Bug 781078 (SOA-3567) - ModeShape federation connector blocks when underlying connector is mis-configured
Summary: ModeShape federation connector blocks when underlying connector is mis-config...
Keywords:
Status: CLOSED NOTABUG
Alias: SOA-3567
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.2.0.ER6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-09 07:02 UTC by Jiri Pechanec
Modified: 2011-11-15 17:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-15 17:48:12 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker MODE-1301 0 None None None Never
Red Hat Issue Tracker SOA-3567 0 None None None Never

Description Jiri Pechanec 2011-11-09 07:02:47 UTC
project_key: SOA

I have three sources defined, two using file connector and one using federated connector.
<mode:source jcr:name="test-file-federated1" mode:classname="org.modeshape.connector.filesystem.FileSystemSource" mode:creatingWorkspaceAllowed="true" mode:retryLimit="3" mode:defaultWorkspaceName="federated" mode:updatesAllowed="true" mode:workspaceRootPath="/home/jpechane/workspace/SOATests/tests/modeshape/build/test-repositories/federated1"/>
<mode:source jcr:name="test-file-federated2" mode:classname="org.modeshape.connector.filesystem.FileSystemSource" mode:creatingWorkspaceAllowed="true" mode:retryLimit="3" mode:defaultWorkspaceName="federated" mode:updatesAllowed="true" mode:workspaceRootPath="/home/jpechane/workspace/SOATests/tests/modeshape/build/test-repositories/federated2"/>
<mode:source jcr:name="test-federated" mode:classname="org.modeshape.graph.connector.federation.FederatedRepositorySource" mode:defaultWorkspaceName="default">
<mode:workspaces>
<mode:workspace jcr:name="default">
<mode:projections>
<mode:projection jcr:name="File 1" mode:source="test-file-federated1" mode:workspaceName="federated">
<mode:projectionRules>/source1/fed =&gt; /federated</mode:projectionRules>
</mode:projection>
<mode:projection jcr:name="File 2" mode:source="test-file-federated2" mode:workspaceName="federated">
<mode:projectionRules>/source2/fed =&gt; /</mode:projectionRules>
</mode:projection>
</mode:projections>
</mode:workspace>
</mode:workspaces>
</mode:source>

The setup works well and the repository can be browsed.

I removed the directories of one of the file connectors to simulate misconfiguration.

I tried to access one of the file repositories and I got proper exception
javax.jcr.RepositoryException: Error starting the "test-file-federated1" repository (check the configuration): The path "/home/jpechane/workspace/SOATests/tests/modeshape/build/test-repositories/federated1" for the predefined workspace for the file system source "test-file-federated1" does not represent an existing directory
        at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:911)
        at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:883)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.IllegalStateException: The path "/home/jpechane/workspace/SOATests/tests/modeshape/build/test-repositories/federated1" for the predefined workspace for the file system source "test-file-federated1" does not represent an existing directory
        at org.modeshape.connector.filesystem.FileSystemRepository.initialize(FileSystemRepository.java:80)
        at org.modeshape.connector.filesystem.FileSystemRepository.<init>(FileSystemRepository.java:66)
        at org.modeshape.connector.filesystem.FileSystemSource.getConnection(FileSystemSource.java:806)
        at org.modeshape.graph.connector.RepositoryConnectionPool.newWrappedConnection(RepositoryConnectionPool.java:980)
        at org.modeshape.graph.connector.RepositoryConnectionPool.getConnection(RepositoryConnectionPool.java:831)
        at org.modeshape.repository.RepositoryLibrary.createConnection(RepositoryLibrary.java:566)
        at org.modeshape.graph.Graph.execute(Graph.java:283)
        at org.modeshape.graph.Graph$5.process(Graph.java:231)
        at org.modeshape.graph.request.RequestBuilder.verifyWorkspace(RequestBuilder.java:75)
        at org.modeshape.graph.Graph.useWorkspace(Graph.java:382)
        at org.modeshape.graph.Graph.getCurrentWorkspace(Graph.java:357)
        at org.modeshape.graph.Graph.getCurrentWorkspaceName(Graph.java:342)
        at org.modeshape.jcr.JcrRepository.<init>(JcrRepository.java:836)
        at org.modeshape.jcr.JcrEngine.doCreateJcrRepository(JcrEngine.java:607)
        at org.modeshape.jcr.JcrEngine$RepositoryInitializer.call(JcrEngine.java:900)
        ... 6 more


But if I tried to acess federated repository then I did not receive any exception and the test hangs after writing this messages
   [testng] Retrieving standalone repository: test-federated
   [testng] SLF4J: Class path contains multiple SLF4J bindings.
   [testng] SLF4J: Found binding in [jar:file:/home/jpechane/workspace/SOATests/tests/lib/jackrabbit-standalone-2.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [testng] SLF4J: Found binding in [jar:file:/home/jpechane/releases/52ER6AS/seam/lib/slf4j-log4j.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [testng] SLF4J: Found binding in [jar:file:/home/jpechane/releases/52ER6AS/seam/lib/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [testng] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
   [testng] 07:59:45,037 INFO  [RepositoryQueryManager] Started rebuilding indexes for repository 'test-federated'

Federation connector shold be able to detect the misconfiguration and fail gracefully.

Comment 1 Jiri Pechanec 2011-11-09 12:42:49 UTC
It seems that the same behaviour happens if I call session.save() and I am writing to a part of tree that does not contain any configured store.

Comment 2 Van Halbert 2011-11-09 13:05:33 UTC
Link: Added: This issue Cloned to SOA-3568


Comment 4 Van Halbert 2011-11-11 04:57:13 UTC
Since the federation connector is being removed in ModeShape 3.0, which will be SOA 6, this issue will not be fixed.


Note You need to log in before you can comment on or make changes to this bug.