-->
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.  [ 4 posts ] 
Author Message
 Post subject: hibernate-tools-3.0 alpha1 problems with hibernate 3.0
PostPosted: Wed Mar 23, 2005 11:43 am 
Newbie

Joined: Tue Mar 22, 2005 10:44 am
Posts: 8
hibernate-tools-3.0 alpha1 has problems with hibernate-mapping-3.0.dtd.

I have hbm mapping files like this

<?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 entity-name="Test" table="test" node="test">
<id name="testId" column="test_id" type="long">
<generator class="increment"/>
</id>
<property name="testName" column="test_name" node="testname" type="string"/>
<property name="testTitle" column="test_title" node="testtitle" type="string"/>
<property name="testRemark" column="test_remark" node="testremark" type="string"/>
</class>

</hibernate-mapping>

If I call create SessionFactory in the eclipse plugin hibernate console
I get this exception

org.hibernate.MappingException: Error reading resource: admin/usermanagement/Test.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:444)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1369)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1341)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1323)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1290)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1252)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:151)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:128)
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:555)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:419)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285)
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:220)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
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.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:710)
at org.eclipse.core.launcher.Main.main(Main.java:694)
Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:391)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:441)
... 32 more
Caused by: org.xml.sax.SAXParseException: Attribut "node" ist nicht für Element "class" deklariert.
at org.apache.crimson.parser.Parser2.error(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:334)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:390)
... 33 more


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 23, 2005 12:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
its because you are using the new H3 features which is not included in the latest release of the tools.

if you can wait for that release you *should* be able to replace the hibernate3.jar in the plugin with the RC.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 24, 2005 5:33 am 
Newbie

Joined: Tue Mar 22, 2005 10:44 am
Posts: 8
Thank you for reply !
I copied the new hibernate3.jar to \eclipse\plugins\org.hibernate.eclipse_3.0.0.alpha\lib,
but now I get exceptions from creation of the mapped entities tree.
When do you think there will be a new release of the tool ?
I think/hope I can wait ...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 24, 2005 6:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is packaged with JBossIDE M1 which should have been there this morning, but it seems sf.net once again dont want to work when we upload stuff.....

so very soon now ,)

-max

_________________
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.  [ 4 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.