It's not a secret anymore!*
The moose likes EJB and other Java EE Technologies and the fly likes jms not bound? what is that? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "jms not bound? what is that?" Watch "jms not bound? what is that?" New topic
Author

jms not bound? what is that?

Diogo Gonzaga
Greenhorn

Joined: Nov 04, 2008
Posts: 14
I'm trying to deploy a MessageListener, but i get this error. What is that?

23:22:08,996 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@dea6bc(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1ffb2eb destination=jms/ShippingRequestQueue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=0)
23:22:09,007 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@dea6bc(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1ffb2eb destination=jms/ShippingRequestQueue isTopic=false tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=0)
javax.naming.NameNotFoundException: jms not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.util.naming.Util.lookup(Util.java:215)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:399)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:306)
at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:250)
at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:593)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
at java.lang.Thread.run(Thread.java:595)

-------------
My class is:


@MessageDriven(name = "ShippingRequestProcessor", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/ShippingRequestQueue") })
public class ShippingRequestProcessorMDB implements MessageListener {
private Connection connection;

private DataSource dataSource;

@Resource
private MessageDrivenContext context;

@Resource(name = "jdbc/TurtleDS", mappedName = "java:/DefaultDS")
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}

@PostConstruct
public void initialize() {
try {
connection = dataSource.getConnection();
} catch (SQLException sqle) {
sqle.printStackTrace();
}
}

@PreDestroy
public void cleanup() {
try {
connection.close();
connection = null;
} catch (SQLException sqle) {
sqle.printStackTrace();
}
}

public void onMessage(Message message) {
try {
ObjectMessage objectMessage = (ObjectMessage) message;
ShippingRequest shippingRequest = (ShippingRequest) objectMessage
.getObject();
processShippingRequest(shippingRequest);
System.out.println("Shipping request processed.");
} catch (JMSException jmse) {
jmse.printStackTrace();
context.setRollbackOnly();
} catch (SQLException sqle) {
sqle.printStackTrace();
context.setRollbackOnly();
}
}

Anybody can give me a hint to solve this?
Chris Hurst
Ranch Hand

Joined: Oct 26, 2003
Posts: 416
    
    2

I suspect it cant find "jms/ShippingRequestQueue" , its failing on a lookup at bean activation trying to find a destination so that's my guess.

Did you create the queue ? ie look for the queue before you deploy the bean assuming its not created as a resource on deployment ?


"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jms not bound? what is that?