Bug 432771 - XPathFactory.newInstance() throws NullPointerException
XPathFactory.newInstance() throws NullPointerException
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: java-1.6.0-openjdk (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Lillian Angel
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-14 05:03 EST by Stefan Foerster
Modified: 2009-01-09 00:59 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 00:59:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test Case to reproduce the bug (9.50 KB, application/x-zip-compressed)
2008-04-25 05:01 EDT, Stefan Foerster
no flags Details

  None (edit)
Description Stefan Foerster 2008-02-14 05:03:19 EST
Description of problem:

Creating an XPathFactory throws a NullPointerException.

The bug has been reported before to Sun as Bug 6245257
(http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6245257).

Workarounds and a detailed description is given on this page. 

Sun closed the bug report (State: closed, wont be fixed) for no given reason,
but the bug still exists in icedtea.
Comment 1 Lillian Angel 2008-04-17 14:37:25 EDT
They asked for a test case to reproduce the problem:

Evaluation 	

Marking it as "incomplete." Please ask the submitter for a test case in order
for us to reproduce and debug the problem.
  xxxxx@xxxxx   2005-06-07 02:38:01 GMT

I will look into it for icedtea
Comment 2 Lillian Angel 2008-04-23 11:00:20 EDT
Do you have a test case?
Comment 3 Stefan Foerster 2008-04-25 05:01:05 EDT
Created attachment 303763 [details]
Test Case to reproduce the bug

The simplest way to reproduce the bug is using OSGi + Eclipse:

1. Add the jar contained in the attached zip archive to 
   the eclipse target platform (via
   Preferences->Plug-in Development->Target Platform)
2. Create a run configuration via:
   Run->Open Run Dialog->OSGi Framework
3. Set the following: leave everything on default, deselect
   all bundles except:
   - javax.servlet
   - org.eclipse.equinox.ds
   - org.eclipse.equinox.util
   - org.eclipse.osgi
   - org.eclipse.osgi.services
   - xpathtest
4. Run and you will get the following output:
-----------------------------------------------
osgi> java.lang.NullPointerException
	at
javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:219)
	at
javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:140)
	at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:183)
	at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:97)
	at xpathtest.Activator.activate(Activator.java:16)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.lang.reflect.Method.invoke(Method.java:623)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:114)

	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:153)

	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:295)

	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:578)

	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:195)

	at
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:443)

	at
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:187)
	at
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:632)
	at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:598)

	at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
	at
org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:80)

No crash!
-----------------------------------------------

5. if I execute ss on the osgi console I get:
-----------------------------------------------
osgi> ss

Framework is launched.

id	State	    Bundle
0	ACTIVE	    org.eclipse.osgi_3.4.0.v20080218
1	ACTIVE	    org.eclipse.equinox.ds_1.0.0.N20080224-0010
2	ACTIVE	    org.eclipse.equinox.util_1.0.0.v20080218
3	ACTIVE	    org.eclipse.osgi.services_3.1.200.v20071203
4	ACTIVE	    xpathtest_1.0.0
5	ACTIVE	    javax.servlet_2.4.0.v200711021030

osgi> 
-----------------------------------------------
Comment 4 Stefan Foerster 2008-04-25 05:03:23 EDT
Ensure that you select icedtea 1.7 as the execution environment for 
the testcase run configuration.
Comment 5 Andrew Overholt 2008-04-29 15:43:19 EDT
Where can one download the specific versions of the Equinox bundles you list
here?  What version of the Eclipse SDK are you using?
Comment 6 Andrew Overholt 2008-04-29 15:52:18 EDT
Running I20080429-0100 on OpenJDK (java-1.6.0-openjdk-1.6.0.0-0.1.b06.fc9 from
F-9 on an x86 Fedora 8 box) with HEAD of equinox.ds and equinox.util checked out
in my workspace, I get:

osgi> No crash!
ss

Framework is launched.

id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.4.0.qualifier
1	ACTIVE      org.eclipse.osgi.services_3.1.200.v20071203
2	ACTIVE      xpathtest_1.0.0
3	ACTIVE      org.eclipse.equinox.ds_1.0.0.qualifier
4	ACTIVE      javax.servlet_2.4.0.v200803061910
5	ACTIVE      org.eclipse.equinox.util_1.0.0.qualifier
Comment 7 Stefan Foerster 2008-04-30 04:51:25 EDT
(In reply to comment #6)
Today I reproduced the bug with the following setup:
1) icedtea (via rpm -qa | grep icedtea):
 java-1.7.0-icedtea-1.7.0.0-0.19.b21.snapshot.fc8
 java-1.7.0-icedtea-demo-1.7.0.0-0.19.b21.snapshot.fc8
 java-1.7.0-icedtea-plugin-1.7.0.0-0.19.b21.snapshot.fc8
 java-1.7.0-icedtea-src-1.7.0.0-0.19.b21.snapshot.fc8
 java-1.7.0-icedtea-devel-1.7.0.0-0.19.b21.snapshot.fc8
 java-1.7.0-icedtea-javadoc-1.7.0.0-0.19.b21.snapshot.fc8
2) Fedora 8, x86_64
3) Stream stable build of equinox (3.4M6a from
http://download.eclipse.org/eclipse/equinox/)
4) setup as described in comment #3 (selected 3.4M6a + xpathtest.jar as target
platform)
5) I get:
osgi> java.lang.NullPointerException
	at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:219)
	at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:140)
	at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:183)
	at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:97)
	at xpathtest.Activator.activate(Activator.java:16)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:114)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:153)
	at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:295)
	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:578)
	at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:195)
	at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:443)
	at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:187)
	at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:632)
	at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:598)
	at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
	at
org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:80)
No crash!
ss

Framework is launched.

id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.4.0.v20080326
7	ACTIVE      org.eclipse.equinox.ds_1.0.0.v20080310
8	ACTIVE      org.eclipse.osgi.services_3.1.200.v20071203
9	ACTIVE      javax.servlet_2.4.0.v200803061910
10	ACTIVE      org.eclipse.equinox.util_1.0.0.v20080303
11	ACTIVE      xpathtest_1.0.0

osgi> 
Eclipse
Comment 8 Thomas Fitzsimmons 2008-05-02 19:03:14 EDT
I can reproduce this on x86 Rawhide with:

$ md5sum eclipse-equinox-SDK-3.4M6a.zip
4af12cf70020a69dd50eb814dc48e61f  eclipse-equinox-SDK-3.4M6a.zip

$ rpm -q java-1.6.0-openjdk
java-1.6.0-openjdk-1.6.0.0-0.10.b09.fc9.i386

$ rpm -q eclipse-platform
eclipse-platform-3.3.2-11.fc9.i386
Comment 9 Bug Zapper 2008-11-26 04:48:53 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2009-01-09 00:59:23 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.