[Messaging, JMS & JBossMQ] - Sonic JCA Resource Adapter Wait for Available Session Ended
by vimalm
Hi
We are using JBOSS 4.0.4GA along with Sonic JCA Resource adapter. I have a MDB deployed on JBOSS which listens on a Topic on Sonic ESB. Under heavy load on this topic, my MDB appears to turn deaf after processing 10000 or so messages on this topic. I see in the server.log messages like one shown below:
| 2006-12-22 02:43:48,433 DEBUG [Sonic Resource Adapter for JCA] SonicServerSessionPool.getServerSession() SessionMessageProcessor (34) 1: TopicSubscriber msg handler, $CC$$TS$wait for available session
|
| 2006-12-22 02:43:48,525 DEBUG [Sonic Resource Adapter for JCA] SonicServerSessionPool.getServerSession() SessionMessageProcessor (27) 1: TopicSubscriber msg handler, $CC$$TS$ wait for available session ended
|
This phenomenan is fairly reproducible. I wrote a stand along java code, which will publish about 21000 messages on the topic by reading stuff from a file. This program takes about 5 minutes to dump these 21000 messages on the topic.
Structure of this client program is fairly standard and simple. Given below in case you are interested to have a look.
| InitialContext ctx = new InitialContext(properties);
| ConnectionFactory connectionFactory = (ConnectionFactory) client.lookup(ctx, "ConnectionFactory");
| javax.jms.Connection connection = connectionFactory.createConnection();
| javax.jms.Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
| Topic tp = session.createTopic("TopicName");
| MessageProducer messageProducer = session.createProducer(tp);
| BufferedReader in = new BufferedReader(new FileReader("data.txt"));
| String str = null;
| while((str = in.readLine()) !=null) {
| TextMessage message = session.createTextMessage(str);
| messageProducer.send(message, DeliveryMode.PERSISTENT, 4, 5400000);
| System.out.println("Published message");
| }
| // Do stuff to close BufferedReader, MessageProducer, Session and Connection and in that order
|
Now my MDB takes about 300 ms on an average to process the message. This involves updating about 10 tables on an Oracle database using a local-tx datasource.
Here is the ejb-jar.xml for the MDB
| <enterprise-beans>
| <message-driven>
| <ejb-name>SomeMDB</ejb-name>
| <ejb-class>mypackage.SomeMDB</ejb-class>
| <messaging-type>javax.jms.MessageListener</messaging-type>
| <transaction-type>Bean</transaction-type>
| <activation-config>
| <activation-config-property>
| <activation-config-property-name>destinationType</activation-config-property-name>
| <activation-config-property-value>javax.jms.Topic</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>destination</activation-config-property-name>
| <activation-config-property-value>[[sharedsub]]TopicName</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>subscriptionDurability</activation-config-property-name>
| <activation-config-property-value>Durable</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>subscriptionName</activation-config-property-name>
| <activation-config-property-value>SomeMDBDurableSub</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>clientID</activation-config-property-name>
| <activation-config-property-value>SomeMDB</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>reconnectTimeout</activation-config-property-name>
| <activation-config-property-value>5</activation-config-property-value>
| </activation-config-property>
| </activation-config>
| </message-driven>
| </enterprise-beans>
|
| <!-- Assembly Descriptor -->
| <assembly-descriptor>
| <container-transaction>
| <method>
| <ejb-name>SomeMDB</ejb-name>
| <method-name>*</method-name>
| </method>
| <trans-attribute>NotSupported</trans-attribute>
| </container-transaction>
|
| </assembly-descriptor>
|
Here is the code for MDB
| public void onMessage(Message message) {
| TextMessage txtMess = (TextMessage)message;
| Connection con = null;
| try {
| String xml = txtMess.getText();
| log.debug("SomeMDB|onMessage|Message Driven Bean Got Message: " + xml);
| InitialContext ctx = new InitialContext();
| DataSource ds = (DataSource) ctx.lookup("java:jdbc/MyDataSource");
| con = ds.getConnection();
| con.setAutoCommit(false);
| dp = new DataProcessor(con);
| dp.process(xml); // Process message to take about 150 ms
| con.commit();
| } catch(Throwable e) {
| log.error("Caught Throwable " + e.getMessage() , e);
| try {
| con.rollback();
| } catch(Throwable t) {
| log.error("CAn't rollback" , t);
| }
| } finally {
| try {
| con.close();
| } catch(SQLException e1) {
| log.error("Can't close connection " , e1);
| }
| }
| }
|
The echo message in SomeMDB stops appearing the log after processing about 10000 messages.
I have tried a lot of permutations. Some of them being:
1. Instead of using Bean managed transaction with notsupported transactiontype, use a CM transaction with Required transaction type. That causes another type of problem because Sonic JCA adapter appears to start a XA transaction and I was using the local-tx for oracle. I got a series of about 5 transaction time out. Further messages did not get processed.
2. I tried a CM Transaction with Required Transaction Type with Oracle XA transaction which dropped messages too. But I did not get any more transaction time out. The error message was the same as shown near the top.
3. I started off with my client doing a producer.send(textmessage) and my MDB not being durable which did not work too.
Here is what works and is very weird.
In my publisher code, I add a delay of 300 ms between the messages produced by doing a Thread.sleep(300). My MDB now seems to respond well and consume all the message.
Per SonicMQ documentation, if the publisher is publishing PERSISTENT messages and MDB is durable that will gurantee message delivery. But it does not appear so. I crashed my container after my MDB stopped listening and restarted it in the hope that it will pick up the message. But my MDB did not pick up the message.
Durable subscription works and I have tested it. So there should not be a problem with activation config.
We probably can't ask the publisher in a production like environment to add this delay between the messages so that we can consume them because they run several production jobs sequentially and by adding this delay there entire job processing time will be increased by 1.5 hours or so.
Does any one have run into this problem? Any help will be appreciated.
I have searched into the forum and have read the issue with concurrent.jar etc. That should not be a problem because we are using such a newer version of JBoss.
Any thoughts will be appreciated. I am going to try to add the Jboss MQ trace level logging to see if that gives me any more explanation.
Happy new year.
Vimal
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996887#3996887
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996887
17 years, 8 months
[EJB 3.0] - Exception thrown on EJB3.0_RC9_Patch1 and JBoss-4.0.5.GA
by gus888
Hi all,
I unziped Jboss-4.0.5.GA, and run ant for EJB3.0_RC9_Patch1. It looks everything was successful, but when I run Jboss server, I got the following exceptions. Anybody can give me some guidance? Thank you in advance.
10:59:07,937 ERROR [MainDeployer] Could not create deployment: file:/C:/Tomcat/jboss-4.0.5.GA/server/default/deploy/ejb3-clustered-sfsbcache-service.xml
| org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.reflect.UndeclaredThrowableException
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:236)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| ... 81 more
| Caused by: java.lang.NoClassDefFoundError: org/jboss/cache/TreeCache
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
| at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
| at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
| at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:190)
| at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
| at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:517)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1204)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| ... 83 more
| 10:59:08,390 ERROR [MainDeployer] Could not create deployment: file:/C:/Tomcat/jboss-4.0.5.GA/server/default/deploy/ejb3-entity-cache-service.xml
| org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.cache.TreeCache; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.j
| che)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.cache.TreeCache
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1204)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| ... 79 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996884#3996884
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996884
17 years, 8 months
[JBoss Seam] - Fields of Seam-managed-component are loosing values
by Falchor
Hi there,
I ran into a strange problem:
What I'm trying to do is:
An action is called on conversation-component 'A'. All fields are perfectly injected and carry the right values.
Now I'm calling a method in conversation-component 'B' from the action-method in component 'A' (not directly, happens through observer-pattern).
Bean 'B' has a field, where an instance of Bean 'A' is injected - works correct, too.
The method in Bean 'B' calls a method in Bean 'A' - still works correct.
But: When Bean 'B' returns from the method-call and I'm back in Bean 'A' again, all the seam-managed-fields in Bean 'A' are set to null suddenly.
How is that possible? It's still the same object, just the fields are empty.. Any suggestions?
Thank you so much for an answer, I'm down on the floor ;)
greets,
-clem
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996882#3996882
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996882
17 years, 8 months
[Beginners Corner] - URLClassLoader loadClass() throws NoClassDefFoundError for S
by infoiasi_m
I am trying to use URLClassLoader class tor retrieve information about a class in the local file system, using the version 4.0.5 of the JBoss application server.
I have a business function in a session bean class in which i do this:
| String classPathString = path;
| File classPath = new File(classPathString);
| File[] files = classPath.listFiles();
|
| try {
| URLClassLoader classLoader;
| Thread.currentThread().setContextClassLoader(
| classLoader = new URLClassLoader(
| new URL[] {files[0].toURL()}
| )
| );
| Class c = classLoader.loadClass("classbro.ejb.JClassBroBean");
| return c.getName();
| } catch(ClassNotFoundException e) {
| return "Class not found.";
| } catch(MalformedURLException e) {
| return "Malformed URL.";
| }
|
The call of loadClass throws a NoClassDefFoundError for javax/ejb/SessionBean, which I cannot understand. The class which I put there exists and it is found, because I tested this. How could I fix this problem?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996881#3996881
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996881
17 years, 8 months
[JBossCache] - Replication vs. Invalidation and Configuration
by fabrefactor
Hi JBossCache folks.
We have a number of use cases where we need to maintain state across application servers. Specifically, one application in one cluster may need to save a conversation before redirecting to another application in yet another cluster.
So, the use case is:
* App 1 stores data in the cache
* App 1 redirects to App 2 (via HTTP forward)
* App 2 removes the stored data from the cache
We have had the following problems:
1. We cannot use IP multicast or UDP to let the caches communicate. The only way I have found to get them to discover one another is through the use of TCPPING.
2. It seems as though *sometimes* App 2 cannot find the node in the cache region after redirect, but sometimes it can. The problem is hard to reproduce, as if the App 2 cache joins the App 1 cache for the first time, it works fine, but if the membership was already established, the data is not replicated to App 2. I assume this is because ClusteredCacheLoader fetches the state only on first join.
It would seem as though we need to use synchronous replication rather than invalidation, but the manual seems to advise against that if at all possible.
So I have no idea how to change the configuration to fulfill the use case.
I'll note that we're running under WebSphere 6 and instantiating the conversation cache manually. (Not as a server-wide mbean.)
Thanks in advance for any and all assistance.
Here's our configuration.
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
| <!-- ==================================================================== -->
| <!-- Defines TreeCache configuration -->
| <!-- ==================================================================== -->
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.GenericTransactionManagerLookup</attribute>
|
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <attribute name="CacheMode">INVALIDATION_SYNC</attribute>
|
| <attribute name="UseReplQueue">false</attribute>
|
| <attribute name="ReplQueueInterval">0</attribute>
|
| <attribute name="ReplQueueMaxElements">0</attribute>
|
| <attribute name="ClusterName">onversationCache</attribute>
|
| <attribute name="ClusterConfig">
| <config>
| <TCP start_port="7800" loopback="true" />
| <TCPPING initial_hosts="localhost[7800],was01[7800],was02[7800],was03[7800],was04[7800],was05[7800],was06[7800],was07[7800],was08[7800]" port_range="20" timeout="3500" num_initial_members="3" up_thread="true" down_thread="true" />
| <MERGE2 min_interval="5000" max_interval="10000" />
| <FD shun="true" timeout="2500" max_tries="5" up_thread="true" down_thread="true" />
| <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" />
| <pbcast.NAKACK down_thread="true" up_thread="true" gc_lag="100" retransmit_timeout="3000" />
| <pbcast.STABLE desired_avg_gossip="20000" down_thread="false" up_thread="false" />
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="false" print_local_addr="true" down_thread="true" up_thread="true" />
| <pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />
| </config>
| </attribute>
| <attribute name="CacheLoaderConfiguration">
| <config>
| <cacheloader>
| <class>org.jboss.cache.loader.ClusteredCacheLoader</class>
| <properties>timeout=3000</properties>
| </cacheloader>
| </config>
| </attribute>
|
| <attribute name="FetchInMemoryState">true</attribute>
|
| <attribute name="InitialStateRetrievalTimeout">15000</attribute>
|
| <attribute name="SyncReplTimeout">15000</attribute>
|
| <attribute name="LockAcquisitionTimeout">10000</attribute>
|
| <attribute name="EvictionPolicyClass" />
|
| <attribute name="UseRegionBasedMarshalling">false</attribute>
| </mbean>
| </server>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996880#3996880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996880
17 years, 8 months
[EJB/JBoss] - org.jboss.tm.JBossRollbackException
by Guy007
I have a stateless session bean which accesses an EJB3 entity. When I use entitymanager.find() it works fine, but when i do persist() i get the following error:
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=jupiter/31, BranchQual=, localId=31] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update)
|
|
| java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=jupiter/31, BranchQual=, localId=31] status=STATUS_NO_TRANSACTION; - nested throwable: (javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update) at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198) at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87) at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:275) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at
| etc etc
the method i am calling is:
@TransactionAttribute(TransactionAttributeType.REQUIRES_
| public String mymethod() {
| ...
| entitymanager.persist(mybean);
| }
where mybean is as follows:
anonymous wrote :
| public class Mybean implements Serializable {
|
| @Id
| @Column (unique=true, nullable=false, length=32)
| private String name;
|
| public MyBean() {...}
|
| ..........
|
any ideas why! it is driving me insane!
i have been working on it for a week now... no success!
thanks guys!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996878#3996878
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996878
17 years, 8 months