Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » NPE Generating Entity
NPE Generating Entity [message #434581] Sat, 08 September 2007 09:52 Go to next message
Shawn Peters is currently offline Shawn Peters
Messages: 9
Registered: July 2009
Junior Member
I am getting a NPE when I try an generate an entity for one particular
table. So far all of my other tables have been generated just fine, but it
keeps erroring out on this table. Here is the stack Trace of the error:

eclipse.buildId=I20070323-1616
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86

Error
Sat Sep 08 08:36:24 CDT 2007
Unhandled event loop exception

java.lang.NullPointerException
at
org.eclipse.jpt.db.internal.ForeignKey.getReferencedTable(Fo reignKey.java:104)
at
org.eclipse.jpt.gen.internal.GenTable.addReferencedTablesTo( GenTable.java:106)
at
org.eclipse.jpt.gen.internal.GenScope.buildReferencedTables( GenScope.java:169)
at
org.eclipse.jpt.gen.internal.GenScope.configureManyToManyRel ations(GenScope.java:81)
at org.eclipse.jpt.gen.internal.GenScope.initialize(GenScope.ja va:46)
at org.eclipse.jpt.gen.internal.GenScope.<init>(GenScope.java:33)
at
org.eclipse.jpt.gen.internal.PackageGenerator.<init>(PackageGenerator.java:48)
at
org.eclipse.jpt.gen.internal.PackageGenerator.generateEntiti es(PackageGenerator.java:38)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator$Genera teEntitiesRunnable.run(EntitiesGenerator.java:129)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1779)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:88)
at
org.eclipse.jpt.ui.internal.generic.EntitiesGenerator.genera te(EntitiesGenerator.java:56)
at
org.eclipse.jpt.ui.internal.BaseJpaPlatformUi.generateEntiti es(BaseJpaPlatformUi.java:66)
at
org.eclipse.jpt.ui.internal.actions.GenerateEntitiesAction.e xecute(GenerateEntitiesAction.java:27)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:90)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.execute(Pr ojectAction.java:71)
at
org.eclipse.jpt.ui.internal.actions.ProjectAction.run(Projec tAction.java:63)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:256)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
Re: NPE Generating Entity [message #434584 is a reply to message #434581] Mon, 10 September 2007 15:49 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Shawn,

Can you open a bug against Dali for this, and attach a DDL test case so we
can reproduce the error?

We'll take a look at the DDL and see if we can figure out what the problem
is.

Thanks,
Neil
Re: NPE Generating Entity [message #434589 is a reply to message #434584] Tue, 11 September 2007 11:25 Go to previous messageGo to next message
Shawn Peters is currently offline Shawn Peters
Messages: 9
Registered: July 2009
Junior Member
How much of our DDL do you need? Would you like all the schema we have
that touches this one table? Our database is rather large, that is why I
ask.
Re: NPE Generating Entity [message #434590 is a reply to message #434589] Tue, 11 September 2007 12:33 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Shawn wrote:

> How much of our DDL do you need? Would you like all the schema we have
> that touches this one table? Our database is rather large, that is why I
> ask.


I would reduce it to the smallest DLL that still reproduces the error, so
I would start very small and see if it can still be reproduced with say 2
tables and constraints. From there you can add in references until the
error reproduces. You can change the names of the tables and columns to
hide that information if you wish. We just need a test case to reproduce
with.

Neil
Re: NPE Generating Entity [message #434591 is a reply to message #434590] Wed, 12 September 2007 11:23 Go to previous messageGo to next message
Shawn Peters is currently offline Shawn Peters
Messages: 9
Registered: July 2009
Junior Member
Will I need to delete tables or remove the foreign key reference to find
out the smallest set of tables that re-creates the issue? The problem is
that our database is very large and this table is the center of the
database. I would say it is referenced by around 900 tables or more. Would
this be enough information? I am afraid to ask our database team to go and
find every table that touches this, beacuse it might take them awhile. Is
there any other information that I could find that might have something to
do with this error like triggers or something like that?
Re: NPE Generating Entity [message #434595 is a reply to message #434591] Tue, 18 September 2007 16:56 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Based on this information, it might be best for us to try and determine
what the problem is without the test case. If you could, enter a bug with
all of the information you have been able to provide so far, and we will
try to debug the issue without a test case.

Neil
Re: NPE Generating Entity [message #605535 is a reply to message #434581] Mon, 10 September 2007 15:49 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Shawn,

Can you open a bug against Dali for this, and attach a DDL test case so we
can reproduce the error?

We'll take a look at the DDL and see if we can figure out what the problem
is.

Thanks,
Neil
Re: NPE Generating Entity [message #606093 is a reply to message #434584] Tue, 11 September 2007 11:25 Go to previous message
Shawn Peters is currently offline Shawn Peters
Messages: 9
Registered: July 2009
Junior Member
How much of our DDL do you need? Would you like all the schema we have
that touches this one table? Our database is rather large, that is why I
ask.
Re: NPE Generating Entity [message #606095 is a reply to message #434589] Tue, 11 September 2007 12:33 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Shawn wrote:

> How much of our DDL do you need? Would you like all the schema we have
> that touches this one table? Our database is rather large, that is why I
> ask.


I would reduce it to the smallest DLL that still reproduces the error, so
I would start very small and see if it can still be reproduced with say 2
tables and constraints. From there you can add in references until the
error reproduces. You can change the names of the tables and columns to
hide that information if you wish. We just need a test case to reproduce
with.

Neil
Re: NPE Generating Entity [message #606099 is a reply to message #434590] Wed, 12 September 2007 11:23 Go to previous message
Shawn Peters is currently offline Shawn Peters
Messages: 9
Registered: July 2009
Junior Member
Will I need to delete tables or remove the foreign key reference to find
out the smallest set of tables that re-creates the issue? The problem is
that our database is very large and this table is the center of the
database. I would say it is referenced by around 900 tables or more. Would
this be enough information? I am afraid to ask our database team to go and
find every table that touches this, beacuse it might take them awhile. Is
there any other information that I could find that might have something to
do with this error like triggers or something like that?
Re: NPE Generating Entity [message #606106 is a reply to message #434591] Tue, 18 September 2007 16:56 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Based on this information, it might be best for us to try and determine
what the problem is without the test case. If you could, enter a bug with
all of the information you have been able to provide so far, and we will
try to debug the issue without a test case.

Neil
Previous Topic:How to influence mapping type
Next Topic:How to influence mapping type
Goto Forum:
  


Current Time: Wed Aug 27 11:05:23 EDT 2014

Powered by FUDForum. Page generated in 0.02254 seconds