I had the same problem.
My hack (deploying in Tomcat) was to do this at init:
static {
System.setProperty("OJB.properties", "/ojb.properties");
}
Worked for me but I believe there's a problem with the way OJB loads its
config.
> -----Original Message-----
> From: Stephen Ting [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 14, 2003 10:03 AM
> To: 'Ojb Users List'
> Subject: Failed to deploy in JBoss 3.0.4
>
>
> hello,
>
> I seach through the mailing list and found some instructions on
> deploying OJB in Jboss. I include the following line in
> user-service.xml.
>
> <mbean code="org.jboss.ojb.odmg.ODMGFactory"
> name="DefaultDomain:service=ODMG,name=ojb/defaultODMG">
> <attribute name="JndiName">ojb/defaultODMG</attribute>
> </mbean>
>
> <mbean code="org.jboss.ojb.pb.PBFactory"
> name="DefaultDomain:service=PB,name=ojb/PBAPI">
> <attribute name="JndiName">ojb/PBAPI</attribute>
> </mbean>
>
> And the following setting in OJB.properties file.
>
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.Conne
> ctionFacto
> ryManagedImpl
> useAutoCommit=0
> ignoreAutoCommitExceptions=true
> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
> JTATransactionManagerClass=org.apache.ojb.otm.transaction.fact
> ory.JBossT
> ransactionManagerFactory
>
> in repository.xml:
>
> eager-release="true"
>
> Now it can find the PB through JNDI. however i have the
> following errors
> when i invoke my bean.
> Seems it can't find my ojb properties files. I include the properties
> and all the xml file in the root directory of the bean jar file deploy
> in the Jboss deploy directory.
>
>
> 2003-01-14 17:38:55,908 INFO [STDOUT] [BOOT] ERROR:
> 2003-01-14 17:38:55,908 INFO [STDOUT] Cannot get OJB properties file,
> use default settings!
> 2003-01-14 17:38:56,189 INFO [STDOUT]
> [org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl] INFO:
> 2003-01-14 17:38:56,189 INFO [STDOUT] Create
> PersistenceBroker instance
> pool, pool configuration was {whenExhaustedAction=0, maxIdle=-1,
> maxActive=21, maxWait=5000, removeAbandoned=false,
> numTestsPerEvictionRun=10, testWhileIdle=false,
> minEvictableIdleTimeMillis=600000, testOnReturn=false,
> logAbandoned=false, removeAbandonedTimeout=300,
> timeBetweenEvictionRunsMillis=-1, testOnBorrow=false}
> 2003-01-14 17:38:56,220 INFO [STDOUT]
> [org.apache.ojb.broker.metadata.RepositoryPersistor] INFO:
> 2003-01-14 17:38:56,220 INFO [STDOUT] OJB Descriptor Repository:
> jar:file:/G:/jboss/jboss-3.0.4/server/default/tmp/deploy/serve
r/default/
> deploy/webeinout-beans.jar/113.webeinout-beans.jar!/repository.xml
> 2003-01-14 17:38:56,251 INFO [STDOUT]
> [org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO:
> 2003-01-14 17:38:56,251 INFO [STDOUT] Ignoring unused Element
> connection-pool
> 2003-01-14 17:38:56,251 INFO [STDOUT]
> [org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO:
> 2003-01-14 17:38:56,267 INFO [STDOUT] Ignoring unused Element
> sequence-manager
> 2003-01-14 17:38:56,267 INFO [STDOUT]
> [org.apache.ojb.broker.metadata.RepositoryXmlHandler] INFO:
> 2003-01-14 17:38:56,267 INFO [STDOUT] Ignoring unused Element
> jdbc-connection-descriptor
> 2003-01-14 17:38:56,455 ERROR [org.jboss.ejb.plugins.LogInterceptor]
> Unexpected Error:
> java.lang.ExceptionInInitializerError
> at
> org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.b
> uildDefaul
> tKey(Unknown Source)
> at
> org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.<
init>(Unkn
> own Source)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
nstructorA
> ccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
gatingCons
> tructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> at java.lang.Class.newInstance0(Class.java:296)
> at java.lang.Class.newInstance(Class.java:249)
> at
> org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory.insta
> ntiate(Unk
> nown Source)
> at
> org.apache.ojb.broker.ta.PersistenceBrokerFactoryFactory.insta
> nce(Unknow
> n Source)
> at org.jboss.ojb.pb.PBFactory.getInstance(Unknown Source)
> at
> my.com.shinyang.einout.pr.PurchaseRequisitionSessionBean.ejbCr
> eate(Unkno
> wn Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
orImpl.jav
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
odAccessor
> Impl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(Statele
ssSessionE
> nterpriseContext.java:52)
> at
> org.jboss.ejb.plugins.StatelessSessionInstancePool.create(Stat
elessSessi
> onInstancePool.java:61)
> at
> org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstanc
ePool.java
> :209)
> at
> org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invo
> ke(Statele
> ssSessionInstanceInterceptor.java:63)
> at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstrac
tTxInterce
> ptor.java:107)
> at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxI
nterceptor
> CMT.java:178)
> at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT
.java:60)
> at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInter
ceptor.jav
> a:130)
> at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
> at
> org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessio
nContainer
> .java:313)
> at org.jboss.ejb.Container.invoke(Container.java:712)
> at
> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
> at
> org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoke
r.java:382
> )
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
orImpl.jav
> a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
odAccessor
> Impl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
> at sun.rmi.transport.Transport$1.run(Transport.java:148)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport
.java:460)
> at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTr
ansport.ja
> va:701)
> at java.lang.Thread.run(Thread.java:536)
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Could not
> read repository class descriptor data, using repository:
> repository.xml:
> Class org.apache.ojb.broker.util.sequence.SequenceEntry could not be
> found in the classpath. This could cause unexpected behaviour of OJB,
> please remove or comment out this class descriptor in the
> repository.xml
> file.: org.apache.ojb.broker.util.sequence.SequenceEntry
> at org.apache.ojb.broker.metadata.MetadataManager.<init>(Unknown
> Source)
> at org.apache.ojb.broker.metadata.MetadataManager.<clinit>(Unknown
> Source)
> ... 40 more
> Caused by: org.apache.ojb.broker.metadata.MetadataException: Class
> org.apache.ojb.broker.util.sequence.SequenceEntry could not
> be found in
> the classpath. This could cause unexpected behaviour of OJB, please
> remove or comment out this class descriptor in the
> repository.xml file.:
> org.apache.ojb.broker.util.sequence.SequenceEntry
> at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:396)
> at
> org.apache.ojb.broker.metadata.RepositoryPersistor.buildReposi
> tory(Unkno
> wn Source)
> at
> org.apache.ojb.broker.metadata.RepositoryPersistor.readDescrip
> torReposit
> ory(Unknown Source)
> ... 42 more
>
>
> can anyone who had successfully deployed OJB in Jboss assist.
>
> Thanks
>
> Stephen
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>