ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ Java / JMSUnknown constant tag 84 in class file com/ibm/mq/jmqi/JmqiEn

Post new topicReply to topic
Unknown constant tag 84 in class file com/ibm/mq/jmqi/JmqiEn View previous topic :: View next topic
Author Message
MABeatty1978
PostPosted: Mon Oct 16, 2017 6:51 am Post subject: Unknown constant tag 84 in class file com/ibm/mq/jmqi/JmqiEn Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 52

I've got a java application that is bombing out when trying to connect to MQ. Here is the stack trace:

Exception in thread "main" java.lang.ClassFormatError: Unknown constant tag 84 in class file com/ibm/mq/jmqi/JmqiEnvironment
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager$3.run(ComponentManager.java:1241)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.dynamicLoadClass(ComponentManager.java:1219)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.locateComponents(ComponentManager.java:330)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.findComponent(ComponentManager.java:239)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.access$000(ComponentManager.java:65)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager$2.run(ComponentManager.java:824)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.init(ComponentManager.java:820)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.init(ComponentManager.java:775)
at com.ibm.msg.client.commonservices.componentmanager.ComponentManager.getInstance(ComponentManager.java:1042)
at com.ibm.msg.client.commonservices.CommonServices.<clinit>(CommonServices.java:103)
at com.ibm.msg.client.commonservices.propertystore.PropertyStore.initialize(PropertyStore.java:507)
at com.ibm.msg.client.commonservices.propertystore.PropertyStore.<clinit>(PropertyStore.java:229)
at com.ibm.msg.client.commonservices.trace.Trace.<clinit>(Trace.java:424)
at com.ibm.msg.client.commonservices.cssystem.WASSupport.<clinit>(WASSupport.java:47)
at com.ibm.mq.internal.MQCommonServices$6.run(MQCommonServices.java:1263)
at com.ibm.mq.internal.MQCommonServices$Helper.runIgnoresNoClass(MQCommonServices.java:1322)
at com.ibm.mq.internal.MQCommonServices.isJmsCommonServicesRequired(MQCommonServices.java:1277)
at com.ibm.mq.internal.MQCommonServices.<clinit>(MQCommonServices.java:265)
at com.ibm.mq.MQSESSION.getJmqiEnv(MQSESSION.java:142)
at com.ibm.mq.MQQueueManagerFactory.<init>(MQQueueManagerFactory.java:85)
at com.ibm.mq.MQQueueManagerFactory.getInstance(MQQueueManagerFactory.java:112)
at com.ibm.mq.MQQueueManager.<clinit>(MQQueueManager.java:155)
at com.sherwin.protocolhandler.ProtocolHandler.startup(ProtocolHandler.java:90)
at com.sherwin.protocolhandler.ProtocolHandler.main(ProtocolHandler.java:56)


From what I'm reading on this exception, the class file is corrupt? How could I correct this?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 16, 2017 7:29 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

That's not anything about a corrupt class file.

It says that there's a constant being passed in that has a value of 84, and the listed class doesn't know about it.

Which, if you start at the back of the stack trace, says that
com.sherwin.protocolhandler.ProtocolHandler.startup(ProtocolHandler.java:90)
is passing a bad value to
com.ibm.mq.MQQueueManager.<clinit>(MQQueueManager.java:155)

Potentially, you're using a constructor or passing in options that require newer versions of the MQ classes you are using. Perhaps you're using MQv7 classes and trying to pass in MQV8 parameters.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
MABeatty1978
PostPosted: Mon Oct 16, 2017 7:43 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 52

mqjeff wrote:
That's not anything about a corrupt class file.

It says that there's a constant being passed in that has a value of 84, and the listed class doesn't know about it.

Which, if you start at the back of the stack trace, says that
com.sherwin.protocolhandler.ProtocolHandler.startup(ProtocolHandler.java:90)
is passing a bad value to
com.ibm.mq.MQQueueManager.<clinit>(MQQueueManager.java:155)

Potentially, you're using a constructor or passing in options that require newer versions of the MQ classes you are using. Perhaps you're using MQv7 classes and trying to pass in MQV8 parameters.


I'm not sure how that could be possible: The call is pretty straight forward:
Code:
MQQueueManager qmgr = null;
      try {
         qmgr = new MQQueueManager(System.getenv("QMGR"));      
      } catch (MQException ex){
         if (ex.getReason()== 2059){
            PCHLog.log("Queue Manager Not Available.  Exiting");
         }
         else {
            PCHLog.log(new RCReply("C5027", ex));
         }
         System.exit(1);         
      }


It is MQ version 7, but this code is running in thousands of locations with all the same software, this is the only one experiencing the issue. Are the java classes that are being used typically located in /opt/mqm/java/lib?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 16, 2017 8:22 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19433
Location: LI,NY

MABeatty1978 wrote:
Are the java classes that are being used typically located in /opt/mqm/java/lib?

Yes they are.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
MABeatty1978
PostPosted: Mon Oct 16, 2017 8:43 am Post subject: Reply with quote

Acolyte

Joined: 17 Jul 2014
Posts: 52

fjb_saper wrote:
MABeatty1978 wrote:
Are the java classes that are being used typically located in /opt/mqm/java/lib?

Yes they are.


So if the libraries are identical in a working and nonworking location, then I can rule the library themselves out?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 16, 2017 9:05 pm Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19433
Location: LI,NY

MABeatty1978 wrote:
fjb_saper wrote:
MABeatty1978 wrote:
Are the java classes that are being used typically located in /opt/mqm/java/lib?

Yes they are.


So if the libraries are identical in a working and nonworking location, then I can rule the library themselves out?


Only if the file comparison shows the same content and not additional jars are found in those locations (mix of versions)...

You might also need to look at the so libraries in those locations as they are use to connect in "bindings" mode.

However I'd believe that you are trying to use a feature from a later release not present in the current setup. Like a constant value not yet present in MQConstants?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Oct 17, 2017 4:13 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17448

You should also look at how this code is being run, that is the shell environment that it is being launched from.

If there is more than one MQ Installation on the machine, and you are not actually at MQ v7.0.x but 7.1.x or 7.5.x, then you might not be using the default installation.

If so, you need to make sure that your code is running in a shell that is tied to the right version of MQ.

Well, this could be true even if you are at 7.0.x - if the admin has set things up so that all applications run under the never version context.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSUnknown constant tag 84 in class file com/ibm/mq/jmqi/JmqiEn
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.