i use the jalapeno and want to test the example code(Person and Address).I configured Person and Address in jboss-aop.xml and use the example replSync-service.xml as configuration file. then in my testcase the code is something like: System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.cache.transaction.DummyContextFactory"); DummyTransactionManager.getInstance();
Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.cache.transaction.DummyContextFactory"); UserTransaction tx = (UserTransaction) new InitialContext(prop).lookup("UserTransaction"); PojoCache tree = new PojoCache(); PropertyConfigurator config = new PropertyConfigurator(); config.configure(tree,".\\jboss-cache\\etc\\META-INF\\replSync-service.xml"); Person joe = new Person(); joe.setName("Joe Black"); joe.setAge(31); Address addr = new Address(); addr.setCity("Sunnyvale"); addr.setStreet("123 Albert Ave"); addr.setZip(94086); joe.setAddress(addr); tree.startService(); tree.putObject("/aop/joe", joe); And i run my junit-testcase and get following exceptions: 2006-07-06 17:11:03,660 [main] INFO org.jboss.cache.TreeCache - parseConfig(): PojoCacheConfig is empty 2006-07-06 17:11:03,801 [main] ERROR org.jboss.cache.transaction.DummyTransaction - beforeCompletion() failed for [EMAIL PROTECTED], handlers=[TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction:<10.1.18.140:3348>:1, [EMAIL PROTECTED])] java.lang.RuntimeException: at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1083) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75) at org.jboss.cache.transaction.DummyTransaction.notifyBeforeCompletion(DummyTransaction.java:247) at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:54) at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:61) at org.jboss.cache.aop.PojoCache.endTransaction(PojoCache.java:693) at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:483) at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:422) at com.cycos.jcl.message.TestCache.testPlainCache(TestCache.java:160) 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:324) 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.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737) at java.io.ObjectInputStream.(ObjectInputStream.java:253) at org.jboss.invocation.MarshalledValueInputStream.(MarshalledValueInputStream.java:60) at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:176) at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:232) at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:604) at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:504) at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:327) at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:701) at org.jgroups.JChannel.up(JChannel.java:1049) at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:376) at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:392) at org.jgroups.stack.Protocol.passUp(Protocol.java:538) at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:137) at org.jgroups.stack.UpHandler.run(Protocol.java:59) 2006-07-06 17:11:03,801 [main] ERROR org.jboss.cache.transaction.DummyTransaction - afterCompletion() failed for [EMAIL PROTECTED] java.lang.NullPointerException at org.jboss.cache.aop.PojoTxSynchronizationHandler.runRollbackPhase(PojoTxSynchronizationHandler.java:66) at org.jboss.cache.aop.PojoTxSynchronizationHandler.afterCompletion(PojoTxSynchronizationHandler.java:50) at org.jboss.cache.transaction.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:270) at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:64) at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:61) at org.jboss.cache.aop.PojoCache.endTransaction(PojoCache.java:693) at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:483) at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:422) at com.cycos.jcl.message.TestCache.testPlainCache(TestCache.java:160) 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:324) 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.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) 2006-07-06 17:11:03,816 [main] WARN org.jboss.cache.TreeCache - PojoCache.endTransaction(): rolling back transaction with exception: javax.transaction.RollbackException: outcome is false status: 1 So i can not put one complex object in the cache.Please help me! Thanks! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955898#3955898 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955898 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user