Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
johnyesberg
Post subject: NullPointerException in XMLMultiPageEditorPart  PostPosted: Aug 09, 2007 - 03:27 AM
Registered Member
Registered Member


Joined: Aug 03, 2007
Posts: 6

I have some spring bean definition XML files. When I double-click on one in the Package Explorer, it opens in a MyEclipse XML Editor. The file shows many validation warnings (eg. Referenced bean 'sessionFactory' not found) and errors (eg. parent bean 'baseTransactionProxy' not found). This is possibly related to the fact that this file is included by another file, and these various beans are defined in the other file.

The main problem, however, is that at various times, when I click in the file, or scroll the file, I get a popup dialog box headed "Error", saying "An error has ocurred. See error log for more details. Reason: java.lang.NullPointerException". If I click "Details >>", I get no new information. The error log contains the following:

!ENTRY org.eclipse.jface 4 2 2007-08-09 12:20:50.374
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$StatusLineLabelProvider.getText(XMLMultiPageEditorPart.java:322)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.updateStatusLine(XMLMultiPageEditorPart.java:853)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$5.selectionChanged(XMLMultiPageEditorPart.java:429)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1642)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1083)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$TextEditorPostSelectionAdapter.selectionChanged(XMLMultiPageEditorPart.java:233)
at org.eclipse.wst.sse.ui.StructuredTextEditor$6.run(StructuredTextEditor.java:908)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.fireSelectionChanged(StructuredTextEditor.java:906)
at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.handlePostSelectionChanged(StructuredTextEditor.java:964)
at org.eclipse.wst.sse.ui.StructuredTextEditor$5.selectionChanged(StructuredTextEditor.java:887)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2546)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2498)
at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2477)
at org.eclipse.swt.widgets.Display.runTimer(Display.java:3745)
at org.eclipse.swt.widgets.Display.messageProc(Display.java:2967)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2264)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
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(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

My installation is vanilla Europa, as follows:
*** Date:
Thursday, 9 August 2007 12:22:44 PM EST

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


*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.0.0 M1
Build id: 20070629-6.0.0-M1


*** Eclipse details:
MyEclipse Enterprise Workbench

Version: 6.0.0 M1
Build id: 20070629-6.0.0-M1




Eclipse Project SDK

Version: 3.3.0.v20070607-7M7J-BIolz-OcxWxvWAPSfLPqevO
Build id: I20070625-1500


Eclipse Platform

Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
Build id: I20070625-1500


Eclipse Java Development Tools

Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
Build id: I20070625-1500


Eclipse RCP

Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
Build id: I20070625-1500


Eclipse Plug-in Development Environment

Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
Build id: I20070625-1500


Eclipse Graphical Editing Framework

Version: 3.3.0.v20070620
Build id: 20070620-1021




Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\MyEclipse-6.0M1\eclipse\eclipse.exe
-name
Eclipse
--launcher.library
C:\Program Files\MyEclipse-6.0M1\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
-startup
C:\Program Files\MyEclipse-6.0M1\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
-exitdata
978_68
-vm
C:\Program Files\MyEclipse-6.0M1\jre\bin\javaw.exe

Many thanks,
John.
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Aug 09, 2007 - 09:39 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5764

Can you paste the file here for me so that I can try reproducing the issue at my end.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
johnyesberg
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Aug 09, 2007 - 11:47 PM
Registered Member
Registered Member


Joined: Aug 03, 2007
Posts: 6

Nipun, here is my file WebRoot/WEB-INF/applicationContext-jdbc.xml
John.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans default-lazy-init="false" default-autowire="no"
default-dependency-check="none">
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource" abstract="false"
lazy-init="default" autowire="default" dependency-check="default"
destroy-method="close">
<property name="driverClass">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="jdbcUrl">
<value>jdbc:mysql://localhost/dfpc</value>
</property>
<property name="user">
<value>dfpc</value>
</property>
<property name="password">
<value>dfpc</value>
</property>
<property name="autoCommitOnClose">
<value>true</value>
</property>
</bean>

<bean id="jmxExporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry key="Hibernate:name=statistics">
<ref local="statisticsBean" />
</entry>
</map>
</property>
</bean>

<bean id="statisticsBean"
class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled">
<value>true</value>
</property>
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>


<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="configLocation">
<value>WEB-INF/hibernate.cfg.xml</value>
</property>
<property name="configurationClass">
<value>org.hibernate.cfg.AnnotationConfiguration</value>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.current_session_context_class">
thread
</prop>
<prop key="hibernate.transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</prop>
</props>
</property>
</bean>

<!-- Spring/Hibernate Transaction Support -->
<!-- Added 2007-05-17 by Glennn in Fixing problems with transactions -->


<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>


<bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager" ref ="transactionManager" />
<property name="transactionAttributes">
<props>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="load*">PROPAGATION_REQUIRED, readOnly</prop>
</props>
</property>
</bean>


</beans>
 
 View user's profile Send private message  
Reply with quote Back to top
dbschman
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Sep 20, 2007 - 12:38 AM



Joined: Sep 20, 2007
Posts: 2

I get the same exact problem when editing either spring config files or hibernate mapping files - lots and lots of NPE whenever I open the file or try to edit. After maybe 4 or 5 exceptions though, they go away and I can edit and save the files w/o further problems.

eclipse.buildId=I20070625-1500
java.version=1.5.0_07
java.vendor=Apple Computer, Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Framework arguments: -keyring /Users/dbusch/.eclipse_keyring -showlocation -product com.genuitec.myeclipse.product.ide -product com.genuitec.myeclipse.product.ide
Command-line arguments: -os macosx -ws carbon -arch x86 -keyring /Users/dbusch/.eclipse_keyring -consoleLog -showlocation -product com.genuitec.myeclipse.product.ide -product com.genuitec.myeclipse.product.ide
This is a continuation of log file /Volumes/Storage/workspace/eclipse-3.3/eclipse/workspace/.metadata/.bak_0.log
Created Time: 2007-09-19 14:39:05.817

Error
Wed Sep 19 16:28:00 PDT 2007
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$StatusLineLabelProvider.getText(XMLMultiPageEditorPart.java:322)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.updateStatusLine(XMLMultiPageEditorPart.java:853)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$5.selectionChanged(XMLMultiPageEditorPart.java:429)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1642)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1083)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart$TextEditorPostSelectionAdapter.selectionChanged(XMLMultiPageEditorPart.java:233)
at org.eclipse.wst.sse.ui.StructuredTextEditor$6.run(StructuredTextEditor.java:908)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.fireSelectionChanged(StructuredTextEditor.java:906)
at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.handlePostSelectionChanged(StructuredTextEditor.java:964)
at org.eclipse.wst.sse.ui.StructuredTextEditor$5.selectionChanged(StructuredTextEditor.java:887)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2546)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2498)
at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2477)
at org.eclipse.swt.widgets.Display.runTimers(Display.java:3434)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2930)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
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(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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.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)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-nipun
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Sep 21, 2007 - 06:25 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5764

dbschman,
Can you switch to a new workspace and try working with the config files again. Do these errors still pop up ?

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
dbschman
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Sep 21, 2007 - 08:16 PM



Joined: Sep 20, 2007
Posts: 2

yes and no. Starting a new workspace did not get rid of the NPEs in the hibernate mapping files but it did solve them for the spring configuration files.

For this I imported an existing project into the new workspace, so I will try creating another new workspace and creating the projects from scratch.

Dan
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-nipun
Post subject: RE: NullPointerException in XMLMultiPageEditorPart  PostPosted: Sep 24, 2007 - 06:32 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5764

Can you send me a sample project with these files so that I can try reproducing this at my end as well.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
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