JBoss Community

Messaging in AS7

created by el_paso in Beginner's Corner - View the full discussion

Hi,

 

I'm trying to make this code  http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/JMS_Examples-A_Pub_Sub_Example.html#A_Pub_Sub_Example-A_JMS_publisher_client but I always get this error:

 
11:13:51,470 INFO  [stdout] (http--127.0.0.1-8080-4) Begin sendAsync

11:13:51,470 ERROR [stderr] (http--127.0.0.1-8080-4) javax.naming.NameNotFoundException: ConnectionFactory -- service jboss.naming.context.java.ConnectionFactory

11:13:51,470 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:87)

11:13:51,470 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:173)

11:13:51,470 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:47)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:209)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.naming.InitialContext.lookup(Unknown Source)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.lsyh.salespotential.CommandOutput.setupPubSub(CommandOutput.java:26)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.lsyh.salespotential.CommandOutput.sendAsync(CommandOutput.java:40)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.lsyh.salespotential.CommandInputBean.sendCommand(CommandInputBean.java:40)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.lsyh.salespotential.CommandInputBean.submitButton(CommandInputBean.java:57)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at java.lang.reflect.Method.invoke(Unknown Source)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.el.parser.AstValue.invoke(AstValue.java:196)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.component.UICommand.broadcast(UICommand.java:300)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

11:13:51,473 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

11:13:51,475 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

11:13:51,478 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

11:13:51,478 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

11:13:51,478 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)

11:13:51,478 ERROR [stderr] (http--127.0.0.1-8080-4)  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)

11:13:51,478 ERROR [stderr] (http--127.0.0.1-8080-4)  at java.lang.Thread.run(Unknown Source)

 

 


Seems the problem is this:

InitialContext iniCtx = new InitialContext();

Object tmp = iniCtx.lookup("ConnectionFactory");

 

 

Maybe I'm not configuring something but what?


Please help

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community