Re: exception in JDBC driver
Hi Sergey, Manukyan, Sergey wrote: Hi Everybody, We upgraded to 1.0.4 and using JT400-4.4 JDBC driver for AS400 data source. See now our JDBC driver throwing exceptions when OJB askes him for field named "OJB_CLAZZ", that the result set doesn't have, and it happens for every row. Is it possible to avoid OJB to check for this field from result set? First, thanks much! This was an important hint to unravel the mystery of slowdown of query performance between 1.0.3 and 1.0.4. Currently OJB checks each row of a result set for this column. The check was needed to resolve real class names when inheritance was used. http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+Each+Subclass+to+a+Distinct+Table+%28table+per+subclass%29 I will check in a improved version tomorrow. This version will only ask for the column when it really exists, thus no exceptions should occur. regards, Armin -Sergey -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 12:58 PM To: OJB Users List Subject: Re: store object without references Hi Sergey, Manukyan, Sergey wrote: Folks, I am using 1.0.4. Could you please advice if there is a way to store an object of some class without storing references although I defined in the descriptor of the class to store references as well. I am looking for a workaround that will enable me to do it in some cases... Something like: PersistenceBroker.store(object, ) you can use a method defined in PersistenceBrokerInternal, simply cast the used PB instance to PBI. public void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences) This method will ignore the auto-update settings when flag 'ignoreReferences' is true. http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBrokerInte rnal.html Build the Identity via IdentityFactory (service method in PB), lookup the ClassDescriptor via PB. regards, Armin Thank you, Sergey ** ** LEGAL DISCLAIMER ** ** This E-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this E-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this E-mail message from your computer. - 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: OJB_HL_SEQ
Hi Rick, Rick Roman wrote: After upgrading to ojb-1.0.4 I am getting an error: [org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception while read metadata Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name org.apache.ojb.broker.metadata.MetadataException: Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory.createPersistentField(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) I think I need to do the operation described in the release notes: * Internal used OJB_HL_SEQ table changed. Remove of deprecated column. If the SequenceManagerHighLowImpl was used and problems occur after upgrade, please drop and recreate this table without removed column Where is the table and where is the new definition to recreate it with? Hope this link help: http://db.apache.org/ojb/docu/guides/platforms.html#OJB+internal+tables The concrete sql definition depends on the used DB, e.g. hsql: drop table OJB_HL_SEQ if exists; CREATE TABLE OJB_HL_SEQ ( TABLENAME VARCHAR (250), MAX_KEY BIGINT, GRAB_SIZE integer, VERSION integer, PRIMARY KEY(TABLENAME) ); regards, Armin - 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_HL_SEQ
Look at src/schema/ojbcore-schema.xml You can use torque to generate the SQL. -Original Message- From: Rick Roman [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 5:07 PM To: OJB Users List Subject: OJB_HL_SEQ After upgrading to ojb-1.0.4 I am getting an error: [org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception while read metadata Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name org.apache.ojb.broker.metadata.MetadataException: Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory.create PersistentField(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) I think I need to do the operation described in the release notes: * Internal used OJB_HL_SEQ table changed. Remove of deprecated column. If the SequenceManagerHighLowImpl was used and problems occur after upgrade, please drop and recreate this table without removed column Where is the table and where is the new definition to recreate it with? - 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]
OJB_HL_SEQ
After upgrading to ojb-1.0.4 I am getting an error: [org.apache.ojb.broker.metadata.RepositoryXmlHandler] ERROR: Exception while read metadata Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name org.apache.ojb.broker.metadata.MetadataException: Error creating PersistentField: org.apache.ojb.broker.util.sequence.HighLowSequence, name at org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory.createPersistentField(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) I think I need to do the operation described in the release notes: * Internal used OJB_HL_SEQ table changed. Remove of deprecated column. If the SequenceManagerHighLowImpl was used and problems occur after upgrade, please drop and recreate this table without removed column Where is the table and where is the new definition to recreate it with? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bidirectional 1:1 relations
Hello again, Kindly forget my last e-mail I was looking to a old page of OJB that was cached somewere... I think that the http://db.apache.org/ojb/docu/guides/advanced-technique.html#nested-objects page wil serve my needs... if it doesn't I will let you know. Regards, Gonçalo Luiz On 1/20/06, Gonçalo Luiz <[EMAIL PROTECTED]> wrote: > Armin thank you for your reply, > > I came to a solution proposed to another OJB mailing poster (Luis > Cruz) that works with me and suggested that I could invoke the > getUniqueValue() in the DomainObject super class... its ugly but it > works fine... and it happens to be a "controlled ugliness". > > I was now wondering... is it possible to map an object to two distinct > columns of the same table? I mean if I have > > class Point > { > int x; > int y; > } > > and > B > { > Point p; > String name; > } > > Can I use the B table to store the points? I was thinking about a > table with the following schema: > create table B (name varchar, point_x int, point_y int); > > I read the rowreader tutorial but it doesn't seem to fit my needs. > > Thank you once again! > > Best regards, > Gonçalo Luiz > -- Gonçalo Luiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bidirectional 1:1 relations
Armin thank you for your reply, I came to a solution proposed to another OJB mailing poster (Luis Cruz) that works with me and suggested that I could invoke the getUniqueValue() in the DomainObject super class... its ugly but it works fine... and it happens to be a "controlled ugliness". I was now wondering... is it possible to map an object to two distinct columns of the same table? I mean if I have class Point { int x; int y; } and B { Point p; String name; } Can I use the B table to store the points? I was thinking about a table with the following schema: create table B (name varchar, point_x int, point_y int); I read the rowreader tutorial but it doesn't seem to fit my needs. Thank you once again! Best regards, Gonçalo Luiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: store object without references
Thank you Armin. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 12:58 PM To: OJB Users List Subject: Re: store object without references Hi Sergey, Manukyan, Sergey wrote: > Folks, > > I am using 1.0.4. > > Could you please advice if there is a way to store an object of some > class without storing references although I defined in the descriptor of > the class to store references as well. > > I am looking for a workaround that will enable me to do it in some > cases... > > Something like: > > PersistenceBroker.store(object, references>) you can use a method defined in PersistenceBrokerInternal, simply cast the used PB instance to PBI. public void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences) This method will ignore the auto-update settings when flag 'ignoreReferences' is true. http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBrokerInte rnal.html Build the Identity via IdentityFactory (service method in PB), lookup the ClassDescriptor via PB. regards, Armin > > Thank you, > > Sergey > > ** > ** LEGAL DISCLAIMER ** > ** > > This E-mail message and any attachments may contain > > legally privileged, confidential or proprietary > > information. If you are not the intended recipient(s), > or the employee or agent responsible for delivery of > > this message to the intended recipient(s), you are > > hereby notified that any dissemination, distribution > > or copying of this E-mail message is strictly > > prohibited. If you have received this message in > > error, please immediately notify the sender and > > delete this E-mail message from your computer. > > - > 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]
exception in JDBC driver
Hi Everybody, We upgraded to 1.0.4 and using JT400-4.4 JDBC driver for AS400 data source. See now our JDBC driver throwing exceptions when OJB askes him for field named "OJB_CLAZZ", that the result set doesn't have, and it happens for every row. Is it possible to avoid OJB to check for this field from result set? -Sergey -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 12:58 PM To: OJB Users List Subject: Re: store object without references Hi Sergey, Manukyan, Sergey wrote: > Folks, > > I am using 1.0.4. > > Could you please advice if there is a way to store an object of some > class without storing references although I defined in the descriptor of > the class to store references as well. > > I am looking for a workaround that will enable me to do it in some > cases... > > Something like: > > PersistenceBroker.store(object, references>) you can use a method defined in PersistenceBrokerInternal, simply cast the used PB instance to PBI. public void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences) This method will ignore the auto-update settings when flag 'ignoreReferences' is true. http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBrokerInte rnal.html Build the Identity via IdentityFactory (service method in PB), lookup the ClassDescriptor via PB. regards, Armin > > Thank you, > > Sergey > > ** > ** LEGAL DISCLAIMER ** > ** > > This E-mail message and any attachments may contain > > legally privileged, confidential or proprietary > > information. If you are not the intended recipient(s), > or the employee or agent responsible for delivery of > > this message to the intended recipient(s), you are > > hereby notified that any dissemination, distribution > > or copying of this E-mail message is strictly > > prohibited. If you have received this message in > > error, please immediately notify the sender and > > delete this E-mail message from your computer. > > - > 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: store object without references
Hi Sergey, Manukyan, Sergey wrote: Folks, I am using 1.0.4. Could you please advice if there is a way to store an object of some class without storing references although I defined in the descriptor of the class to store references as well. I am looking for a workaround that will enable me to do it in some cases... Something like: PersistenceBroker.store(object, ) you can use a method defined in PersistenceBrokerInternal, simply cast the used PB instance to PBI. public void store(Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences) This method will ignore the auto-update settings when flag 'ignoreReferences' is true. http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBrokerInternal.html Build the Identity via IdentityFactory (service method in PB), lookup the ClassDescriptor via PB. regards, Armin Thank you, Sergey ** ** LEGAL DISCLAIMER ** ** This E-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this E-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this E-mail message from your computer. - 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]
store object without references
Folks, I am using 1.0.4. Could you please advice if there is a way to store an object of some class without storing references although I defined in the descriptor of the class to store references as well. I am looking for a workaround that will enable me to do it in some cases... Something like: PersistenceBroker.store(object, ) Thank you, Sergey ** ** LEGAL DISCLAIMER ** ** This E-mail message and any attachments may contain legally privileged, confidential or proprietary information. If you are not the intended recipient(s), or the employee or agent responsible for delivery of this message to the intended recipient(s), you are hereby notified that any dissemination, distribution or copying of this E-mail message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this E-mail message from your computer. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]