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 Ju...@Bertelsmann.de on 2003/06/25 13:49:31 UTC

web app in jboss -- where to put files?

Hello!

I have a generall questions. I have a web application deployed on jboss
3.0.6. I want to use OJB for persistence in that web application. I want to
able to use my preconfigured datasource.

I followed the steps in the documentation how to deploy ojb on jboss which
means that I created the ojb.sar folder with the neccessary archives. My
question is now:

Where do I put my repository files needed for the persistence for my web
application? In the ojb.sar folder or in the WEB-INF folder of my web app?

I tried to put it in the ojb.sar folder but I get exception when trying to
get:

Implementation odmg = factory.getInstance();

Here is the stack trace:

java.lang.ExceptionInInitializerError
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultK
ey(Unknown Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Unknow
n Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:306)
        at java.lang.Class.newInstance(Class.java:259)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
Source)
        at
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unknown
Source)
        at
org.apache.ojb.broker.PersistenceBrokerFactory.getConfigurator(Unknown
Source)
        at org.apache.ojb.odmg.OJBJ2EE_2.getInstance(Unknown Source)
        at org.apache.ojb.jboss.ODMGFactory.getInstance(Unknown Source)
        at
de.arvatosystems.monitoring.business.scheduler.InitServlet.init(InitServlet.
java:180)
....

Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not read
repository class descriptor data, using repository: repository.xml: Error
creating PersistentField: de.arvatosystems.monitoring.business.vo.CoreVO,
entryID
        at org.apache.ojb.broker.metadata.MetadataManager.init(Unknown
Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown
Source)
        at org.apache.ojb.broker.metadata.MetadataManager.<clinit>(Unknown
Source)
        ... 69 more


CoreVO with the attribute entryID is the first class and field descriptor in
my repository_user.xml

Where is my mistake?

Thanks, Julia.

Re: web app in jboss -- where to put files?

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi,

> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not
read
> repository class descriptor data, using repository: repository.xml:
Error
> creating PersistentField:
de.arvatosystems.monitoring.business.vo.CoreVO,
> entryID

seems the repository file was found, but maybe it's corrupt.
Please check your repository file - in particular repository_user.xml
for CoreVO.
Or OJB can not instantiate PersistentField object for 'entryID'.
There should be a stack trace caused by PersistentFieldFactory
say what's going wrong.

regards,
Armin

----- Original Message -----
From: <Ju...@Bertelsmann.de>
To: <oj...@db.apache.org>
Sent: Wednesday, June 25, 2003 1:49 PM
Subject: web app in jboss -- where to put files?


> Hello!
>
> I have a generall questions. I have a web application deployed on
jboss
> 3.0.6. I want to use OJB for persistence in that web application. I
want to
> able to use my preconfigured datasource.
>
> I followed the steps in the documentation how to deploy ojb on jboss
which
> means that I created the ojb.sar folder with the neccessary archives.
My
> question is now:
>
> Where do I put my repository files needed for the persistence for my
web
> application? In the ojb.sar folder or in the WEB-INF folder of my web
app?
>
> I tried to put it in the ojb.sar folder but I get exception when
trying to
> get:
>
> Implementation odmg = factory.getInstance();
>
> Here is the stack trace:
>
> java.lang.ExceptionInInitializerError
>         at
>
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefa
ultK
> ey(Unknown Source)
>         at
>
org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(Un
know
> n Source)
>         at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
rAcces
> sorImpl.java:39)
>         at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
truc
> torAccessorImpl.java:27)
>         at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at java.lang.Class.newInstance0(Class.java:306)
>         at java.lang.Class.newInstance(Class.java:259)
>         at
>
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(Unknown
> Source)
>         at
>
org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Unkn
own
> Source)
>         at
> org.apache.ojb.broker.PersistenceBrokerFactory.getConfigurator(Unknown
> Source)
>         at org.apache.ojb.odmg.OJBJ2EE_2.getInstance(Unknown Source)
>         at org.apache.ojb.jboss.ODMGFactory.getInstance(Unknown
Source)
>         at
>
de.arvatosystems.monitoring.business.scheduler.InitServlet.init(InitServ
let.
> java:180)
> ....
>
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not
read
> repository class descriptor data, using repository: repository.xml:
Error
> creating PersistentField:
de.arvatosystems.monitoring.business.vo.CoreVO,
> entryID
>         at org.apache.ojb.broker.metadata.MetadataManager.init(Unknown
> Source)
>         at
org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown
> Source)
>         at
org.apache.ojb.broker.metadata.MetadataManager.<clinit>(Unknown
> Source)
>         ... 69 more
>
>
> CoreVO with the attribute entryID is the first class and field
descriptor in
> my repository_user.xml
>
> Where is my mistake?
>
> Thanks, Julia.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>