You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Klaasjan Brand <kl...@topicus.nl> on 2003/02/13 09:15:08 UTC

problems loading repository.xml using resin

Hi,

We're using OJB 0.9.9 for a web application which has to be deployed on
Resin. The app works fine on Tomcat, but when deployed on Resin I get
the following error:

[BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class
Could not read repository class descriptor data, using repository:
repository.xml: Exception when reading metadata information, please
check your repository.xml file
java.lang.NullPointerException
	at
org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(RepositoryXmlHandler.java:834)
	at
org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:211)
	at com.caucho.xml.XmlParser.addElement(XmlParser.java:2222)
	at com.caucho.xml.XmlParser.parseElement(XmlParser.java:609)
	at com.caucho.xml.XmlParser.parseNode(XmlParser.java:360)
	at com.caucho.xml.XmlParser.parseInt(XmlParser.java:242)
	at com.caucho.xml.AbstractParser.parse(AbstractParser.java:584)
	at com.caucho.xml.AbstractParser.parse(AbstractParser.java:654)
	at
org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:288)
...

It seems the repository.xml cannot be parsed using the default XML
parser provided by Resin. Switching Resin to xerces/xalan for XML
handling solves the problem, but since it's just XML it should work
without tweaking. (and without asking hosting providers to change global
server settings...)

Did anyone install an OJB application on Resin and have the same
problem? Or does anyone understand why the Resin XML parser pukes at the
OJB repository?

-- 
Klaasjan Brand <kl...@topicus.nl>
Topicus B.V.


RE: problems loading repository.xml using resin

Posted by Ricardo Tercero Lozano <rt...@isoco.com>.
I put this conde in resin.conf inside a <host> tag.

<host id=.....>
....
   <system-property javax.xml.parsers.DocumentBuilderFactory=
           "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
    <system-property javax.xml.parsers.SAXParserFactory=
           "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
.....
</host>



I don't know if is used only for the host definition or if it is 
global for all hosts defined.


Ricardo.



-----Mensaje original-----
De: Klaasjan Brand [mailto:klaasjan.brand@topicus.nl]
Enviado el: jueves, 13 de febrero de 2003 16:06
Para: OJB Users List
Asunto: Re: problems loading repository.xml using resin


On Thu, 2003-02-13 at 14:27, Leandro Rodrigo Saad Cruz wrote:
> I use resin to develop with ojb, but I put my parsers on WEB-INF/lib

That's needed when using Xerces too, but how do you set up OJB so it's
using Xerces to parse it's repository. The only way I know with Resin is
to use a server global switch which is a little problematic with a
hosting provider which runs multiple sites on one server...

-- 
Klaasjan Brand <kl...@topicus.nl>
Topicus B.V.


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: problems loading repository.xml using resin

Posted by Klaasjan Brand <kl...@topicus.nl>.
On Thu, 2003-02-13 at 14:27, Leandro Rodrigo Saad Cruz wrote:
> I use resin to develop with ojb, but I put my parsers on WEB-INF/lib

That's needed when using Xerces too, but how do you set up OJB so it's
using Xerces to parse it's repository. The only way I know with Resin is
to use a server global switch which is a little problematic with a
hosting provider which runs multiple sites on one server...

-- 
Klaasjan Brand <kl...@topicus.nl>
Topicus B.V.


Re: problems loading repository.xml using resin

Posted by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br>.
I use resin to develop with ojb, but I put my parsers on WEB-INF/lib

On Thu, 2003-02-13 at 06:15, Klaasjan Brand wrote:
> Hi,
> 
> We're using OJB 0.9.9 for a web application which has to be deployed on
> Resin. The app works fine on Tomcat, but when deployed on Resin I get
> the following error:
> 
> [BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class
> Could not read repository class descriptor data, using repository:
> repository.xml: Exception when reading metadata information, please
> check your repository.xml file
> java.lang.NullPointerException
> 	at
> org.apache.ojb.broker.metadata.RepositoryXmlHandler.getIsoLevel(RepositoryXmlHandler.java:834)
> 	at
> org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:211)
> 	at com.caucho.xml.XmlParser.addElement(XmlParser.java:2222)
> 	at com.caucho.xml.XmlParser.parseElement(XmlParser.java:609)
> 	at com.caucho.xml.XmlParser.parseNode(XmlParser.java:360)
> 	at com.caucho.xml.XmlParser.parseInt(XmlParser.java:242)
> 	at com.caucho.xml.AbstractParser.parse(AbstractParser.java:584)
> 	at com.caucho.xml.AbstractParser.parse(AbstractParser.java:654)
> 	at
> org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:288)
> ...
> 
> It seems the repository.xml cannot be parsed using the default XML
> parser provided by Resin. Switching Resin to xerces/xalan for XML
> handling solves the problem, but since it's just XML it should work
> without tweaking. (and without asking hosting providers to change global
> server settings...)
> 
> Did anyone install an OJB application on Resin and have the same
> problem? Or does anyone understand why the Resin XML parser pukes at the
> OJB repository?
> 
> -- 
> Klaasjan Brand <kl...@topicus.nl>
> Topicus B.V.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://jakarta.apache.org/ojb