-->
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: NPE opening Reverse Engineering Editor
PostPosted: Thu Nov 17, 2005 4:24 pm 
Newbie

Joined: Fri Nov 21, 2003 5:17 pm
Posts: 9
Location: Oklahoma City, OK, USA
Winbloze XP
Eclipse 3.1.1
WTP 0.7.1
JRE 1.5.0_04

I successfully generated a hibernate.reveng.xml file yesterday and was able to open it in the editor then, but it fails now.

I've cloned the file and removed everything between <hibernate-reverse-engineering> & </hibernate-reverse-engineering> but to no avail.

Any suggestions?

Hibernate Tools version: 3.1.0.N200511111411
Full stack trace of any exception that occurs:
Code:
java.lang.NullPointerException
   at org.hibernate.eclipse.mapper.model.DOMReverseEngineeringDefinition.<init>(DOMReverseEngineeringDefinition.java:74)
   at org.hibernate.eclipse.mapper.editors.ReverseEngineeringEditor.initSourcePage(ReverseEngineeringEditor.java:112)
   at org.hibernate.eclipse.mapper.editors.ReverseEngineeringEditor.addPages(ReverseEngineeringEditor.java:60)
   at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:133)
   at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:241)
   at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
   at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:384)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
   at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:283)
   at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:126)
   at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
   at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
   at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:391)
   at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1102)
   at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1051)
   at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1256)
   at org.eclipse.ui.internal.PartStack.add(PartStack.java:442)
   at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:109)
   at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:60)
   at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:212)
   at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:202)
   at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:758)
   at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:665)
   at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:628)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2360)
   at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2295)
   at org.eclipse.ui.internal.WorkbenchPage.access$9(WorkbenchPage.java:2287)
   at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2273)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
   at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2268)
   at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:279)
   at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:271)
   at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:178)
   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:3080)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
   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)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 4:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
very weird - its caused by the DOM model returning null for a node....spookey.

What if you create a new file and open that ?

(btw. please put it in jira so i can add a error dialog or sanity here instead of a stupid NPE)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: new generation works fine
PostPosted: Thu Nov 17, 2005 5:05 pm 
Newbie

Joined: Fri Nov 21, 2003 5:17 pm
Posts: 9
Location: Oklahoma City, OK, USA
Oddly enough, I can gen a new .reveng.xml and specify some tables to include. However, when it's at the end of the process, it opens the file in my XML editor.

I'm wondering if this is a conflict between the Rev Engineering Editor and XML Buddy? I know Bob has railed about the way Eclipse handles multiple editors handling a given file type. I wonder if what we're seeing is something from that realm?

Here's the simple .reveng.xml file I just generated:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<table-filter match-catalog="cpdb" match-name="Assignment"/>
<table-filter match-catalog="cpdb" match-name="Citizens"/>
<table-filter match-catalog="cpdb" match-name="ComplaintNotes"/>
<table-filter match-catalog="cpdb" match-name="ComplaintTypes"/>
<table-filter match-catalog="cpdb" match-name="Complaints"/>
<table-filter match-catalog="cpdb" match-name="Departments"/>
<table-filter match-catalog="cpdb" match-name="Employees"/>
<table-filter match-catalog="cpdb" match-name="Permissions"/>
<table-filter match-catalog="cpdb" match-name="Reviews"/>
</hibernate-reverse-engineering>

BTW, the DTD from sourceforge gets a 404...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 5:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you use the WTP xml editor (which hibernate tools integrate into) the DTD will automatically be resolved from a cached copy in the plugins.


and yes xmlbuddy and wtp has certain "discussions" about who wins ;)

_________________
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.