[Mulgara-general] problem with Session.modelExists(URI uri)

Edwin Shin eddie at cs.cornell.edu
Thu Nov 22 06:01:28 UTC 2007


I'm seeing another problem with checking for model existence, but only 
with a remote connection. I'm attaching a JUnit test that provokes the 
error.

In particular, it appears to the call to SessionFactory.close() that is 
provoking the error:

org.mulgara.query.QueryException: Failed to determine model existence
	at org.mulgara.resolver.DatabaseSession.execute(DatabaseSession.java:634)
	at 
org.mulgara.resolver.DatabaseSession.modelExists(DatabaseSession.java:431)
	at 
org.mulgara.resolver.LocalJRDFDatabaseSession.modelExists(LocalJRDFDatabaseSession.java:75)
	at 
org.mulgara.server.rmi.SessionWrapperRemoteSession.modelExists(SessionWrapperRemoteSession.java:331)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
	at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
	at 
org.mulgara.server.rmi.RemoteJRDFSessionImpl_Stub.modelExists(Unknown 
Source)
	at 
org.mulgara.server.rmi.RemoteSessionWrapperSession.modelExists(RemoteSessionWrapperSession.java:424)
	at 
org.trippi.impl.mulgara.ModelExistsTest.testRemote(ModelExistsTest.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.mulgara.query.QueryException: 
org.mulgara.query.MulgaraTransactionException: Transaction rollback 
triggered
	at 
org.mulgara.resolver.MulgaraTransaction.implicitRollback(MulgaraTransaction.java:487)
	at 
org.mulgara.resolver.MulgaraTransaction.activate(MulgaraTransaction.java:145)
	at 
org.mulgara.resolver.MulgaraTransaction.execute(MulgaraTransaction.java:576)
	at org.mulgara.resolver.DatabaseSession.execute(DatabaseSession.java:631)
	at 
org.mulgara.resolver.DatabaseSession.modelExists(DatabaseSession.java:431)
	at 
org.mulgara.resolver.LocalJRDFDatabaseSession.modelExists(LocalJRDFDatabaseSession.java:75)
	at 
org.mulgara.server.rmi.SessionWrapperRemoteSession.modelExists(SessionWrapperRemoteSession.java:331)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.mulgara.query.QueryException: Unable to enlist 
systemResolver:null into transaction
	at 
org.mulgara.resolver.DatabaseOperationContext.initiate(DatabaseOperationContext.java:969)
	at 
org.mulgara.resolver.MulgaraTransaction.activate(MulgaraTransaction.java:143)
	... 19 more
Caused by: java.lang.IllegalStateException: Cannot create read only view 
of uninitialized StringPool.
	at 
org.mulgara.store.stringpool.xa.XAStringPoolImpl$ReadOnlyStringPool.<init>(XAStringPoolImpl.java:1080)
	at 
org.mulgara.store.stringpool.xa.XAStringPoolImpl.newReadOnlyStringPool(XAStringPoolImpl.java:442)
	at 
org.mulgara.resolver.StringPoolSessionFactory.newReadOnlyResolverSession(StringPoolSessionFactory.java:204)
	at 
org.mulgara.resolver.store.StatementStoreResolverFactory.newResolver(StatementStoreResolverFactory.java:227)
	at 
org.mulgara.resolver.DatabaseOperationContext.initiate(DatabaseOperationContext.java:966)
	... 20 more


The testLocal() test is just to make the point that with a local 
connection, there's no problem. However, for testLocal() to succeed you 
will need to have applied the workaround for ModelExistsOperation that 
Paul suggested previously (attached as well). You could also just skip 
testLocal() as it's testRemote() that is exhibiting the problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ModelExistsTest.java
Type: text/x-java
Size: 1823 bytes
Desc: not available
URL: <http://lists.mulgara.org/pipermail/mulgara-general/attachments/20071122/dd4377c2/attachment.java>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ModelExistsOperation.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.mulgara.org/pipermail/mulgara-general/attachments/20071122/dd4377c2/attachment.bin>


More information about the Mulgara-general mailing list