[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem using the jdbc example: 'org.apache.crimson.jaxp' doesn't like the <name:name2> xml nodes??
Gilles Lavaux wrote:
In the xmlBlaster/CHANGES file we noted:
- Bug fixed in JDBC adapter, NullPointerException because of
missing namespace (thanks to Juergen Freidling).
which applies to version 0.79b and above.
Your description remembers me to this problem.
It occured because we had the namespace declaration
missing:
<database:adapter xmlns:database='http://www.xmlBlaster.org/jdbc'>
Adding this line (see
xmlBlaster/src/java/org/xmlBlaster/client/XmlDbMessageWrapper.java
line 89)
solved the problem.
Only the new xml parser was overreacting.
hope it helps,
Marcel
>
> Hello Marcel
>
> I try to use the jdbc jacaclient to access some postgresql database.
> I had no luck with it, the output of XmlDBClient.java is :
>
> Apr 10, 2001 9:17:53 PM INFO XmlDBClient: Connected to xmlBlaster as
> 'XmlDBClient'
> Apr 10, 2001 9:17:53 PM INFO XmlDBClient: Published query ...
> message sent:<database:adapter>
> <database:url>jdbc:postgresql://blackbox.esrin.e
> sa.it:5432/tennis</database:url> <database:username>css</database:username>
> <dat
> abase:password>css</database:password> <database:interaction type='query'/>
> <dat
> abase:command><![CDATA[select * from tennis_user;]]></database:command>
> <databas
> e:connectionlifespan ttl='1'/> <database:rowlimit max='50'/>
> <database:confirmat
> ion confirm='true'/></database:adapter>
> Waiting...
> Waiting...
> Waiting...
> <exception id='XmlDBAdapter.SqlInitError'>
> <class>org.xmlBlaster.util.XmlBlasterException</class>
> <reason><![CDATA[java.lang.NullPointerException]]></reason>
> </exception>
> Apr 10, 2001 9:17:55 PM INFO XmlDBClient: Logout ...
> Apr 10, 2001 9:17:55 PM INFO CorbaCallbackServer-XmlDBClient: The callback
> server is shutdown.
>
> the xmlBl;aster server reports:
>
> Apr 10, 2001 9:21:56 PM INFO AuthServerImpl: Trying login for XmlDBClient
> Apr 10, 2001 9:21:56 PM INFO CallbackCorbaDriver: Accessing client
> callback reference using given IOR string
> Apr 10, 2001 9:21:56 PM INFO Authenticate: Successful login for client
> XmlDBClient
> createDocument()
> docBuilder:org.apache.crimson.jaxp.DocumentBuilderImpl at 161dff
> createDocument() content:[B at b81e3
> Content string:<database:adapter>
> <database:url>jdbc:postgresql://blackbox.esrin
> .esa.it:5432/tennis</database:url>
> <database:username>css</database:username> <d
> atabase:password>css</database:password> <database:interaction
> type='query'/> <d
> atabase:command><![CDATA[select * from tennis_user;]]></database:command>
> <datab
> ase:connectionlifespan ttl='1'/> <database:rowlimit max='50'/>
> <database:confirm
> ation confirm='true'/></database:adapter>
> Exception found location=XmlDBAdapter.java:120
> Apr 10, 2001 9:21:57 PM ERROR
> XmlDBAdapter.java:120-XmlDBAdapter.SqlInitError:
> java.lang.NullPointerException
> java.lang.Exception
> at org.xmlBlaster.util.Log.error(Log.java:269)
> at
> org.xmlBlaster.protocol.jdbc.XmlDBAdapter.query(XmlDBAdapter.java:120
> )
> at
> org.xmlBlaster.protocol.jdbc.XmlDBAdapterWorker.run(XmlDBAdapterWorke
> r.java:62)
> Apr 10, 2001 9:21:57 PM INFO CallbackCorbaDriver: Shutdown of CORBA
> callback client done
>
> I have tested the same database access with a minimal java:jdbc program and
> it works.
> I have put several logs in the XmlDBAdapter.java file and I found that:
> - the XmlDBAdapter.createDocument() docBuilder is a
> 'org.apache.crimson.jaxp.DocumentBuilderImpl at 161dff'
> - DocumentBuilderImpl.parse() fail if it try to parse an xml content who has
> node like '<database:adapter>'. The ':' causing the problem.
>
> I attach to this mail a XmlTest.java I have done to investigate this pb.
> Parsing a String like "<database>\nhello\n</database>" is ok,
> parsing "<database:a>\nhello\n</database:a>" doesn't work.
>
> Do I use the good XML parser? this 'org.apache.crimson.jaxp' is in the
> parser.jar file. And I start my xmlBlaster apps with a
> java -Djava.ext.dirs=c:\xmlblaster\lib class etc... so all the .jar are in
> view; it it the pb?
>
> Thanks for any info, I would love to be able to use the jdbc possibility...
>
> Gilles
>
> ------------------------------------------------------------------------
> Name: XmlTest.java
> XmlTest.java Type: Nicht spezifizierter Typ (application/octet-stream)
> Encoding: quoted-printable
--
Marcel Ruff
mailto:ruff at swand.lake.de
http://www.lake.de/home/lake/swand/
http://www.xmlBlaster.org