- This topic has 5 replies, 3 voices, and was last updated 18 years, 8 months ago by
Brian Fernandes.
-
AuthorPosts
-
[email protected]MemberI have created a hbm.xml mapping file for a particular entity. When I right-click on the file in MyEclipse (4.1.1) Package Explorer and choose “Generate Pojos” it generates a java.lang.NullPointerException.
Stacktrace:
!ENTRY org.eclipse.ui 4 0 2006-06-14 07:55:35.821
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at com.genuitec.eclipse.hibernate.wizards.NewHibernateWizard.initProjectIfNeeded(NewHibernateWizard.java:68)
at com.genuitec.eclipse.hibernate.wizards.NewHibernateWizard.preAddPages(NewHibernateWizard.java:117)
at com.genuitec.eclipse.hibernate.wizards.NewHibernateWizard.addPages(NewHibernateWizard.java:113)
at com.genuitec.eclipse.hibernate.wizards.GeneratePOJOWizard.addPages(GeneratePOJOWizard.java:43)
at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:499)
at org.eclipse.jface.window.Window.create(Window.java:418)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:996)
at org.eclipse.jface.window.Window.open(Window.java:776)
at com.genuitec.eclipse.hibernate.action.GeneratePOJOActionDelegate.run(GeneratePOJOActionDelegate.java:28)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)The mapping file is:
<?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=”web.hibernate.RuleResult” table=”SDA_RULERESULT”>
<id column=”ID”>
<generator class=”sequence”>
<param name=”sequence”>SDA_REDEMPTION_SEQ</param>
</generator>
</id>
<property column=”WORKTYPE” name=”worktype” length=”10″ type=”string” />
<many-to-one name=”primaryRule” class=”web.hibernate.rule.SortRuleDefinition” column=”PRIMARYRULEID” />
<set name=”rulesResult”
lazy=”false”
cascade=”all-delete-orphan”
table=”SDA_REDAUDITRULE”>
<key column=”RULERESULTID” not-null=”true” />
<many-to-many class=”web.hibernate.rule.RuleDefinition” column=”RULEDEFINITIONID” />
</set>
</class>
</hibernate-mapping>
Riyad KallaMemberCan you click your MyEclipse menu item, then click “About MyEclipse” then click “Configuration Summary” and paste the result here for us?
[email protected]Member@support-rkalla wrote:
Can you click your MyEclipse menu item, then click “About MyEclipse” then click “Configuration Summary” and paste the result here for us?
*** Date: Wed Jun 14 13:09:38 CDT 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_02*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.1.1 GA
Build id: 20060309-4.1.1-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.2
Build id: M20060118-1600Eclipse Platform
Version: 3.1.2
Build id: M20060118-1600Eclipse RCP
Version: 3.1.2
Build id: M20060118-1600Eclipse Java Development Tools
Version: 3.1.2
Build id: M20060118-1600Eclipse Plug-in Development Environment
Version: 3.1.2
Build id: M20060118-1600Eclipse Project SDK
Version: 3.1.2
Build id: M20060118-1600Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
d8_44
-vm
C:\WINNT\system32\javaw.exe
Brian FernandesModeratorAre the hbm.xml files you have selected in a MyEclipse Hibernate project? This is mandatory for the POJO generation to work properly.
If not, add Hibernate capabilites to your project (please refer to the Hibernate help included with ME for further instructions and detail) and then re-invoke the wizard.
Let us know if you require further assistance or it still isn’t working.
Best,
Brian.
[email protected]Member@Support-Brian wrote:
Are the hbm.xml files you have selected in a MyEclipse Hibernate project? This is mandatory for the POJO generation to work properly.
If not, add Hibernate capabilites to your project (please refer to the Hibernate help included with ME for further instructions and detail) and then re-invoke the wizard.
Let us know if you require further assistance or it still isn’t working.
Best,
Brian.Ok, that fixed the problem. In a future revision, you might consider not having “Generate POJOs” as an option if you don’t have hibernate project capabilities.
Thanks for your help.
Brian FernandesModeratorOk, that fixed the problem. In a future revision, you might consider not having “Generate POJOs” as an option if you don’t have hibernate project capabilities.
I agree, I’m surprised that wasn’t done already. We’ll take care of it in our next release.
Thank you for reporting back 🙂Best,
Brian. -
AuthorPosts