jQuery in Action, 2nd edition*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes JMS not bound? What is this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply locked New topic
Author

JMS not bound? What is this?

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();
}
}
[ December 14, 2008: Message edited by: Diogo Gonzaga ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Closing duplicate.
[ December 14, 2008: Message edited by: Christophe Verre ]

[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS not bound? What is this?
 
Similar Threads
jms not bound? what is that?
Error While Starting JBoss 5.1.0 GA!!!
Problem in Deploying MDB bean
Error while deploying MDB
Use of "mappedName" attribute with @MessageDriven EJB3.0