specifing the location of repository.xml

2003-03-12 Thread Christopher Cheng
How could I specify the path of repository.xml? OJB.properties says that it would look 
up in the classpath. I would like to put those files in /WEB-INF/conf/ instead of 
/WEB-INF/classes.


Why can't work for deploying OJB(db-ojb-1.0.rc1) to Jboss3.0.4?

2003-03-12 Thread 蔡博至
Hi!
I try to re-deploy 1.0.rc1 to Jboss3.0.4,but it can't work. I ever deployed 0.9.8 
success.
The repository_database.xml file as:

   


   

I have followed the deployment doc step by step. It raised error message:

11:08:32,031 INFO  [STDOUT] [org.apache.ojb.broker.metadata.ConnectionRepository] INFO:

11:08:32,046 INFO  [STDOUT] Could not found org.apache.ojb.broker.metadata.JdbcC
onnectionDescriptor for PBKey org.apache.ojb.broker.PBKey: repository=repository
.xml, user=null, password=null

11:08:32,093 INFO  [STDOUT] [org.apache.ojb.broker.accesslayer.ConnectionManager
Factory] ERROR:

11:08:32,109 INFO  [STDOUT] ConfigurableFactory instantiation failed for class c
lass org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
* Factory types:
1 - Type: org.apache.ojb.broker.PersistenceBroker
* Factory arguments:
1 - Argument: [EMAIL PROTECTED]
11:08:32,156 INFO  [STDOUT] null
11:08:32,187 ERROR [STDERR] java.lang.reflect.InvocationTargetException
 :
 :
What's wrong?

Thanks.

Dogie Tsai



Re: OJB 0.9.9 and Oracle 817 always rollback

2003-03-12 Thread Thomas Phan
Hi Armin,

I still get the exception after changing the conf to:








   

[org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO: Create
new connection
pool:[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=thin:@localhost:1521:es
  user=esf
  password=*
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, maxActive=21,
maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10,
testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false,
logAbandoned=false, removeAbandonedTimeout=300,
timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
  batchMode=false

[EMAIL PROTECTED]
 sequenceManagerClass=class
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
 Properties={grabSize=20}
]
]
[2003-03-13 09:23:06,755 LV: INFO CL:jcrontab]
org.jcrontab.data.DataNotFoundException: No CrontabEntries available
[org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO: Rollback was
called, do rollback on current connection
[EMAIL PROTECTED]
[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Io
exception: Bad file descriptor
java.sql.SQLException: Io exception: Bad file descriptor

Thomas
- Original Message -
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Thursday, March 13, 2003 3:51 AM
Subject: Re: OJB 0.9.9 and Oracle 817 always rollback


> Hi Thomas,
>
> did you tried
>
> eager-release=false
> batchMode=false
>
> regards,
> Armin
>
> - Original Message -
> From: "Thomas Phan" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 8:08 PM
> Subject: OJB 0.9.9 and Oracle 817 always rollback
>
>
> > Hi,
> >
> > I couldn't get OJB to work with Oracle, while connecting to Oracle
> thur a
> > raw JDBC should work. Did anyone encounter this problem? Am I
> configured OJB
> > to generate Oracle queries correctly? I've an UTF-8 instance, and set
> > NLS_LANG=.UTF8, and most of my database's tables are empty (contain no
> row)
> >
> > My application works fine with both MSSQL and MySQL by changing the
> driver,
> > and the xmls, but not Oracle!
> >
> > Thanks
> >
> > Here's what I got:
> >
> > [org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO:
> Create
> > new connection
> > pool:[EMAIL PROTECTED]
> >   jcd-alias=default
> >   default-connection=true
> >   dbms=Oracle
> >   jdbc-level=1.0
> >   driver=oracle.jdbc.driver.OracleDriver
> >   protocol=jdbc
> >   sub-protocol=oracle
> >   db-alias=thin:@localhost:1521:sid
> >   user=esf
> >   password=*
> >   eager-release=true
> >   ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1,
> maxActive=21,
> > maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10,
> > testWhileIdle=false, minEvictableIdleTimeMillis=60,
> testOnReturn=false,
> > logAbandoned=false, removeAbandonedTimeout=300,
> > timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
> >   batchMode=true
> >
> >
> [EMAIL PROTECTED]
> 84f[
> >  sequenceManagerClass=class
> > org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
> >  Properties={grabSize=20}
> > ]
> > ]
> > [org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO:
> Rollback was
> > called, do rollback on current connection
> > [EMAIL PROTECTED]
> > [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Io
> > exception: Bad file descriptor
> > java.sql.SQLException: Io exception: Bad file descriptor
> > at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
> > at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
> > at
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
> > at
> > oracle.jdbc.driver.OracleStatement.(OracleStatement.java:445)
> > at
> > oracle.jdbc.driver.OracleStatement.(OracleStatement.java:460)
> > at
> >
> oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatemen
> t.ja
> > va:185)
> > at
> >
> oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatemen
> t.ja
> > va:168)
> > at
> >
> oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnec
> tion
> > .java:614)
> > at
> >
> oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.ja
> va:4
> > 92)
> > at
> >
> org.apache.ojb.broker.util.batch.BatchConnection.prepareStatement(Unknow
> n
> > Source)
> > at
> >
> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen
> t(Un
> > known Source)
> > at
> >
> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt
> (Unk
> > nown Source)
> > at
> >
> org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(
> Unkn
> > own Source)
> > at
> >

ClassCast Exception in OjbExtent

2003-03-12 Thread Susanne Sherba
I'm getting a ClassCastException in the OjbExtent constructor:
iterator = (RsIterator) broker.getIteratorByQuery(q);

The problem appears to come from getRsIteratorFromQuery in the
PersistenceBrokerImpl class which returns a ChainingIterator when there 
are subclasses (extents) and an RSIterator in the other cases.  

I've temporarily fixed the problem by casting to an OJBIterator in
OjbExtent instead of an RSIterator -- but am not sure if this is a good
permanent fix.  

Any suggestions?

Thanks.

Susanne





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



Debugging OJB with Intellij

2003-03-12 Thread Jason Hale
I am trying to debug a web application that uses OJB rc1 with Intellij
3.0.2.

If I just run the web app it works just fine.  However, for some strange
reason whenever I try and debug my web app I get the following in my
log:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
[INFO] PropertyMessageResources - -Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
[INFO] PropertyMessageResources - -Initializing,
config='com.wingate.us.portal.ApplicationResources', returnNull=true
[INFO] TilesPlugin - -Tiles definition factory loaded for module ''.
[INFO] ValidatorPlugIn - -Loading validation rules file from
'/WEB-INF/validation.xml'
[INFO] ValidatorPlugIn - -Loading validation rules file from
'/WEB-INF/validator-rules.xml'
[INFO] PersistenceBrokerFactoryDefaultImpl - -Create PersistenceBroker
instance pool, pool configuration was {whenExhaustedAction=0,
maxIdle=-1, maxActive=100, maxWait=2000, removeAbandoned=false,
numTestsPerEvictionRun=10, testWhileIdle=false,
minEvictableIdleTimeMillis=100, testOnReturn=false,
logAbandoned=false, removeAbandonedTimeout=300,
timeBetweenEvictionRunsMillis=-1, testOnBorrow=false}
[INFO] RepositoryPersistor - -OJB Descriptor Repository:
file:C:/dev/projects/wingate/xp/web/WEB-INF/classes/repository.xml
[INFO] RepositoryXmlHandler - -Found attribute (name=grabSize, value=20)
but I could not assign them to a descriptor
[INFO] RepositoryPersistor - -Read repository from file took 454 ms
[INFO] RepositoryPersistor - -OJB Descriptor Repository:
file:C:/dev/projects/wingate/xp/web/WEB-INF/classes/repository.xml
[INFO] RepositoryPersistor - -Read connection repository from file took
453 ms
[INFO] PersistenceBrokerFactoryDefaultImpl - -Set default PBKey:
org.apache.ojb.broker.PBKey: repository=default, user=userstory,
password=*
java.lang.AbstractMethodError:
org/apache/ojb/broker/singlevm/PersistenceBrokerAbstractImpl.query
at
org.apache.ojb.broker.util.configuration.impl.OjbConfigurator.configure(
Unknown Source)
at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createNewBr
okerInstance(Unknown Source)
at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl$PBKeyedPool
ableObjectFactory.makeObject(Unknown Source)
at
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(Generic
KeyedObjectPool.java:760)
at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.createPersi
stenceBroker(Unknown Source)
at
org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl.defaultPers
istenceBroker(Unknown Source)
at
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(
Unknown Source)
at
com.wingate.us.impl.PersistenceService.getList(PersistenceService.java:9
9)
at
com.wingate.us.webapp.ServicePlugin.init(ServicePlugin.java:65)
at
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j
ava:1105)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:918)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3279)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421
)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
Starting service Tomcat-Apache
Apache Tomcat/4.0.6

I am at a loss.  I can debug the same application just fine with
JBuilder 7. 
Is there an Intellij expert out there that is using OJB that help me?? 
 
-Jason




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



Re: Deploy OJB in WebLogic Server

2003-03-12 Thread Christophe Lombart
I'm trying to do this via a weblogic startup class. Via this startup 
class,  I'm putting the PB factory into a JNDI tree. This part is 
working but I got an exception whith the datasource and I don't 
understand why : SecurityPrivilegeActionException.
In a session bean, I lookup to the PB facotry and try to execute a 
query. At this time, I got this exception.

Christophe

Lucy Zhao wrote:

Have anybody deployed OJB in a WebLogic Server? And wrote an MBean for
WebLogic Server?
Thanks!

Lucy Zhao

 



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


Re: ODMG w/oracle problem

2003-03-12 Thread Armin Waibel
Where is the Nullpointer stack trace?
Your snip seems OK.

regards,
Armin
- Original Message -
From: "Larry Schuler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 13, 2003 12:52 AM
Subject: ODMG w/oracle problem


>
> Hi,
>I'm just starting to use OJB, so I think this may be configuration
related,
> but I can use the PersisetenceBroker to retrieve objects, so I think I
have it
> set up correctly. Anyway, when I try to use the ODMG method of access,
OJB
> seems to load up ok, but when I try to retrieve objects, I get a
> NullPointerException with very little other details, here is a debug
trace:
> (What I think may be the problem is the call to "PB.close", why would
that be
> called right after opening?) The final message (select) is all that I
receive in
> the log. My client app is reporting a failure due to a
NullPointerException in
> the server.
>
> Thanks for any help.
> --Larry
>
>
> 08:56:20,751  INFO RepositoryPersistor:? - Read connection repository
from file
> took 150 ms
> 08:56:20,821  INFO PersistenceBrokerFactoryDefaultImpl:? - Set default
PBKey: or
> g.apache.ojb.broker.PBKey: repository=MAGE, user=magedev,
password=*
> 08:56:20,831 DEBUG PersistenceBrokerFactoryDefaultImpl:? -
createPersistenceBrok
> er(key) called
> 08:56:20,831  INFO PersistenceBrokerFactoryDefaultImpl:? - Create new
PB instanc
> e for PBKey org.apache.ojb.broker.PBKey: repository=MAGE,
user=magedev, password
> =*, already created persistence broker instances: 0
> 08:56:20,861 DEBUG SequenceManagerFactory:? - Default sequence manager
class was
>org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
> 08:56:20,861 DEBUG SequenceManagerFactory:? - create new sequence
manager for br
> oker [EMAIL PROTECTED]
> 08:56:20,861 DEBUG SequenceManagerFactory:? -
Jdbc-Connection-Descriptor 'MAGE'
> use sequence manager: class
org.apache.ojb.broker.util.sequence.SequenceManagerH
> ighLowImpl
> 08:56:20,911 DEBUG OJB:? - Set current database
org.apache.ojb.odmg.DatabaseImpl
> @811c88 PBKey was org.apache.ojb.broker.PBKey: repository=MAGE,
user=magedev, pa
> ssword=*
> 08:56:20,911 DEBUG DatabaseImpl:? - Open database using PBKey
org.apache.ojb.bro
> ker.PBKey: repository=MAGE, user=magedev, password=*
> 08:56:20,911 DEBUG PersistenceBrokerImpl:? - PB.close was called:
org.apache.ojb
> [EMAIL PROTECTED]
> Debug2
> * Mage Manager bound
> 08:56:34,381 DEBUG TransactionImpl:? - Begin transaction was called on
tx org.ap
> [EMAIL PROTECTED], with associated PB null
> 08:56:34,391 DEBUG OQLQueryImpl:? - create query for query-string:
select * from
>ContactImpl
>
>
>
>
>
> -
> 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]



ODMG w/oracle problem

2003-03-12 Thread Larry Schuler
Hi,
  I'm just starting to use OJB, so I think this may be configuration related,
but I can use the PersisetenceBroker to retrieve objects, so I think I have it
set up correctly. Anyway, when I try to use the ODMG method of access, OJB
seems to load up ok, but when I try to retrieve objects, I get a
NullPointerException with very little other details, here is a debug trace:
(What I think may be the problem is the call to "PB.close", why would that be
called right after opening?) The final message (select) is all that I receive in 
the log. My client app is reporting a failure due to a NullPointerException in 
the server.

Thanks for any help.
--Larry
08:56:20,751  INFO RepositoryPersistor:? - Read connection repository from file
took 150 ms
08:56:20,821  INFO PersistenceBrokerFactoryDefaultImpl:? - Set default PBKey: or
g.apache.ojb.broker.PBKey: repository=MAGE, user=magedev, password=*
08:56:20,831 DEBUG PersistenceBrokerFactoryDefaultImpl:? - createPersistenceBrok
er(key) called
08:56:20,831  INFO PersistenceBrokerFactoryDefaultImpl:? - Create new PB instanc
e for PBKey org.apache.ojb.broker.PBKey: repository=MAGE, user=magedev, password
=*, already created persistence broker instances: 0
08:56:20,861 DEBUG SequenceManagerFactory:? - Default sequence manager class was
  org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
08:56:20,861 DEBUG SequenceManagerFactory:? - create new sequence manager for br
oker [EMAIL PROTECTED]
08:56:20,861 DEBUG SequenceManagerFactory:? - Jdbc-Connection-Descriptor 'MAGE'
use sequence manager: class org.apache.ojb.broker.util.sequence.SequenceManagerH
ighLowImpl
08:56:20,911 DEBUG OJB:? - Set current database org.apache.ojb.odmg.DatabaseImpl
@811c88 PBKey was org.apache.ojb.broker.PBKey: repository=MAGE, user=magedev, pa
ssword=*
08:56:20,911 DEBUG DatabaseImpl:? - Open database using PBKey org.apache.ojb.bro
ker.PBKey: repository=MAGE, user=magedev, password=*
08:56:20,911 DEBUG PersistenceBrokerImpl:? - PB.close was called: org.apache.ojb
[EMAIL PROTECTED]
Debug2
* Mage Manager bound
08:56:34,381 DEBUG TransactionImpl:? - Begin transaction was called on tx org.ap
[EMAIL PROTECTED], with associated PB null
08:56:34,391 DEBUG OQLQueryImpl:? - create query for query-string: select * from
  ContactImpl




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


Re: cache confusion

2003-03-12 Thread Luis Cruz

Hello,

Recently I've stumbled onto a very similar problem. Upon deleting
various objects subsequent reads obtain, from the cache, objects which
are no longer in the database!

A temporary quick fix to this problem was to clear the cache upon
committing the transaction; however this degrades efficiency.

I also had a quick look at what the persistent broker did when
committing a transaction in which objects are deleted from the database.
>From what I could make out it simply does nothing! I am running OJB in
singlevm mode, in which case the following lines of code are executed:

 --
// if running in singlevm mode simply remove from local cache
else
{
   // as resolution to #OJB1 I commented out the following line
   // removeFromCache(oid);
}
 --

Why isn't the object removed from the cache, in other words what is
"resolution to #OJB1"?

Thanks in advance,
Luis Cruz


On Wed, 2003-03-12 at 17:02, Armin Waibel wrote:
> Hi Will,
> 
> I have checked in a test case to reproduce
> your problem. See CollectionsTest.java.
> The test is passed, please have a look at it. 
> 
> > have a web application, so let's say the user chooses a Trainee and
> > clicks Delete. The action does the following, each in a separate ODMG
> > transaction.
> >
> > - (the Faculty object has previously been retreived and put into the
> > session.)
> > - get the Trainee object using the OID, delete the trainee (both in
> one tx)
> you have to reset the Trainee List in Faculty and lock this too,
> because the Faculty object in the cache could not know (or say
> we do not have such a sophisticated cache implementation ;-))
> that one of the references was deleted.
> When using the ObjectCacheEmptyImpl this could not
> happen, then every object was retrieved from the DB.
> 
> If the test case does not reproduce you problem could
> you please post me a modified version?
> 
> HTH
> 
> regards,
> Armin
> 
> 
> > - get the Faculty object using the OID
> >
> > I then put the Faculty into the sessions and use its trainee
> collection
> >   to populate a dropdown box of Trainees. What happens is that the
> > deleted trainee continues to appear in the list. Via debugging I can
> see
> > that the Faculties trainee collection still has the deleted trainee.
> >
> > It seems that the Faculty object is always gotten from the cache and
> > never from the db, so the Trainee collection is wrong. I have to
> restart
> > my application server in order for the correct collection to show.
> >
> > This make so sense to me. Clearly I'm not understanding the cache.
> >
> > Will


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



Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread Armin Waibel

- Original Message -
From: "V.B. Skrypnyk" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
<[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 11:01 PM
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


> Interestingly it fails silently, because after the assertion of
primary keys
> the storeToDb() simply returns.  Maybe foreign references should be
expanded
> before the primary keys are asserted...
>
sounds good (means I don't have a clue ;-)).
This part of OJB is definitely not my special subject.
If you find a solution I will check in your code.

Test is in, let the gurus make the work ;-)

regards,
Armin

> --Bill.
>
>
> - Original Message -
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 1:49 PM
> Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
>
>
> > The test fails because after commit none object
> > was persisted to database.
> >
> > regards,
> > Armin
> >
> > - Original Message -
> > From: "V.B. Skrypnyk" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 12, 2003 10:37 PM
> > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> >
> >
> > > Hi Armin,
> > >
> > > I can only see 2 slight variances from my case:
> > > 1. My class doesn't have an autoincrement primary key
> > > 2. The reference is set from an object that already exists (it's
not
> > saved
> > > in the same transaction)
> > >
> > > I don't know if these variances are material. Does the test pass?
(I
> > can't
> > > seem to compile the
> > > project, there seem to be some problems with the StatementManager)
> > >
> > > --Bill.
> > >
> > >
> > > - Original Message -
> > > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > > To: "OJB Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 12, 2003 10:46 AM
> > > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> > >
> > >
> > > > Hi Christian, Bill
> > > >
> > > > I currently add a new test case to demonstrate
> > > > the described behaviour.
> > > > Could you check if I hit the bull's eye.
> > > > See ReferenceTest#testRepositoryFKStore
> > > >
> > > > regards,
> > > > Armin
> > > >
> > > > - Original Message -
> > > > From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
> > > > To: "'OJB Users List'" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, March 12, 2003 6:15 PM
> > > > Subject: RE: Interesting (failing) scenario of FKs/PKs in PB
> > > >
> > > >
> > > > Hi
> > > > Yes, I succeeded to this behaviour but only for Oracle, for
MySQL
> > was
> > > > going
> > > > OK,
> > > > and for my typical situation I needed only one PK, no FK.
> > > > This was strange for me, and I posted one email on this theme
last
> > week,
> > > > but
> > > > till
> > > > now no remark/comment. I'm using the PB basic API.
> > > > regards,
> > > > Cristian
> > > >
> > > > -Original Message-
> > > > From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
> > > > Sent: Mittwoch, 12. März 2003 18:02
> > > > To: OJB Users List
> > > > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> > > >
> > > >
> > > > Has anyone else encountered this problem?
> > > >
> > > > --Bill.
> > > >
> > > > > Hi,
> > > > >
> > > > > The following fails to be stored by PersistenceBroker:
> > > > >
> > > > > I have a class ACL which has two primary keys: objectId and
> > userFK,
> > > > and
> > > > > userFK is also a foreign key tied to a reference of type User.
If
> > I do
> > > > this:
> > > > >
> > > > > persistentBroker.beginTransaction();
> > > > > ACL acl = new ACL();
> > > > > acl.setObjectId( 100 );
> > > > > acl.setUser( currentUser );
> > > > > persistentBroker.store(acl);
> > > > > persistentBroker.commitTransaction();
> > > > >
> > > > > Acl will not be saved. The reason seems to be because in the
> > > > storeToDb()
> > > > > method of the PersistentBroker, there first comes an assertion
of
> > the
> > > > > PrimaryKeys and afterwards comes the assignment of all the
foreign
> > > > keys.
> > > > In
> > > > > the scenario above the assertion of the primary keys will
fail,
> > > > because
> > > > the
> > > > > userFK has not been assigned yet, so we have an incomplete set
of
> > > > primary
> > > > > keys. This does work with the ODMG layer, probably because of
a
> > > > different
> > > > > sequence of events during the storing of the object.
> > > > >
> > > > > I wonder if there should be a check whether a primary key is
> > shared by
> > > > the
> > > > > foreign key and allow that assignment before the assertion of
the
> > > > primary
> > > > > keys is performed. Any ideas?
> > > > >
> > > > > Cheers,
> > > > > --Bill.
> > > > >
> > > > >
> > > >
> >
> -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> >

Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread V.B. Skrypnyk
Interestingly it fails silently, because after the assertion of primary keys
the storeToDb() simply returns.  Maybe foreign references should be expanded
before the primary keys are asserted...

--Bill.


- Original Message -
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 1:49 PM
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


> The test fails because after commit none object
> was persisted to database.
>
> regards,
> Armin
>
> - Original Message -
> From: "V.B. Skrypnyk" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 10:37 PM
> Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
>
>
> > Hi Armin,
> >
> > I can only see 2 slight variances from my case:
> > 1. My class doesn't have an autoincrement primary key
> > 2. The reference is set from an object that already exists (it's not
> saved
> > in the same transaction)
> >
> > I don't know if these variances are material. Does the test pass? (I
> can't
> > seem to compile the
> > project, there seem to be some problems with the StatementManager)
> >
> > --Bill.
> >
> >
> > - Original Message -
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 12, 2003 10:46 AM
> > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> >
> >
> > > Hi Christian, Bill
> > >
> > > I currently add a new test case to demonstrate
> > > the described behaviour.
> > > Could you check if I hit the bull's eye.
> > > See ReferenceTest#testRepositoryFKStore
> > >
> > > regards,
> > > Armin
> > >
> > > - Original Message -
> > > From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
> > > To: "'OJB Users List'" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 12, 2003 6:15 PM
> > > Subject: RE: Interesting (failing) scenario of FKs/PKs in PB
> > >
> > >
> > > Hi
> > > Yes, I succeeded to this behaviour but only for Oracle, for MySQL
> was
> > > going
> > > OK,
> > > and for my typical situation I needed only one PK, no FK.
> > > This was strange for me, and I posted one email on this theme last
> week,
> > > but
> > > till
> > > now no remark/comment. I'm using the PB basic API.
> > > regards,
> > > Cristian
> > >
> > > -Original Message-
> > > From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
> > > Sent: Mittwoch, 12. März 2003 18:02
> > > To: OJB Users List
> > > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> > >
> > >
> > > Has anyone else encountered this problem?
> > >
> > > --Bill.
> > >
> > > > Hi,
> > > >
> > > > The following fails to be stored by PersistenceBroker:
> > > >
> > > > I have a class ACL which has two primary keys: objectId and
> userFK,
> > > and
> > > > userFK is also a foreign key tied to a reference of type User. If
> I do
> > > this:
> > > >
> > > > persistentBroker.beginTransaction();
> > > > ACL acl = new ACL();
> > > > acl.setObjectId( 100 );
> > > > acl.setUser( currentUser );
> > > > persistentBroker.store(acl);
> > > > persistentBroker.commitTransaction();
> > > >
> > > > Acl will not be saved. The reason seems to be because in the
> > > storeToDb()
> > > > method of the PersistentBroker, there first comes an assertion of
> the
> > > > PrimaryKeys and afterwards comes the assignment of all the foreign
> > > keys.
> > > In
> > > > the scenario above the assertion of the primary keys will fail,
> > > because
> > > the
> > > > userFK has not been assigned yet, so we have an incomplete set of
> > > primary
> > > > keys. This does work with the ODMG layer, probably because of a
> > > different
> > > > sequence of events during the storing of the object.
> > > >
> > > > I wonder if there should be a check whether a primary key is
> shared by
> > > the
> > > > foreign key and allow that assignment before the assertion of the
> > > primary
> > > > keys is performed. Any ideas?
> > > >
> > > > Cheers,
> > > > --Bill.
> > > >
> > > >
> > >
> > -
> > > > 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]
> > >
> >
> > -
> > > 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]
> > >
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additi

Deploy OJB in WebLogic Server

2003-03-12 Thread Lucy Zhao
Have anybody deployed OJB in a WebLogic Server? And wrote an MBean for
WebLogic Server?
 
Thanks!
 
Lucy Zhao


Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread Armin Waibel
The test fails because after commit none object
was persisted to database.

regards,
Armin

- Original Message -
From: "V.B. Skrypnyk" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel"
<[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 10:37 PM
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


> Hi Armin,
>
> I can only see 2 slight variances from my case:
> 1. My class doesn't have an autoincrement primary key
> 2. The reference is set from an object that already exists (it's not
saved
> in the same transaction)
>
> I don't know if these variances are material. Does the test pass? (I
can't
> seem to compile the
> project, there seem to be some problems with the StatementManager)
>
> --Bill.
>
>
> - Original Message -
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 10:46 AM
> Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
>
>
> > Hi Christian, Bill
> >
> > I currently add a new test case to demonstrate
> > the described behaviour.
> > Could you check if I hit the bull's eye.
> > See ReferenceTest#testRepositoryFKStore
> >
> > regards,
> > Armin
> >
> > - Original Message -
> > From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
> > To: "'OJB Users List'" <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 12, 2003 6:15 PM
> > Subject: RE: Interesting (failing) scenario of FKs/PKs in PB
> >
> >
> > Hi
> > Yes, I succeeded to this behaviour but only for Oracle, for MySQL
was
> > going
> > OK,
> > and for my typical situation I needed only one PK, no FK.
> > This was strange for me, and I posted one email on this theme last
week,
> > but
> > till
> > now no remark/comment. I'm using the PB basic API.
> > regards,
> > Cristian
> >
> > -Original Message-
> > From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
> > Sent: Mittwoch, 12. März 2003 18:02
> > To: OJB Users List
> > Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
> >
> >
> > Has anyone else encountered this problem?
> >
> > --Bill.
> >
> > > Hi,
> > >
> > > The following fails to be stored by PersistenceBroker:
> > >
> > > I have a class ACL which has two primary keys: objectId and
userFK,
> > and
> > > userFK is also a foreign key tied to a reference of type User. If
I do
> > this:
> > >
> > > persistentBroker.beginTransaction();
> > > ACL acl = new ACL();
> > > acl.setObjectId( 100 );
> > > acl.setUser( currentUser );
> > > persistentBroker.store(acl);
> > > persistentBroker.commitTransaction();
> > >
> > > Acl will not be saved. The reason seems to be because in the
> > storeToDb()
> > > method of the PersistentBroker, there first comes an assertion of
the
> > > PrimaryKeys and afterwards comes the assignment of all the foreign
> > keys.
> > In
> > > the scenario above the assertion of the primary keys will fail,
> > because
> > the
> > > userFK has not been assigned yet, so we have an incomplete set of
> > primary
> > > keys. This does work with the ODMG layer, probably because of a
> > different
> > > sequence of events during the storing of the object.
> > >
> > > I wonder if there should be a check whether a primary key is
shared by
> > the
> > > foreign key and allow that assignment before the assertion of the
> > primary
> > > keys is performed. Any ideas?
> > >
> > > Cheers,
> > > --Bill.
> > >
> > >
> >
> -
> > > 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]
> >
>
> -
> > 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]
> >
> >
>
>
> -
> 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]



Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread V.B. Skrypnyk
Hi Armin,

I can only see 2 slight variances from my case:
1. My class doesn't have an autoincrement primary key
2. The reference is set from an object that already exists (it's not saved
in the same transaction)

I don't know if these variances are material. Does the test pass? (I can't
seem to compile the
project, there seem to be some problems with the StatementManager)

--Bill.


- Original Message -
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 10:46 AM
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


> Hi Christian, Bill
>
> I currently add a new test case to demonstrate
> the described behaviour.
> Could you check if I hit the bull's eye.
> See ReferenceTest#testRepositoryFKStore
>
> regards,
> Armin
>
> - Original Message -
> From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
> To: "'OJB Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 6:15 PM
> Subject: RE: Interesting (failing) scenario of FKs/PKs in PB
>
>
> Hi
> Yes, I succeeded to this behaviour but only for Oracle, for MySQL was
> going
> OK,
> and for my typical situation I needed only one PK, no FK.
> This was strange for me, and I posted one email on this theme last week,
> but
> till
> now no remark/comment. I'm using the PB basic API.
> regards,
> Cristian
>
> -Original Message-
> From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
> Sent: Mittwoch, 12. März 2003 18:02
> To: OJB Users List
> Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
>
>
> Has anyone else encountered this problem?
>
> --Bill.
>
> > Hi,
> >
> > The following fails to be stored by PersistenceBroker:
> >
> > I have a class ACL which has two primary keys: objectId and userFK,
> and
> > userFK is also a foreign key tied to a reference of type User. If I do
> this:
> >
> > persistentBroker.beginTransaction();
> > ACL acl = new ACL();
> > acl.setObjectId( 100 );
> > acl.setUser( currentUser );
> > persistentBroker.store(acl);
> > persistentBroker.commitTransaction();
> >
> > Acl will not be saved. The reason seems to be because in the
> storeToDb()
> > method of the PersistentBroker, there first comes an assertion of the
> > PrimaryKeys and afterwards comes the assignment of all the foreign
> keys.
> In
> > the scenario above the assertion of the primary keys will fail,
> because
> the
> > userFK has not been assigned yet, so we have an incomplete set of
> primary
> > keys. This does work with the ODMG layer, probably because of a
> different
> > sequence of events during the storing of the object.
> >
> > I wonder if there should be a check whether a primary key is shared by
> the
> > foreign key and allow that assignment before the assertion of the
> primary
> > keys is performed. Any ideas?
> >
> > Cheers,
> > --Bill.
> >
> >
> > -
> > 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]
>
> -
> 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]
>
>


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



Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread V.B. Skrypnyk
Hi Armin,

I can only see 2 slight variances from my case:
1. My class doesn't have an autoincrement primary key
2. The reference is set from an object that already exists (it's not saved
in the same transaction)

I don't know if these variances are material. Does the test pass? (I can't
seem to compile the
project, there seem to be some problems with the StatementManager)

--Bill.


- Original Message -
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 10:46 AM
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


> Hi Christian, Bill
>
> I currently add a new test case to demonstrate
> the described behaviour.
> Could you check if I hit the bull's eye.
> See ReferenceTest#testRepositoryFKStore
>
> regards,
> Armin
>
> - Original Message -
> From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
> To: "'OJB Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 6:15 PM
> Subject: RE: Interesting (failing) scenario of FKs/PKs in PB
>
>
> Hi
> Yes, I succeeded to this behaviour but only for Oracle, for MySQL was
> going
> OK,
> and for my typical situation I needed only one PK, no FK.
> This was strange for me, and I posted one email on this theme last week,
> but
> till
> now no remark/comment. I'm using the PB basic API.
> regards,
> Cristian
>
> -Original Message-
> From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
> Sent: Mittwoch, 12. März 2003 18:02
> To: OJB Users List
> Subject: Re: Interesting (failing) scenario of FKs/PKs in PB
>
>
> Has anyone else encountered this problem?
>
> --Bill.
>
> > Hi,
> >
> > The following fails to be stored by PersistenceBroker:
> >
> > I have a class ACL which has two primary keys: objectId and userFK,
> and
> > userFK is also a foreign key tied to a reference of type User. If I do
> this:
> >
> > persistentBroker.beginTransaction();
> > ACL acl = new ACL();
> > acl.setObjectId( 100 );
> > acl.setUser( currentUser );
> > persistentBroker.store(acl);
> > persistentBroker.commitTransaction();
> >
> > Acl will not be saved. The reason seems to be because in the
> storeToDb()
> > method of the PersistentBroker, there first comes an assertion of the
> > PrimaryKeys and afterwards comes the assignment of all the foreign
> keys.
> In
> > the scenario above the assertion of the primary keys will fail,
> because
> the
> > userFK has not been assigned yet, so we have an incomplete set of
> primary
> > keys. This does work with the ODMG layer, probably because of a
> different
> > sequence of events during the storing of the object.
> >
> > I wonder if there should be a check whether a primary key is shared by
> the
> > foreign key and allow that assignment before the assertion of the
> primary
> > keys is performed. Any ideas?
> >
> > Cheers,
> > --Bill.
> >
> >
> > -
> > 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]
>
> -
> 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]
>
>


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



RE: Selecting Top 10 records??

2003-03-12 Thread Max Vesely
It's not implemented in OJB version 0.9.8. I had to extend
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl class to build
alter select statement with TOP keyword. 

Max Vesely -Dynax Solutions, Inc.
Main:   212 889 7722
Direct: 212 331 8627
Mobile: 732 803 2115
E-Mail: [EMAIL PROTECTED]



-Original Message-
From: Ron Gallagher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 2:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Selecting Top 10 records??


Try using

query.setStartAtIndex(0);
query.setEndAtIndex(10);

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]

> 
> From: "Ismail Siddiqui" <[EMAIL PROTECTED]>
> Date: 2003/03/12 Wed PM 02:26:35 EST
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Subject: Selecting Top 10  records??
> 
> Hi all
> I am using QueryByCriteria  as following
> 
> PersistenceBroker broker = 
> PersistenceBrokerFactory.defaultPersistenceBroker();
>   broker.beginTransaction();
>   Criteria c = new Criteria();
>   c.addEqualToColumn("program_instance_id",
program_instance_id+"");
>   c.addOrderByDescending("score");
>   QueryByCriteria query = new QueryByCriteria(Game.class, c);
> Collection game = 
> broker.getCollectionByQuery(query);
> 
> I am running microsoft sql server and want to select only top 5 
> records ..like select top 5  * where   How can I put this 
> condition in Criteria
> 
> 
> Thanks
> 
> ismail
> 
> 
> -
> 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]

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



RE: Any guidelines or best practices for OJB ?

2003-03-12 Thread Theo Niemeijer

Thomas, 
Thanks a lot for your elaborate reply. 
It was just the thing I needed before taking on the
trail of migrating to OJB 1.0 :->
By the way, thank you all for your hard work, 
and be assured that we find it useful and elegant. 
Cheers,
Theo Niemeijer


> -
> Subject: Re: Any guidelines or best practices for OJB ?
> 
> 
> Hi Theo,
> 
> As no one else answered I share some thoughts.
> 
> Theo Niemeijer wrote:
> > Hi all. 
> > 
> > I hope this post is not to long to read. 
> > 
> > I am working with OJB for several months now, 
> > and although I am quite happy with its existance, 
> > I still have that nagging feeling that I am doing 
> > things wrong :->.  Or that things that seem strange are 
> > simply caused by my own misunderstandings. 
> > 
> > So what I would like to now: Can anyone with experience offer
> > some "best practice" guidelines ? 
> > 
> > For starters I will tell how we use it: 
> > 
> > - We use MSSQL Server, with JBoss app server, 
> >   and are still using 0.9.5 for production. 
> >   (I have tested with 1.0rc1, and it seems to work
> >after changing some deprecated method calls. But I do 
> >not dare to put it in production yet because of some
> >subtle or not so subtle changes that were introduced)
> 
> Although I know SqlServer from past projects I have no personal 
> experience with OJB + MS SqlServer.
> 
> The general recommendation is to always use the latest release as part 
> of a continous integration dicipline. We are doing this for all 
> libraries that OJB depends on. See: 
> http://cvs.apache.org/builds/gump/2003-03-11/db-ojb.html
> 
> > - We use OJB in single server mode, with its 
> >   own connection pooling.
> 
> Using OJB C/S mode is definitely not recommended.
> I have no general tips wrt. connection pooling. It depends a lot to your 
> actual environment. With most app servers you won't have to rely on OJB 
> con pooling.
> 
> > 
> > - We have unique global identities, so each 
> >   objects has a unique key, using 
> >   SequenceManagerHighLowImpl (compatible with HiLo I think)
> >   We use an Integer field as the key. 
> 
> You could also use OJB GUIDs. They are based on a VARCHAR field.
> 
> > - We heavely use proxy references, and collection proxies,
> >   using the 'proxy="true"' idiom. 
> 
> Good idea for "normal" applications. special scenarios could possibly 
> benefit from not using proxies.
> 
> > - We only use the Persistence Broker API, making queries with the Criteria 
> >   objects and getIteratorByQuery and getCollectionByQuery. 
> >   We tried to not use the addSql() method, but could not avoid it
> >   in some places.  
> 
> PB is a good choice if you
> - want maximum performance and flecibility
> - are not bound to a standard API
> - are willing to implement some higher level "persistence-manager" 
> functionality on your own
> 
> I know several projects that use a lot of QueryBySql statements. Of 
> course you loose some "purity" and code beauty, but it may be a good 
> choice for special problems.
> We had no problems in those problems so far...
> 
> > - We do not use ODMG or JDO at all. We have quite complex queries expressed
> >   as OJB Criteria, and were attracted by the portable way these could 
> >   be expressed, and transferred from client to server. Extra 
> >   criteria are added for things like access rights and 'views' based on state.
> >   (front office sees a different 'view' than back-office)
> > 
> That's one of the benefits of the PB. It allows you to build your own 
> higher level persistence functionality by providing a flexible and 
> rock-solid foundation.
> If you are aware of the limited semantics of the PB you can build 
> extremely powerful persistence managers on top of it. Our ODMG and JDO 
> layer are examples for this.
> 
> > - We have quite a lot of domain objects, most of them in 
> >   several levels of hierarchy, all mapped in the repository.
> >   The main domain hierarchies are are each mapped to a single 
> >   table. The many relations are made between the abstract base
> >   objects of such a domain hierarchie.   
> >   (Activities, Resources, Events, Articles, Locations) 
> >
> No general rule here. it really depends on the domain model.
> 
> > - We mapped our domain objects directly on Java objects, but added
> >   OJB support (beforeStore) to add things like "createdBy", "creationDate", 
> >   "modifiedBy", "modifiedDate" etc. Therefore we use a PersistentObject
> >   base class that has the unique key and such. 
> 
> In the business frameworks my company develops on top of OJB we also use 
> a persistent base class. this makes it much easier to provide framework 
> services to all entity objects.
> 
> > - We actually use separate Tomcat web servers, connecting to 
> >   the JBoss app server Session EJB's, which in turn use
> >   the OJB persistence broker. Result objects and 
> >   collections are transferred to the client.
> 
> In

Re: OJB 0.9.9 and Oracle 817 always rollback

2003-03-12 Thread Armin Waibel
Hi Thomas,

did you tried

eager-release=false
batchMode=false

regards,
Armin

- Original Message -
From: "Thomas Phan" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 8:08 PM
Subject: OJB 0.9.9 and Oracle 817 always rollback


> Hi,
>
> I couldn't get OJB to work with Oracle, while connecting to Oracle
thur a
> raw JDBC should work. Did anyone encounter this problem? Am I
configured OJB
> to generate Oracle queries correctly? I've an UTF-8 instance, and set
> NLS_LANG=.UTF8, and most of my database's tables are empty (contain no
row)
>
> My application works fine with both MSSQL and MySQL by changing the
driver,
> and the xmls, but not Oracle!
>
> Thanks
>
> Here's what I got:
>
> [org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO:
Create
> new connection
> pool:[EMAIL PROTECTED]
>   jcd-alias=default
>   default-connection=true
>   dbms=Oracle
>   jdbc-level=1.0
>   driver=oracle.jdbc.driver.OracleDriver
>   protocol=jdbc
>   sub-protocol=oracle
>   db-alias=thin:@localhost:1521:sid
>   user=esf
>   password=*
>   eager-release=true
>   ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1,
maxActive=21,
> maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10,
> testWhileIdle=false, minEvictableIdleTimeMillis=60,
testOnReturn=false,
> logAbandoned=false, removeAbandonedTimeout=300,
> timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
>   batchMode=true
>
>
[EMAIL PROTECTED]
84f[
>  sequenceManagerClass=class
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
>  Properties={grabSize=20}
> ]
> ]
> [org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO:
Rollback was
> called, do rollback on current connection
> [EMAIL PROTECTED]
> [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Io
> exception: Bad file descriptor
> java.sql.SQLException: Io exception: Bad file descriptor
> at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
> at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
> at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
> at
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:445)
> at
> oracle.jdbc.driver.OracleStatement.(OracleStatement.java:460)
> at
>
oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatemen
t.ja
> va:185)
> at
>
oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatemen
t.ja
> va:168)
> at
>
oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnec
tion
> .java:614)
> at
>
oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.ja
va:4
> 92)
> at
>
org.apache.ojb.broker.util.batch.BatchConnection.prepareStatement(Unknow
n
> Source)
> at
>
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatemen
t(Un
> known Source)
> at
>
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt
(Unk
> nown Source)
> at
>
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(
Unkn
> own Source)
> at
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
> Source)
> at org.apache.ojb.broker.accesslayer.RsIterator.(Unknown
> Source)
> at
> org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.(Unknown
> Source)
> at
>
org.apache.ojb.broker.singlevm.ReportRsIteratorFactoryImpl.createRsItera
tor(
> Unknown Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQu
ery(
> Unknown Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getReportQueryItera
torF
> romQuery(Unknown Source)
> at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getReportQueryItera
torB
> yQuery(Unknown Source)
> at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getReportQuer
yIte
> ratorByQuery(Unknown Source)
> at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown
Source)
> at
> com.entersys.util.DAOHelper.getCollectionByQuery(DAOHelper.java:133)
> at
> com.entersys.util.DAOHelper.getIteratorByQuery(DAOHelper.java:139)
> at
>
com.entersys.escds.util.SecurityUtils.isUserInRole(SecurityUtils.java:36
)
> at
>
com.entersys.escds.util.SecurityUtils.isUserInRole(SecurityUtils.java:45
)
> at
>
com.entersys.escds.services.DAOSoapBindingImpl.findLookups(DAOSoapBindin
gImp
> l.java:329)
> at java.lang.reflect.Method.invoke(Native Method)
> at
>
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java
:383
> )
> at
>
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.ja
va:2
> 91)
> at
>
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:330
)
> at
>
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:
> 71)
> at
org.apache.

Re: Selecting Top 10 records??

2003-03-12 Thread Ron Gallagher
Try using

query.setStartAtIndex(0);
query.setEndAtIndex(10);

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]

> 
> From: "Ismail Siddiqui" <[EMAIL PROTECTED]>
> Date: 2003/03/12 Wed PM 02:26:35 EST
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Subject: Selecting Top 10  records??
> 
> Hi all
> I am using QueryByCriteria  as following
> 
> PersistenceBroker broker =
> PersistenceBrokerFactory.defaultPersistenceBroker();
>   broker.beginTransaction();
>   Criteria c = new Criteria();
>   c.addEqualToColumn("program_instance_id", program_instance_id+"");
>   c.addOrderByDescending("score");
>   QueryByCriteria query = new QueryByCriteria(Game.class, c);
> Collection game =
> broker.getCollectionByQuery(query);
> 
> I am running microsoft sql server and want to select only top 5 records
> ..like select top 5  * where   How can I put this condition in Criteria
> 
> 
> Thanks
> 
> ismail
> 
> 
> -
> 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]



Selecting Top 10 records??

2003-03-12 Thread Ismail Siddiqui
Hi all
I am using QueryByCriteria  as following

PersistenceBroker broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
broker.beginTransaction();
Criteria c = new Criteria();
c.addEqualToColumn("program_instance_id", program_instance_id+"");
c.addOrderByDescending("score");
QueryByCriteria query = new QueryByCriteria(Game.class, c);
Collection game =
broker.getCollectionByQuery(query);

I am running microsoft sql server and want to select only top 5 records
..like select top 5  * where   How can I put this condition in Criteria


Thanks

ismail


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



OJB 0.9.9 and Oracle 817 always rollback

2003-03-12 Thread Thomas Phan
Hi,

I couldn't get OJB to work with Oracle, while connecting to Oracle thur a
raw JDBC should work. Did anyone encounter this problem? Am I configured OJB
to generate Oracle queries correctly? I've an UTF-8 instance, and set
NLS_LANG=.UTF8, and most of my database's tables are empty (contain no row)

My application works fine with both MSSQL and MySQL by changing the driver,
and the xmls, but not Oracle!

Thanks

Here's what I got:

[org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl] INFO: Create
new connection
pool:[EMAIL PROTECTED]
  jcd-alias=default
  default-connection=true
  dbms=Oracle
  jdbc-level=1.0
  driver=oracle.jdbc.driver.OracleDriver
  protocol=jdbc
  sub-protocol=oracle
  db-alias=thin:@localhost:1521:sid
  user=esf
  password=*
  eager-release=true
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, maxActive=21,
maxWait=5000, removeAbandoned=false, numTestsPerEvictionRun=10,
testWhileIdle=false, minEvictableIdleTimeMillis=60, testOnReturn=false,
logAbandoned=false, removeAbandonedTimeout=300,
timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
  batchMode=true

[EMAIL PROTECTED]
 sequenceManagerClass=class
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
 Properties={grabSize=20}
]
]
[org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] INFO: Rollback was
called, do rollback on current connection
[EMAIL PROTECTED]
[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR: Io
exception: Bad file descriptor
java.sql.SQLException: Io exception: Bad file descriptor
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
at
oracle.jdbc.driver.OracleStatement.(OracleStatement.java:445)
at
oracle.jdbc.driver.OracleStatement.(OracleStatement.java:460)
at
oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.ja
va:185)
at
oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.ja
va:168)
at
oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection
.java:614)
at
oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:4
92)
at
org.apache.ojb.broker.util.batch.BatchConnection.prepareStatement(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(Un
known Source)
at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(Unk
nown Source)
at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unkn
own Source)
at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
Source)
at org.apache.ojb.broker.accesslayer.RsIterator.(Unknown
Source)
at
org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.(Unknown
Source)
at
org.apache.ojb.broker.singlevm.ReportRsIteratorFactoryImpl.createRsIterator(
Unknown Source)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQuery(
Unknown Source)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getReportQueryIteratorF
romQuery(Unknown Source)
at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getReportQueryIteratorB
yQuery(Unknown Source)
at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getReportQueryIte
ratorByQuery(Unknown Source)
at org.apache.ojb.odmg.oql.OQLQueryImpl.execute(Unknown Source)
at
com.entersys.util.DAOHelper.getCollectionByQuery(DAOHelper.java:133)
at
com.entersys.util.DAOHelper.getIteratorByQuery(DAOHelper.java:139)
at
com.entersys.escds.util.SecurityUtils.isUserInRole(SecurityUtils.java:36)
at
com.entersys.escds.util.SecurityUtils.isUserInRole(SecurityUtils.java:45)
at
com.entersys.escds.services.DAOSoapBindingImpl.findLookups(DAOSoapBindingImp
l.java:329)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:383
)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:2
91)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:330)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:322)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
339)
at javax.servlet.http.Ht

Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread Armin Waibel
Hi Christian, Bill

I currently add a new test case to demonstrate
the described behaviour.
Could you check if I hit the bull's eye.
See ReferenceTest#testRepositoryFKStore

regards,
Armin

- Original Message -
From: "Malinescu, Cristian" <[EMAIL PROTECTED]>
To: "'OJB Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 6:15 PM
Subject: RE: Interesting (failing) scenario of FKs/PKs in PB


Hi
Yes, I succeeded to this behaviour but only for Oracle, for MySQL was
going
OK,
and for my typical situation I needed only one PK, no FK.
This was strange for me, and I posted one email on this theme last week,
but
till
now no remark/comment. I'm using the PB basic API.
regards,
Cristian

-Original Message-
From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 12. März 2003 18:02
To: OJB Users List
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


Has anyone else encountered this problem?

--Bill.

> Hi,
>
> The following fails to be stored by PersistenceBroker:
>
> I have a class ACL which has two primary keys: objectId and userFK,
and
> userFK is also a foreign key tied to a reference of type User. If I do
this:
>
> persistentBroker.beginTransaction();
> ACL acl = new ACL();
> acl.setObjectId( 100 );
> acl.setUser( currentUser );
> persistentBroker.store(acl);
> persistentBroker.commitTransaction();
>
> Acl will not be saved. The reason seems to be because in the
storeToDb()
> method of the PersistentBroker, there first comes an assertion of the
> PrimaryKeys and afterwards comes the assignment of all the foreign
keys.
In
> the scenario above the assertion of the primary keys will fail,
because
the
> userFK has not been assigned yet, so we have an incomplete set of
primary
> keys. This does work with the ODMG layer, probably because of a
different
> sequence of events during the storing of the object.
>
> I wonder if there should be a check whether a primary key is shared by
the
> foreign key and allow that assignment before the assertion of the
primary
> keys is performed. Any ideas?
>
> Cheers,
> --Bill.
>
>
> -
> 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]

-
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]



Re: build.sh won't run

2003-03-12 Thread Dennis Ryan

My German isn't very good, but I believe it is saying
"file or directory not found"

 which probably means that the binaries are not executable?
$ chmod +x bin/*.sh

Give that a try.
dennis

[EMAIL PROTECTED] wrote:

>
>
> Hello,
>
> I'm trying to install OJB on a linux computer.
> I set the the JAVA_HOME to the JDK1.4.
> I unpacked the OJB file.
> I checked the rights to run the build.sh (rights == 555).
>
> now, I try to run junit, calling it from the ojb-directory:
>bin/build.sh junit
>
> Here I get the message:
>bash: /bin/build.sh: Datei oder Verzeichnis nicht gefunden
>
> Does anyone have an idea, why this won't work?
>
> Thanks for helping in advanced.
>
> Yours sincerely,
> C. Pörtge
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread Malinescu, Cristian
Hi
Yes, I succeeded to this behaviour but only for Oracle, for MySQL was going
OK,
and for my typical situation I needed only one PK, no FK.
This was strange for me, and I posted one email on this theme last week, but
till
now no remark/comment. I'm using the PB basic API.
regards,
Cristian

-Original Message-
From: V.B. Skrypnyk [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 12. März 2003 18:02
To: OJB Users List
Subject: Re: Interesting (failing) scenario of FKs/PKs in PB


Has anyone else encountered this problem?

--Bill.

> Hi,
>
> The following fails to be stored by PersistenceBroker:
>
> I have a class ACL which has two primary keys: objectId and userFK, and
> userFK is also a foreign key tied to a reference of type User. If I do
this:
>
> persistentBroker.beginTransaction();
> ACL acl = new ACL();
> acl.setObjectId( 100 );
> acl.setUser( currentUser );
> persistentBroker.store(acl);
> persistentBroker.commitTransaction();
>
> Acl will not be saved. The reason seems to be because in the storeToDb()
> method of the PersistentBroker, there first comes an assertion of the
> PrimaryKeys and afterwards comes the assignment of all the foreign keys.
In
> the scenario above the assertion of the primary keys will fail, because
the
> userFK has not been assigned yet, so we have an incomplete set of primary
> keys. This does work with the ODMG layer, probably because of a different
> sequence of events during the storing of the object.
>
> I wonder if there should be a check whether a primary key is shared by the
> foreign key and allow that assignment before the assertion of the primary
> keys is performed. Any ideas?
>
> Cheers,
> --Bill.
>
>
> -
> 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]

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



Re: problem with join across 1:n relationships

2003-03-12 Thread Lorna Morris
Thanks for your quick reply. It worked!  I thought it should be upper case
because it is a class name, but now I notice in the documentation it is
actually lower case.


Ron Gallagher wrote:

> Lorna --
>
> Looks like a problem with case sensitivity.
>
> Change
>
> crit.addEqualTo("ExternalEntity.database_id", databaseId );
>
> to
>
> crit.addEqualTo("externalEntity.database_id", databaseId );
>
> and things will probably work better.
>
> Ron Gallagher
> Atlanta, GA
> [EMAIL PROTECTED]
>
> >
> > From: Lorna Morris <[EMAIL PROTECTED]>
> > Date: 2003/03/12 Wed AM 11:37:08 EST
> > To: [EMAIL PROTECTED]
> > Subject: problem with join across 1:n relationships
> >
> > Hi,
> >
> > I am having problems doing queries with joins. Maybe it's because I'm
> > using ojb0.9.2. I really must upgrade soon. I have been reading the
> > section on joins in the documentation here:
> > http://db.apache.org/ojb/query.html, but this may not apply to ojb0.9.2
> > and I can't find anything in the mailing list archives.
> >
> > The problem is when I use QueryByCriteria to perform a query that joins
> > 2 tables, I get some unexpected sql generated.
> >
> > I am doing a query by crieria, selecting objects from one table
> > (reference) by a single value in a column of an associated table
> > (external_entity). There is a 1-M association between
> > external_entity:reference. Here is the snippet of java that performs the
> > query and the class descriptors from the repository.xml for the two
> > relevant classes:
> >
> >
> > String databaseId = "A1234";
> > Criteria crit = new Criteria();
> > crit.addEqualTo("ExternalEntity.database_id", databaseId );
> > Query query = new QueryByCriteria( Reference.class, crit );
> > Collection col = broker.getCollectionByQuery(query);
> >
> >
> > 
> >  > class="uk.ac.ebi.integr8.data.Reference"
> > table="REFERENCE"
> > >
> >  > name="referenceId"
> > column="REFERENCE_ID"
> > jdbc-type="BIGINT"
> > primarykey="true"
> > autoincrement="true"
> > />
> >  > name="externalEntityId"
> > column="EXTERNAL_ENTITY_ID"
> > jdbc-type="BIGINT"
> > />
> >  > name="externalEntity"
> > class-ref="uk.ac.ebi.integr8.data.ExternalEntity"
> > >
> > 
> > 
> > 
> >
> >
> >
> >  > class="uk.ac.ebi.integr8.data.ExternalEntity"
> > table="EXTERNAL_ENTITY"
> > >
> >  > name="externalEntityId"
> > column="EXTERNAL_ENTITY_ID"
> > jdbc-type="BIGINT"
> > primarykey="true"
> > autoincrement="true"
> > />
> >  > name="db_id"
> > column="DATABASE_ID"
> > jdbc-type="VARCHAR"
> > />
> >  > name="references"
> > element-class-ref="uk.ac.ebi.integr8.data.Reference"
> > auto-retrieve="false"
> > auto-update="false"
> > auto-delete="false"
> > proxy="false"
> > >
> > 
> > 
> > 
> >
> >
> > The query that is generated by ojb is:
> >
> > SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0 WHERE
> > ExternalEntity.database_id = ?
> >
> >
> > But I was hoping for a query of this form to be generated, i.e. ojb
> > would perform the join based on the foreign key information in the
> > repository.xml:
> >
> > SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0,
> > EXTERNAL_ENTITY EE WHERE EE.EXTERNAL_ENTITY_ID = AO.EXTERNAL_ENTITY_ID
> > AND EE.database_id = ?
> >
> >
> >
> > Any help would be greatly appreciated,
> >
> > Many thanks
> >
> > Lorna
> >
> >
> >
> >
> > -
> > 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]


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



Re: cache confusion

2003-03-12 Thread Armin Waibel
Hi Will,

I have checked in a test case to reproduce
your problem. See CollectionsTest.java.
The test is passed, please have a look at it. 

> have a web application, so let's say the user chooses a Trainee and
> clicks Delete. The action does the following, each in a separate ODMG
> transaction.
>
> - (the Faculty object has previously been retreived and put into the
> session.)
> - get the Trainee object using the OID, delete the trainee (both in
one tx)
you have to reset the Trainee List in Faculty and lock this too,
because the Faculty object in the cache could not know (or say
we do not have such a sophisticated cache implementation ;-))
that one of the references was deleted.
When using the ObjectCacheEmptyImpl this could not
happen, then every object was retrieved from the DB.

If the test case does not reproduce you problem could
you please post me a modified version?

HTH

regards,
Armin


> - get the Faculty object using the OID
>
> I then put the Faculty into the sessions and use its trainee
collection
>   to populate a dropdown box of Trainees. What happens is that the
> deleted trainee continues to appear in the list. Via debugging I can
see
> that the Faculties trainee collection still has the deleted trainee.
>
> It seems that the Faculty object is always gotten from the cache and
> never from the db, so the Trainee collection is wrong. I have to
restart
> my application server in order for the correct collection to show.
>
> This make so sense to me. Clearly I'm not understanding the cache.
>
> Will
>
>
> -
> 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]



Re: Interesting (failing) scenario of FKs/PKs in PB

2003-03-12 Thread V.B. Skrypnyk
Has anyone else encountered this problem?

--Bill.

> Hi,
>
> The following fails to be stored by PersistenceBroker:
>
> I have a class ACL which has two primary keys: objectId and userFK, and
> userFK is also a foreign key tied to a reference of type User. If I do
this:
>
> persistentBroker.beginTransaction();
> ACL acl = new ACL();
> acl.setObjectId( 100 );
> acl.setUser( currentUser );
> persistentBroker.store(acl);
> persistentBroker.commitTransaction();
>
> Acl will not be saved. The reason seems to be because in the storeToDb()
> method of the PersistentBroker, there first comes an assertion of the
> PrimaryKeys and afterwards comes the assignment of all the foreign keys.
In
> the scenario above the assertion of the primary keys will fail, because
the
> userFK has not been assigned yet, so we have an incomplete set of primary
> keys. This does work with the ODMG layer, probably because of a different
> sequence of events during the storing of the object.
>
> I wonder if there should be a check whether a primary key is shared by the
> foreign key and allow that assignment before the assertion of the primary
> keys is performed. Any ideas?
>
> Cheers,
> --Bill.
>
>
> -
> 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]



RE: ECHO not implemented

2003-03-12 Thread Mahler Thomas
You can safely ignore the ECHO not implemented message!

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 3:28 PM
> To: OJB Users List
> Subject: ECHO not implemented
> 
> 
> 
> 
> Hello Thomas,
> 
> thank you for your last tips. I finally could run the build.sh.
> 
> Now, I would like to try the Tutorial 1. The script 
> prepare-tutorials.sh runs
> fine, but in the Terminal-Output, I see that the 
> create-db.sql delivers the
> output "ECHO not implemented". I checked this file and read: "ECHO not
> implemented".
> Did I miss a newer file, which is not in the standard OJB 1.0 
> packed file?
> 
> 
> Thank you.
> Carsten Pörtge
> 
> 
> Here is a part of the output:
> 
> schnipp-
> project-sql-classpath:
>  [echo] +--+
>  [echo] |  |
>  [echo] | Generating SQL for OJB Testsuite!|
>  [echo] | enJoy!   |
>  [echo] |  |
>  [echo] +--+
> [torque-sql] Using contextProperties file:
> /misc/home/a322pc/db-ojb-1.0.rc1/build.properties
> [torque-sql] Using classpath
> [torque-sql] Generating to file
> /misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/report.ojbtest
> .sql.generation
> [torque-sql] Resolver: used database.dtd from
> org.apache.torque.engine.database.transform package
> [torque-sql] Resolver: used database.dtd from
> org.apache.torque.engine.database.transform package
> 
> project-create-db-classpath:
>  [echo]
>  [echo]   driver="org.hsqldb.jdbcDriver"
>  [echo]   url="jdbc:hsqldb:target/test/OJB"
>  [echo]   userid="sa"
>  [echo]   password=""
>  [echo]
> [torque-create-db] Using classpath
> [torque-create-db] Generating to file
> /misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/create-db.sql
> [torque-create-db] Resolver: used database.dtd from
> org.apache.torque.engine.database.transform package
> [torque-create-db] Resolver: used database.dtd from
> org.apache.torque.engine.database.transform package
>   [sql] Executing file:
> /misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/create-db.sql
>   [sql] Failed to execute: ECHO Not implemented
>   [sql] java.sql.SQLException: Unexpected token: ECHO in 
> statement [ECHO Not
> implemented]
>   [sql] 0 of 1 SQL statements executed successfully
> schnapp
> 
> 
> 
> -
> 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]



Re: problem with join across 1:n relationships

2003-03-12 Thread Ron Gallagher
Lorna -- 

Looks like a problem with case sensitivity.

Change

crit.addEqualTo("ExternalEntity.database_id", databaseId );

to

crit.addEqualTo("externalEntity.database_id", databaseId );

and things will probably work better.

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]

> 
> From: Lorna Morris <[EMAIL PROTECTED]>
> Date: 2003/03/12 Wed AM 11:37:08 EST
> To: [EMAIL PROTECTED]
> Subject: problem with join across 1:n relationships
> 
> Hi,
> 
> I am having problems doing queries with joins. Maybe it's because I'm
> using ojb0.9.2. I really must upgrade soon. I have been reading the
> section on joins in the documentation here:
> http://db.apache.org/ojb/query.html, but this may not apply to ojb0.9.2
> and I can't find anything in the mailing list archives.
> 
> The problem is when I use QueryByCriteria to perform a query that joins
> 2 tables, I get some unexpected sql generated.
> 
> I am doing a query by crieria, selecting objects from one table
> (reference) by a single value in a column of an associated table
> (external_entity). There is a 1-M association between
> external_entity:reference. Here is the snippet of java that performs the
> query and the class descriptors from the repository.xml for the two
> relevant classes:
> 
> 
> String databaseId = "A1234";
> Criteria crit = new Criteria();
> crit.addEqualTo("ExternalEntity.database_id", databaseId );
> Query query = new QueryByCriteria( Reference.class, crit );
> Collection col = broker.getCollectionByQuery(query);
> 
> 
> 
>  class="uk.ac.ebi.integr8.data.Reference"
> table="REFERENCE"
> >
>  name="referenceId"
> column="REFERENCE_ID"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
>  name="externalEntityId"
> column="EXTERNAL_ENTITY_ID"
> jdbc-type="BIGINT"
> />
>  name="externalEntity"
> class-ref="uk.ac.ebi.integr8.data.ExternalEntity"
> >
> 
> 
> 
> 
> 
>
>  class="uk.ac.ebi.integr8.data.ExternalEntity"
> table="EXTERNAL_ENTITY"
> >
>  name="externalEntityId"
> column="EXTERNAL_ENTITY_ID"
> jdbc-type="BIGINT"
> primarykey="true"
> autoincrement="true"
> />
>  name="db_id"
> column="DATABASE_ID"
> jdbc-type="VARCHAR"
> />
>  name="references"
> element-class-ref="uk.ac.ebi.integr8.data.Reference"
> auto-retrieve="false"
> auto-update="false"
> auto-delete="false"
> proxy="false"
> >
> 
> 
> 
> 
> 
> The query that is generated by ojb is:
> 
> SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0 WHERE
> ExternalEntity.database_id = ?
> 
> 
> But I was hoping for a query of this form to be generated, i.e. ojb
> would perform the join based on the foreign key information in the
> repository.xml:
> 
> SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0,
> EXTERNAL_ENTITY EE WHERE EE.EXTERNAL_ENTITY_ID = AO.EXTERNAL_ENTITY_ID
> AND EE.database_id = ?
> 
> 
> 
> Any help would be greatly appreciated,
> 
> Many thanks
> 
> Lorna
> 
> 
> 
> 
> -
> 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]



problem with join across 1:n relationships

2003-03-12 Thread Lorna Morris
Hi,

I am having problems doing queries with joins. Maybe it's because I'm
using ojb0.9.2. I really must upgrade soon. I have been reading the
section on joins in the documentation here:
http://db.apache.org/ojb/query.html, but this may not apply to ojb0.9.2
and I can't find anything in the mailing list archives.

The problem is when I use QueryByCriteria to perform a query that joins
2 tables, I get some unexpected sql generated.

I am doing a query by crieria, selecting objects from one table
(reference) by a single value in a column of an associated table
(external_entity). There is a 1-M association between
external_entity:reference. Here is the snippet of java that performs the
query and the class descriptors from the repository.xml for the two
relevant classes:


String databaseId = "A1234";
Criteria crit = new Criteria();
crit.addEqualTo("ExternalEntity.database_id", databaseId );
Query query = new QueryByCriteria( Reference.class, crit );
Collection col = broker.getCollectionByQuery(query);












   









The query that is generated by ojb is:

SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0 WHERE
ExternalEntity.database_id = ?


But I was hoping for a query of this form to be generated, i.e. ojb
would perform the join based on the foreign key information in the
repository.xml:

SELECT A0.REFERENCE_ID,A0.EXTERNAL_ENTITY_ID FROM REFERENCE A0,
EXTERNAL_ENTITY EE WHERE EE.EXTERNAL_ENTITY_ID = AO.EXTERNAL_ENTITY_ID
AND EE.database_id = ?



Any help would be greatly appreciated,

Many thanks

Lorna




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



Persisting a list

2003-03-12 Thread Peter Kirk
Hi there,
I need some help persisting classes, where one class contains a list of
objects of the other class.

Say I have two classes A and B.

A has:
int id;
List bList; // a list of B objects.

B has:
int id;
A a; // a reference to the A that owns this B.

I am having trouble persisting these via ODMG. The only way I can get it to
work is if I also define a new field "aId" in class B (which is a copy of
the id from the A owner object).

Is there a "cleaner" way to get this to work (ie. without needing the "aId")
?


Eg. some tables:
CREATE TABLE A_TABLE(ID INTEGER)
CREATE TABLE B_TABLE(ID INTEGER,A_ID INTEGER)

In the repository xml:



  

  



  
  
  

  



Thanks,
Peter


ECHO not implemented

2003-03-12 Thread Carsten . Poertge


Hello Thomas,

thank you for your last tips. I finally could run the build.sh.

Now, I would like to try the Tutorial 1. The script prepare-tutorials.sh runs
fine, but in the Terminal-Output, I see that the create-db.sql delivers the
output "ECHO not implemented". I checked this file and read: "ECHO not
implemented".
Did I miss a newer file, which is not in the standard OJB 1.0 packed file?


Thank you.
Carsten Pörtge


Here is a part of the output:

schnipp-
project-sql-classpath:
 [echo] +--+
 [echo] |  |
 [echo] | Generating SQL for OJB Testsuite!|
 [echo] | enJoy!   |
 [echo] |  |
 [echo] +--+
[torque-sql] Using contextProperties file:
/misc/home/a322pc/db-ojb-1.0.rc1/build.properties
[torque-sql] Using classpath
[torque-sql] Generating to file
/misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/report.ojbtest.sql.generation
[torque-sql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-sql] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package

project-create-db-classpath:
 [echo]
 [echo]   driver="org.hsqldb.jdbcDriver"
 [echo]   url="jdbc:hsqldb:target/test/OJB"
 [echo]   userid="sa"
 [echo]   password=""
 [echo]
[torque-create-db] Using classpath
[torque-create-db] Generating to file
/misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/create-db.sql
[torque-create-db] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
[torque-create-db] Resolver: used database.dtd from
org.apache.torque.engine.database.transform package
  [sql] Executing file:
/misc/home/a322pc/db-ojb-1.0.rc1/target/src/sql/create-db.sql
  [sql] Failed to execute: ECHO Not implemented
  [sql] java.sql.SQLException: Unexpected token: ECHO in statement [ECHO Not
implemented]
  [sql] 0 of 1 SQL statements executed successfully
schnapp



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



Re: IndexOutOfBoundsException with more than 32 field-descriptor in class-descriptor

2003-03-12 Thread Armin Waibel
Hi,

you say all works fine with 32 fields and the descriptors
are all correct - maybe it's a restriction of the WSJdbc driver.
I don't know about a restriction to 32 fields using OJB,
but we don't have a test case using >32 fields.

If you use the CVS repository, I update StatementManager
to give some more logging info.

regards,
Armin

- Original Message -
From: <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 12:09 PM
Subject: IndexOutOfBoundsException with more than 32 field-descriptor in
class-descriptor



Hi Armin,

Platform is WSAD 5.0 with Websphere 5.0,  here the stack :

[12/03/03 12:06:47:368 CET] 31f43203 SystemOut O Socle DEBUG[60]
Version du socle 0.1
[12/03/03 12:06:47:378 CET] 31f43203 ApplicationMg A WSVR0221I:
L'application est lancée : DefaultEAR
[12/03/03 12:06:47:438 CET] 31f43203 HttpTransport A SRVE0171I: Le
transport http écoute sur le port 9 080.
[12/03/03 12:06:53:687 CET] 31f43203 HttpTransport A SRVE0171I: Le
transport https écoute sur le port 9 443.
[12/03/03 12:06:53:817 CET] 31f43203 RMIConnectorC A ADMC0026I:
Connecteur
RMI disponible sur le port 2809
[12/03/03 12:06:53:877 CET] 31f43203 WsServer  A WSVR0001I: Serveur
server1 ouvert pour e-business
[12/03/03 12:07:12:434 CET] 60103216 RequestProces I
org.apache.struts.action.RequestProcessor  Processing a 'GET' for path
'/CreationBOAction'
[12/03/03 12:07:13:696 CET] 60103216 ConnectionFac I J2CA0107I: Alias
d'authentification géré par composant non accepté pour la fabrique de
connexions ou la source de données Source de données 3.
[12/03/03 12:07:26:544 CET] 60103216 SystemOut O Nombre de compose :
5
[12/03/03 12:07:27:275 CET] 60103216 SharedPoolI J2CA0086W: La
connexion partageable MCWrapper id 1e45b214  Managed connection
[EMAIL PROTECTED]
State:STATE_TRAN_WRAPPER_INUSE
 utilisée à partir de la ressource jdbc/ds3 a été utilisée à l'intérieur
des limites de confinement d'une transaction locale.
[12/03/03 12:07:28:367 CET] 60103216 RequestProces W
org.apache.struts.action.RequestProcessor  Unhandled Exception thrown:
class java.lang.IndexOutOfBoundsException
[12/03/03 12:07:31:541 CET] 60103216 WebGroup  E SRVE0026E: [Erreur
de
servlet]-[Index: 0, Size: 0]: java.lang.IndexOutOfBoundsException:
Index:
0, Size: 0
  at java.util.ArrayList.RangeCheck(ArrayList.java(Compiled Code))
  at java.util.ArrayList.set(ArrayList.java:343)
  at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.countParameter(WSJdbcP
reparedStatement.java:355)
  at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.setObject(WSJdbcPrepar
edStatement.java:1117)
  at
org.apache.ojb.broker.platforms.PlatformDefaultImpl.setObjectForStatemen
t(Unknown
 Source)
  at
org.apache.ojb.broker.platforms.PlatformDb2Impl.setObjectForStatement(Un
known
 Source)
  at
org.apache.ojb.broker.accesslayer.StatementManager.bindUpdate(Unknown
Source)
  at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.storeToDb(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.store(Unknown
Source)
  at
com.gie2a.commun.socle.service.dataservice.ojb.OjbDataService.update(Ojb
DataService.java:196)
  at
com.gie2a.commun.socle.service.businessservice.BusinessServiceImpl.updat
e(BusinessServiceImpl.java:113)
  at
appli.socleservices.CfpclientBS.modifierClient(CfpclientBS.java:77)
  at
appli.action.CreationBOAction.execute(CreationBOAction.java:123)
  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:446)
  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
266)
  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rvletInstance.java:110)
  at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.
_service(StrictLifecycleServlet.java:174)
  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Servlet.java:313)
  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ecycleServlet.java:116)
  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
java:258)
  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dServletReferenceState.java:42)
  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tInstanceReference.java:40)
  at
com.ibm.ws.webcontainer.webapp.WebAp

IndexOutOfBoundsException with more than 32 field-descriptor in class-descriptor

2003-03-12 Thread cgargan

Hi Armin,

Platform is WSAD 5.0 with Websphere 5.0,  here the stack :

[12/03/03 12:06:47:368 CET] 31f43203 SystemOut O Socle DEBUG[60]
Version du socle 0.1
[12/03/03 12:06:47:378 CET] 31f43203 ApplicationMg A WSVR0221I:
L'application est lancée : DefaultEAR
[12/03/03 12:06:47:438 CET] 31f43203 HttpTransport A SRVE0171I: Le
transport http écoute sur le port 9 080.
[12/03/03 12:06:53:687 CET] 31f43203 HttpTransport A SRVE0171I: Le
transport https écoute sur le port 9 443.
[12/03/03 12:06:53:817 CET] 31f43203 RMIConnectorC A ADMC0026I: Connecteur
RMI disponible sur le port 2809
[12/03/03 12:06:53:877 CET] 31f43203 WsServer  A WSVR0001I: Serveur
server1 ouvert pour e-business
[12/03/03 12:07:12:434 CET] 60103216 RequestProces I
org.apache.struts.action.RequestProcessor  Processing a 'GET' for path
'/CreationBOAction'
[12/03/03 12:07:13:696 CET] 60103216 ConnectionFac I J2CA0107I: Alias
d'authentification géré par composant non accepté pour la fabrique de
connexions ou la source de données Source de données 3.
[12/03/03 12:07:26:544 CET] 60103216 SystemOut O Nombre de compose : 5
[12/03/03 12:07:27:275 CET] 60103216 SharedPoolI J2CA0086W: La
connexion partageable MCWrapper id 1e45b214  Managed connection
[EMAIL PROTECTED]
State:STATE_TRAN_WRAPPER_INUSE
 utilisée à partir de la ressource jdbc/ds3 a été utilisée à l'intérieur
des limites de confinement d'une transaction locale.
[12/03/03 12:07:28:367 CET] 60103216 RequestProces W
org.apache.struts.action.RequestProcessor  Unhandled Exception thrown:
class java.lang.IndexOutOfBoundsException
[12/03/03 12:07:31:541 CET] 60103216 WebGroup  E SRVE0026E: [Erreur de
servlet]-[Index: 0, Size: 0]: java.lang.IndexOutOfBoundsException: Index:
0, Size: 0
  at java.util.ArrayList.RangeCheck(ArrayList.java(Compiled Code))
  at java.util.ArrayList.set(ArrayList.java:343)
  at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.countParameter(WSJdbcPreparedStatement.java:355)
  at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.setObject(WSJdbcPreparedStatement.java:1117)
  at
org.apache.ojb.broker.platforms.PlatformDefaultImpl.setObjectForStatement(Unknown
 Source)
  at
org.apache.ojb.broker.platforms.PlatformDb2Impl.setObjectForStatement(Unknown
 Source)
  at
org.apache.ojb.broker.accesslayer.StatementManager.bindUpdate(Unknown
Source)
  at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.storeToDb(Unknown
Source)
  at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
  at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown
Source)
  at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.store(Unknown
Source)
  at
com.gie2a.commun.socle.service.dataservice.ojb.OjbDataService.update(OjbDataService.java:196)
  at
com.gie2a.commun.socle.service.businessservice.BusinessServiceImpl.update(BusinessServiceImpl.java:113)
  at
appli.socleservices.CfpclientBS.modifierClient(CfpclientBS.java:77)
  at appli.action.CreationBOAction.execute(CreationBOAction.java:123)
  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
  at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.
_service(StrictLifecycleServlet.java:174)
  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
  at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
  

Re: IndexOutOfBoundsException with more than 32 field-descriptor in class-descriptor

2003-03-12 Thread Armin Waibel
Could you please post your stack trace to get more
information?

regards,
Armin

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 11:39 AM
Subject: IndexOutOfBoundsException with more than 32 field-descriptor in
class-descriptor


>
> Hi,
>
> I'm using  DB2 UDB 7.2 , and I have a table with 43 fields inside.
> I defined a class-descriptor with 43 field-descriptor corresponding to
this
> table.
> When I try to  insert or update several objects in my database, I
receive
> an IndexOutOfBoundsException and
> the first of the objects is nevertheless stored.
> There's no exception at all when I try to store only one object.
> There's no problem either  if I define only 32 field-descriptor in the
> class-descriptor and then try to store
> several objects.
>
> How can I solve this ?
>
> Thanks.
>
>
>
>
>
> -
> 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]



IndexOutOfBoundsException with more than 32 field-descriptor in class-descriptor

2003-03-12 Thread cgargan

Hi,

I'm using  DB2 UDB 7.2 , and I have a table with 43 fields inside.
I defined a class-descriptor with 43 field-descriptor corresponding to this
table.
When I try to  insert or update several objects in my database, I receive
an IndexOutOfBoundsException and
the first of the objects is nevertheless stored.
There's no exception at all when I try to store only one object.
There's no problem either  if I define only 32 field-descriptor in the
class-descriptor and then try to store
several objects.

How can I solve this ?

Thanks.





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



Where is the best place to declare the PersistenceBroker?

2003-03-12 Thread Sylvain.Thevoz
Hello,

I'm using OJB and PersistenceBroker API.

I use OJB to deal with my database from inside a JavaBean.

My question is:
Where is the best place to declare my PersistenceBroker inside the Bean?

I think it's better to declare the broker one time??


Thanks
Sylvain

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



RE: repository.xml

2003-03-12 Thread Mahler Thomas
http://db.apache.org/ojb/deployment.html

> -Original Message-
> From: Oki DZ [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 12, 2003 9:19 AM
> To: [EMAIL PROTECTED]
> Subject: repository.xml
> 
> 
> Hi,
> 
> I'm new to OJB, and I think I need some pointers on the config files.
> I put the repository.xml outside the OJB home directory, and the 
> PBFactory couldn't find it. I had put the path into my 
> repository.xml into the classpath. I used the default 
> connection (using 
> PersistenceBrokerFactory.defaultPersistenceBroker()).
> 
> Question is, should the repository.xml be put in the original 
> directory?
> 
> Thanks in advance,
> Oki
> 
> 
> -
> 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]



RE: speed question

2003-03-12 Thread Mahler Thomas
Hi Don,

OJB does nothing special if you are running it in a managed environment.
So IMO the overhead you see must be J2EE overhead.

I expect that you will see a drastic improvement if you just use a
(stateless) SessionBean and not BMP entity beans.
EntityBeans require *a lot* of management overhead.
Proper usage of transaction demarcation with entity beans also has an
enourmous impact!
So in OJB.properties you should switch to container managed connections!

cheers,
Thomas

> -Original Message-
> From: Don Walling [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 11, 2003 11:58 PM
> To: OJB Users List
> Subject: Re: speed question
> 
> 
> Its the average time. The first time takes close to 2 seconds.
> I'm not so worried about the absolute value of the time. Its the 
> relative difference when we put the code inside an EJB that is 
> bothersome. Just wondering if there is something we're 
> missing regarding 
> configuration, or if we can reasonably expect the timings to 
> be similar.
> Thanks for your help,
> Don
> ---
> 
> [EMAIL PROTECTED] wrote:
> 
> >Is 450ms the average time it takes or is it the first time 
> the ejb container 
> >takes a request?
> >
> >Jeff
> >
> >
> >On Tuesday 11 March 2003 09:44 am, you wrote:
> >  
> >
> >>We're experiencing a speed difference we can't explain. 
> We've tried the
> >>following code in two circumstances:
> >>
> >>Date start = new Date();
> >>PersistenceManager manager = factory.getPersistenceManager();
> >>PersistenceBrokerFactory.defaultPersistenceBroker().clearCache();
> >>manager.currentTransaction().begin();
> >>String filter = "registrationNumber == 2";
> >>Query query = manager.newQuery(AircraftValue.class,filter);
> >>Collection all = (Collection)query.execute();
> >>Interator result = all.iterator();
> >>Date end = new Date();
> >>
> >>When packaged in a .war and invoked by a .jsp, the code executes in
> >>about 15 ms. When packaged in an ejbLoad() method on a BMP, it takes
> >>about 450 ms. The OJB.properties and registry.xml files are 
> identical in
> >>both cases (copied from OJB 0.9.9), and we're using a 
> datasource to SQL
> >>Server. Is this speed difference resulting from being 
> executed inside a
> >>BMP transaction? Or is something else going on?
> >>Thanks in advance,
> >>Don
> >>---
> >>
> >>
> >>
> -
> >>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]
> >
> >  
> >
> 
> -- 
> Your favorite stores, helpful shopping tools and great gift ideas. 
> Experience the convenience of buying online with [EMAIL PROTECTED] 
> http://shopnow.netscape.com/
> 
> 


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



AW: Oracle: store() -> "Broken Pipe"

2003-03-12 Thread "Büttgen Ulrich, IT5"
Hi,

> 
> Hi Uli,
> 
> if you say custom SM you mean your own implementation
> based on the 0.95 code?

Yes, and i have found the error last night: my SM was closing the JDBC connection. My 
fault :(
> 
> regards,
> Armin
> 

Uli

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



Re: Any guidelines or best practices for OJB ?

2003-03-12 Thread Joerg Lensing
hi ojb-users,
i found it very useful to read this thread. How about integrating it in 
the user-docs?

joerg

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


repository.xml

2003-03-12 Thread Oki DZ
Hi,

I'm new to OJB, and I think I need some pointers on the config files.
I put the repository.xml outside the OJB home directory, and the 
PBFactory couldn't find it. I had put the path into my 
repository.xml into the classpath. I used the default connection (using 
PersistenceBrokerFactory.defaultPersistenceBroker()).

Question is, should the repository.xml be put in the original directory?

Thanks in advance,
Oki


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