Skip to main content

Error sending message to queue

4 replies [Last post]
tpauline
Offline
Joined: 2009-09-22
Points: 0

Hi,
I tried a simple java class to send message to a JMS queue in glassfish using the following properties.

java.util.Properties prop = new java.util.Properties();
prop.setProperty("org.omg.CORBA.ORBInitialPort", "7676");
try {

jndiContext = new InitialContext(prop);

} catch (NamingException e) {
e.printStackTrace();
}

and encountered the following error:
Sep 22, 2009 6:04:24 PM com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase parseGiopHeader
WARNING: "IOP00710220: (INTERNAL) Error in GIOP magic"
org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 220 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:5201)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:5215)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.parseGiopHeader(MessageBase.java:196)
at com.sun.corba.ee.impl.protocol.MessageParserImpl.parseBytes(MessageParserImpl.java:181)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.parseBytesAndDispatchMessages(SocketOrChannelConnectionImpl.java:1891)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1718)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1263)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
javax.naming.CommunicationException: Can't find SerialContextProvider [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe]
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:164)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at simple.SimpleQueueSender.main(SimpleQueueSender.java:116)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:2862)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:2880)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1788)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1263)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 220 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:5201)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.giopMagicError(ORBUtilSystemException.java:5215)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.parseGiopHeader(MessageBase.java:196)
at com.sun.corba.ee.impl.protocol.MessageParserImpl.parseBytes(MessageParserImpl.java:181)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.parseBytesAndDispatchMessages(SocketOrChannelConnectionImpl.java:1891)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doOptimizedReadStrategy(SocketOrChannelConnectionImpl.java:1718)
... 2 more

Any idea what is the problem and how I can fix it? Thank you!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nigeldeakin
Offline
Joined: 2007-10-12
Points: 0

This code is trying to connect to a JNDI naming service, and is nothing to do with JMS. Whatever port that naming service is using, it won't be 7676 since that is the port used for JMS connections.

Are you running your "simple Java class" in the Glassfish application client container? If you are (and it has been configured correctly) then you should be able to create your InitialContext without specifying any properties.

Once you have obtained your InitialContext you can use it to lookup a JMS connection factory and a JMS queue from JNDI. Once you have obtained these objects you can use the JMS API to send a message.

Since 7676 is the default port for JMS connections, you shouldn't need to specify it anywhere.

Nigel

tpauline
Offline
Joined: 2009-09-22
Points: 0

Thank you for your reply.

How do I find out which port is the naming service using?

Yes, I am running my Java class in the Glassfish application client. I have previously used it to create bpel processes that work fine connecting to JMS as well. Would that mean it should have been configured properly?

nigeldeakin
Offline
Joined: 2007-10-12
Points: 0

I'm not an expert on the Application Client Container, but you shouldn't need to worry about which port the naming service is using. The ACC (the appclient command) should obtain this information from the Glassfish configuration for you. All you need to do is instantiate an InitialContext.

Nigel

tpauline
Offline
Joined: 2009-09-22
Points: 0

Thank you so much for your help.

I figured maybe Glassfish wasn't configured properly during installation. Re-installing seemed to solve the problem and I was able to send the message to queue without any additional properties.

Thank you.