facebook

NullPointerException in XMLMultiPageEditorPart

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #273707 Reply

    John Yesberg
    Member

    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.

    #273727 Reply

    Loyal Water
    Member

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

    #273731 Reply

    John Yesberg
    Member

    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”&gt;
    <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>

    #275942 Reply

    dbschman
    Member

    This message has not been recovered.

    #276012 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #276019 Reply

    dbschman
    Member

    This message has not been recovered.

    #276088 Reply

    Loyal Water
    Member

    This message has not been recovered.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: NullPointerException in XMLMultiPageEditorPart

You must be logged in to post in the forum log in