[jdom-interest] XML Registry Definition

Mike Vesey mvesey at dbvisions.com
Wed May 1 12:48:42 PDT 2002


Hello all,
I'm new to the list and jdom and hoping I can get a little help.
I'm using BEA's Weblogic Portal Server on solaris and am having some
difficulty with the XML Registry.  It seems that Portal server already has a
XML Registry entry in the config.xml and it is causing my app to bust.  My
app works fine on a server with now XML Registry defined in config.xml.

Here is a message I sent to Jason Hunter, he recommended I forward to this
list for a more prompt response.
Thanks for any help you can provide.
Mike

I have a program I've written
> using jdom that is failing using weblogic's portal server due to an XML
> Registry definition.  This program works fine if there is not already a
> definition defined but with the portal server there is.  I know I need to
> define an XML Registry setting for jdom in the config.xml file but I'm not
> experienced enough with jdom to know exactly how.  Can you help?
> I shouldn't need to direct the program to use this registry right?  The
fact
> that it calls XMLBuilder or whatever should be enough to point it to the
> correct registry.  Am I correct here?
> Here is the existing XML Registry in the Portal server followed by an
email
> snip from one of BEA's engineers.  This shows the exception I'm getting
> followed by his suggestion to create a new Registry.
> Thanks for your help.
> Mike
>
> ***************REGISTRY FROM PORTAL SERVER*****************
>     <XMLRegistry
>
>
DocumentBuilderFactory="weblogic.apache.xerces.jaxp.DocumentBuilderFactoryIm
> pl"
>         Name="portal XML registry"
>
SAXParserFactory="weblogic.apache.xerces.jaxp.SAXParserFactoryImpl"
>
>
TransformerFactory="weblogic.apache.xalan.processor.TransformerFactoryImpl"
> WhenToCache="cache-on-reference">
>         <XMLParserSelectRegistryEntry
>             Name="XMLParserSelectRegistryEntry-994114729515"
> SAXParserFactory="weblogic.apache.xerces.jaxp.SAXParserFactoryImpl"/>
>     </XMLRegistry>
> ***********************************************************
>
> ********************EMAIL SNIP*****************************
> I modified your code;
>
> if ( isVerbose() )
>         {
>             obj = new TappedInputStream(((InputStream) (obj)),
System.out);
>         }
>
>         SAXBuilder saxbuilder = null;
>         Document document2 = null;
>         try
>         {
>             System.out.println("new SAXBuilder()");
>             saxbuilder = new SAXBuilder();
>             System.out.println("Have a new SAXBuilder()");
>
>             document2 = saxbuilder.build(((InputStream) (obj)));
>             System.out.println("saxbuilder.build");
>         }
>         catch ( Exception e )
>         {
>             e.printStackTrace();
>         }
>
> and got the full exception
>
> <PlaceWareConfCenter>
>     <GetPostingURLReply
> url="http://www15.placeware.com/cc/dbvisions/xml/2.2"/>
> </PlaceWareConfCenter>
> org.jdom.JDOMException: Error in building:
> http://xml.org/sax/handlers/LexicalHandler
>         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
>         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
>         at com.placeware.weblogic.Request.getXMLReply(Request.java:208)
>         at com.placeware.weblogic.Request.getURL(Request.java:78)
>         at com.placeware.weblogic.Request.getSessionURL(Request.java:104)
>         at
>
com.placeware.weblogic.PW_AuthenticateUser.processRequest(PW_AuthenticateUse
> r.java:35)
>         at jsp_servlet.__testit._jspService(__testit.java:106)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :265)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :304)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :200)
>         at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> ntext.java:2459)
>         at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> :2039)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> Root cause: org.xml.sax.SAXNotRecognizedException:
> http://xml.org/sax/handlers/LexicalHandler
>         at
>
weblogic.xml.jaxp.RegistryXMLReader.setupXMLReader(RegistryXMLReader.java:40
> 4)
>         at
> weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:124)
>         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:287)
>         at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
>         at com.placeware.weblogic.Request.getXMLReply(Request.java:208)
>         at com.placeware.weblogic.Request.getURL(Request.java:78)
>         at com.placeware.weblogic.Request.getSessionURL(Request.java:104)
>         at
>
com.placeware.weblogic.PW_AuthenticateUser.processRequest(PW_AuthenticateUse
> r.java:35)
>         at jsp_servlet.__testit._jspService(__testit.java:106)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :265)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :304)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :200)
>         at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> ntext.java:2459)
>         at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> :2039)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
> The reason the code ran in the WLS server w/o Portal is that the stand
alone
> server hasn't any XML registry entries defined.
> Portal on the other hand does as you can see in the stack trace so the
> public SAXBuilder() call will use parser registered in the XML registry.
> You should try and confirgure a new XML registry.
> ****************************************************************





More information about the jdom-interest mailing list