[JBoss Messaging] - Class Loader Issue using ObjectMessage
by jhd
I've read through several posts that describe the problem I am running into. One of those posts indicates this problem was fixed but I still have the same problem.
Environment:
Jboss 4.2.2 GA
Jboss Messaging 1.4.0 SP3
Java 1.5.0_06
Problem:
I have two JMS clients, a MDB running inside Jboss AS and a stand-alone Java client. Both clients receive an ObjectMessage. The MDB implementation works as expected. The Java client fails on ObjectMessage.getObject() with the following stack trace:
org.jboss.messaging.util.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:65)\r\n\tat java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)\r\n\tat java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)\r\n\tat java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)\r\n\tat java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)\r\n\tat java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)\r\n\tat org.jboss.messaging.util.StreamUtils.readObject(StreamUtils.java:154)\r\n\tat org.jboss.messaging.core.impl.message.MessageSupport.getPayload(MessageSupport.java:246)\r\n\tat org.jboss.jms.message.JBossObjectMessage.getObject(JBossObjectMessage.java:125)\r\n\tat org.jboss.jms.message.ObjectMessageProxy.getObject(ObjectMessageProxy.java:64)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n\tat java.lang.reflect.Method.invoke(Method.java:585)\r\n\tat com.jnbridge.jnbcore.JNBDispatcher.objectVirtualCall(Unknown Source)\r\n\tat com.jnbridge.jnbcore.JNBDispatcher.call(Unknown Source)\r\n\tat com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.a(Unknown Source)\r\n\tat com.jnbridge.jnbcore.server.sharedmem.SharedMemRequestHandler.handleRequest(Unknown Source)\r\n" string
If I change my stand-alone Java client to receive a TextMessage it works fine.
I read through the following posts:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=101710
http://jira.jboss.org/jira/browse/JBMESSAGING-924
http://jboss.com/index.html?module=bb&op=viewtopic&p=4028694
It would seem this issue was resolved in Jboss Messaging 1.2.0 SP1. So why am I having the same problem?
If I insert the following code inside onMessage() it works but according to the posts above I shouldn't have to do this:
java.lang.Class c=java.lang.Class.forName("org.twia.jms.SimpleObjectMessage");
| java.lang.Thread.currentThread().setContextClassLoader(c.getClassLoader());
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159652#4159652
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159652
17 years, 10 months
[Clustering/JBoss] - Cluster Deployment: farming
by sankul123
Need some clear[simple :)] clarifications[please]-
1.Farming service-
When we say farming service , I believe that I need not worry about keeping the application context synch in cluster.
For ex: we have some feature to upload files.
So in a cluster with N1,N2,N3 and if file upload request is served by N1 node, the uploaded file on N1 is also replicated on nodes N2,N3 .
Please clarify this if I my understanding is wrong.
2.Farming deployment
If I hot-deploy the application
archive file (the EAR) in the all/farm/ directory of any of the cluster member
and the application is automatically duplicated across all nodes in the same cluster. In our application we have features to upload files[these are ETL related job files] to server.
For now I am deploying the application ear in server type default/deploy, what I observe is that the ear is exploded every time I start/restart my jboss server.I am not able to see the files uploaded files after restart of Jboss as ear file gets exploded to new tmp folder? If this is the behaviour then people are going to kill me if the ear is exploded every time, lots of configurations in properties file will be lost. The solution that was proposed to me for this is to deploy application as exploded directory - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=137796
Now what I see from cluster doc is that farming service is only supported if hot deployed as ear archive? Will my files uploaded[through upload file feature,which are not part of ear archive] , or any configuration done to my properties file be lost on restart of cluster?
Above all I am sorry for this big post ,but could not help as I did not get clear clarification from many other JBoss cluster GURU's :).
Sandeep
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159650#4159650
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159650
17 years, 10 months
[JBoss jBPM] - MySQL backend
by RichardC
Hello:
I followed the steps outlined in the following wiki documents for changing the backend to use the MySQL database:
http://wiki.jboss.org/wiki/SetUpMysqlAsDefaultDS
http://wiki.jboss.org/wiki/SetUpAMysqlDatasource
I then added some users, groups, and memberships based on the script I stole from here:
http://blogs.dfwikilabs.org/pigui/files/2007/11/mysqlidentityscriptjbpm32...
After restarting the server, I can log into the jbpm-console with a username & password added to the MySQL database. I am also able to add new groups and users through the jbpm-console. However, I am no longer able to deploy process definitions through the jbpm-console or the gpd.
Looking at the server log, I see the following:
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.transaction.JDBCTransaction] current autocommit status: true
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.transaction.JDBCTransaction] disabling autocommit
| 2008-06-20 13:36:03,397 DEBUG [org.jbpm.persistence.db.DbPersistenceService] begun hibernate transaction org.hibernate.transaction.JDBCTransaction@69bdf8
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.SQL] select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() prototypeone -> name [2]
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2008-06-20 13:36:03,397 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
| com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCR' at line 1
|
>From the looks of it, it may be executing an sql statement that is invalid in MySQL as "SELECT TOP ? col1, col2 FROM tablename WHERE col1 = 'value2'" is invalid in MySQL where as the MySQL equivalent should be "SELECT col1, col2 FROM tablename WHERE col1 = 'value2' LIMIT ?".
I also notice during startup of the JBoss AS, i see the following log info:
| 13:58:20,085 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
| State: CONFIGURED
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=DefaultDS
|
| ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
| State: CONFIGURED
| I Depend On:
| jboss.mq:service=Invoker
| jboss.web:service=WebServer
|
| <more like above and below cut out for brevity>
|
| ObjectName: jboss.mq:service=PersistenceManager
| State: CONFIGURED
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=DefaultDS
| Depends On Me:
| jboss.mq:service=DestinationManager
|
| ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
| State: CONFIGURED
| I Depend On:
| jboss.mq:service=Invoker
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
| State: NOTYETINSTALLED
| Depends On Me:
| jboss.ejb:service=EJBTimerService,persistencePolicy=database
| jboss:service=KeyGeneratorFactory,type=HiLo
| jboss.mq:service=StateManager
| jboss.mq:service=PersistenceManager
|
If someone out there could provide ideas on why the mbean is not being installed/configured that would be much appreciated. Thank you for your time.
Regards,
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159646#4159646
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159646
17 years, 10 months