[jboss-user] [JBoss AOP] - netbeans platform RCP application and JMS problem
alexei.zaycev
do-not-reply at jboss.com
Wed Jun 17 01:45:13 EDT 2009
Have a JBoss 5.1.0, with registered topic/TestMQ.
Have a simple test code that puts a test message to the topic.
Have the NetBeans IDE and 2 projects with this code - a simple console and RCP (NetBeans Platform). In both added library from jboss/client.
The first project work successful but the second falls with the exception on createTopicSession ()
code of the RCP project:
| public class Installer extends ModuleInstall {
|
| public static void runTest() {
| TopicConnection conn = null;
| TopicSession session = null;
| Topic topic = null;
| try {
| System.out.println(" 1. set properties");
| Properties props = new Properties();
| props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
| props.setProperty("java.naming.provider.url", "localhost");
| System.out.println(" 2. new InitialContext()");
| Context context = new InitialContext(props);
| System.out.println(" 3. context.lookup()");
| TopicConnectionFactory tcf = (TopicConnectionFactory) context.lookup("ConnectionFactory");
| System.out.println(" 4. createTopicConnection()");
| conn = tcf.createTopicConnection();
| System.out.println(" 5. context.lookup()");
| topic = (Topic) context.lookup("topic/TestMQ");
| System.out.println(" 6. createTopicSession()");
| session = conn.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
| System.out.println(" 7. conn.start()");
| conn.start();
| System.out.println(" 8. session.createPublisher()");
| TopicPublisher send = session.createPublisher(topic);
| System.out.println(" 9. session.createTextMessage()");
| TextMessage tm = session.createTextMessage("Test Message");
| System.out.println("10. send.publish()");
| send.publish(tm);
| System.out.println("11. send.close()");
| send.close();
| System.out.println("12. OK");
| } catch (Exception e) {
| e.printStackTrace();
| }
| }
|
| @Override
| public void restored() {
| runTest();
| }
| }
|
trace
| org.jboss.jms.exception.MessagingJMSException: Failed to invoke
| at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$createSessionDelegate$aop(ClientConnectionDelegate.java:186)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeTarget(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.jms.client.container.StateCreationAspect.handleCreateSessionDelegate(StateCreationAspect.java:122)
| at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateSessionDelegate_27785692.invoke(StateCreationAspect_z_handleCreateSessionDelegate_27785692.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.container.ConnectionAspect.handleCreateSessionDelegate(ConnectionAspect.java:164)
| 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:597)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.createSessionDelegate(ClientConnectionDelegate.java)
| at org.jboss.jms.client.JBossConnection.createSessionInternal(JBossConnection.java:269)
| at org.jboss.jms.client.JBossConnection.createTopicSession(JBossConnection.java:182)
| at ru.lab127.ccenter.client.Installer.runTest(Installer.java:173)
| at ru.lab127.ccenter.client.Installer.restored(Installer.java:216)
| at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:440)
| at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:361)
| at org.netbeans.ModuleManager.enable(ModuleManager.java:917)
| at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:289)
| at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:225)
| at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
| at org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
| at org.netbeans.core.startup.Main.start(Main.java:309)
| at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:111)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.ExceptionInInitializerError
| at org.jboss.jms.wireformat.ConnectionCreateSessionDelegateResponse.read(ConnectionCreateSessionDelegateResponse.java:70)
| at org.jboss.jms.wireformat.JMSWireFormat.read(JMSWireFormat.java:298)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1222)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:426)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
| at org.jboss.remoting.Client.invoke(Client.java:1724)
| at org.jboss.remoting.Client.invoke(Client.java:629)
| at org.jboss.remoting.Client.invoke(Client.java:617)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
| ... 35 more
| Caused by: java.lang.RuntimeException: org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRedeliver_27785692: frozen class (cannot edit)
| at javassist.ClassPool.checkNotFrozen(ClassPool.java:568)
| at javassist.ClassPool.makeClass(ClassPool.java:746)
| at javassist.ClassPool.makeClass(ClassPool.java:731)
| at org.jboss.aop.instrument.TransformerCommon.makeClass(TransformerCommon.java:239)
| at org.jboss.aop.advice.PerVmAdvice.generateInterceptor(PerVmAdvice.java:145)
| at org.jboss.aop.advice.PerVmAdvice.generateOptimized(PerVmAdvice.java:56)
| at org.jboss.aop.advice.AdviceFactory.create(AdviceFactory.java:106)
| at org.jboss.aop.Advisor.createInterceptorChain(Advisor.java:1323)
| at org.jboss.aop.Advisor.pointcutResolved(Advisor.java:1937)
| at org.jboss.aop.MethodMatchInfo.applyBinding(MethodMatchInfo.java:152)
| at org.jboss.aop.MethodMatchInfo.simplePopulateBindings(MethodMatchInfo.java:113)
| at org.jboss.aop.MethodMatchInfo.populateBindings(MethodMatchInfo.java:96)
| at org.jboss.aop.Advisor.finalizeMethodChain(Advisor.java:1548)
| at org.jboss.aop.ClassAdvisor.finalizeChains(ClassAdvisor.java:741)
| at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:609)
| at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:306)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:276)
| at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:748)
| at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:729)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.<clinit>(ClientSessionDelegate.java)
| ... 45 more
|
What could be wrong?
PS. I write in this forum based on the contents of trace.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238086#4238086
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238086
More information about the jboss-user
mailing list