geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: Unable to create Datasource
Date Thu, 17 May 2012 14:24:41 GMT

On May 17, 2012, at 4:37 AM, sai charan wrote:

> Hello,
> 
> I have installed Geronimo 2.0.1 in one machine and MS SQL Server 2005 in an another machine
, while i was trying to configure the database connection pool i am unable to create datasource,
I found the logs in the command prompt please find below:
> 
> 
<snip>
...
> jvm 1    | java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
> jvm 1    |      at java.lang.ClassLoader.defineClass1(Native Method)
> jvm 1    |      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> jvm 1    |      at java.security.SecureClassLoader.defineClass(SecureClassLoader
> .java:124)
> jvm 1    |      at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> jvm 1    |      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> jvm 1    |      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> jvm 1    |      at java.security.AccessController.doPrivileged(Native Method)
> jvm 1    |      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> jvm 1    |      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> jvm 1    |      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> jvm 1    |      at org.apache.geronimo.console.databasemanager.wizard.DatabasePo
> olPortlet.attemptDriverLoad(DatabasePoolPortlet.java:1177)
...
<snip>
> 
> Please suggest me the steps to complete this task. I need this in an urgency.... I would
really appreciate if i get any response from you.

One general point -- Geronimo 2.0.1 is pretty old. If you you need a Java EE 5 server, I'd
suggest Geronimo 2.1.8 (or 2.2.1).

What version of Java are you running?

You are almost certainly getting this error because you are running a version of Java which
is older than the version of Java which was used to compile some of your classes. It's really
a bit more complex than this. The javac parameters -source and -target control what JVM class
file format will be generated by javac (e.g. Java 6 compiler can generate Java 5 class files,
but not vice versa). 

In your case, I'd say for example you are running Java 1.5 and some of your classes were compiled
for Java 6. Each class has a Java version identifier. When your Java 1.5 JVM loads a Java
6 class, the 1.5 JVM detects that the Java 6 class version number is not supported and throws
this exception…

I'd assume your attempting to run classes (e.g. from your jdbc driver) that are not compatible
with the version of java you're using to run geronimo. You either need to recompile your classes
or move to a newer version of java.

--kevan


Mime
View raw message