sunleo
sunleo

Reputation: 10943

ActiveMQ version conflict with jre 1.5

I am using Axway server which runs on jre 1.5 . So it accepts all classed builded below 1.6 . But problem is I read THIS LINK and I got this line as guide

Environment: * Java Developer Kit (JDK) 1.4.x or greater for deployment and 1.5.x (Java 5) for compiling/building. As of AMQ 5.5.0 you need JDK 1.6.0 to**

Which says I can use ActiveMQs below version 5.5 for jre 1.5.

when I use ActiveMQ 5.4.3 am getting bad class version error.Please help me.

This is the line where am getting this error

Object o = Class.forName("org.apache.activemq.ActiveMQConnectionFactory", 
                                    true,ConnFactory.class.getClassLoader())
                        .newInstance();

Upvotes: 2

Views: 983

Answers (3)

Mikus
Mikus

Reputation: 322

In maven repository the last version of activemq built on jdk 1.5 is 5.4.2.

Upvotes: 1

bluesockets
bluesockets

Reputation: 56

You could extract the jar as a zip file, and then look inside the folder and check inside the META-INF directory. The MANIFEST.MF file will tell you what version of the jvm the jar was compiled with. I just grabbed the 5.4.3 version of the activemq jar and it said this:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: chirino
**Build-Jdk: 1.6.0_26**
Specification-Title: ActiveMQ :: Jar Bundle
Specification-Version: 5.4.3
Specification-Vendor: The Apache Software Foundation
Implementation-Title: ActiveMQ :: Jar Bundle
Implementation-Version: 5.4.3
Implementation-Vendor-Id: org.apache.activemq
Implementation-Vendor: The Apache Software Foundation

which clearly shows that it was built with the 1.6 jvm. Might need to download the source and build it on 1.5 manually.

Upvotes: 1

sunleo
sunleo

Reputation: 10943

Problem is due to the jvm config file entry for jar newly added.

I don't know and I am not responsible and I don't have permission to do any Admin related privileges.

I put the jar in CLASSPATH exactly.So its ok for all the classes to access that.

But problem is in JVM config file I have to put the entry, I mean I have to give name of the jar with CLASSPATH in jvm.config file of axway.Though I put my jar in class path without put entry in jvm.config, it is worthless.Because while jvm get initialized it checks the config file first to add jar with it.

Upvotes: 0

Related Questions