[JBoss Messaging] - org.jboss.jms.message.JBossMessage produced null jmsMessageI
by kadlecp
Hello,
I have checked out JBossMessaging_1_4_0_SP3_CP02 from SVN and I encounter following exception when processing a lot of messages.
| 2008-04-24 13:43:49,168 ERROR [org.jboss.messaging.core.impl.ChannelSupport] Failed to handle message
| java.lang.NullPointerException
| at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:846)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager.cacheID(JDBCPersistenceManager.java:1632)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager$1AddReferenceRunner.doTransaction(JDBCPersistenceManager.java:1358)
| at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:474)
| at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:512)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager.addReference(JDBCPersistenceManager.java:1396)
| at org.jboss.messaging.core.impl.ChannelSupport.handle(ChannelSupport.java:226)
| at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.routeInternal(MessagingPostOffice.java:2208)
| at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.route(MessagingPostOffice.java:494)
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:755)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:391)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
| at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)
| at sun.reflect.GeneratedMethodAccessor481.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
| at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| 2008-04-24 13:43:49,168 ERROR [org.jboss.messaging.util.ExceptionUtil] SessionEndpoint[991-j03c9fff-1-inpu7fff-x6f9dw-g10o4c5] send [bp5-gw2o9fff-1-inpu7fff-x6f9dw-g10o4c5]
| javax.jms.JMSException: Failed to route Reference[19808869090865061]:RELIABLE to DataCollectorQueue
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:757)
| at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:391)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
| at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)
| at sun.reflect.GeneratedMethodAccessor481.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeNext(SessionAdvised$send_7280680627620114891.java)
| at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)
| at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:572)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
|
I have looked at source code a I can see that this exception is thrown as a result of inserting null into java.util.concurrent.ConcurrentHashMap. The root of the problem is that JBossMessage returned null jmsMessageID. I have noticed that there were some changes in method, expecially following one http://viewvc.jboss.org/cgi-bin/viewvc.cgi/messaging/tags/JBossMessaging_...
I would like to ask if we can be sure that the new version of JBossMessage never returns null jmsMessageID (I don't have whole picture of message processing).
I upgraged from JBossMessaging_1_4_0_SP3 because I encoutered another exceptions (I have problems with message duplicity, I have been receiving exceptions from DB related to violation of unique constraints on primary key of tables JBM_MSG, JBM_MSG_REF). With CP2 these exceptions disappared, but the one above appeared:-).
Thank you for answer
Pavel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147074#4147074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147074
17 years, 12 months
[EJB 3.0] - failed to deploy entity when persistence.xml is there
by peiguo
I am trying out persistence and EJB 3, but I got this error when the jar is deployed:
| 10:06:55,887 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:jar=order.jar,name=ShoppingCartBean,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| persistence.units:unitName=sample
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:unitName=sample
| State: NOTYETINSTALLED
| Depends On Me:
| jboss.j2ee:jar=order.jar,name=ShoppingCartBean,service=EJB3
|
I do have a persistencein META-INF directory:
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
| <persistence-unit name="sample">
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
|
in my stateful bean I have this code:
| package org.jboss.tutorial.entity.bean;
|
| import javax.ejb.Remote;
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| import javax.persistence.PersistenceContext;
|
|
| @Stateful
| @Remote(ShoppingCart.class)
| public class ShoppingCartBean implements ShoppingCart, java.io.Serializable
| {
| @PersistenceContext(unitName="sample")
| private EntityManager manager;
| private Order order;
|
| public void buy(String product, int quantity, double price)
| {
| if (order == null) order = new Order();
| order.addPurchase(product, quantity, price);
| }
|
| public Order getOrder()
| {
| return order;
| }
|
| @Remove
| public void checkout()
| {
| manager.persist(order);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147072#4147072
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147072
17 years, 12 months