[jboss-user] [JBoss Cache: Core Edition] - Problem with transaction (jbossts) configuration in Tomcat
jreeman
do-not-reply at jboss.com
Thu Jul 10 07:27:09 EDT 2008
Hello all,
I have a problem of configuration with jboss cache :
My code is just that :
String value = String.valueOf(random.nextInt());
| Fqn<String> testFqn = Fqn.fromString("/my/tests");
| Node<String, String> rootNode = cache.getRoot();
|
| Node<String, String> testNode = rootNode.addChild(testFqn);
|
And I have the following error :
anonymous wrote : org.jboss.cache.CacheException: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:135)
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:64)
| at org.jboss.cache.invocation.CacheInvocationDelegate.getNode(CacheInvocationDelegate.java:434)
| at org.jboss.cache.invocation.NodeInvocationDelegate.getChild(NodeInvocationDelegate.java:331)
| at org.jboss.cache.invocation.NodeInvocationDelegate.addChild(NodeInvocationDelegate.java:293)
| ...
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple.getTransaction(TransactionManagerImple.java:53)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.getTransaction(InvocationContextInterceptor.java:135)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:46)
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:123)
| ... 20 more
|
| java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
|
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
|
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.cache.CacheException: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:135)
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:64)
| at org.jboss.cache.invocation.CacheInvocationDelegate.getNode(CacheInvocationDelegate.java:434)
| at org.jboss.cache.invocation.NodeInvocationDelegate.getChild(NodeInvocationDelegate.java:331)
| at org.jboss.cache.invocation.NodeInvocationDelegate.addChild(NodeInvocationDelegate.java:293)
| at
|
| ... 13 more
| Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple.getTransaction(TransactionManagerImple.java:53)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.getTransaction(InvocationContextInterceptor.java:135)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:46)
| at org.jboss.cache.invocation.AbstractInvocationDelegate.invoke(AbstractInvocationDelegate.java:123)
| ... 20 more
|
The class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple is in the tomcat class path.
In fact, I have put all the jboss libraries in the web-inf/lib directory of my web app:
jta-1.0.1B.jar
| jgroups-2.6.2.jar
| jbossts-common-4.3.0.GA.jar
| jbossjta-4.3.0.GA.jar
| jboss-javaee-5.0.0.Beta3.jar
| jboss-common-logging-spi-2.0.4.GA.jar
| jboss-common-core-2.2.3.GA.jar
| jbosscache-core-2.1.1.GA.jar
My jboss cache config is :
| <?xml version="1.0" encoding="UTF-8"?>
|
|
| <server>
|
| <!-- Note the value of the 'code' attribute has changed since JBC 1.x -->
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
|
| <!-- Ensure JNDI and the TransactionManager are started before the
| cache. Only works inside JBoss AS; ignored otherwise -->
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <!-- Configure the TransactionManager -->
| <attribute name="TransactionManagerLookupClass">mypackage.TxManagerLookup</attribute>
|
| <!-- Node locking level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE -->
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <!-- Lock parent before doing node additions/removes -->
| <attribute name="LockParentForChildInsertRemove">true</attribute>
|
| <!-- Valid modes are LOCAL (default)
| REPL_ASYNC
| REPL_SYNC
| INVALIDATION_ASYNC
| INVALIDATION_SYNC -->
| <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
|
| <!-- Name of cluster. Needs to be the same for all JBoss Cache nodes in a
| cluster in order to find each other.
| -->
|
| <attribute name="ClusterName">Controllers-Cluster</attribute>
| <!--Uncomment next three statements to use the JGroups multiplexer.
| This configuration is dependent on the JGroups multiplexer being
| registered in an MBean server such as JBossAS. This type of
| dependency injection only works in the AS; outside it's up to
| your code to inject a ChannelFactory if you want to use one.
| -->
|
| <!--
| <depends optional-attribute-name="MultiplexerService"
| proxy-type="attribute">jgroups.mux:name=Multiplexer</depends>
|
| <attribute name="MultiplexerStack">tcp</attribute>
| -->
|
| <!-- JGroups protocol stack properties.
| ClusterConfig isn't used if the multiplexer is enabled above.
| -->
| <attribute name="ClusterConfig">
| <config>
| <!-- UDP: if you have a multihomed machine, set the bind_addr
| attribute to the appropriate NIC IP address -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true -->
|
| <UDP mcast_addr="228.1.2.3" mcast_port="48866"
| ip_ttl="64" ip_mcast="true" mcast_send_buf_size="150000"
| mcast_recv_buf_size="80000" ucast_send_buf_size="150000"
| ucast_recv_buf_size="80000" loopback="false" />
|
| <PING timeout="2000" num_initial_members="2" />
|
| <MERGE2 min_interval="10000" max_interval="20000" />
|
| <FD shun="true" />
|
| <FD_SOCK />
|
| <VERIFY_SUSPECT timeout="1500" />
|
| <pbcast.NAKACK gc_lag="50"
| retransmit_timeout="600,1200,2400,4800" />
|
| <UNICAST timeout="600,1200,2400,4800" />
|
| <pbcast.STABLE desired_avg_gossip="400000" />
|
| <FC max_credits="2000000" min_threshold="0.10" />
|
| <FRAG2 frag_size="8192" />
|
| <pbcast.GMS join_timeout="5000" shun="true"
| print_local_addr="true" />
|
| <pbcast.STATE_TRANSFER />
| </config>
| </attribute>
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
|
| <attribute name="StateRetrievalTimeout">20000</attribute>
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.
| -->
|
| <attribute name="SyncReplTimeout">20000</attribute>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisitionTimeout">15000</attribute>
|
| <!-- Shutdown hook behavior. Valid choices are: DEFAULT, REGISTER and DONT_REGISTER.
| If this element is omitted, DEFAULT is used. -->
| <attribute name="ShutdownHookBehavior">DEFAULT</attribute>
|
| <!-- Enables or disables lazy unmarshalling. If omitted, the default is that lazy unmarshalling is enabled. -->
| <attribute name="UseLazyDeserialization">true</attribute>
|
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- This defaults to 200000 if not specified -->
| <attribute name="eventQueueSize">200000</attribute>
| <attribute name="policyClass">org.jboss.cache.eviction.ExpirationPolicy</attribute>
|
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">5000</attribute>
| <attribute name="timeToLiveSeconds">1000</attribute>
| </region>
|
| <region name="/org/jboss/data">
| <attribute name="maxNodes">5000</attribute>
| <attribute name="timeToLiveSeconds">1000</attribute>
| </region>
|
| <region name="/org/jboss/test/data">
| <attribute name="maxNodes">5</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
|
| <region name="/test">
| <attribute name="maxNodes">10000</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
|
| <region name="/maxAgeTest">
| <attribute name="maxNodes">10000</attribute>
| <attribute name="timeToLiveSeconds">8</attribute>
| <attribute name="maxAgeSeconds">10</attribute>
| </region>
| </config>
| </attribute>
| </mbean>
| </server>
my lookup class * just returns a transaction manager like this :
public class TxManagerLookup implements org.jboss.cache.transaction.TransactionManagerLookup {
| /**
| * {@inheritDoc}
| */
| @Override
| public TransactionManager getTransactionManager() throws ConfigurationException {
| return com.arjuna.ats.jta.TransactionManager.transactionManager();
| }
| }
Could you explain to me how I can fix my problems and what I did wrong with this configuration/code ?
Thx
------
* Before I tried to use the class org.jboss.cache.GenericTransactionManagerLookup but I had this error :
ERROR [org.jboss.cache.transaction.DummyTransactionManager] - binding of DummyTransactionManager failed
javax.naming.NamingException: Le Contexte est en lecture seule
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163552#4163552
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163552
More information about the jboss-user
mailing list