after I added these line of codes in the Catch clause: 
        System.out.println(CustomMessageBean.class.getClassLoader().toString() 
+ " - " + 
CustomMessageBean.class.getProtectionDomain().getCodeSource().getLocation().toString());
  |     System.out.println(mailBeanJMS.getClass().getClassLoader().toString() + 
" - " + 
mailBeanJMS.getClass().getProtectionDomain().getCodeSource().getLocation().toString());

mailBeanJMS is an object of CustomMessageBean type
I get new error: 
17:59:05,623 INFO  [STDOUT] ERROR.  : java.lang.ClassCastException: 
mail.CustomMessageBean
  | 17:59:05,624 INFO  [WebappClassLoader] Illegal access: this web application 
instance has been stopped already.  Could not load 
java.security.ProtectionDomain.  The eventual following stack trace is caused 
by an error thrown for debugging purposes as well as to attempt to terminate 
the thread which caused the illegal access, and has no functional impact.
  | java.lang.IllegalStateException
  |         at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
  |         at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
  |         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  |         at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:148)
  |         at 
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
  |         at 
org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
  |         at 
org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
  |         at 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
  |         at java.lang.Thread.run(Thread.java:595)
  | 
  | 17:59:05,631 INFO  [STDOUT] WebappClassLoader
  |   delegate: false
  |   repositories:
  |  - 
file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
  | 17:59:05,633 ERROR [ClientConsumer] RuntimeException was thrown from 
onMessage, 139265 will be redelivered
  | java.lang.NullPointerException
  |         at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
  |         at 
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
  |         at 
org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
  |         at 
org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
  |         at 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
  |         at java.lang.Thread.run(Thread.java:595)
  | 
  | 17:59:05,645 INFO  [STDOUT] ERROR.  : java.lang.ClassCastException: 
mail.CustomMessageBean
  | 17:59:05,646 INFO  [STDOUT] WebappClassLoader
  |   delegate: false
  |   repositories:
  |  - 
file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
  | 17:59:05,647 ERROR [ClientConsumer] RuntimeException was thrown from 
onMessage, 139265 will be redelivered
  | java.lang.NullPointerException
  |         at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
  |         at 
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
  |         at 
org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
  |         at 
org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
  |         at 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
  |         at java.lang.Thread.run(Thread.java:595)
  | 17:59:05,649 INFO  [STDOUT] onMessage at JMS Receiver
  | 17:59:05,652 INFO  [STDOUT] ERROR.  : java.lang.ClassCastException: 
mail.CustomMessageBean
  | 17:59:05,653 INFO  [STDOUT] WebappClassLoader
  |   delegate: false
  |   repositories:
  |  - 
file:/export/home/JBoss/jboss-eap-4.3/jboss-as/server/default/deploy/webapps.war/WEB-INF/classes/mail/CustomMessageBean.class
  | 17:59:05,654 ERROR [ClientConsumer] RuntimeException was thrown from 
onMessage, 139265 will be redelivered
  | java.lang.NullPointerException
  |         at mail.AsyncQueueReceiver.onMessage(AsyncQueueReceiver.java:149)
  |         at 
org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:159)
  |         at 
org.jboss.jms.client.container.ClientConsumer$ListenerRunner.run(ClientConsumer.java:976)
  |         at 
org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:99)
  |         at 
EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(QueuedExecutor.java:89)
  |         at java.lang.Thread.run(Thread.java:595)
  | 17:59:05,656 INFO  [STDOUT] onMessage at JMS Receiver

do you know the cause of problem? I did understand the new API clearly

Thank for your help!


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206460#4206460

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206460
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to