Community
Participate
Working Groups
After creating a project and adding some sample entities from the JPA specification I get a NullPointerException when trying to Generate DDL. The error appears to be related to the entities that I'm using. I'll attach the .java files after submitting the bug. Environment data : Eclipse : Version: 3.1.2 Build id: M20060118-1600 OS : Ubuntu Linux 2.6.12-10-386 Java : java full version "J2RE 1.5.0 IBM Linux build pxi32dev-20060222 (SR1)" Dali : dali-N-0.5M1-200603170005.zip WTP : 1.0.1 ( I can get the full build if needed). I'm using the Kodo EA 4 runtime to provide javax.persistence.* classes. The exact error that I'm seeing follows : ava.lang.NullPointerException at org.eclipse.wst.rdb.internal.models.sql.datatypes.impl.CharacterStringDataTypeImpl.eSet(CharacterStringDataTypeImpl.java:364) at org.eclipse.dali.db.ddl.OrmDdlGenerator.copyDataType(OrmDdlGenerator.java:384) at org.eclipse.dali.db.ddl.OrmDdlGenerator.addJoinColumn(OrmDdlGenerator.java:345) at org.eclipse.dali.db.ddl.OrmDdlGenerator.addRefColumns(OrmDdlGenerator.java:320) at org.eclipse.dali.db.ddl.OrmDdlGenerator.createDdl(OrmDdlGenerator.java:225) at org.eclipse.dali.ui.actions.GenerateDdlAction.execute(GenerateDdlAction.java:28) at org.eclipse.dali.ui.actions.ProjectAction.execute(ProjectAction.java:90) at org.eclipse.dali.ui.actions.ProjectAction.execute(ProjectAction.java:71) at org.eclipse.dali.ui.actions.ProjectAction.run(ProjectAction.java:63) 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:1021) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572) 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(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) 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) Session Data from the ErrorLog : eclipse.buildId=M20060118-1600 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20060222a (JIT enabled) J9VM - 20060220_05389_lHdSMR JIT - 20060220_2133_r8 GC - 20060214_AA BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -showlocation Command-line arguments: -os linux -ws gtk -arch x86 -showlocation
Created attachment 38515 [details] Source code for the Entities that I'm using. I've been running against Derby v10.1 and MySQL v4.1 - the problem occurs on both. This zip contains the entities that can be used to reproduce the problem. The Wizard works if the only entity present is SimpleEntity. When Customer, Order, DeliveryService and Address are present I get the NullPointerException. I haven't been able to narrow the problem down to a specific entity in that list, though. Thanks for your attention, if there's any other information I can provide please let me know.
*** This bug has been confirmed by popular vote. ***
More info: http://www.eclipse.org/newsportal/article.php?id=139&group=eclipse.technology.dali#139
The NPE probably occurred whenever the project had a relation between two entities and the "target" entity had a String field as a primary key.
Closing Verified Fixed bugs from 0.5.