From: Sam Ruby <rubys@intertwingly.net>
To: Andrew Haley <aph@redhat.com>
Cc: Mark Wielaard <mark@klomp.org>, java@gcc.gnu.org
Subject: Re: NPE in parser->getDOMImplementation() with CNI
Date: Mon, 22 Jun 2009 12:33:00 -0000 [thread overview]
Message-ID: <4A3F7A07.1080205@intertwingly.net> (raw)
In-Reply-To: <4A3F701B.2000007@redhat.com>
Andrew Haley wrote:
> Sam Ruby wrote:
>> Andrew Haley wrote:
>>> Mark Wielaard wrote:
>>>> On Sun, 2009-06-21 at 16:46 +0100, Andrew Haley wrote:
>>>>> Sam Ruby wrote:
>>>>>> I'm trying to develop a JAXP implementation using CNI, but I get a
>>>>>> NullPointerException when I try to get a DOMImplementation. I've
>>>>>> attached a small script (tested on Ubuntu 9.04) which demonstrates the
>>>>>> problem.
>>>>>>
>>>>>> Any help would be appreciated.
>>>>> Congratulations on this excellent test case. Next time I want to tell
>>>>> people how to do it right, I'll point them at your posting.
>>>>>
>>>>> However, I get
>>>>>
>>>>> $ sh ~/testdomimpl.sh
>>>>> gnu.xml.dom.DomDocumentBuilderFactory@160ecdad
>>>>> gnu.xml.dom.DomDocumentBuilder@15ffbc45
>>>>> gnu.xml.dom.DomImpl@15ef0ee5
>>>>>
>>>>> gnu.xml.dom.DomDocumentBuilderFactory@2df0bea7
>>>>> gnu.xml.dom.DomDocumentBuilder@2de03d5f
>>>>> gnu.xml.dom.DomImpl@2dd0bfdf
>>>>> $ gcj --version
>>>>> gcj (GCC) 4.4.0 20090307 (Red Hat 4.4.0-0.23)
>>>> I get the same with that version of gcj.
>>>> But on an older gcj installation:
>>>> gcj (Debian 4.3.2-2) 4.3.2
>>>>
>>>> gnu.xml.dom.DomDocumentBuilderFactory@6992f029
>>>> gnu.xml.dom.DomDocumentBuilder@647a3539
>>>> gnu.xml.dom.DomImpl@64826fa9
>>>>
>>>> gnu.xml.dom.DomDocumentBuilderFactory@17d5dffb
>>>> gnu.xml.dom.DomDocumentBuilder@12bcf52b
>>>> java.lang.NullPointerException
>>>> at java.io.PrintStream.println(PrintStream.java:473)
>>> I found the problem.
>>>
>>> There is an implementation of jaxp in /usr/share/java/jaxp-1.3.jar and
>>> another in /usr/lib/libgcj.so.90. They are not the same version, and
>>> they are not compatible.
>>>
>>> If you link against /usr/lib/libgcj.so.90 then you must compile against
>>> the version of jaxp in that library.
>>>
>>> Do this:
>>>
>>> gcjh -cp /usr/share/java/libgcj.jar -d headers \
>>> org.w3c.dom.DOMImplementation \
>>> javax.xml.parsers.DocumentBuilder \
>>> javax.xml.parsers.DocumentBuilderFactory
>> I still see the problem. Even after I apt-get remove libjaxp1.3-java-gcj.
>
> The problem is not libjaxp1.3-java-gcj, it's libjaxp1.3-java
Bingo! apt-get remove libjaxp1.3-java... problem solved! Thanks!
- Sam Ruby
next prev parent reply other threads:[~2009-06-22 12:33 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-21 2:07 Sam Ruby
2009-06-21 15:46 ` Andrew Haley
2009-06-21 20:27 ` Mark Wielaard
2009-06-22 8:20 ` Andrew Haley
2009-06-22 11:13 ` Sam Ruby
2009-06-22 11:08 ` Andrew Haley
2009-06-22 11:33 ` Sam Ruby
2009-06-22 11:51 ` Andrew Haley
2009-06-22 12:33 ` Sam Ruby [this message]
2009-06-23 2:09 ` Sam Ruby
2009-06-23 9:30 ` Andrew Haley
2009-06-23 9:40 ` Chris Burdess
2009-06-23 9:58 ` Bryce McKinlay
2009-06-23 10:55 ` namespace namespace (was: NPE in parser->getDOMImplementation() with CNI) Sam Ruby
2009-06-23 12:41 ` namespace namespace Andrew Haley
2009-06-23 13:42 ` Sam Ruby
2009-06-23 14:04 ` Bryce McKinlay
2009-06-23 14:20 ` Andrew Haley
2009-06-23 20:23 ` Sam Ruby
2009-06-24 9:18 ` Andrew Haley
2009-06-24 11:53 ` Sam Ruby
2009-06-24 12:03 ` Bryce McKinlay
2009-06-24 12:38 ` Andrew Haley
2009-06-23 10:45 ` NPE in parser->getDOMImplementation() with CNI Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A3F7A07.1080205@intertwingly.net \
--to=rubys@intertwingly.net \
--cc=aph@redhat.com \
--cc=java@gcc.gnu.org \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).