[JBoss Messaging] - Re: Bridge cannot find session with QOS_ONCE_AND_ONLY_ONCE
by timfox
If I follow your instructions exactly I can replicate the issue.
However it looks like you skipped a stage in the installation of messaging2 - you need to give it a unique server id.
http://labs.jboss.com/file-access/default/members/jbossmessaging/freezone...
Since both servers have got the same server id the client side resource manager thinks there is only one server and sends all the work to be processed on one - hence the issue.
After giving messaging2 a unique server id it works for me:
| run:
| [java] Queue JBossQueue[A] exists
| [java] Queue JBossQueue[B] exists
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was successfully sent to the A queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The message was received successfully from the B queue
| [java] The example connected to JBoss Messaging version 1.4.0.CR3 (1.4)
|
| [java] #####################
| [java] ### SUCCESS! ###
| [java] #####################
|
| undeploy:
| [delete] Deleting: /home/tim/dev/jboss-4.2.1.GA/server/messaging/deploy/test-bridge-service.xml
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087487#4087487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087487
18 years, 7 months
[JBoss Messaging] - Re: Bridge cannot find session with QOS_ONCE_AND_ONLY_ONCE
by julians37
Hi Tim,
thanks again for sticking with me on this one.
I've started off with a new AS installation and ran the example as per your instructions, and it works fine.
However, it fails as soon as more than one server is involved.
Here are the steps to reproduce:
Start with a fresh JBoss AS 4.2.1 installation and create two messaging configurations:
| cd util
| ant -f release-admin.xml
| ant -f release-admin.xml -Dmessaging.config.name=messaging2
|
In $JBOSS_HOME/server/messaging2/conf/jboss-service.xml, uncomment the ServiceBindingManager so that the messaging2 config uses a different set of ports:
| --- messaging/conf/jboss-service.xml 2007-09-22 10:48:53.000000000 +1000
| +++ messaging2/conf/jboss-service.xml 2007-09-22 14:12:27.000000000 +1000
| @@ -187,6 +187,7 @@
| | during initialization that specifies how to connect to the bindings store.
| | StoreFactory: The org.jboss.services.binding.ServicesStoreFactory interface
| | implementation to create to obtain the ServicesStore instance.
| + -->
|
| <mbean code="org.jboss.services.binding.ServiceBindingManager"
| name="jboss.system:service=ServiceBindingManager">
| @@ -196,7 +197,6 @@
| org.jboss.services.binding.XMLServicesStoreFactory
| </attribute>
| </mbean>
| - -->
|
| <!-- ==================================================================== -->
| <!-- Class Loading -->
|
Modify docs/examples/bridge/etc/test-bridge-service.xml as follows:
| * Add a new JMSProvider connecting to jnp://localhost:1199 (which is messaging2's JNDI port)
| * Change the TargetProviderLoader to use the remote provider
| * Set QOS to 2
|
| Index: test-bridge-service.xml
| ===================================================================
| --- test-bridge-service.xml (revision 3139)
| +++ test-bridge-service.xml (working copy)
| @@ -8,6 +8,27 @@
|
| <server>
|
| + <!-- The JMS provider loader -->
| + <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| + name="jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider">
| + <attribute name="ProviderName">RemoteJMSProvider</attribute>
| + <attribute name="ProviderAdapterClass">
| + org.jboss.jms.jndi.JNDIProviderAdapter
| + </attribute>
| + <!-- The combined connection factory -->
| + <attribute name="FactoryRef">/XAConnectionFactory</attribute>
| + <!-- The queue connection factory -->
| + <attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
| + <!-- The topic factory -->
| + <attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
| + <!-- Access JMS via HAJNDI -->
| + <attribute name="Properties">
| + java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| + java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
| + java.naming.provider.url=localhost:1199
| + jnp.disableDiscovery=true
| + </attribute>
| + </mbean>
|
| <mbean code="org.jboss.jms.server.bridge.BridgeService"
| name="jboss.messaging:service=Bridge,name=TestBridge"
| @@ -17,7 +38,7 @@
| <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
|
| <!-- The JMS provider loader that is used to lookup the target destination -->
| - <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>
| + <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=RemoteJMSProvider</depends>
|
| <!-- The JNDI lookup for the source destination -->
| <attribute name="SourceDestinationLookup">/queue/A</attribute>
| @@ -45,7 +66,7 @@
| QOS_AT_MOST_ONCE = 0;
| QOS_DUPLICATES_OK = 1;
| QOS_ONCE_AND_ONLY_ONCE = 2; -->
| - <attribute name="QualityOfServiceMode">0</attribute>
| + <attribute name="QualityOfServiceMode">2</attribute>
|
| <!-- JMS selector to use for consuming messages from the source
| <attribute name="Selector">specify jms selector here</attribute>
|
Now bring up the two AS instances and run the bridge example. This should give you the "session id not found" error messages in messaging's log.
Can you reproduce this? If so, is this a bug or is my RemoteJMSProvider configuration wrong? Or is there anything else I need to configure in my second AS instance?
(Note that in my previous test setup, the two servers were running on different machines in different subnets between which there's no multicast routing, so I doubt that there's some problem with the ports or with the fact that both servers are running on the same host in this example. Also, my previous test setup was on Linux while this example was tested on Darwin, so it doesn't seem to be some kind of network quirk or OS hickup either)
Thanks again,
Julian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087470#4087470
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087470
18 years, 7 months
[JBoss Seam] - NPE when call seam web service on glassfish
by hugo_th02
I deploy seam 2.0 RC1 on glassfish and create a web service. When calling this web service, I get the NPE like this:
[#|2007-09-22T10:14:31.156-0700|INFO|sun-appserver9.1|javax.enterprise.resource.webservices.jaxws.handler|_ThreadID=20;_ThreadName=httpSSLWorkerThread-8280-0;|Exception ignored during close
java.lang.NullPointerException
at org.jboss.seam.servlet.ServletRequestSessionMap.put(ServletRequestSessionMap.java:88)
at org.jboss.seam.servlet.ServletRequestSessionMap.put(ServletRequestSessionMap.java:25)
at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:80)
at org.jboss.seam.Component.newInstance(Component.java:1976)
at org.jboss.seam.Component.getInstance(Component.java:1874)
at org.jboss.seam.Component.getInstance(Component.java:1853)
at org.jboss.seam.Component.getInstance(Component.java:1830)
at org.jboss.seam.web.Session.getInstance(Session.java:122)
at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:375)
at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:132)
at nguyen.seam.demo.ws.util.SOAPRequestHandler.close(SOAPRequestHandler.java:159)
at com.sun.xml.ws.handler.HandlerProcessor.closeHandlers(HandlerProcessor.java:414)
at com.sun.xml.ws.handler.ServerSOAPHandlerTube.closeSOAPHandlers(ServerSOAPHandlerTube.java:146)
at com.sun.xml.ws.handler.ServerSOAPHandlerTube.close(ServerSOAPHandlerTube.java:120)
at com.sun.xml.ws.handler.HandlerTube.cleanUpState(HandlerTube.java:195)
at com.sun.xml.ws.handler.HandlerTube.processResponse(HandlerTube.java:161)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:605)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:287)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:200)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
[#|2007-09-22T10:14:31.156-0700|WARNING|sun-appserver9.1|javax.enterprise.resource.webservices.jaxws.wstx|_ThreadID=20;_ThreadName=httpSSLWorkerThread-8280-0;_RequestID=0a9fd8f9-ab54-4cc5-9d56-74c88e6d337a;|WSTX-SERVICE-5013: Handling exception to complete WS-TX processing of WS-TX coordId= 'uuid:WSCOOR-SUN-fb5aefb8-ebee-45ce-8a72-fa965bf8e02d', imported JTA transaction='J2EETransaction: txId=7 nonXAResource=null jtsTx=com.sun.jts.jta.TransactionImpl@5b142a09 localTxStatus=0 syncs=[]}'
java.lang.NullPointerException
at org.jboss.seam.servlet.ServletRequestSessionMap.put(ServletRequestSessionMap.java:88)
at org.jboss.seam.servlet.ServletRequestSessionMap.put(ServletRequestSessionMap.java:25)
at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:80)
at org.jboss.seam.Component.newInstance(Component.java:1976)
at org.jboss.seam.Component.getInstance(Component.java:1874)
at org.jboss.seam.Component.getInstance(Component.java:1853)
at org.jboss.seam.Component.getInstance(Component.java:1830)
at org.jboss.seam.core.ConversationEntries.getInstance(ConversationEntries.java:103)
at org.jboss.seam.core.Manager.removeCurrentConversationAndDestroyNestedContexts(Manager.java:369)
at org.jboss.seam.core.Manager.endRequest(Manager.java:338)
at nguyen.seam.demo.ws.util.SOAPRequestHandler.handleOutbound(SOAPRequestHandler.java:117)
at nguyen.seam.demo.ws.util.SOAPRequestHandler.handleMessage(SOAPRequestHandler.java:56)
at com.sun.xml.ws.handler.HandlerProcessor.callHandleMessageReverse(HandlerProcessor.java:336)
at com.sun.xml.ws.handler.HandlerProcessor.callHandlersResponse(HandlerProcessor.java:207)
at com.sun.xml.ws.handler.ServerSOAPHandlerTube.callHandlersOnResponse(ServerSOAPHandlerTube.java:206)
at com.sun.xml.ws.handler.HandlerTube.processResponse(HandlerTube.java:158)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:605)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.enterprise.webservice.MonitoringPipe.process(MonitoringPipe.java:147)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java:287)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:218)
at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:129)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:113)
at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:87)
at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:200)
at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:129)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:114)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
[#|2007-09-22T10:14:31.375-0700|SEVERE|sun-appserver9.1|javax.enterprise.resource.webservices.jaxws.wstx.wsat|_ThreadID=17;_ThreadName=httpSSLWorkerThread-2569-1;_RequestID=7d122cb0-394d-43b7-bfe1-b1c64c863a5e;|WSTX-AT-0026: XATerminator abort. coordId='uuid:WSCOOR-SUN-fb5aefb8-ebee-45ce-8a72-fa965bf8e02d'|#]
It seems that there no HttpSession along with the MessageContext when the SOAPRequestHandler init the seam context. So, when call Contexts.flushAndDestroyContexts() in SOAPRequestHandler.close(), the NPE was throwed.
Can anyone help me?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087466#4087466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087466
18 years, 7 months