RE: ArrayIndexOutOfBoundsException at 1:N relationship
Hi Guido, Please provide the repository fragment relevant to your classes, specifically where you make reference, Sergey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 1:00 PM To: ojb-user@db.apache.org Subject: ArrayIndexOutOfBoundsException at 1:N relationship Hi, I have a problem with a java.lang.ArrayIndexOutOfBoundsException: 1 I have the following: class A { Integer pkA }; class B { Integer pkA // is PK Integer pkB // is PK too Integer otherField; }; B has 2 primary key fields and A only one. So the first field pkA of Class (and table ) B is the primary key of Class (and table) A. >From point of view of A it is a 1:N relationship. I have a repository with a collection descriptor at A and a reference descriptor at B and both are working when I turn on autoload. I would like to query A and get all A where B.otherField=SomeValue. This produces the ArrayIndexOutOfBoundsException. Can the problem be that B has no own pk field so that B.pkA is part of the primary key of the table B and part of a reference descriptor (and part of the collection descriptor of A) ? best regards, Guido - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** ** 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]
ArrayIndexOutOfBoundsException at 1:N relationship
Hi, I have a problem with a java.lang.ArrayIndexOutOfBoundsException: 1 I have the following: class A { Integer pkA }; class B { Integer pkA // is PK Integer pkB // is PK too Integer otherField; }; B has 2 primary key fields and A only one. So the first field pkA of Class (and table ) B is the primary key of Class (and table) A. >From point of view of A it is a 1:N relationship. I have a repository with a collection descriptor at A and a reference descriptor at B and both are working when I turn on autoload. I would like to query A and get all A where B.otherField=SomeValue. This produces the ArrayIndexOutOfBoundsException. Can the problem be that B has no own pk field so that B.pkA is part of the primary key of the table B and part of a reference descriptor (and part of the collection descriptor of A) ? best regards, Guido - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: solution for subqueries returning values
Hi Jacob, Every relation is defined. But in the report queries I can only specify the columns in String[] {}, I wish I could specify the queries as well and pass it in Object[] {}, just like it is done for Criteria methods. F.e : Query qB = QueryFactory.newReportQuery(B.class); // SELECT COUNT(*) FROM B Query qC = QueryFactory.newReportQuery(C.class); // SELECT AVG(C.FF) FROM C Query qD = QueryFactory.newReportQuery(D.class); // SELECT MAX(D.FFF) FROM D ReportQueryByCriteria q = QueryFactory.newReportQuery(A.class); q.setAttributes( new Object[] { "F", qB, qC, qD } ) Is this functionality is planned in the roadmap of OJB? -Sergey -Original Message- From: Jakob Braeuchi [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 31, 2006 3:53 PM To: OJB Users List Subject: Re: solution for subqueries returning values hi sergey, this looks like a report query to me. do you have relationships defined between A, B, C, D ? jakob Manukyan, Sergey schrieb: > Folks, > > Could you please advice an OJB solution for this SQL query: > > SELECT > A.F, > (SELECT COUNT(*) FROM B INNER JOIN A ON A.F = B.F), > (SELECT AVG(C.FF) FROM C INNER JOIN A ON A.F = C.F), > (SELECT MAX(D.FFF) FROM D INNER JOIN A ON A.F = D.F) > FROM > > A > > > The OJB subqueries mechanism doesn't work in this case or... am I > missing anything? > > > -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: Problem with signed applet.
I have create a jar with my applet and all business function, including or not my repository.xml, i have signed this jar, but the result is always the same: [BOOT] ERROR: It seems that the problem happens only if I change my repository. From: Dennis Bekkering <[EMAIL PROTECTED]> Reply-To: "OJB Users List" To: OJB Users List Subject: Re: Problem with signed applet. Date: Wed, 1 Feb 2006 14:33:55 +0100 the applet can propbably not find the repository in it's class path. Try to stuff everything in a jar and use that jar instead of a single class. 2006/2/1, alessandro olivieri <[EMAIL PROTECTED]>: > > Hi, > > I'm using ojb 1.0 rc1 in a signed applet. > Without warning, this applet is not working when I try to modify > repository.xml. > The error message is: > > [BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class > Could not read repository class descriptor data, using repository: > repository.xml: Elemento root del documento mancante. > org.xml.sax.SAXParseException: Elemento root del documento mancante. > > But if I added a main in my java class and I directly call my ojb data > function this working fine. > > Tnx in advance > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- mvg, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with signed applet.
the applet can propbably not find the repository in it's class path. Try to stuff everything in a jar and use that jar instead of a single class. 2006/2/1, alessandro olivieri <[EMAIL PROTECTED]>: > > Hi, > > I'm using ojb 1.0 rc1 in a signed applet. > Without warning, this applet is not working when I try to modify > repository.xml. > The error message is: > > [BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class > Could not read repository class descriptor data, using repository: > repository.xml: Elemento root del documento mancante. > org.xml.sax.SAXParseException: Elemento root del documento mancante. > > But if I added a main in my java class and I directly call my ojb data > function this working fine. > > Tnx in advance > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- mvg, Dennis
Problem with signed applet.
Hi, I'm using ojb 1.0 rc1 in a signed applet. Without warning, this applet is not working when I try to modify repository.xml. The error message is: [BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory class Could not read repository class descriptor data, using repository: repository.xml: Elemento root del documento mancante. org.xml.sax.SAXParseException: Elemento root del documento mancante. But if I added a main in my java class and I directly call my ojb data function this working fine. Tnx in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems upgrading to ojb1.04
On 2/1/06, Milisic Aleksandar <[EMAIL PROTECTED]> wrote: > Problem solved. For future reference if anybody runs > into this problem, the torque.delimiter in > build-torque.xml needs to be set to "/" since the > generated SQL uses the "/" to separate sql statements. > > Perhaps this should be somewhere in documentation, > since it's definitely a change compared to the > behaviour in ojb1.03? This probably is a change in Torque then, not in OJB (and an Oracle-specific one because for other databases this error did not occur). Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ArrayIndexOutOfBoundsException at 1:N relationship
Hi, please forget all I wrote :) I had a error at the definition of the pk of A. A second row was defined as primary key too. I think that I ran in this problem during my tests. This maybe why the autoload was working when I started. With the invalid pk definition the test case wouldn't succeed best regards, Guido [EMAIL PROTECTED] wrote: Hi, I have a problem with a java.lang.ArrayIndexOutOfBoundsException: 1 I have the following: class A { Integer pkA }; class B { Integer pkA // is PK Integer pkB // is PK too Integer otherField; }; B has 2 primary key fields and A only one. So the first field pkA of Class (and table ) B is the primary key of Class (and table) A. From point of view of A it is a 1:N relationship. I have a repository with a collection descriptor at A and a reference descriptor at B and both are working when I turn on autoload. I would like to query A and get all A where B.otherField=SomeValue. This produces the ArrayIndexOutOfBoundsException. Can the problem be that B has no own pk field so that B.pkA is part of the primary key of the table B and part of a reference descriptor (and part of the collection descriptor of A) ? best regards, Guido - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]