mapping classes on multiple joined tables

2004-04-03 Thread [EMAIL PROTECTED]
Hello,

I'm trying to map classes on multiple joined tables as described in OJB tutorial.
This is my situation: I have a class A that extends a class B that in turn extends a 
class C that extends a fourth class D. In the classes A, B and C there is an attribute 
referring to the super class's primary key. The referene descriptor look like:

reference-descriptor name =super
 class-ref=pack.B
 auto-retrieve=true
 auto-update=true
 auto-delete=true

foreignkey field-ref=bid/
/reference-descriptor

my application correctly saves the data on the database, but when querying for read, I 
get a NullPointerException. I don't understand why Any help would be very 
appreciated.

Best regards,
Ilaria.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Configuration problem with rc6

2004-04-03 Thread Frédéric
Well, i'm so surprised because my repository hasn't
changed at all with the 2 versions... 

In fact, all was fine with rc3 until the application
was deployed. Now, multiple users access the same
database in the same time and there are some very
strange behaviour. It seems that transaction are not
properly isolated between the users. Can it be
possible ?

Thanks, Fred

 --- Armin Waibel [EMAIL PROTECTED] a écrit :  Hi,
 
 Caused by:
 org.apache.ojb.broker.metadata.MetadataException:
 Can
 not read repository class descriptor data, using
 repository: repository.xml
 
 Caused by:
 org.apache.ojb.broker.metadata.MetadataException:
 Exception when reading metadata information, please
 check your repository.xml file
 
 indicate that something is wrong with your metadata
 mapping.
 So, enable 'DEBUG' mode for
 
 org.apache.ojb.broker.metadata.RepositoryXmlHandler
 (and

org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler
 if 
 you don't have success)
 
 If you use OJB default logging change the entries in
 OJB.properties. 
 Else it depends on the used logging framework.
 
 regards,
 Armin
 
 Frédéric wrote:
 
  Well, sorry ;) ! 
  
  Here is the root cause :
  
  java.lang.ExceptionInInitializerError
  at
 

org.apache.ojb.broker.util.BrokerHelper.crossCheckPBKey(BrokerHelper.java:123)
  at
 

org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker(PersistenceBrokerFactoryDefaultImpl.java:91)
  at
 

org.apache.ojb.broker.PersistenceBrokerFactory.createPersistenceBroker(PersistenceBrokerFactory.java:86)
  at
 

org.apache.ojb.odmg.DatabaseImpl.open(DatabaseImpl.java:121)
  at
 

com.eads.agit.framework.DatabaseManager.(DatabaseManager.java:63)
  at
 

com.eads.agit.framework.DatabaseManager.getInstance(DatabaseManager.java:46)
  at
 

com.eads.agit.framework.AgitAction.getDatabaseManager(AgitAction.java:327)
  at
 

com.eads.agit.conteneur.struts.ActIdentOut.execute(ActIdentOut.java:35)
  at
 

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:480)
  at
 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
  at
 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
  at
 

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
  at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  at
 

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  at
 

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
 

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at
 

org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
 

org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
  at
 

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at
 

org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at
 

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at
 

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
  at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
 

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
  at
 

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
  at
 

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 

org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
 


Re: Configuration problem with rc6

2004-04-03 Thread Guido Beutler
Hello,

i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without usng 
OJB or ejb.
My problem now is that I would like to lock some (not all) objects 
imediately.
Normaly I use read uncommited but at EJB's the data are written at 
commit of the
whole transaction what means other apps can modify the data until the ejb
transaction is commited.
I would like to lock the objects (again, not all) for other reads like 
repeatable read.
Is it possible to do this only for some objects? Where to set the jdbc 
transaction isolation
in general when usin ojb with ejb's?

best regards,

Guido

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Transaction isolation OJB inside EJB's

2004-04-03 Thread Guido Beutler
Hello,

i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without usng 
OJB or ejb.
My problem now is that I would like to lock some (not all) objects 
imediately.
Normaly I use read uncommited but at EJB's the data are written at 
commit of the
whole transaction what means other apps can modify the data until the ejb
transaction is commited.
I would like to lock the objects (again, not all) for other reads like 
repeatable read.
Is it possible to do this only for some objects? Where to set the jdbc 
transaction isolation
in general when usin ojb with ejb's?

best regards,

Guido

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Configuration problem with rc6

2004-04-03 Thread Guido Beutler
Sorry wrong header 

Guido Beutler wrote:

Hello,

i've got a small howto question.
I use PB API of OJB RC6 inside of JBoss 3.2.3 with DB2.
There are applications which directly access the same data without 
usng OJB or ejb.
My problem now is that I would like to lock some (not all) objects 
imediately.
Normaly I use read uncommited but at EJB's the data are written at 
commit of the
whole transaction what means other apps can modify the data until the ejb
transaction is commited.
I would like to lock the objects (again, not all) for other reads like 
repeatable read.
Is it possible to do this only for some objects? Where to set the jdbc 
transaction isolation
in general when usin ojb with ejb's?

best regards,

Guido

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]