-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Unsupported major.minor version 49.0
PostPosted: Tue Apr 26, 2005 4:59 pm 
Newbie

Joined: Thu Apr 21, 2005 6:39 am
Posts: 1
Hi,
Sorry if this seems like a rudimentary problem. I am new to Hibernate. I am running tools (JBossIDE-1.5M1-jre15-ALL.zip) using Hibernate Console. I get the error ("Unsupported major.minor version 49.0") while trying to auto generate .java and while trying to run "Create SessionFactory" from Hibernate Console. I have been reading these web sites, trying to resolve this issue for over 5 days. Any assistance would be appreciated.
Thanks.

Hibernate version: 3.0.1

Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="com.vai.cms.domain.EquipmentCharacteristic" table="TBL_EQUIPMENT_CHARACTERISTIC">
<composite-id>
<key-many-to-one name="equipmentId" class="com.vai.cms.domain.Equipment" column="EQUIPMENT_NO"/>
<key-many-to-one name="categoryId" class="com.vai.cms.domain.Category" column="CATEGORY_NO"/>
</composite-id>
<property name="name" type="java.lang.String" column="NAME" length="127"/>
<property name="value" type="java.lang.String" column="VALUE" length="127"/>
<property name="javatype" type="java.lang.String" column="JAVATYPE" length="127"/>
</class>
</hibernate-mapping>

Full stack trace of any exception that occurs:
java.lang.UnsupportedClassVersionError: com/vai/cms/domain/EquipmentCharacteristic (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at org.hibernate.mapping.Component.getComponentClass(Component.java:98)
at org.hibernate.cfg.HbmBinder.bindCompositeId(HbmBinder.java:406)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:297)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
at org.hibernate.cfg.Configuration.add(Configuration.java:358)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:395)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:241)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:163)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:129)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:50)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:47)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:557)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:507)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:421)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2908)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2541)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1612)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1578)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:293)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:228)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:333)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:268)
at org.eclipse.core.launcher.Main.basicRun(Main.java:260)
at org.eclipse.core.launcher.Main.run(Main.java:887)
at org.eclipse.core.launcher.Main.main(Main.java:871)


Name and version of the database you are using:
Oracle 9i


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 5:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
your eclipse is running with a jdk 1.4 VM and your app classes are 1.5 only, so we cant load them.

run eclipse with jdk 1.5 to run with this scenario.

note: i've added a better error message for this scenario.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 2:33 pm 
Newbie

Joined: Mon Jan 02, 2006 2:26 pm
Posts: 1
I'm getting the same error but the solution you give is no solution for me.

I need to use Java 1.4 and cannot move to 1.5. My unit tests work and
everything is fine using 1.4 except I can no longer create a Hibernate
Configuration. I had them created a few hours ago and then changed
some things and am now getting this error. I have not changed the
code to use anything java 1.5 specific.

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 3:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this thread is about someone using jdk 5 compiled classes with a jdk 1.4 runtime - nothing more, nothing less.

thus if you have the same error your code is compiled for jdk 5 and should be run as such.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: JDK 5.0 classes on JRE 1.4
PostPosted: Thu Jan 19, 2006 12:58 pm 
Newbie

Joined: Thu Jan 19, 2006 12:44 pm
Posts: 1
It looks like it is possible to use JDK 5.0 compiled classes with a JDK 1.4 runtime:
http://sourceforge.net/forum/forum.php? ... _id=513539
http://sourceforge.net/forum/message.php?msg_id=3526452


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 19, 2006 4:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you want me to create 2 different distributions of the plugins just so you don't need to start eclipse with jdk 5 ?

I don't think so ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.