Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mmelby
Post subject: NullPointerException when using hibernate properties config  PostPosted: Sep 28, 2006 - 01:44 AM



Joined: Sep 28, 2006
Posts: 5

This happens when trying to add a mapping.


java.lang.NullPointerException
at com.genuitec.eclipse.hibernate.ui.MappingsSectionPart.addItem(MappingsSectionPart.java:165)
at com.genuitec.eclipse.hibernate.ui.TableSectionPart$1.widgetSelected(TableSectionPart.java:90)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Thoughts?
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Sep 28, 2006 - 11:36 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2339

mmelby,

Can you please post all the information we request in the Posting Guidelines thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug.

Thanks,
Brian.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mmelby
Post subject:   PostPosted: Sep 28, 2006 - 05:59 PM



Joined: Sep 28, 2006
Posts: 5

Sorry, here is some more information.

The error occurs when viewing the hibernate.cfg.xml with the MyEclipse Hibernate Config Editor. When I select to open the file using this editor I am presented with a popup warning stating "Unsupported Content Type in Editor. To associate file extension with a supported content type, please see Content Type Preferences Page". I click ok and proceed. From the editor I select the "Add..." button under the mappings heading. When selecting this button I get two Exceptions in error log.


java.lang.NullPointerException
at com.genuitec.eclipse.hibernate.ui.MappingsSectionPart.addItem(MappingsSectionPart.java:165)
at com.genuitec.eclipse.hibernate.ui.TableSectionPart$1.widgetSelected(TableSectionPart.java:90)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


and


Unhandled event loop exception. Stack trace not available.


Install Details:

*** Date: Thu Sep 28 09:58:32 PDT 2006

*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_05

*** MyEclipse details:
MyEclipse Enterprise Workbench

Version: 5.0 GA
Build id: 20060805-5.0-GA

*** Eclipse details:
MyEclipse Enterprise Workbench

Version: 5.0.1 GA
Build id: 20060810-5.0.1-GA

Eclipse Platform

Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
Build id: M20060629-1905

Eclipse RCP

Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
Build id: M20060629-1905

Eclipse Java Development Tools

Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
Build id: M20060629-1905

Eclipse Plug-in Development Environment

Version: 3.2.0.v20060609m------6zXJJzJzJq
Build id: M20060629-1905

Eclipse Project SDK

Version: 3.2.0.v20060609m-GNq6oQq-7es-Y81
Build id: M20060629-1905

Eclipse Graphical Editing Framework

Version: 3.2.0.v20060626
Build id: 20060627-0816

Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\dev\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
f9c_80
-product
com.genuitec.myeclipse.product.ide
-clean
-vm
c:\jdk1.5.0_05\bin\javaw.exe



Thank you for any help.
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Sep 29, 2006 - 12:45 AM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2339

mmelby,

The unsupported content type issue is really odd. What is the file name of your configuration file?

Also, is it a valid configuration file? Can you paste the first few lines of your configuration up until the <hibernate-configuration> starting tag here?
Have you added Hibernate capabilites to the project containing the configuration file?

Best,
Brian.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mmelby
Post subject:   PostPosted: Sep 29, 2006 - 02:05 AM



Joined: Sep 28, 2006
Posts: 5

Hi Brian,

The file name is hibernate.cfg.xml. It should be vaild as it was created using the wizard to add hibernate capabilities. Here it is..


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>

Thanks.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Oct 03, 2006 - 01:20 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

mmelby,
If that is the *entire* file, thta is not complete. Did you type that out or copy-paste the entire thing?

Also I just helped a user over a period of a week that was having a similar problem with our HTML/JSP designer and it all turned out to be a problem with XML Buddy interfering with our editors not letting it load the content.

Do you have XML Buddy installed?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits