Re: more 098 to 099 conversion problems
Nope, apparently not. I hit that snag too, it's a new change, because it needs to know WHICH DB you're trying to connect to regardless of the default. R P.S. Equifax uses OJB? On Tuesday, Feb 11, 2003, at 16:28 US/Eastern, [EMAIL PROTECTED] wrote: Thanks much. But isn't that why I specify 'default-connection="true"' in the JCD? |-+---> | | "Robert S. | | | Sfeir" | | | <[EMAIL PROTECTED]| | | gov>| | | | | | 02/11/2003 04:15| | | PM | | | Please respond | | | to "OJB Users | | | List" | | | | |-+---> -- -- --| | | |To: "OJB Users List" <[EMAIL PROTECTED]> | |cc: | |Subject: Re: more 098 to 099 conversion problems | | | -- -- --| yup ran into that last weekend. The trick is that in your class file where you do the db.open, you need to change (something close to): db.open("repository.xml", Database.READ_WRITE) to db.open("default", Database.READ_WRITE) (Default in this case is the name of your alias) R On Tuesday, Feb 11, 2003, at 16:04 US/Eastern, [EMAIL PROTECTED] wrote: When I try to get my new app running with 0.9.9, I get the following. [org.apache.ojb.broker.metadata.ConnectionRepository] INFO: Could not found org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey org.apache.ojb.broker.PBKey: repository=repository.xml, user=null, password=null [org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: ConfigurableFactory instantiation failed for class class org.apache.ojb.broker.accesslayer.ConnectionManagerImpl * Factory types: 1 - Type: org.apache.ojb.broker.PersistenceBroker * Factory arguments: 1 - Argument: org.apache.ojb.broker.singlevm.PersistenceBrokerImpl@79935d null java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo r AccessorImpl.java:39) . . . . at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo n structorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source) ... 35 more Caused by: java.lang.NullPointerException at org.apache.ojb.broker.platforms.PlatformFactory.getPlatformFor(Unknown Source) at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.(Unknown Source) ... 40 more The OJB.properties is now "stock". At the moment, here is my jdbc connection descriptor. jcd-alias="default" default-connection="true" platform="Hsqldb" jdbc-level="2.0" driver="org.hsqldb.jdbcDriver" username="sa" password="" eager-release="false" batch-mode="false" useAutoCommit="0" ignoreAutoCommitExceptions="false" Normally, I'd just debug into OJB to understand what is going on, but at the moment I'm having network difficulties which are making it hard for me to get the source in a form I can useso, can anyone tell me what I've done wrong? Thanks. David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] R -- Robert S. Sfeir Senior Java Engineer National Institutes of Health Ce
RE: [patch] Re: PBKey and OJB 0.9.9
Works perfectly - thanks! -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 3:58 AM To: OJB Users List; [EMAIL PROTECTED] Subject: [patch] Re: PBKey and OJB 0.9.9 Hi Jason, Shannon, I currently checked in the fix. To update version 0.9.9 check out src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java src/java/org/apache/ojb/broker/ta/PersistenceBrokerFactoryDefaultImpl.ja va src/java/org/apache/ojb/broker/util BrokerHelper.java http://cvs.apache.org/viewcvs/jakarta-ojb/src/java/org/apache/ojb/broker / regards, Armin - Original Message - From: "Jason Mihalick" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 2:30 AM Subject: Re: PBKey and OJB 0.9.9 > I whole-heartedly agree. Thanks for responding so quickly, and thanks for > correcting this. Thanks to you too Shannon for the great suggestion. > > -- > Jason > > - Original Message - > From: "Armin Waibel" <[EMAIL PROTECTED]> > To: "OJB Users List" <[EMAIL PROTECTED]> > Sent: Monday, February 10, 2003 6:01 PM > Subject: Re: PBKey and OJB 0.9.9 > > > > > > - Original Message - > > From: "Shannon Ewing" <[EMAIL PROTECTED]> > > To: "'OJB Users List'" <[EMAIL PROTECTED]> > > Sent: Monday, February 10, 2003 11:14 PM > > Subject: RE: PBKey and OJB 0.9.9 > > > > > > > Are you saying that if the connection is not "default" then the user > > and > > > password must be passed in despite the fact that the user and password > > is > > > defined in the jdbc-connection-descriptor? This does not make since. > > > The > > > only difference should be the connection being flagged as default > > which > > > would be used for PersistenceBrokerFactory.defaultPersistenceBroker(). > > If > > > PersistenceBrokerFactory.createPersistenceBroker(new PBKey("xyz")) is > > done, > > > then the user and password defined for "xyz" in the > > > jdbc-connection-descriptor should be used. > > > > > > > OK, you are right. This makes sense, I will change this. > > > > thank you Shannon and Jason > > > > regards, > > Armin > > > > > > > > > -Original Message- > > > From: Armin Waibel [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, February 10, 2003 3:42 PM > > > To: OJB Users List > > > Subject: Re: PBKey and OJB 0.9.9 > > > > > > > > > Hi Jason, > > > > > > sorry for the hassle, but the new release is more strict in handling > > > different users. Thus OJB try to find a connection without user and > > > password, > > > because both fields were null (new PBKey("mydb")). > > > > > > If you only use > > > one database per application and you set the default-connection > > > attribute > > > 'true' it is possible to use > > > broker = PersistenceBrokerFactory.defaultPersistenceBroker(); > > > > > > If it will help in your case I could do the following: > > > Granted that the jcdAlias name of the PBKey is matching > > > a jdbc-connection-descriptor and the default-connection was set > > 'true', > > > but user and password of the PBKey are 'null', then OJB could use the > > > user and password specified in the descriptor. > > > This will only work if default-connection is set 'true' and you > > > only could define one jdbc-connection-descriptor as the default > > > one. Would this solve your problem? > > > > > > > > > regards, > > > Armin > > > > > > - Original Message - > > > From: <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, February 10, 2003 9:23 PM > > > Subject: PBKey and OJB 0.9.9 > > > > > > > > > > Hi, > > > > > > > > I recently reconfigured our application to use the new 0.9.9 > > release. > > > > Previously we were using 0.9.8. We are using the PersistenceBroker > > > API. > > > > After reconfiguring our repository.xml file to use the new jcd-alias > > > > attribute on the connection descriptor, my connection descriptor is > > as > > > > follows: > > > > > > > > > > > jcd-alias="mydb" > > > > default-connection="true" > > > > useAutoCommit="1" > > > > platform="Hsqldb" > > > > jdbc-level="2.0" > > > > driver="org.hsqldb.jdbcDriver" > > > > protocol="jdbc" > > > > subprotocol="hsqldb" > > > > dbalias="/tmp/db/mydb" > > > > username="sa" > > > > password="" > > > >/> > > > > > > > > > > > > In my code, I aquire the PersistenceBroker using this method: > > > > > > > > broker = > > ersistenceBrokerFactory.createPersistenceBroker( new > > > > PBKey( "mydb") ); > > > > > > > > > > > > I am curious as to why it is now mandatory to supply the user name > > and > > > > password as part of the key now? I could always store it in > > another > > > file > > > > I suppose, but we are using multiple database platforms each of > > which > > > have > > > > a different username and password. The way this used to work was > > > gr
Re: RES: Does OJB supports clustering in an EJB container?
First I'm not an expert on this part of OJB, but I think this only works when using the ODMG api, PB-api does not support any locking features. Anymore locking of objects does not solve the caching problems caused by running in a cluster and caching is done on the PB-level. regards, Armin - Original Message - From: "Norman C. Jarvis" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 5:27 PM Subject: Re: RES: Does OJB supports clustering in an EJB container? > I know it works with the PB API and ODMG API. We are not going to use > the JDO API until it is farther along (i.e. not using Suns JDORI). I > suspect that it will work in the JDO API as well since the JDO API > implementation will be built upon the PB API. > > Norman Jarvis > > On Tue, 11 Feb 2003 13:11:46 -0300 > Fernando <[EMAIL PROTECTED]> wrote: > > > Does it applies to JDO impl? > > > > > -Mensagem original- > > > De: Norman C. Jarvis [mailto:[EMAIL PROTECTED]] > > > Enviada em: segunda-feira, 10 de fevereiro de 2003 13:34 > > > Para: OJB Users List > > > Assunto: Re: Does OJB supports clustering in an EJB container? > > > > > > > > > In an email from Thomas Mahler: > > > > > > "It is also possible to run the ODMG transaction manager in > > > distributed > > > mode. You just have to configure usage of the Persistent Lock > > > Manager in > > > OJB.properties." > > > > > > The message thread on the mailing list is: configuring OJB in > > > a cluster > > > > > > Norman Jarvis > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- > Norman Jarvis > [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: more 098 to 099 conversion problems
Thanks much. But isn't that why I specify 'default-connection="true"' in the JCD? |-+---> | | "Robert S. | | | Sfeir" | | | <[EMAIL PROTECTED]| | | gov>| | | | | | 02/11/2003 04:15| | | PM | | | Please respond | | | to "OJB Users | | | List" | | | | |-+---> >--| | | |To: "OJB Users List" <[EMAIL PROTECTED]> | |cc: | |Subject: Re: more 098 to 099 conversion problems | | | >--| yup ran into that last weekend. The trick is that in your class file where you do the db.open, you need to change (something close to): db.open("repository.xml", Database.READ_WRITE) to db.open("default", Database.READ_WRITE) (Default in this case is the name of your alias) R On Tuesday, Feb 11, 2003, at 16:04 US/Eastern, [EMAIL PROTECTED] wrote: > When I try to get my new app running with 0.9.9, I get the following. > > [org.apache.ojb.broker.metadata.ConnectionRepository] INFO: Could not > found > org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey > org.apache.ojb.broker.PBKey: repository=repository.xml, user=null, > password=null > [org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: > ConfigurableFactory instantiation failed for class class > org.apache.ojb.broker.accesslayer.ConnectionManagerImpl > * Factory types: > 1 - Type: org.apache.ojb.broker.PersistenceBroker > * Factory arguments: > 1 - Argument: > org.apache.ojb.broker.singlevm.PersistenceBrokerImpl@79935d > null > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor > AccessorImpl.java:39) > > . > . > . > . > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon > structorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:274) > at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown > Source) > ... 35 more > Caused by: java.lang.NullPointerException > at > org.apache.ojb.broker.platforms.PlatformFactory.getPlatformFor(Unknown > Source) > at > org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.(Unknown > Source) > ... 40 more > > The OJB.properties is now "stock". At the moment, here is my jdbc > connection descriptor. > > jcd-alias="default" > default-connection="true" > platform="Hsqldb" > jdbc-level="2.0" > driver="org.hsqldb.jdbcDriver" > username="sa" > password="" > eager-release="false" > batch-mode="false" > useAutoCommit="0" > ignoreAutoCommitExceptions="false" >> > ="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl"> > attribute-value="250"/> > > > > > Normally, I'd just debug into OJB to understand what is going on, but > at > the moment I'm having network difficulties which are making it hard > for me > to get the source in a form I can useso, can anyone tell me what > I've > done wrong? > > Thanks. > > David > > > This message contains information from Equifax Inc. which may be > confidential and privileged. If you are not an intended recipient, > please > refrain from any disclosure, copying, distribution or use of this > information and note that such actions are prohibited. If you have > received this transmission in error, please notify by e-mail > [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > R -- Robert S. Sfeir Senior Java Engineer National Institutes of Health Center for Information T
Re: more 098 to 099 conversion problems
yup ran into that last weekend. The trick is that in your class file where you do the db.open, you need to change (something close to): db.open("repository.xml", Database.READ_WRITE) to db.open("default", Database.READ_WRITE) (Default in this case is the name of your alias) R On Tuesday, Feb 11, 2003, at 16:04 US/Eastern, [EMAIL PROTECTED] wrote: When I try to get my new app running with 0.9.9, I get the following. [org.apache.ojb.broker.metadata.ConnectionRepository] INFO: Could not found org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey org.apache.ojb.broker.PBKey: repository=repository.xml, user=null, password=null [org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: ConfigurableFactory instantiation failed for class class org.apache.ojb.broker.accesslayer.ConnectionManagerImpl * Factory types: 1 - Type: org.apache.ojb.broker.PersistenceBroker * Factory arguments: 1 - Argument: org.apache.ojb.broker.singlevm.PersistenceBrokerImpl@79935d null java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor AccessorImpl.java:39) . . . . at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon structorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source) ... 35 more Caused by: java.lang.NullPointerException at org.apache.ojb.broker.platforms.PlatformFactory.getPlatformFor(Unknown Source) at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.(Unknown Source) ... 40 more The OJB.properties is now "stock". At the moment, here is my jdbc connection descriptor. jcd-alias="default" default-connection="true" platform="Hsqldb" jdbc-level="2.0" driver="org.hsqldb.jdbcDriver" username="sa" password="" eager-release="false" batch-mode="false" useAutoCommit="0" ignoreAutoCommitExceptions="false" ="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl"> Normally, I'd just debug into OJB to understand what is going on, but at the moment I'm having network difficulties which are making it hard for me to get the source in a form I can useso, can anyone tell me what I've done wrong? Thanks. David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] R -- Robert S. Sfeir Senior Java Engineer National Institutes of Health Center for Information Technology Department of Enterprise Custom Applications [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
more 098 to 099 conversion problems
When I try to get my new app running with 0.9.9, I get the following. [org.apache.ojb.broker.metadata.ConnectionRepository] INFO: Could not found org.apache.ojb.broker.metadata.JdbcConnectionDescriptor for PBKey org.apache.ojb.broker.PBKey: repository=repository.xml, user=null, password=null [org.apache.ojb.broker.accesslayer.ConnectionManagerFactory] ERROR: ConfigurableFactory instantiation failed for class class org.apache.ojb.broker.accesslayer.ConnectionManagerImpl * Factory types: 1 - Type: org.apache.ojb.broker.PersistenceBroker * Factory arguments: 1 - Argument: org.apache.ojb.broker.singlevm.PersistenceBrokerImpl@79935d null java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) . . . . at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at org.apache.ojb.broker.util.ClassHelper.newInstance(Unknown Source) ... 35 more Caused by: java.lang.NullPointerException at org.apache.ojb.broker.platforms.PlatformFactory.getPlatformFor(Unknown Source) at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.(Unknown Source) ... 40 more The OJB.properties is now "stock". At the moment, here is my jdbc connection descriptor. Normally, I'd just debug into OJB to understand what is going on, but at the moment I'm having network difficulties which are making it hard for me to get the source in a form I can useso, can anyone tell me what I've done wrong? Thanks. David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Repository descriptors, PBKey and OJB 0.9.9
Hi Ilkka, I checked in new version of the MetadataManager with some new service methods among other things your proposed read methods. HTH regards, Armin - Original Message - From: "Ilkka Priha" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 2:42 PM Subject: Re: Repository descriptors, PBKey and OJB 0.9.9 > Hi Armin, > > > -- cut -- > > > > Currently there are only methods to add > > ClassDescriptors, add runtime. > > I think to realize that functionality we need merge methods for > > DescriptorRepository and ConnectionRepository: > > > > MetadataManager.mergeDescriptorRepository(DescriptorRepository > > newRepository) > > > > Is this what you have intended? > > > > regards, > > Armin > > In principle, yes, but starting from the descriptor file. So should > something like this work and will it be supported in future releases: > > RepositoryPersistor rp = new RepositoryPersistor(); > ConnectionRepository cr = rp.readConnectionRepository("mysql.xml"); > DescriptorRepository dr = rp.readDescriptorRepository("mysql.xml"); > > List list = cr.getAllDescriptor(); > ConnectionRepository metacr = > MetadataManager.getInstance().connectionRepository(); > for (Iterator i = list.iterator(); i.hasNext();) > { > metacr.addDescriptor((JdbcConnectionDescriptor) i.next()); > } > > Map.Entry entry; > Map map = dr.getDescriptorTable(); > DescriptorRepository metadr = > MetadataManager.getInstance().getRepository(); > for (Iterator i = map.entrySet().iterator(); i.hasNext();) > { > entry = (Map.Entry) i.next(); > metadr.put( > (String) entry.getKey(), > (ClassDescriptor) entry.getValue()); > } > > It just doesn't seem to be flexible enough for us to define all > descriptors in a property file during startup of a web service system > supporting dynamically configurable applications, which are loaded and > unloaded without shutdown. I think that OJB has all the capability > needed for dynamic configuration, it's just difficult to figure out > correct classes and methods to apply to use this potential. > > Of course the merge methods would make things easier, but even the above > code would be fine if we just dare to use it in our application :-) > > Thanks, >Ilkka > > > > > - > 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]
AW: reverse-db (yet again)
Hi Matthias, i've had a quick look at the sources a few weeks ago. I am not quite sure what could be integrated back into reversedb, but it is of course worth discussion. Are you the author of this tool? regards, Florian > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 11. Februar 2003 17:54 > An: [EMAIL PROTECTED] > Betreff: AW: reverse-db (yet again) > > > Hi, > do you know the eclipse plugin for OJB on http://www.impart.ch/download/? > this plugin is based on reverse-db. You > can also use it with out eclipse(Start com.impart.ojbgenerator.Main). > The Source Code is also includet. In the ImpartOJBGenerator.properties > you have some samples to connect to defferent DB's > > regards > matthias > -Ursprungliche Nachricht- > Von: Florian Bruckner [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 11. Februar 2003 13:20 > An: OJB Users List > Betreff: AW: reverse-db (yet again) > > > Hi Jeremy, > > I've tested the reverse engineering part of reverse-db with the following > database/JDBC driver combinations: > > - Informix IDS 9 with Informix JDBC (9.21JC2, 9.21JC3) > - Oracle 8.1.7 and 9.2.0 with Oracle JDBC (9.2.0) > - IBM DB2 UDB 7.2 with IBM Type 3 JDBC driver (7.02) > - Mysql 3.23 with mm.mysql JDBC (2.something) > - Microsoft SQL Server 2000 with Microsoft JDBC driver > > For these databases I know that you can capture the schema data. I haven't > looked into xml and java file generation, but it is possible that > there are > still severe problems, this is something I will have to look at. > But please > bear in mind that I am doing this in my spare time and I just have very > limited time currently. > > I just can say it again and again (this of course addresses > everybody on the > list): you have the sources, I am sure you know how to code java, > so please, > please, please help me by not just yelling "It doesn't work, fix > it!" but by > trying to find the source of the failure, trying to find a fix or a > workaround - If we can work together this way, we can get things > going much > quicker. > > regards, > Florian > > > OK, now that I know the new version supports MySQL and now that I know > > that the schema with a MySQL DB would always be represented as empty. I > > still am not getting what I expect to happen. I connect to my db > > server, read the database I want to generate classes and mapping for, > > then save xml. The file generated as repository.xml, is severely > > lacking in things like mapping. Also, 'Generate Java' doesn't seem to > > be generating anything at all. I must be missing something very > > obvious. I am using MySQL 4.0.7 gamma and > > mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I > > am trying to generate the mapping and java classes for an existing db. > > > > Here is all I can get the reverse-db tool to accomplish: > > > > > > > > > > > jcd-alias="default" > > default-connection="true" > > platform="" > > jdbc-level="1.0" > > driver="XXX" > > protocol="XXX" > > subprotocol="XXX" > > dbalias="XXX" > > username="XXX" > > password="XXX"> > > > > > > > > > > > > Sorry to bother with something that is probably obvious, but really > > there is no documentation at all on this topic, and I am starting to > > worry that I will have to manually generate the mappings and classes for > > this big 'ol database. > > > > Thanks, Jeremy > > > > > > - > > 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: tutorial does not work
Hi Jean-Paul, sorry for the hassle, but OJB is currently under heavy development and I forget to check the tutorials before we made the last release. Thanks for pointing to the bugs in tutorial1, I will fix this ASAP. regards, Armin - Original Message - From: "Jean-Paul Le Fèvre" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 3:01 PM Subject: tutorial does not work > > > I'm unable to run the examples of the tutorial coming > with version 0.9.9. > > After having spent 4 hours ( in the QuickStart section :( ) > trying to figure out why tutorial1.sh failed with the exception : > > org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: > org.apache.ojb.tutorial1.Product not found in OJB Repository > > I read 1 hour ago in the archive of the mailing list that the > configuration file repository.xml was broken. I fixed it > according to what Oliver said. > > However I still wonder how to play with other examples 2,3,4. > > > Moreover : > > Note that when building the tutorial I got the following > error message for the project-create-db-classpath target : > > [sql] Failed to execute: ECHO Not implemented > [sql] 0 of 1 SQL statements executed successfully > > I guess it does not hurt but it's confusing especially > when dealing with errors in the tutorials, > > > In tutorial1.html : > browse_db instead of browse-db > link to javadoc of org.apache.ojb.broker broken. > > Running browse-db : >[browse] java.lang.ArrayIndexOutOfBoundsException: 44 >= 1 or (7>=0) >[browse] at java.util.Vector.elementAt(Vector.java:427) > > Mailing list address : > <[EMAIL PROTECTED]>: > Sorry, no mailbox here by that name. (#5.1.1) > > -- > __ > > Jean-Paul Le Fèvre - [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: RES: Does OJB supports clustering in an EJB container?
I know it works with the PB API and ODMG API. We are not going to use the JDO API until it is farther along (i.e. not using Suns JDORI). I suspect that it will work in the JDO API as well since the JDO API implementation will be built upon the PB API. Norman Jarvis On Tue, 11 Feb 2003 13:11:46 -0300 Fernando <[EMAIL PROTECTED]> wrote: > Does it applies to JDO impl? > > > -Mensagem original- > > De: Norman C. Jarvis [mailto:[EMAIL PROTECTED]] > > Enviada em: segunda-feira, 10 de fevereiro de 2003 13:34 > > Para: OJB Users List > > Assunto: Re: Does OJB supports clustering in an EJB container? > > > > > > In an email from Thomas Mahler: > > > > "It is also possible to run the ODMG transaction manager in > > distributed > > mode. You just have to configure usage of the Persistent Lock > > Manager in > > OJB.properties." > > > > The message thread on the mailing list is: configuring OJB in > > a cluster > > > > Norman Jarvis > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Norman Jarvis [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: reverse-db (yet again)
Hi, do you know the eclipse plugin for OJB on http://www.impart.ch/download/? this plugin is based on reverse-db. You can also use it with out eclipse(Start com.impart.ojbgenerator.Main). The Source Code is also includet. In the ImpartOJBGenerator.properties you have some samples to connect to defferent DB's regards matthias -Ursprungliche Nachricht- Von: Florian Bruckner [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 11. Februar 2003 13:20 An: OJB Users List Betreff: AW: reverse-db (yet again) Hi Jeremy, I've tested the reverse engineering part of reverse-db with the following database/JDBC driver combinations: - Informix IDS 9 with Informix JDBC (9.21JC2, 9.21JC3) - Oracle 8.1.7 and 9.2.0 with Oracle JDBC (9.2.0) - IBM DB2 UDB 7.2 with IBM Type 3 JDBC driver (7.02) - Mysql 3.23 with mm.mysql JDBC (2.something) - Microsoft SQL Server 2000 with Microsoft JDBC driver For these databases I know that you can capture the schema data. I haven't looked into xml and java file generation, but it is possible that there are still severe problems, this is something I will have to look at. But please bear in mind that I am doing this in my spare time and I just have very limited time currently. I just can say it again and again (this of course addresses everybody on the list): you have the sources, I am sure you know how to code java, so please, please, please help me by not just yelling "It doesn't work, fix it!" but by trying to find the source of the failure, trying to find a fix or a workaround - If we can work together this way, we can get things going much quicker. regards, Florian > OK, now that I know the new version supports MySQL and now that I know > that the schema with a MySQL DB would always be represented as empty. I > still am not getting what I expect to happen. I connect to my db > server, read the database I want to generate classes and mapping for, > then save xml. The file generated as repository.xml, is severely > lacking in things like mapping. Also, 'Generate Java' doesn't seem to > be generating anything at all. I must be missing something very > obvious. I am using MySQL 4.0.7 gamma and > mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I > am trying to generate the mapping and java classes for an existing db. > > Here is all I can get the reverse-db tool to accomplish: > > > > > jcd-alias="default" > default-connection="true" > platform="" > jdbc-level="1.0" > driver="XXX" > protocol="XXX" > subprotocol="XXX" > dbalias="XXX" > username="XXX" > password="XXX"> > > > > > > Sorry to bother with something that is probably obvious, but really > there is no documentation at all on this topic, and I am starting to > worry that I will have to manually generate the mappings and classes for > this big 'ol database. > > Thanks, Jeremy > > > - > 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: Eager release
Hi. I put the eager release in. As we were developing the connection management piece of OJB, we ran through a bunch of different implementations before we decided on an optimal one. During that period I found need to add this configuration option to release connections eagerly, rather than hold on to them to get around what I believe to be a bug in JBOSS (I think it was fixed, however). Eitherway once the JCA adapter is built, we'll probably use that solely, and hold on to the connection per broker. This however will not require client code change. m -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tue 2/11/2003 8:29 AM To: [EMAIL PROTECTED] Cc: Subject: Eager release From the repository.dtd file: The eager-release attribute was adopt to solve a problem occured when using OJB within JBoss (>=3.0). Only use within JBoss. Can someone elaborate on what the problem is? Thanks David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by 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: Accessing connection information in OJB 0.9.9
try broker.serviceConnectionManager().etConnectionDescriptor() Hope that helps Caster - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 9:53 AM Subject: Accessing connection information in OJB 0.9.9 > We used to be able to do this to get enable access to raw jdbc connection > in 0.9.8: > > > broker = PersistenceBrokerFactory.defaultPersistenceBroker(); > ClassDescriptor cld = > broker.getClassDescriptor(ProjectFilter.class); > jcd = cld.getConnectionDescriptor(); > cf = ConnectionFactoryFactory.getInstance(); > > This no longer works - what is the correct way to do this? > > David > > > This message contains information from Equifax Inc. which may be > confidential and privileged. If you are not an intended recipient, please > refrain from any disclosure, copying, distribution or use of this > information and note that such actions are prohibited. If you have > received this transmission in error, please notify by 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]
Eager release
>From the repository.dtd file: The eager-release attribute was adopt to solve a problem occured when using OJB within JBoss (>=3.0). Only use within JBoss. Can someone elaborate on what the problem is? Thanks David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tutorial does not work
I'm unable to run the examples of the tutorial coming with version 0.9.9. After having spent 4 hours ( in the QuickStart section :( ) trying to figure out why tutorial1.sh failed with the exception : org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: org.apache.ojb.tutorial1.Product not found in OJB Repository I read 1 hour ago in the archive of the mailing list that the configuration file repository.xml was broken. I fixed it according to what Oliver said. However I still wonder how to play with other examples 2,3,4. Moreover : Note that when building the tutorial I got the following error message for the project-create-db-classpath target : [sql] Failed to execute: ECHO Not implemented [sql] 0 of 1 SQL statements executed successfully I guess it does not hurt but it's confusing especially when dealing with errors in the tutorials, In tutorial1.html : browse_db instead of browse-db link to javadoc of org.apache.ojb.broker broken. Running browse-db : [browse] java.lang.ArrayIndexOutOfBoundsException: 44 >= 1 or (7>=0) [browse] at java.util.Vector.elementAt(Vector.java:427) Mailing list address : <[EMAIL PROTECTED]>: Sorry, no mailbox here by that name. (#5.1.1) -- __ Jean-Paul Le Fèvre - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing connection information in OJB 0.9.9
We used to be able to do this to get enable access to raw jdbc connection in 0.9.8: broker = PersistenceBrokerFactory.defaultPersistenceBroker(); ClassDescriptor cld = broker.getClassDescriptor(ProjectFilter.class); jcd = cld.getConnectionDescriptor(); cf = ConnectionFactoryFactory.getInstance(); This no longer works - what is the correct way to do this? David This message contains information from Equifax Inc. which may be confidential and privileged. If you are not an intended recipient, please refrain from any disclosure, copying, distribution or use of this information and note that such actions are prohibited. If you have received this transmission in error, please notify by e-mail [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Does OJB supports clustering in an EJB container?
Does it applies to JDO impl? > -Mensagem original- > De: Norman C. Jarvis [mailto:[EMAIL PROTECTED]] > Enviada em: segunda-feira, 10 de fevereiro de 2003 13:34 > Para: OJB Users List > Assunto: Re: Does OJB supports clustering in an EJB container? > > > In an email from Thomas Mahler: > > "It is also possible to run the ODMG transaction manager in > distributed > mode. You just have to configure usage of the Persistent Lock > Manager in > OJB.properties." > > The message thread on the mailing list is: configuring OJB in > a cluster > > Norman Jarvis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with Oracle and longVarchar fields
Hi, I browsed the mailing list but didn't find entry concerning this problem. I have a Object mapped to a table containing a LONGVARCHAR field. I have no problem to store such an object nor to query it by Identity, but as soon as I try to retrieve it by query (with any criteria), I get a SQLEception whose message is : "Stream has already been closed". The problem disapear if I comment out the field descriptor corresponding to the LONGVARCHAR field any idea about how to fix that ? Many thanks Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fetch rows n to m; Lazy instantiate objects/rows
Query query = QueryFactory.newQuery(clazz, critFilter); query.setStartAtIndex(startAt); query.setEndAtIndex(endAt); Will retrieve rows startAt to endAt-1. -Original Message- From: Stefan Schlösser [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 12:10 AM To: [EMAIL PROTECTED] Subject: Fetch rows n to m; Lazy instantiate objects/rows Hi all, when retrieving data from a DB a sometimes don't want to fetch all data, e.g I want to fetch 100 rows at a time. E.g. when I allow a user to page through a ton of results I would like to only fetch the next page. I would therefore need some Criteria to say fetch rows from n to m only. I know that some (most?) databases do not support that. But say I need objects #no 98200 to 98300 it would be a massive overhead to go an create 98000 objects of which 99% are then thrown away. Maybe some kind of lazy instantiation of an object could help. There is an Iterator interface associated with the PersistenceBroker, does this do lazy instantiation ? Thanks for any ideas, Stefan p.s resent since I did not receive the original back from the list - 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: Repository descriptors, PBKey and OJB 0.9.9
Hi Armin, -- cut -- Currently there are only methods to add ClassDescriptors, add runtime. I think to realize that functionality we need merge methods for DescriptorRepository and ConnectionRepository: MetadataManager.mergeDescriptorRepository(DescriptorRepository newRepository) Is this what you have intended? regards, Armin In principle, yes, but starting from the descriptor file. So should something like this work and will it be supported in future releases: RepositoryPersistor rp = new RepositoryPersistor(); ConnectionRepository cr = rp.readConnectionRepository("mysql.xml"); DescriptorRepository dr = rp.readDescriptorRepository("mysql.xml"); List list = cr.getAllDescriptor(); ConnectionRepository metacr = MetadataManager.getInstance().connectionRepository(); for (Iterator i = list.iterator(); i.hasNext();) { metacr.addDescriptor((JdbcConnectionDescriptor) i.next()); } Map.Entry entry; Map map = dr.getDescriptorTable(); DescriptorRepository metadr = MetadataManager.getInstance().getRepository(); for (Iterator i = map.entrySet().iterator(); i.hasNext();) { entry = (Map.Entry) i.next(); metadr.put( (String) entry.getKey(), (ClassDescriptor) entry.getValue()); } It just doesn't seem to be flexible enough for us to define all descriptors in a property file during startup of a web service system supporting dynamically configurable applications, which are loaded and unloaded without shutdown. I think that OJB has all the capability needed for dynamic configuration, it's just difficult to figure out correct classes and methods to apply to use this potential. Of course the merge methods would make things easier, but even the above code would be fine if we just dare to use it in our application :-) Thanks, Ilkka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OJB in real world
On Mon, 2003-02-10 at 19:11, Nuno Marques wrote: > > Hye, > I'm a newbie in OJB, but I would like to know if anyone has already used OJB in >real production environments. Was it sucessfull? Good performance? Scalability? Sure, I think almost every one on this list use OJB on real world situations. You can search the mailing list, this question has been answered many times. Please go to : http://www.mail-archive.com/ojb-user@jakarta.apache.org/msg03281.html It is also under heavy development. OJB developers are adding new features to it every day. > Thanks, > Nuno Vamo la brazucas ! -- Leandro Rodrigo Saad Cruz IT - Inter Business Tecnologia e Servicos (IB) http://www.ibnetwork.com.br http://jakarta.apache.org/ojb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Repository descriptors, PBKey and OJB 0.9.9
Hi Ilkka, - Original Message - From: "Ilkka Priha" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 11:49 AM Subject: Repository descriptors, PBKey and OJB 0.9.9 > Hi, > > In 0.9.6, it was also possible to add new repository descriptors during > run-time to PersistenceBrokerFactory by specifying the descriptor file > pathname in PBKey instead of the new db alias. Is there a recommended > method to do it in 0.9.9? We've tried something with MetadataManager and > RepositoryPersistor, but without much luck. Currently there are only methods to add ClassDescriptors, add runtime. I think to realize that functionality we need merge methods for DescriptorRepository and ConnectionRepository: MetadataManager.mergeDescriptorRepository(DescriptorRepository newRepository) Is this what you have intended? regards, Armin > > -- Ilkka Priha > > > > > - > 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]
Locking exception with OJB 0.9.8 and JBoss
Hi, during storing an object I get following exception. I use OJB 0.9.8 and DB2 V7.2 with app driver. Any Idea whats going on? cheers, Guido 13:38:35,082 INFO [STDOUT] [org.apache.ojb.odmg.OJBJ2EE_2] INFO: 13:38:35,083 INFO [STDOUT] beginInternTransaction was called 13:38:35,150 INFO [STDOUT] [org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG: 13:38:35,152 INFO [STDOUT] SQL: SELECT A0.TIMESTAMP_,A0.ISOLATIONLEVEL,A0.TX_ID,A0.LOCKTYPE,A0.OID_ FROM OJB_LOCKENTRY A0 WHERE A0.TIMESTAMP_ < ? 13:38:35,175 INFO [STDOUT] [org.apache.ojb.broker.accesslayer.JdbcAccess] ERROR: 13:38:35,177 INFO [STDOUT] SQLException during the execution of the query (for a org.apache.ojb.odmg.locking.LockEntry): [IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006 13:38:35,178 INFO [STDOUT] [IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006 13:38:35,179 ERROR [STDERR] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0102E Invalid conversion. SQLSTATE=07006 13:38:35,184 ERROR [STDERR] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe nerator.java:269) 13:38:35,185 ERROR [STDERR] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe nerator.java:206) 13:38:35,187 ERROR [STDERR] at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGen erator.java:457) 13:38:35,188 ERROR [STDERR] at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java :1759) 13:38:35,190 ERROR [STDERR] at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatement. java:1247) 13:38:35,191 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(Lo calPreparedStatement.java:289) 13:38:35,192 ERROR [STDERR] at org.apache.ojb.broker.accesslayer.JdbcAccess.executeQuery(Unknown Source) 13:38:35,194 ERROR [STDERR] at org.apache.ojb.broker.accesslayer.RsIterator.(Unknown Source) 13:38:35,195 ERROR [STDERR] at org.apache.ojb.broker.singlevm.RsIteratorFactoryImpl.createRsIterator(Unknow n Source) 13:38:35,197 ERROR [STDERR] at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQuery( Unknown Source) 13:38:35,198 ERROR [STDERR] at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQueryE xtentAware(Unknown Source) 13:38:35,199 ERROR [STDERR] at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuery(Un known Source) 13:38:35,201 ERROR [STDERR] at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorByQuery(Unkn own Source) 13:38:35,202 ERROR [STDERR] at org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getIteratorByQuer y(Unknown Source) 13:38:35,204 ERROR [STDERR] at org.apache.ojb.odmg.locking.PersistentLockMapImpl.removeTimedOutLocks(Unknow n Source) 13:38:35,205 ERROR [STDERR] at org.apache.ojb.odmg.locking.PersistentLockMapImpl.getWriter(Unknown Source) 13:38:35,206 ERROR [STDERR] at org.apache.ojb.odmg.locking.AbstractLockStrategy.getWriter(Unknown Source) 13:38:35,207 ERROR [STDERR] at org.apache.ojb.odmg.locking.ReadUncommittedStrategy.writeLock(Unknown Source) 13:38:35,209 ERROR [STDERR] at org.apache.ojb.odmg.locking.LockManagerDefaultImpl.writeLock(Unknown Source) 13:38:35,210 ERROR [STDERR] at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source) 13:38:35,211 ERROR [STDERR] at org.apache.ojb.odmg.NarrowTransaction.lock(Unknown Source) 13:38:35,212 ERROR [STDERR] at de.hrs.hsv.HSVSessionManagerEJB.addSession(Unknown Source) 13:38:35,214 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 13:38:35,215 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) 13:38:35,216 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) 13:38:35,218 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 13:38:35,219 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.ja va:1197) 13:38:35,220 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron izationInterceptor.java:340) 13:38:35,222 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach edConnectionInterceptor.java:186) 13:38:35,223 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce ptor.java:193) 13:38:35,225 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav a:107) 13:38:35,226 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterce ptor.java:69) 13:38:35,227 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor .java:96) 13:38:35,229 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:167) 13:38:35,230 ERROR [STDERR] at org.jboss.ejb.plugins.TxIntercepto
AW: reverse-db (yet again)
Hi Jeremy, I've tested the reverse engineering part of reverse-db with the following database/JDBC driver combinations: - Informix IDS 9 with Informix JDBC (9.21JC2, 9.21JC3) - Oracle 8.1.7 and 9.2.0 with Oracle JDBC (9.2.0) - IBM DB2 UDB 7.2 with IBM Type 3 JDBC driver (7.02) - Mysql 3.23 with mm.mysql JDBC (2.something) - Microsoft SQL Server 2000 with Microsoft JDBC driver For these databases I know that you can capture the schema data. I haven't looked into xml and java file generation, but it is possible that there are still severe problems, this is something I will have to look at. But please bear in mind that I am doing this in my spare time and I just have very limited time currently. I just can say it again and again (this of course addresses everybody on the list): you have the sources, I am sure you know how to code java, so please, please, please help me by not just yelling "It doesn't work, fix it!" but by trying to find the source of the failure, trying to find a fix or a workaround - If we can work together this way, we can get things going much quicker. regards, Florian > OK, now that I know the new version supports MySQL and now that I know > that the schema with a MySQL DB would always be represented as empty. I > still am not getting what I expect to happen. I connect to my db > server, read the database I want to generate classes and mapping for, > then save xml. The file generated as repository.xml, is severely > lacking in things like mapping. Also, 'Generate Java' doesn't seem to > be generating anything at all. I must be missing something very > obvious. I am using MySQL 4.0.7 gamma and > mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I > am trying to generate the mapping and java classes for an existing db. > > Here is all I can get the reverse-db tool to accomplish: > > > > > jcd-alias="default" > default-connection="true" > platform="" > jdbc-level="1.0" > driver="XXX" > protocol="XXX" > subprotocol="XXX" > dbalias="XXX" > username="XXX" > password="XXX"> > > > > > > Sorry to bother with something that is probably obvious, but really > there is no documentation at all on this topic, and I am starting to > worry that I will have to manually generate the mappings and classes for > this big 'ol database. > > Thanks, Jeremy > > > - > 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]
Repository descriptors, PBKey and OJB 0.9.9
Hi, In 0.9.6, it was also possible to add new repository descriptors during run-time to PersistenceBrokerFactory by specifying the descriptor file pathname in PBKey instead of the new db alias. Is there a recommended method to do it in 0.9.9? We've tried something with MetadataManager and RepositoryPersistor, but without much luck. -- Ilkka Priha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to do SQL MIN MAX functions ??
Hi Jens, OJB defines a layer between my java app and a database. Since the repositiory file contains a description of the tables and column names I would think it to be bad design on my part if I repeated that information some-where hard-coded in my programm by doing a direct sql using table & colum names. I could very well imagine an OJB function int max( String fieldname, Class c), after all int getCount( Query q) does exist ! > > I don't know if this is possible with Ojb at all, since the query you > mention has nothing to do with object mapping, it just returns a single > value. > I usually use plain jdbc for such queries. > Any comments ? Cheers, Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[patch] Re: PBKey and OJB 0.9.9
Hi Jason, Shannon, I currently checked in the fix. To update version 0.9.9 check out src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java src/java/org/apache/ojb/broker/ta/PersistenceBrokerFactoryDefaultImpl.ja va src/java/org/apache/ojb/broker/util BrokerHelper.java http://cvs.apache.org/viewcvs/jakarta-ojb/src/java/org/apache/ojb/broker / regards, Armin - Original Message - From: "Jason Mihalick" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]>; "Armin Waibel" <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 2:30 AM Subject: Re: PBKey and OJB 0.9.9 > I whole-heartedly agree. Thanks for responding so quickly, and thanks for > correcting this. Thanks to you too Shannon for the great suggestion. > > -- > Jason > > - Original Message - > From: "Armin Waibel" <[EMAIL PROTECTED]> > To: "OJB Users List" <[EMAIL PROTECTED]> > Sent: Monday, February 10, 2003 6:01 PM > Subject: Re: PBKey and OJB 0.9.9 > > > > > > - Original Message - > > From: "Shannon Ewing" <[EMAIL PROTECTED]> > > To: "'OJB Users List'" <[EMAIL PROTECTED]> > > Sent: Monday, February 10, 2003 11:14 PM > > Subject: RE: PBKey and OJB 0.9.9 > > > > > > > Are you saying that if the connection is not "default" then the user > > and > > > password must be passed in despite the fact that the user and password > > is > > > defined in the jdbc-connection-descriptor? This does not make since. > > > The > > > only difference should be the connection being flagged as default > > which > > > would be used for PersistenceBrokerFactory.defaultPersistenceBroker(). > > If > > > PersistenceBrokerFactory.createPersistenceBroker(new PBKey("xyz")) is > > done, > > > then the user and password defined for "xyz" in the > > > jdbc-connection-descriptor should be used. > > > > > > > OK, you are right. This makes sense, I will change this. > > > > thank you Shannon and Jason > > > > regards, > > Armin > > > > > > > > > -Original Message- > > > From: Armin Waibel [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, February 10, 2003 3:42 PM > > > To: OJB Users List > > > Subject: Re: PBKey and OJB 0.9.9 > > > > > > > > > Hi Jason, > > > > > > sorry for the hassle, but the new release is more strict in handling > > > different users. Thus OJB try to find a connection without user and > > > password, > > > because both fields were null (new PBKey("mydb")). > > > > > > If you only use > > > one database per application and you set the default-connection > > > attribute > > > 'true' it is possible to use > > > broker = PersistenceBrokerFactory.defaultPersistenceBroker(); > > > > > > If it will help in your case I could do the following: > > > Granted that the jcdAlias name of the PBKey is matching > > > a jdbc-connection-descriptor and the default-connection was set > > 'true', > > > but user and password of the PBKey are 'null', then OJB could use the > > > user and password specified in the descriptor. > > > This will only work if default-connection is set 'true' and you > > > only could define one jdbc-connection-descriptor as the default > > > one. Would this solve your problem? > > > > > > > > > regards, > > > Armin > > > > > > - Original Message - > > > From: <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, February 10, 2003 9:23 PM > > > Subject: PBKey and OJB 0.9.9 > > > > > > > > > > Hi, > > > > > > > > I recently reconfigured our application to use the new 0.9.9 > > release. > > > > Previously we were using 0.9.8. We are using the PersistenceBroker > > > API. > > > > After reconfiguring our repository.xml file to use the new jcd-alias > > > > attribute on the connection descriptor, my connection descriptor is > > as > > > > follows: > > > > > > > > > > > jcd-alias="mydb" > > > > default-connection="true" > > > > useAutoCommit="1" > > > > platform="Hsqldb" > > > > jdbc-level="2.0" > > > > driver="org.hsqldb.jdbcDriver" > > > > protocol="jdbc" > > > > subprotocol="hsqldb" > > > > dbalias="/tmp/db/mydb" > > > > username="sa" > > > > password="" > > > >/> > > > > > > > > > > > > In my code, I aquire the PersistenceBroker using this method: > > > > > > > > broker = > > ersistenceBrokerFactory.createPersistenceBroker( new > > > > PBKey( "mydb") ); > > > > > > > > > > > > I am curious as to why it is now mandatory to supply the user name > > and > > > > password as part of the key now? I could always store it in > > another > > > file > > > > I suppose, but we are using multiple database platforms each of > > which > > > have > > > > a different username and password. The way this used to work was > > > great! > > > > Anyway that I can make it work as it did before? Is this going to > > > change > > > > back for OJB 1.0 or should I just start planning on getting the user > > > name > > > > and password from elsewhere inste
Re: How to do SQL MIN MAX functions ??
On Tue, Feb 11, 2003 at 07:21:06AM +0100, Stefan Schlösser wrote: > Hi, > > I would like to use sql functions such as min and max for an SQL > query. > > I used the queryFactory create ( .. sql) method. This does require a > class AND a table name specified in the from clause. Why is this so ? > > I would not want to specify the table name since this is something > done via the mapping file supplied to OJB. > > In addition my query > "select max(starttime) from Appointment" results in null when > launched via the broker.getObjectByQuery( q ); interface. The query > succeeds when posted via an SQL client. > > What is the correct way to do such sql functions ? I don't know if this is possible with Ojb at all, since the query you mention has nothing to do with object mapping, it just returns a single value. I usually use plain jdbc for such queries. hth, Jens -- Jens Kraemer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: reverse-db (yet again)
Hi Jeremy, I got it working yesterday. I am using MySQL 4.0.9 and connector 2.0.14. Just drop connector jar on lib directory and executed reverse-db tool. All works fine, beans and xml was generated successfully. Ricardo. -Mensaje original- De: Jeremy [mailto:[EMAIL PROTECTED]] Enviado el: lunes, 10 de febrero de 2003 22:02 Para: [EMAIL PROTECTED] Asunto: reverse-db (yet again) OK, now that I know the new version supports MySQL and now that I know that the schema with a MySQL DB would always be represented as empty. I still am not getting what I expect to happen. I connect to my db server, read the database I want to generate classes and mapping for, then save xml. The file generated as repository.xml, is severely lacking in things like mapping. Also, 'Generate Java' doesn't seem to be generating anything at all. I must be missing something very obvious. I am using MySQL 4.0.7 gamma and mysql-connector-java-2.0.14-bin.jar (RH7.3, OJB 0.9.9, J2sdk1.4.1). I am trying to generate the mapping and java classes for an existing db. Here is all I can get the reverse-db tool to accomplish: Sorry to bother with something that is probably obvious, but really there is no documentation at all on this topic, and I am starting to worry that I will have to manually generate the mappings and classes for this big 'ol database. Thanks, Jeremy - 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: OJB in real world
Hi Nuno, > Hye, > I'm a newbie in OJB, but I would like to know if anyone has > already used OJB in real production environments. Was it This question has been asked several times and the answer is YES there are people who use it in production environment. Search the Mailinglist archive or have a look at the following MSGs: http://archives.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED] pache.org&msgId=490470 http://archives.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED] pache.org&msgId=490716 http://archives.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED] pache.org&msgNo=2859 Thomas: Maybe you should publish some statments like the ones above in the OJB FAQ.. Thimo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]