This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 136658 - NullPointerException when opening DDL Wizard
Summary: NullPointerException when opening DDL Wizard
Status: CLOSED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Framework (show other bugs)
Version: 0.5   Edit
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---   Edit
Assignee: Brian Vosburgh CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 11:08 EDT by Michael Dick CLA
Modified: 2007-03-14 18:19 EDT (History)
0 users

See Also:


Attachments
Source code for the Entities that I'm using. (2.97 KB, application/zip)
2006-04-13 11:14 EDT, Michael Dick CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Dick CLA 2006-04-13 11:08:21 EDT
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
Comment 1 Michael Dick CLA 2006-04-13 11:14:34 EDT
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.
Comment 2 Eclipse Webmaster CLA 2006-04-13 13:32:46 EDT
*** This bug has been confirmed by popular vote. ***
Comment 4 Brian Vosburgh CLA 2006-06-17 01:45:07 EDT
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.
Comment 5 Neil Hauge CLA 2007-03-14 18:19:37 EDT
Closing Verified Fixed bugs from 0.5.