[jboss-user] [JBossMQ] - [JmsActivation] Failure in jms activation What would be it?
diogo.gonzaga
do-not-reply at jboss.com
Mon Dec 15 07:45:24 EST 2008
I'm trying to deploy an application example and I got this error:
12:27:04,922 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec at 16095fc(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter at c92ed6 destination=jms/OrderBillingQueue 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.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: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$SetupActivation.run(JmsActivation.java:589)
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 MDB is:
package ejb3.ejb3inaction.actionbazaar.buslogic;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import javax.ejb.MessageDrivenContext;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
import javax.sql.DataSource;
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/ShippingRequestQueue"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
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();
}
}
private void processShippingRequest(ShippingRequest request)
throws SQLException {
Statement statement = connection.createStatement();
String sql = "INSERT INTO " + "SHIPPING_REQUESTS(" + "ITEM, "
+ "SHIPPING_ADDRESS, " + "SHIPPING_METHOD, "
+ "INSURANCE_AMOUNT) " + "VALUES ( " + request.getItem() + ", "
+ "'" + request.getShippingAddress() + "', " + "' "
+ request.getShippingMethod() + "', "
+ request.getInsuranceAmount() + ")";
System.out.println(sql);
statement.execute(sql);
}
}
Anybody have a hint?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196543#4196543
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196543
More information about the jboss-user
mailing list