[JBoss Messaging] - JBOSS 5.1 "MessageConsumer.receiveNoWait(...)" strange problem
by Augustus Karthik
Augustus Karthik [http://community.jboss.org/people/augustusk] created the discussion
"JBOSS 5.1 "MessageConsumer.receiveNoWait(...)" strange problem"
To view the discussion, visit: http://community.jboss.org/message/553680#553680
--------------------------------------------------------------
Hi,
I am have strange problem with JBOSS 5.1.0. I have attached my program below. This program works perfectly in JBOSS 4.2.3. But fails strangely in Jboss 5.1.0. *The strange thing is when I run the same program in "DEBUG" mode it works fine*. I couldn't find whats wrong with this program. Is it something related to Threads? Please help me out..
The Main problem is "MessageConsumer.receiveNoWait(...)" method fails to return the ObjectMessage from the JMS Queue event though there are many messages in the queue.
Here is the program:
initialContext = getContext();
Queue queue = (Queue) initialContext.lookup("/queue/XQueue");
QueueConnectionFactory cf = (QueueConnectionFactory) initialContext.lookup("/ConnectionFactory");
connection = cf.createQueueConnection("caecmibuser","caecmibuser");
QueueSession qSession1 = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer qReceiver = qSession1.createConsumer(queue);
connection.start();
while (true) {
*ObjectMessage message = (ObjectMessage) qReceiver.receiveNoWait();* //This method always returns null
if (message == null)
break;
}
qReceiver.close();
qSession1.close();
connection.close();
Thanks
Augustus
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553680#553680]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months
[JBoss Web Services] - NullPointerException at
by Philipp Leusmann
Philipp Leusmann [http://community.jboss.org/people/p.leusmann] created the discussion
"NullPointerException at"
To view the discussion, visit: http://community.jboss.org/message/553657#553657
--------------------------------------------------------------
Hi,
I ama currently trying to deploy a WebApplication using EJB3 Jax-WS in JBoss.
The Application written using the Eclipse RAP Framework and thus using OSGi (Equinox).
But when the WebServices are setup, I always get the following NullPointerException:
java.lang.NullPointerException
at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:178)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:451)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:180)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:129)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:293)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:84)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:138)
at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
at javax.xml.ws.Service.<init>(Service.java:79)
[...]
I did alread look at that piece of code, and found it is trying to resolve a URL like
file:/var/folders/0W/0WCNl0ONFvm5RkTGZc5t5E+++TI/-Tmp-/JBossWS_de.some.package.name9174384271488964615.xsd
The file actually exists.
Can anybody tell me, what is causing the NPE? I am using JBoss5.1.GA.
Regards,
Philipp
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/553657#553657]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 11 months