Re: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException

2007-05-02 Thread Patrick Linskey

Could you run ant with the '-e' option to get full stack traces?

Also, my guess would be that you've got some sort of security policy
prohibiting OpenJPA from reading resources.

-Patrick

On 5/1/07, Philippe Alexis [EMAIL PROTECTED] wrote:

 Hello Everyone,

 Here's what I'm getting when I follow the 5min quick start guide strictly,
 under both Eclipse 3.1.1 and 3.2,
 and under Ant on Cygwin, using jdk1.5.0_11-b03:

 
=

 Buildfile: D:\Programming\Java\openjpa-
 project-0.9.7-incubating\examples\hellojpa\build.xml
 compile:
 run:
  [java] java.lang.reflect.InvocationTargetException
  [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [java] at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
  [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
  [java] at java.lang.reflect.Method.invoke(Method.java:585)
  [java] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
 InstrumentationImpl.java:141)
  [java] Caused by: java.util.MissingResourceException:
 
org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException:
 org.xml.sax.SAXNotRecognizedException: Property:
 http://java.sun.com/xml/jaxp/properties/schemaLanguage
  [java] at org.apache.openjpa.lib.conf.ProductDerivations.reportErrors
 (ProductDerivations.java:326)
  [java] at org.apache.openjpa.lib.conf.ProductDerivations.load(
 ProductDerivations.java:316)
  [java] at org.apache.openjpa.lib.conf.ProductDerivations.loadDefaults
 (ProductDerivations.java:283)
  [java] at
 org.apache.openjpa.lib.conf.Configurations.populateConfiguration(
 Configurations.java:298)
  [java] FATAL ERROR in native method: processing of -javaagent failed
  [java] at org.apache.openjpa.enhance.PCEnhancerAgent.premain(
 PCEnhancerAgent.java:49)
  [java] ... 5 more
  [java] Exception in thread main

 BUILD FAILED
 D:\Programming\Java\openjpa-
 project-0.9.7-incubating\examples\build.xml:67: Java returned: 1

 Total time: 1 second

 
=


I'm not sure what I'm doing wrong. I'm still stuck in the starting block
here. It's probably related to some missing
XML file, I'd guess.. but the default download is self-contained with
everything required for the quickie included, isn't it?

J-Philippe.




--
Patrick Linskey
202 669 5907


Re: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException

2007-05-02 Thread Philippe Alexis

On 5/2/07, Patrick Linskey [EMAIL PROTECTED] wrote:


Could you run ant with the '-e' option to get full stack traces?

Also, my guess would be that you've got some sort of security policy
prohibiting OpenJPA from reading resources.

-Patrick



Thanks. Ant's -e option didn't yield a more verbose stack trace, but the
hint about security policy
prompted me to try on an XP machine instead. After updating from
jdk1.5.0_beta2 to update 11
the download works out of the box; not sure what's wrong with Java on my
Win2K installation.

J-Philippe.


On 5/1/07, Philippe Alexis [EMAIL PROTECTED] wrote:

  Hello Everyone,
 
  Here's what I'm getting when I follow the 5min quick start guide
strictly,
  under both Eclipse 3.1.1 and 3.2,
  and under Ant on Cygwin, using jdk1.5.0_11-b03:
 
 
=
 
  Buildfile: D:\Programming\Java\openjpa-
  project-0.9.7-incubating\examples\hellojpa\build.xml
  compile:
  run:
   [java] java.lang.reflect.InvocationTargetException
   [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
   [java] at sun.reflect.NativeMethodAccessorImpl.invoke(
  NativeMethodAccessorImpl.java:39)
   [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
  DelegatingMethodAccessorImpl.java:25)
   [java] at java.lang.reflect.Method.invoke(Method.java:585)
   [java] at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
  InstrumentationImpl.java:141)
   [java] Caused by: java.util.MissingResourceException:
 
org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException:
  org.xml.sax.SAXNotRecognizedException: Property:
  http://java.sun.com/xml/jaxp/properties/schemaLanguage
   [java] at
org.apache.openjpa.lib.conf.ProductDerivations.reportErrors
  (ProductDerivations.java:326)
   [java] at org.apache.openjpa.lib.conf.ProductDerivations.load(
  ProductDerivations.java:316)
   [java] at
org.apache.openjpa.lib.conf.ProductDerivations.loadDefaults
  (ProductDerivations.java:283)
   [java] at
  org.apache.openjpa.lib.conf.Configurations.populateConfiguration(
  Configurations.java:298)
   [java] FATAL ERROR in native method: processing of -javaagent
failed
   [java] at org.apache.openjpa.enhance.PCEnhancerAgent.premain(
  PCEnhancerAgent.java:49)
   [java] ... 5 more
   [java] Exception in thread main
 
  BUILD FAILED
  D:\Programming\Java\openjpa-
  project-0.9.7-incubating\examples\build.xml:67: Java returned: 1
 
  Total time: 1 second
 
 
=


 I'm not sure what I'm doing wrong. I'm still stuck in the starting block
 here. It's probably related to some missing
 XML file, I'd guess.. but the default download is self-contained with
 everything required for the quickie included, isn't it?

 J-Philippe.



--
Patrick Linskey
202 669 5907



Re: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException

2007-05-02 Thread Marc Prud'hommeaux


It might be that the JDK 1.5 beta you were using doesn't support XML  
Schema (which is used by the JPA XML format)...



On May 2, 2007, at 10:42 AM, Philippe Alexis wrote:


On 5/2/07, Patrick Linskey [EMAIL PROTECTED] wrote:


Could you run ant with the '-e' option to get full stack traces?

Also, my guess would be that you've got some sort of security policy
prohibiting OpenJPA from reading resources.

-Patrick



Thanks. Ant's -e option didn't yield a more verbose stack trace,  
but the

hint about security policy
prompted me to try on an XP machine instead. After updating from
jdk1.5.0_beta2 to update 11
the download works out of the box; not sure what's wrong with Java  
on my

Win2K installation.

J-Philippe.


On 5/1/07, Philippe Alexis [EMAIL PROTECTED] wrote:

  Hello Everyone,
 
  Here's what I'm getting when I follow the 5min quick start guide
strictly,
  under both Eclipse 3.1.1 and 3.2,
  and under Ant on Cygwin, using jdk1.5.0_11-b03:
 
 
= 


 
  Buildfile: D:\Programming\Java\openjpa-
  project-0.9.7-incubating\examples\hellojpa\build.xml
  compile:
  run:
   [java] java.lang.reflect.InvocationTargetException
   [java] at sun.reflect.NativeMethodAccessorImpl.invoke0 
(Native

Method)
   [java] at sun.reflect.NativeMethodAccessorImpl.invoke(
  NativeMethodAccessorImpl.java:39)
   [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
  DelegatingMethodAccessorImpl.java:25)
   [java] at java.lang.reflect.Method.invoke(Method.java:585)
   [java] at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
  InstrumentationImpl.java:141)
   [java] Caused by: java.util.MissingResourceException:
 
org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.I 
OException:

  org.xml.sax.SAXNotRecognizedException: Property:
  http://java.sun.com/xml/jaxp/properties/schemaLanguage
   [java] at
org.apache.openjpa.lib.conf.ProductDerivations.reportErrors
  (ProductDerivations.java:326)
   [java] at  
org.apache.openjpa.lib.conf.ProductDerivations.load(

  ProductDerivations.java:316)
   [java] at
org.apache.openjpa.lib.conf.ProductDerivations.loadDefaults
  (ProductDerivations.java:283)
   [java] at
  org.apache.openjpa.lib.conf.Configurations.populateConfiguration(
  Configurations.java:298)
   [java] FATAL ERROR in native method: processing of - 
javaagent

failed
   [java] at  
org.apache.openjpa.enhance.PCEnhancerAgent.premain(

  PCEnhancerAgent.java:49)
   [java] ... 5 more
   [java] Exception in thread main
 
  BUILD FAILED
  D:\Programming\Java\openjpa-
  project-0.9.7-incubating\examples\build.xml:67: Java returned: 1
 
  Total time: 1 second
 
 
= 




 I'm not sure what I'm doing wrong. I'm still stuck in the  
starting block

 here. It's probably related to some missing
 XML file, I'd guess.. but the default download is self-contained  
with

 everything required for the quickie included, isn't it?

 J-Philippe.



--
Patrick Linskey
202 669 5907





Re: [CONF] OpenJPA: Powered By (page edited)

2007-05-02 Thread Kevin Sutter

The ordering of the products on this page has bothered me for quite some
time -- especially since WebSphere is always listed last.  :-)
Alphabetically is better (as James just did), but still not great.  I have
seen web sites that will randomly sort entries on a page such as this so
that every time that someone views the page, they get a different view of
the products.  I've looked at the wiki editing capabilities of confluence,
but haven't found this feature.  Does anybody know of a means of doing this
on our wiki?

Thanks,
Kevin

On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


   Page Edited : openjpahttp://cwiki.apache.org/confluence/display/openjpa: 
Powered
By http://cwiki.apache.org/confluence/display/openjpa/Powered+By

Powered By http://cwiki.apache.org/confluence/display/openjpa/Powered+Byhas 
been edited by James
Strachan http://cwiki.apache.org/confluence/display/%7Ejstrachan (May
02, 2007).

(View 
changes)http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=23631originalVersion=9revisedVersion=10
Content:

This page list products and companies that are currently using OpenJPA.
  BEA Kodo http://bea.com/kodo/: Kodo is the project from which the
OpenJPA source code was derived. Kodo is now, in turn, based on the Apache
OpenJPA project and is in production use in hundreds of mission-critical
applications around the world. OpenJPA is included as part of Kodo 4.1 and
higher  Spring http://www.springframework.org: The popular Spring
framework is the leading full-stack Java/J2EE application framework,
delivering significant benefits for many projects, reducing development
effort and costs while improving test coverage and quality. OpenJPA is
shipped as part of Spring 2.0.1  Geronimo http://geronimo.apache.org/:
The Geronimo project is a free software application server developed by the
Apache Software Foundation and distributed under the Apache license. The
goal of the Geronimo project is to produce a server runtime framework that
pulls together the best Open Source alternatives to create runtimes that
meet the needs of developers and system administrators. OpenJPA is shipped
as part of Geronimo 1.2 beta and 2.0-m1.  
OpenEJBhttp://incubator.apache.org/openejb/:
OpenEJB is an open source, modular, configurable, and extendable EJB
Container System and EJB Server. OpenJPA is included with OpenEJB version
3.0 and later.  Apache Ode Ode http://incubator.apache.org/ode/: Ode
(Orchestration Director Engine) is an Apache incubated project to develop an
open-source, Apache-licensed, implementation of the WS-BPEL 1.1 and
WS-BPEL 2.0 (draft) specifications. Ode is a choreography engine allowing
you to develop processes to call services in a well-defined manner. OpenJPA
is included with Ode version 2.0 and later.  
ActiveMQhttp://activemq.apache.org:
Apache ActiveMQ is the most popular and powerful open source Message Broker
which supports many Cross Language Clients and Protocols and many advanced
features while fully supporting JMS 1.1 and J2EE 1.4. OpenJPA is included
with ActiveMQ version 4.2 and later.  WebSphere Application Server Version
6.1 Feature Pack for EJB 3 
Alphahttps://www14.software.ibm.com/iwm/web/cc/earlyprograms/websphere/was61ejb3/:
The Alpha release of the IBM WebSphere Application Server Feature Pack for
EJB 3.0 contains a preliminary implementation of the Enterprise JavaBeans
Version 3.0 specification, commonly known as EJB3. Associated with the
Enterprise JavaBeans Version 3.0 specification is the Java Persistence API
specification, commonly known as JPA. The Alpha JPA implementation is
powered by OpenJPA.

   Powered by Atlassian 
Confluencehttp://www.atlassian.com/software/confluence/default.jsp?clicked=footer(Version:
2.2.9 Build:#527 Sep 07, 2006) - Bug/feature 
requesthttp://jira.atlassian.com/secure/BrowseProject.jspa?id=10470

Unsubscribe or edit your notifications 
preferenceshttp://cwiki.apache.org/confluence/users/viewnotifications.action




Re: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.IOException

2007-05-02 Thread Philippe Alexis

On 5/2/07, Marc Prud'hommeaux [EMAIL PROTECTED] wrote:



It might be that the JDK 1.5 beta you were using doesn't support XML
Schema (which is used by the JPA XML format)...



Yes, the JDK 1.5 beta2 was certainly missing some feature that is required
by OpenJPA.
I was getting a ClassNotFoundException with that. Update 11 fixed that on
both machines.

However, though I won't be trying all that hard to figure it out, the
MissingResourceException
is on the Win2K machine, where it is still occurring. I guess the hint about
a possible security
setting being a showstopper can come in handy some other time for my not
being driven nuts
trying to do something everybody else gets right, out of the box :)

J-Philippe.


On May 2, 2007, at 10:42 AM, Philippe Alexis wrote:


 On 5/2/07, Patrick Linskey [EMAIL PROTECTED] wrote:

 Could you run ant with the '-e' option to get full stack traces?

 Also, my guess would be that you've got some sort of security policy
 prohibiting OpenJPA from reading resources.

 -Patrick


 Thanks. Ant's -e option didn't yield a more verbose stack trace,
 but the
 hint about security policy
 prompted me to try on an XP machine instead. After updating from
 jdk1.5.0_beta2 to update 11
 the download works out of the box; not sure what's wrong with Java
 on my
 Win2K installation.

 J-Philippe.


 On 5/1/07, Philippe Alexis [EMAIL PROTECTED] wrote:
   Hello Everyone,
  
   Here's what I'm getting when I follow the 5min quick start guide
 strictly,
   under both Eclipse 3.1.1 and 3.2,
   and under Ant on Cygwin, using jdk1.5.0_11-b03:
  
  
 =
 
  
   Buildfile: D:\Programming\Java\openjpa-
   project-0.9.7-incubating\examples\hellojpa\build.xml
   compile:
   run:
[java] java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0
 (Native
 Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(
   NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
   DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:585)
[java] at
 sun.instrument.InstrumentationImpl.loadClassAndCallPremain(
   InstrumentationImpl.java:141)
[java] Caused by: java.util.MissingResourceException:
  
 org.apache.openjpa.persistence.PersistenceProductDerivation:java.io.I
 OException:
   org.xml.sax.SAXNotRecognizedException: Property:
   http://java.sun.com/xml/jaxp/properties/schemaLanguage
[java] at
 org.apache.openjpa.lib.conf.ProductDerivations.reportErrors
   (ProductDerivations.java:326)
[java] at
 org.apache.openjpa.lib.conf.ProductDerivations.load(
   ProductDerivations.java:316)
[java] at
 org.apache.openjpa.lib.conf.ProductDerivations.loadDefaults
   (ProductDerivations.java:283)
[java] at
   org.apache.openjpa.lib.conf.Configurations.populateConfiguration(
   Configurations.java:298)
[java] FATAL ERROR in native method: processing of -
 javaagent
 failed
[java] at
 org.apache.openjpa.enhance.PCEnhancerAgent.premain(
   PCEnhancerAgent.java:49)
[java] ... 5 more
[java] Exception in thread main
  
   BUILD FAILED
   D:\Programming\Java\openjpa-
   project-0.9.7-incubating\examples\build.xml:67: Java returned: 1
  
   Total time: 1 second
  
  
 =
 
 
 
  I'm not sure what I'm doing wrong. I'm still stuck in the
 starting block
  here. It's probably related to some missing
  XML file, I'd guess.. but the default download is self-contained
 with
  everything required for the quickie included, isn't it?
 
  J-Philippe.
 


 --
 Patrick Linskey
 202 669 5907





[jira] Created: (OPENJPA-233) Top level POM declares a compile-time dependency on JUnit

2007-05-02 Thread Craig Russell (JIRA)
Top level POM declares a compile-time dependency on JUnit
-

 Key: OPENJPA-233
 URL: https://issues.apache.org/jira/browse/OPENJPA-233
 Project: OpenJPA
  Issue Type: Bug
  Components: build / infrastructure
Affects Versions: 0.9.7
Reporter: Craig Russell
Priority: Trivial
 Fix For: 0.9.8


trunk/pom.xml declares the following maven dependency on JUnit. 
dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version3.8.1/version
scopecompile/scope
/dependency

The dependency should be test, not compile, as required only by test components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-233) Top level POM declares a compile-time dependency on JUnit

2007-05-02 Thread Craig Russell (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493116
 ] 

Craig Russell commented on OPENJPA-233:
---

This patch changes the dependency from compile to test.

Index: pom.xml
===
--- pom.xml (revision 534391)
+++ pom.xml (working copy)
@@ -220,7 +220,7 @@
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
-scopecompile/scope
+scopetest/scope
 /dependency
 /dependencies
 build


 Top level POM declares a compile-time dependency on JUnit
 -

 Key: OPENJPA-233
 URL: https://issues.apache.org/jira/browse/OPENJPA-233
 Project: OpenJPA
  Issue Type: Bug
  Components: build / infrastructure
Affects Versions: 0.9.7
Reporter: Craig Russell
Priority: Trivial
 Fix For: 0.9.8


 trunk/pom.xml declares the following maven dependency on JUnit. 
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
 scopecompile/scope
 /dependency
 The dependency should be test, not compile, as required only by test 
 components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



RE: [jira] Commented: (OPENJPA-233) Top level POM declares a compile-time dependency on JUnit

2007-05-02 Thread Phill Moran
Why not move on up to the 4.1 junit suite as well while we are at it. Backwards
compatible and more robust? 

-Original Message-
From: Craig Russell (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: May 2, 2007 10:56 AM
To: open-jpa-dev@incubator.apache.org
Subject: [jira] Commented: (OPENJPA-233) Top level POM declares a compile-time
dependency on JUnit


[
https://issues.apache.org/jira/browse/OPENJPA-233?page=com.atlassian.jira.plugin
.system.issuetabpanels:comment-tabpanel#action_12493116 ] 

Craig Russell commented on OPENJPA-233:
---

This patch changes the dependency from compile to test.

Index: pom.xml
===
--- pom.xml (revision 534391)
+++ pom.xml (working copy)
@@ -220,7 +220,7 @@
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
-scopecompile/scope
+scopetest/scope
 /dependency
 /dependencies
 build


 Top level POM declares a compile-time dependency on JUnit
 -

 Key: OPENJPA-233
 URL: https://issues.apache.org/jira/browse/OPENJPA-233
 Project: OpenJPA
  Issue Type: Bug
  Components: build / infrastructure
Affects Versions: 0.9.7
Reporter: Craig Russell
Priority: Trivial
 Fix For: 0.9.8


 trunk/pom.xml declares the following maven dependency on JUnit. 
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
 scopecompile/scope
 /dependency
 The dependency should be test, not compile, as required only by test
components.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-233) Top level POM declares a compile-time dependency on JUnit

2007-05-02 Thread Craig Russell (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493122
 ] 

Craig Russell commented on OPENJPA-233:
---

 Why not move on up to the 4.1 junit suite as well while we are at it. 
 Backwards compatible and more robust? 

I guess because I believe in making one change at a time. I'm not sure I have 
the complete test infrastructure to make sure that a new version of JUnit would 
work. There are several test suites outside of the project that might be 
affected.

 Top level POM declares a compile-time dependency on JUnit
 -

 Key: OPENJPA-233
 URL: https://issues.apache.org/jira/browse/OPENJPA-233
 Project: OpenJPA
  Issue Type: Bug
  Components: build / infrastructure
Affects Versions: 0.9.7
Reporter: Craig Russell
Priority: Trivial
 Fix For: 0.9.8


 trunk/pom.xml declares the following maven dependency on JUnit. 
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version3.8.1/version
 scopecompile/scope
 /dependency
 The dependency should be test, not compile, as required only by test 
 components.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: [CONF] OpenJPA: Powered By (page edited)

2007-05-02 Thread Craig L Russell

Hi Kevin,

I understand your concern. We could sort by last letter. But you'd  
still be underneath bea, ode, and openejb. ;-)


Also, you have such a teeny tiny little graphic it gets totally lost  
underneath the camel. How about making the Websphere graphic ten  
times bigger? Or coming up with a cooler graphic entirely?


Craig

On May 2, 2007, at 6:57 AM, Kevin Sutter wrote:

The ordering of the products on this page has bothered me for  
quite some

time -- especially since WebSphere is always listed last.  :-)
Alphabetically is better (as James just did), but still not great.   
I have
seen web sites that will randomly sort entries on a page such as  
this so
that every time that someone views the page, they get a different  
view of
the products.  I've looked at the wiki editing capabilities of  
confluence,
but haven't found this feature.  Does anybody know of a means of  
doing this

on our wiki?

Thanks,
Kevin

On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


   Page Edited : openjpahttp://cwiki.apache.org/confluence/ 
display/openjpa: Powered

By http://cwiki.apache.org/confluence/display/openjpa/Powered+By

Powered By http://cwiki.apache.org/confluence/display/openjpa/ 
Powered+Byhas been edited by James
Strachan http://cwiki.apache.org/confluence/display/%7Ejstrachan  
(May

02, 2007).

(View changes)http://cwiki.apache.org/confluence/pages/ 
diffpagesbyversion.action? 
pageId=23631originalVersion=9revisedVersion=10

Content:

This page list products and companies that are currently using  
OpenJPA.

  BEA Kodo http://bea.com/kodo/: Kodo is the project from which the
OpenJPA source code was derived. Kodo is now, in turn, based on  
the Apache
OpenJPA project and is in production use in hundreds of mission- 
critical
applications around the world. OpenJPA is included as part of Kodo  
4.1 and

higher  Spring http://www.springframework.org: The popular Spring
framework is the leading full-stack Java/J2EE application framework,
delivering significant benefits for many projects, reducing  
development
effort and costs while improving test coverage and quality.  
OpenJPA is
shipped as part of Spring 2.0.1  Geronimo http:// 
geronimo.apache.org/:
The Geronimo project is a free software application server  
developed by the
Apache Software Foundation and distributed under the Apache  
license. The
goal of the Geronimo project is to produce a server runtime  
framework that
pulls together the best Open Source alternatives to create  
runtimes that
meet the needs of developers and system administrators. OpenJPA is  
shipped
as part of Geronimo 1.2 beta and 2.0-m1.  OpenEJBhttp:// 
incubator.apache.org/openejb/:

OpenEJB is an open source, modular, configurable, and extendable EJB
Container System and EJB Server. OpenJPA is included with OpenEJB  
version
3.0 and later.  Apache Ode Ode http://incubator.apache.org/ode/:  
Ode
(Orchestration Director Engine) is an Apache incubated project to  
develop an

open-source, Apache-licensed, implementation of the WS-BPEL 1.1 and
WS-BPEL 2.0 (draft) specifications. Ode is a choreography engine  
allowing
you to develop processes to call services in a well-defined  
manner. OpenJPA
is included with Ode version 2.0 and later.  ActiveMQhttp:// 
activemq.apache.org:
Apache ActiveMQ is the most popular and powerful open source  
Message Broker
which supports many Cross Language Clients and Protocols and many  
advanced
features while fully supporting JMS 1.1 and J2EE 1.4. OpenJPA is  
included
with ActiveMQ version 4.2 and later.  WebSphere Application Server  
Version
6.1 Feature Pack for EJB 3 Alphahttps://www14.software.ibm.com/ 
iwm/web/cc/earlyprograms/websphere/was61ejb3/:
The Alpha release of the IBM WebSphere Application Server Feature  
Pack for
EJB 3.0 contains a preliminary implementation of the Enterprise  
JavaBeans
Version 3.0 specification, commonly known as EJB3. Associated with  
the
Enterprise JavaBeans Version 3.0 specification is the Java  
Persistence API

specification, commonly known as JPA. The Alpha JPA implementation is
powered by OpenJPA.

   Powered by Atlassian Confluencehttp://www.atlassian.com/ 
software/confluence/default.jsp?clicked=footer(Version:
2.2.9 Build:#527 Sep 07, 2006) - Bug/feature requesthttp:// 
jira.atlassian.com/secure/BrowseProject.jspa?id=10470


Unsubscribe or edit your notifications preferenceshttp:// 
cwiki.apache.org/confluence/users/viewnotifications.action





Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!



smime.p7s
Description: S/MIME cryptographic signature


[jira] Commented: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread Abe White (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493126
 ] 

Abe White commented on OPENJPA-51:
--

I don't remember how any of that stuff works at all.  However, the following 
line in findAlias is suspect:

_removeAliasFromParent = key.toString().contains(:);

findAlias is called a lot with different keys.  Setting a member field that is 
used in other methods based
on whether the latest key happens to match a certain criteria seems like it 
could lead to arbitrary
results in different circumstances.  If there is a continuous thread of logic 
that links the last call to
findAlias with the other methods where _removeAliasFromParent is used, it needs 
to be make more
explicit.

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, openjpa-51.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 

Re: [CONF] OpenJPA: Powered By (page edited)

2007-05-02 Thread Kevin Sutter

Craig,
Concerning the graphic size...  That's another topic.  The area for the
graphic should be defined to a max size.  Is that doable?  The new Camel
graphic is a bit obnoxious, don't you think?  :-)  I'll try to find a new
graphic that would fill the allotted space more nicely.  Thanks.

Kevin

On 5/2/07, Craig L Russell [EMAIL PROTECTED] wrote:


Hi Kevin,

I understand your concern. We could sort by last letter. But you'd
still be underneath bea, ode, and openejb. ;-)

Also, you have such a teeny tiny little graphic it gets totally lost
underneath the camel. How about making the Websphere graphic ten
times bigger? Or coming up with a cooler graphic entirely?

Craig

On May 2, 2007, at 6:57 AM, Kevin Sutter wrote:

 The ordering of the products on this page has bothered me for
 quite some
 time -- especially since WebSphere is always listed last.  :-)
 Alphabetically is better (as James just did), but still not great.
 I have
 seen web sites that will randomly sort entries on a page such as
 this so
 that every time that someone views the page, they get a different
 view of
 the products.  I've looked at the wiki editing capabilities of
 confluence,
 but haven't found this feature.  Does anybody know of a means of
 doing this
 on our wiki?

 Thanks,
 Kevin

 On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Page Edited : openjpahttp://cwiki.apache.org/confluence/
 display/openjpa: Powered
 By http://cwiki.apache.org/confluence/display/openjpa/Powered+By

 Powered By http://cwiki.apache.org/confluence/display/openjpa/
 Powered+Byhas been edited by James
 Strachan http://cwiki.apache.org/confluence/display/%7Ejstrachan
 (May
 02, 2007).

 (View changes)http://cwiki.apache.org/confluence/pages/
 diffpagesbyversion.action?
 pageId=23631originalVersion=9revisedVersion=10
 Content:

 This page list products and companies that are currently using
 OpenJPA.
   BEA Kodo http://bea.com/kodo/: Kodo is the project from which the
 OpenJPA source code was derived. Kodo is now, in turn, based on
 the Apache
 OpenJPA project and is in production use in hundreds of mission-
 critical
 applications around the world. OpenJPA is included as part of Kodo
 4.1 and
 higher  Spring http://www.springframework.org: The popular Spring
 framework is the leading full-stack Java/J2EE application framework,
 delivering significant benefits for many projects, reducing
 development
 effort and costs while improving test coverage and quality.
 OpenJPA is
 shipped as part of Spring 2.0.1  Geronimo http://
 geronimo.apache.org/:
 The Geronimo project is a free software application server
 developed by the
 Apache Software Foundation and distributed under the Apache
 license. The
 goal of the Geronimo project is to produce a server runtime
 framework that
 pulls together the best Open Source alternatives to create
 runtimes that
 meet the needs of developers and system administrators. OpenJPA is
 shipped
 as part of Geronimo 1.2 beta and 2.0-m1.  OpenEJBhttp://
 incubator.apache.org/openejb/:
 OpenEJB is an open source, modular, configurable, and extendable EJB
 Container System and EJB Server. OpenJPA is included with OpenEJB
 version
 3.0 and later.  Apache Ode Ode http://incubator.apache.org/ode/:
 Ode
 (Orchestration Director Engine) is an Apache incubated project to
 develop an
 open-source, Apache-licensed, implementation of the WS-BPEL 1.1 and
 WS-BPEL 2.0 (draft) specifications. Ode is a choreography engine
 allowing
 you to develop processes to call services in a well-defined
 manner. OpenJPA
 is included with Ode version 2.0 and later.  ActiveMQhttp://
 activemq.apache.org:
 Apache ActiveMQ is the most popular and powerful open source
 Message Broker
 which supports many Cross Language Clients and Protocols and many
 advanced
 features while fully supporting JMS 1.1 and J2EE 1.4. OpenJPA is
 included
 with ActiveMQ version 4.2 and later.  WebSphere Application Server
 Version
 6.1 Feature Pack for EJB 3 Alphahttps://www14.software.ibm.com/
 iwm/web/cc/earlyprograms/websphere/was61ejb3/:
 The Alpha release of the IBM WebSphere Application Server Feature
 Pack for
 EJB 3.0 contains a preliminary implementation of the Enterprise
 JavaBeans
 Version 3.0 specification, commonly known as EJB3. Associated with
 the
 Enterprise JavaBeans Version 3.0 specification is the Java
 Persistence API
 specification, commonly known as JPA. The Alpha JPA implementation is
 powered by OpenJPA.

Powered by Atlassian Confluencehttp://www.atlassian.com/
 software/confluence/default.jsp?clicked=footer(Version:
 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature requesthttp://
 jira.atlassian.com/secure/BrowseProject.jspa?id=10470

 Unsubscribe or edit your notifications preferenceshttp://
 cwiki.apache.org/confluence/users/viewnotifications.action



Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!





[jira] Updated: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread Catalina Wei (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Catalina Wei updated OPENJPA-51:


Attachment: SelectImpl.java.patch

Abe,
Based on your comment, I have revised my patch. 
Please verify if the new patch is a better solution.
Thanks.

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, openjpa-51.patch, 
 SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at 
 junit.extensions.jfunc.TestletWrapper.runBare(TestletWrapper.java:116)
   at 
 junit.extensions.jfunc.TestletWrapper$1.protect(TestletWrapper.java:106)
   at junit.framework.TestResult.runProtected(Unknown Source)
   at junit.extensions.jfunc.TestletWrapper.run(TestletWrapper.java:109)
   at junit.framework.TestSuite.runTest(Unknown 

Can openjpa scan directories for classes (such as WEB-INF/classes)?

2007-05-02 Thread David Jencks
I'm having some trouble getting openjpa to work properly with  
persistence units directly in unpacked wars in geronimo, and before I  
spend a lot of time looking for dead ends I wonder if anyone knows if  
there are some circumstances in which openjpa can scan for classes in  
an unpacked directory such as WEB-INF/classes?  Right now in the  
geronimo integration openjpa seems to be trying to read the directory  
as if it is an xml file, which fails with a SAX exception:


Caused by: java.io.IOException: org.xml.sax.SAXException: file:/Users/ 
david/geronimo/svn/(.).war/WEB-INF/classes/ [Location: Line: 1,  
C: 1]: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at  
org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
(XMLMetaDataParser.java:376)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:315)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:292)
at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:266)
at  
org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
(PersistenceMetaDataFactory.java:234)


thanks
david jencks


[jira] Updated: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread Catalina Wei (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Catalina Wei updated OPENJPA-51:


Attachment: SelectImpl.java.patch

Abe,
I make some mistake in my previous patch, attaching a revised version.
your conceren about removedAliasFromParent[] flag once set, was never reset;  
that is purposely done.
In case any flag (base on number of aliases created so far) is on, there is 
potentially duplicate joins in the parent select (those joins were initially 
created for aliases initially attached in parent which was removed from parent, 
and now attached on subselect),  we need to remove the duplicate joins on the 
parent, since there is one also created for subselect. The duplicate joins once 
removed, will never be seen on the next call to removeJoinsFromParent().
The local boolean flag is set when joins are indeed removed from parent. 
Otherwise the normal processing of removing duplcate joins from subselect is 
performed.

I think there is a much better solution to this issue, that is to create 
SelectImpl when a SELECT is encountered, rather than delaying it later as it 
is currently done. 
Current code creates aliases for the subselect to come later -- in the middle 
of alias creating for subselect, there isn't a SelectImpl created for subselect 
yet.. So the alias is temporarily attached under the parent SelectImpl.  (This 
could be based on the assumption that any alias defined in subselect is 
correated to outer subselect). 

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, openjpa-51.patch, 
 SelectImpl.java.patch, SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at 

[jira] Commented: (OPENJPA-231) Incorrect handling of cascading bidirectional collections during merge/attach

2007-05-02 Thread Gokhan Ergul (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493193
 ] 

Gokhan Ergul commented on OPENJPA-231:
--

Further testing reveals that the patch I submitted solves only detached object 
merge case. Persisting and later merging in a single EntityManager session 
produces unreliable results, sometimes insert statements of C precede insert 
statements of B resulting in a FK violation, other times the statements are 
executed in the correct order --I have no idea as to why the order would change 
in different test runs with identical configuration. 

 Incorrect handling of cascading bidirectional collections during merge/attach
 -

 Key: OPENJPA-231
 URL: https://issues.apache.org/jira/browse/OPENJPA-231
 Project: OpenJPA
  Issue Type: Bug
  Components: kernel
Affects Versions: 0.9.7
 Environment: platform-independent
Reporter: Gokhan Ergul
 Attachments: jira-test-case.zip


 As posted on open-jpa-dev mailing list:
 -
 I'm having a problem merging an entity, here's the simplified structure:
 Class A { @OneToMany(cascade=CascadeType.ALL, mappedBy=parent)
SetB b_set;
...
 }
 Class B {
@ManyToOne
A parent;
@OneToMany(cascade=CascadeType.ALL, mappedBy=parent)
SetC c_set;
...
 }
 Class C {
@ManyToOne
B parent;
...
 }
 New instances of A,B,C are persisted correctly. However when I retrieve A, 
 add some entries to A.b_set (with some of the new B entries have attached 
 C's), em.merge(A) fails:
 - If A is detached:
 org.apache.openjpa.persistence.ArgumentException: Encountered new object 
 [EMAIL PROTECTED] in persistent field C.parent of managed object [EMAIL 
 PROTECTED] during attach.  However, this field does not allow cascade 
 attach.  You cannot attach a reference to a new object without cascading.
 - If A is not detached:
  C instances are inserted before B instances, resulting in a 
 foreign key violation.
 Setting openjpa.jdbc.SchemaFactory to 'native(ForeignKeys=true)' does not 
 seem to have an effect.
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Can openjpa scan directories for classes (such as WEB-INF/classes)?

2007-05-02 Thread Florent BENOIT

   David,

I think I provided some tips for the solution but no attached patch.
In the comments of this bug, I explained why OpenJPA take the wrong path 
with exploded archive.


But I'm interested in any solution :)

Best Regards,

Florent

David Jencks wrote:

I think so too :-)

I take it you don't have a solution for this?  I will see what I can 
come up with.  Thanks for your detailed analysis!


david jencks

On May 2, 2007, at 12:39 PM, Florent BENOIT wrote:


   Hi,

I reported a bug a couple of months  ago.
I think that it is the same issue: 
http://issues.apache.org/jira/browse/OPENJPA-148


Regards,

Florent

David Jencks wrote:
I'm having some trouble getting openjpa to work properly with 
persistence units directly in unpacked wars in geronimo, and before 
I spend a lot of time looking for dead ends I wonder if anyone knows 
if there are some circumstances in which openjpa can scan for 
classes in an unpacked directory such as WEB-INF/classes?  Right now 
in the geronimo integration openjpa seems to be trying to read the 
directory as if it is an xml file, which fails with a SAX exception:


Caused by: java.io.IOException: org.xml.sax.SAXException: 
file:/Users/david/geronimo/svn/(.).war/WEB-INF/classes/ 
[Location: Line: 1, C: 1]: org.xml.sax.SAXParseException: Content is 
not allowed in prolog.
at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource(XMLMetaDataParser.java:376) 

at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:315) 

at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:292) 

at 
org.apache.openjpa.lib.meta.XMLMetaDataParser.parse(XMLMetaDataParser.java:266) 

at 
org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML(PersistenceMetaDataFactory.java:234) 



thanks
david jencks












[jira] Commented: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread Abe White (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493200
 ] 

Abe White commented on OPENJPA-51:
--

OK, I see.  You still shouldn't be using a fixed array.  Use a BitSet.  

As to the rest... as I said before, I don't remember how this stuff works.  So 
it could be wrong
and I wouldn't know it without doing more code-diving than I have time for.  
It's our fault for 
not having enough tests checked into OpenJPA.  So after changing it to use a 
BitSet, 
assuming it passes all your tests, I'd vote to commit it.  Once that happens 
we'll see how it
fairs against our more extensive Kodo test suite.

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, openjpa-51.patch, 
 SelectImpl.java.patch, SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at 

[jira] Updated: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread David Wisneski (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wisneski updated OPENJPA-51:
--

Attachment: (was: openjpa-51.patch)

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at 
 junit.extensions.jfunc.TestletWrapper.runBare(TestletWrapper.java:116)
   at 
 junit.extensions.jfunc.TestletWrapper$1.protect(TestletWrapper.java:106)
   at junit.framework.TestResult.runProtected(Unknown Source)
   at junit.extensions.jfunc.TestletWrapper.run(TestletWrapper.java:109)
   at junit.framework.TestSuite.runTest(Unknown Source)
   at junit.framework.TestSuite.run(Unknown Source)
   at 

[jira] Updated: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread David Wisneski (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wisneski updated OPENJPA-51:
--

Attachment: (was: SelectImpl.java.patch)

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at 
 junit.extensions.jfunc.TestletWrapper.runBare(TestletWrapper.java:116)
   at 
 junit.extensions.jfunc.TestletWrapper$1.protect(TestletWrapper.java:106)
   at junit.framework.TestResult.runProtected(Unknown Source)
   at junit.extensions.jfunc.TestletWrapper.run(TestletWrapper.java:109)
   at junit.framework.TestSuite.runTest(Unknown Source)
   at junit.framework.TestSuite.run(Unknown Source)
   at 

[jira] Resolved: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-02 Thread David Wisneski (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wisneski resolved OPENJPA-51.
---

Resolution: Fixed

fixed in r534623

 bad sql pushdown, sub select is missing from clause
 ---

 Key: OPENJPA-51
 URL: https://issues.apache.org/jira/browse/OPENJPA-51
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: Windows xp, db2, derby 
Reporter: George Hongell
 Assigned To: David Wisneski
 Fix For: 0.9.8

 Attachments: failureEntities.jar, SelectImpl.java.patch


 451 - bad sql pushdown sub select is missing from clause
  TEST451; select e from EmpBean e where e.empid  any (select e1.empid from 
 DeptBean d, in(d.emps) e1 where d.no = 200) 
 28344  TRACE  [main] openjpa.jdbc.SQL - t 1094861122, conn 295440796 [0 ms] 
 executing prepstmnt 81790176 SELECT t0.empid, t0.bonus, t2.deptno, t2.budget, 
 t2.name, t0.execLevel, t0.hireDate, t0.hireTime, t0.hireTimestamp, t3.street, 
 t3.city, t3.state, t3.zip, t0.isManager, t0.name, t0.salary, t4.street, 
 t4.city, t4.state, t4.zip FROM EmpBean t0 LEFT OUTER JOIN DeptBean t2 ON 
 t0.dept_deptno = t2.deptno LEFT OUTER JOIN AddressBean t3 ON t0.home_street = 
 t3.street LEFT OUTER JOIN AddressBean t4 ON t0.work_street = t4.street WHERE 
 (t0.empid = ANY((SELECT t1.deptno FROM DeptBean t1)))
 s/b
 select t1.empid  FROM DeptBean t0 INNER JOIN EmpBean t1 ON t0.deptno = 
 t1.dept_deptno LEFT OUTER JOIN DeptBean t3 ON t1.dept_deptno = t3.deptno 
 WHERE t1.empid  ANY((SELECT t5.empid FROM DeptBean t4 INNER JOIN EmpBean t5 
 ON t4.deptno = t5.dept_deptno  WHERE (CAST(t4.deptno AS BIGINT) = ?))) {int 
 200}
 0|false|0.0.0 org.apache.openjpa.persistence.PersistenceException: Syntax 
 error: Encountered WHERE at line 1, column 520. {SELECT t2.empid, t2.bonus, 
 t3.deptno, t3.budget, t3.name, t2.execLevel, t2.hireDate, t2.hireTime, 
 t2.hireTimestamp, t4.street, t4.city, t4.state, t4.zip, t2.isManager, 
 t2.name, t2.salary, t5.street, t5.city, t5.state, t5.zip FROM DeptBean t0 
 INNER JOIN EmpBean t1 ON t0.deptno = t1.dept_deptno LEFT OUTER JOIN DeptBean 
 t3 ON t2.dept_deptno = t3.deptno LEFT OUTER JOIN AddressBean t4 ON 
 t2.home_street = t4.street LEFT OUTER JOIN AddressBean t5 ON t2.work_street = 
 t5.street WHERE (t2.empid  ANY((SELECT t1.empid FROM  WHERE (CAST(t0.deptno 
 AS BIGINT) = CAST(? AS BIGINT)} [code=3, state=42X01]
   at 
 org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:3713)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:94)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
   at 
 org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:56)
   at 
 org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:152)
   at 
 org.apache.openjpa.lib.rop.EagerResultList.init(EagerResultList.java:37)
   at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1161)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:936)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:746)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716)
   at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712)
   at 
 org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512)
   at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216)
   at 
 org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:254)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.createAndRunQuery(JFLoopQueryTestcase.java:187)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testFileQuery(JFLoopQueryTestcase.java:536)
   at 
 com.ibm.ws.query.utils.JFLoopQueryTestcase.testRunQueryLoopImpl(JFLoopQueryTestcase.java:591)
   at 
 com.ibm.ws.query.tests.JFLoopQueryTest.testRunQueryLoop(JFLoopQueryTest.java:265)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at 
 junit.extensions.jfunc.TestletWrapper.runBare(TestletWrapper.java:116)
   at 
 junit.extensions.jfunc.TestletWrapper$1.protect(TestletWrapper.java:106)
   at junit.framework.TestResult.runProtected(Unknown Source)
   at junit.extensions.jfunc.TestletWrapper.run(TestletWrapper.java:109)
   at junit.framework.TestSuite.runTest(Unknown Source)
   at junit.framework.TestSuite.run(Unknown Source)
   at 

[jira] Resolved: (OPENJPA-173) JOIN in subselect generates bad SQL

2007-05-02 Thread David Wisneski (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wisneski resolved OPENJPA-173.


Resolution: Fixed

This issue should be fixed by r534623, a similar issue OPENJPA-51.

 JOIN in subselect generates bad SQL
 ---

 Key: OPENJPA-173
 URL: https://issues.apache.org/jira/browse/OPENJPA-173
 Project: OpenJPA
  Issue Type: Bug
  Components: sql
Affects Versions: 0.9.6
Reporter: Roger Keays

 As reported at openjpa-dev [1], the following query generates invalid SQL:
 UPDATE Email e SET e.totalDeliveries = e.totalDeliveries + 1
 WHERE e.email IN (
 SELECT m.email FROM MailingList l JOIN l.subscribers m)
 OpenJPA (0.9.6) parses this correctly, but can't seems to be missing the JOIN 
 clause or some table names from the generated SQL:
  org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: syntax error at or 
 near WHERE {prepstmnt 27475707 UPDATE FB_EMAILS SET totalDeliveries = 
 (totalDeliveries + ?) WHERE email IN (SELECT DISTINCT t2.email FROM WHERE 
 (t2.email IN (SELECT t3.email FROM FB_EMAILS t3 WHERE t0.id = t1.id AND 
 t1.subscribers_email = t3.email))) [params=(long) 1]} [code=0, state=42601]
 
 org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:188)
 
 org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:53)
 
 org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:854)
 
 org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:266)
 
 org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:266)
 
 org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1360)
 
 org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeBulkOperation(JDBCStoreQuery.java:491)
 
 org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeUpdate(JDBCStoreQuery.java:420)
 
 org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeUpdate(ExpressionStoreQuery.java:685)
  
 org.apache.openjpa.datacache.QueryCacheStoreQuery$QueryCacheExecutor.executeUpdate(QueryCacheStoreQuery.java:343)
 org.apache.openjpa.kernel.QueryImpl.update(QueryImpl.java:1028)
 org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:793)
 org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:868)
 org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:864)
 
 org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:560)
 
 org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:304) 
 [1] http://www.nabble.com/forum/ViewPost.jtp?post=9450588framed=y

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (OPENJPA-83) Bad SQL for Subselect BETWEEN

2007-05-02 Thread David Wisneski (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-83?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Wisneski resolved OPENJPA-83.
---

Resolution: Fixed

fixed by r534623

 Bad SQL for Subselect BETWEEN
 -

 Key: OPENJPA-83
 URL: https://issues.apache.org/jira/browse/OPENJPA-83
 Project: OpenJPA
  Issue Type: Bug
  Components: query
 Environment: openJPA 0.9.7
 MySQL 5.0.15
Reporter: Jakob Braeuchi
 Fix For: 0.9.8


 the following query generates an sql with no table in the FROM-clause of the 
 subselct:
 em.createQuery(select k from Kauf k where  +
 ((select sum(p.betrag) from Posten p where p.kauf = k) between :betrVon and 
 :betrBis)  +
 order by k.datum asc);
 SELECT t1.id, t1.bemerkung, t1.datum, t2.id, t2.idEinkauferAlt, t2.name
 FROM ekv2kauf t1 LEFT OUTER JOIN ekv2einkaufer t2 ON t1.idEinkaufer = t2.id
 WHERE ((SELECT SUM(t0.betrag) FROM WHERE (t0.idKauf = t1.id)) = ? AND 
 (SELECT SUM(t0.betrag) FROM WHERE (t0.idKauf = t1.id)) = ?) ORDER BY 
 t1.datum ASC
 [params=(double) 1800.0, (double) 3000.0]
 when i use the query without BETWEEN it works:
 em.createQuery(select k from Kauf k where  +
 ((select sum(p.betrag) from Posten p where p.kauf = k)  :betr)  +
 order by k.datum asc);
 SELECT t1.id, t1.bemerkung, t1.datum, t2.id, t2.idEinkauferAlt, t2.name
 FROM ekv2kauf t1 LEFT OUTER JOIN ekv2einkaufer t2 ON t1.idEinkaufer = t2.id
 WHERE ((SELECT SUM(t0.betrag) FROM ekv2posten t0 WHERE (t0.idKauf = t1.id))  
 ?)
 ORDER BY t1.datum ASC
 [params=(double) 1800.0]
 when i rewrite the query using groupby / having it also works, but the 
 generated sql does not use BETWEEN:
 em.createQuery(select p.kauf from Posten p  +
 group by p.kauf  +
 having sum(p.betrag) between :betrVon and :betrBis  +
 order by p.kauf.datum asc);
 SELECT t1.id, t1.bemerkung, t1.datum, t1.idEinkaufer
 FROM ekv2posten t0 INNER JOIN ekv2kauf t1 ON t0.idKauf = t1.id
 GROUP BY t1.id, t1.bemerkung, t1.datum, t1.idEinkaufer
 HAVING SUM(t0.betrag) = ? AND SUM(t0.betrag) = ?
 ORDER BY t1.datum ASC
 [params=(double) 1800.0, (double) 3000.0]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: svn commit: r534623 - /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java

2007-05-02 Thread Patrick Linskey

A question:


+// bitSet indicating if an alias is removed from parent select
+// bit 0 : correspond to alias 0
+// bit 1 : correspond to alias 1, etc.
+// if the bit is set, the corresponding alias has been removed from parent
+// and recorded under subselect.
+private int _removedAliasFromParent = 0;


Why not use a BitSet? They're not that much more inefficient (esp
considering that these are pathways that only occur when going to the
database), and they don't have an upper bound of 32 like you'll see
with an int.

Also, where's the test case for this change?

-Patrick

On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Author: wisneskid
Date: Wed May  2 14:35:55 2007
New Revision: 534623

URL: http://svn.apache.org/viewvc?view=revrev=534623
Log:
Fix for issue OPENJPA-51. It should also resolve issue OPENJPA-173.

Modified:

incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?view=diffrev=534623r1=534622r2=534623
==
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
 Wed May  2 14:35:55 2007
@@ -158,6 +158,13 @@
 // from select if this select selects from a tmp table created by another
 private SelectImpl _from = null;
 private SelectImpl _outer = null;
+
+// bitSet indicating if an alias is removed from parent select
+// bit 0 : correspond to alias 0
+// bit 1 : correspond to alias 1, etc.
+// if the bit is set, the corresponding alias has been removed from parent
+// and recorded under subselect.
+private int _removedAliasFromParent = 0;

 /**
  * Helper method to return the proper table alias for the given alias 
index.
@@ -1487,8 +1494,13 @@
 private void removeParentJoins(PathJoins pj) {
 if (_parent == null)
 return;
-if (_parent._joins != null  !_parent._joins.isEmpty())
-pj.joins().removeAll(_parent._joins.joins());
+if (_parent._joins != null  !_parent._joins.isEmpty()) {
+boolean removed = false;
+if (_removedAliasFromParent  0)
+removed = _parent._joins.joins().removeAll(pj.joins());
+if (!removed)
+pj.joins().removeAll(_parent._joins.joins());
+}
 if (!pj.isEmpty())
 _parent.removeParentJoins(pj);
 }
@@ -1897,9 +1909,15 @@
 }
 }
 if (!fromParent  _parent != null) {
-alias = _parent.findAlias(table, key, false, this);
-if (alias != null)
+boolean removeAliasFromParent = key.toString().contains(:);
+alias = _parent.findAlias(table, key, removeAliasFromParent, this);
+if (alias != null) {
+if (removeAliasFromParent) {
+recordTableAlias(table, key, alias);
+_removedAliasFromParent |= (1  alias.intValue());
+}
 return alias;
+}
 }
 if (_subsels != null) {
 SelectImpl sub;
@@ -1913,9 +1931,11 @@
 if (sub._tables != null)
 sub._tables.remove(alias);
 } else {
-alias = sub.findAlias(table, key, true, null);
-if (!fromParent  alias != null)
-recordTableAlias(table, key, alias);
+if (fromSub == null) {
+alias = sub.findAlias(table, key, true, null);
+if (!fromParent  alias != null)
+recordTableAlias(table, key, alias);
+}
 }
 }
 }






--
Patrick Linskey
202 669 5907


[jira] Updated: (OPENJPA-148) Parsing exception while using an exploded archive

2007-05-02 Thread David Jencks (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Jencks updated OPENJPA-148:
-

Attachment: OPENJPA-148.patch

This patch fixes the issue for me in the geronimo integration.  There are 2 
changes:

1. there's an apparent bug in the treatment of a directory.  There's a var 
dir which is AFAICT never set that used to be scanned.  I changed it to scan 
the directory under consideration, which does find the persistent classes in 
the dir.  I don't know if dir should be set to one of the scanned directories.

2. In the geronimo environment, the same locations show up in both the files 
and urls lists.  I haven't figured out exactly why.  However, this lets the 
second part of the fix work, which is to ignore urls that point to a file that 
has already been scanned.  I think this is probably OK since non-file urls 
generally can't be scanned like a directory.  

I'll be happy to work on improvements given advice on problems with this patch, 
but this patch would IMO be a good start.

 Parsing exception while using an exploded archive
 ---

 Key: OPENJPA-148
 URL: https://issues.apache.org/jira/browse/OPENJPA-148
 Project: OpenJPA
  Issue Type: Bug
  Components: jpa
 Environment: Sun JDK 5.0 / EasyBeans / OpenJPA snapshot 0.9.7
Reporter: Florent BENOIT
Priority: Minor
 Fix For: 0.9.8

 Attachments: debug_traces_directorymode.txt, 
 debug_traces_filemode_working.txt, OPENJPA-148.patch, stacktrace-error.txt, 
 steps.txt


 This happens when using OpenJPA as persistence provider for the EasyBeans 
 ObjectWeb container.
 The error is happening with exploded archive.
 Exploded means that there is a directory, named entitybean.jar with a 
 folder META-INF which contains a file named persistence.xml, and other 
 directories/files for the classes.
 It seems that when using this mode, OpenJPA is trying to parse the directory 
 inputstream (which is failing).
 This exception is not occuring if a jar file is used instead of the 
 exploded mode, but the exploded mode is the default mode for EasyBeans.
 Note also that this exception don't occur by using Hibernate Entity Manager 
 or Oracle TopLink Essentials as persistence provider.
 I will attach to this issue a stack trace (with the exploded directory) which 
 fails and at the end with a jar file (which work)
 And 4 steps used to reproduce this problem

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Created: (OPENJPA-234) Exception in thread main 0.9.8-incubating-SNAPSHOT-incubating-SNAPSHOT fatal user error org.apache.openjpa.persistence.ArgumentException: Could not locate metadata fo

2007-05-02 Thread chowdareddy somu (JIRA)
Exception in thread main 0.9.8-incubating-SNAPSHOT-incubating-SNAPSHOT fatal 
user error org.apache.openjpa.persistence.ArgumentException: Could not locate 
metadata for the class using alias
-

 Key: OPENJPA-234
 URL: https://issues.apache.org/jira/browse/OPENJPA-234
 Project: OpenJPA
  Issue Type: Bug
  Components: kernel
Affects Versions: 0.9.8
 Environment: Open JPA bug when trying to run Standalone Progam
Reporter: chowdareddy somu
 Fix For: 0.9.8




Hi ,

Here is the bug details..

Query q = em2.createQuery(select file from TBLFile file);
q.getResultList(); // Exception is throwing here

Exception Details are
180  helloFPA  TRACE  [main] openjpa.MetaData - Using metadata factory [EMAIL 
PROTECTED].
260  helloFPA  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class 
org.apache.openjpa.jdbc.sql.OracleDictionary.
440  helloFPA  TRACE  [main] openjpa.MetaData - Scanning resource 
META-INF/orm.xml for persistent types.
440  helloFPA  TRACE  [main] openjpa.MetaData - parsePersistentTypeNames() 
found [com.fpa.persistance.TBLFile].
440  helloFPA  TRACE  [main] openjpa.MetaData - Found 1 classes with metadata 
in 10 milliseconds.
[EMAIL PROTECTED] in thread main 
0.9.8-incubating-SNAPSHOT-incubating-SNAPSHOT fatal user error 
org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for 
the class using alias TBLFile. This could mean that the OpenJPA enhancer or 
load-time weaver was not run on the type whose alias is TBLFile. Registered 
alias mappings: {TBLFile=null}
at 
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:348)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:167)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:145)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:214)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:184)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:177)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500(JPQLExpressionBuilder.java:64)
at 
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1671)
at 
org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:55)
at 
org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:148)
at 
org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:649)
at 
org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:630)
at 
org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:596)
at 
org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:658)
at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1483)
at 
org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)
at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:219)
at 
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:269)
at com.fpa.persistance.TBLFileTest.main(TBLFileTest.java:52)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-232) concat function in EJB QL doesn't nest

2007-05-02 Thread Dan Everton (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493235
 ] 

Dan Everton commented on OPENJPA-232:
-

Actually I meant:

where lower(concat(concat(e.firstname, ' '), e.surname)) like 
concat(lower(:name), '%') 


 concat function in EJB QL doesn't nest
 --

 Key: OPENJPA-232
 URL: https://issues.apache.org/jira/browse/OPENJPA-232
 Project: OpenJPA
  Issue Type: Bug
  Components: jpa
Affects Versions: 0.9.7
 Environment: Using H2 as the target SQL dialect.
Reporter: Dan Everton

 I'm attempting to do a case insensitive search for a substring within the 
 concatenation of two columns. The EJB QL I came up with looks like this:
 where lower(concat(concat(e.firstname, ' '), e.surname))) like 
 concat(lower(:name), '%')
 however trying to execute that results in the following parse exception. 
 Caused by: 0.0.0 nonfatal user error 
 org.apache.openjpa.persistence.ArgumentException: Encountered lower ( concat 
 ( concat ( e . firstname , \' \' ) , e . surname ) ) ) at character 32, but 
 expected: [(, ), +, ,, -, ., :, , =, , =, , 
 =, ?, ABS, ALL, AND, ANY, AS, ASC, AVG, BETWEEN, BOTH, 
 BY, CONCAT, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, 
 DELETE, DESC, DISTINCT, EMPTY, ESCAPE, EXISTS, FETCH, FROM, 
 GROUP, HAVING, IN, INNER, IS, JOIN, LEADING, LEFT, LENGTH, 
 LIKE, LOCATE, LOWER, MAX, MEMBER, MIN, MOD, NEW, NOT, 
 NULL, OBJECT, OF, OR, ORDER, OUTER, SELECT, SET, SIZE, 
 SOME, SQRT, SUBSTRING, SUM, TRAILING, TRIM, UPDATE, UPPER, 
 WHERE, BOOLEAN_LITERAL, DECIMAL_LITERAL, IDENTIFIER, 
 INTEGER_LITERAL, STRING_LITERAL].
   at 
 org.apache.openjpa.kernel.jpql.JPQL.generateParseException(JPQL.java:9322)
   at org.apache.openjpa.kernel.jpql.JPQL.jj_consume_token(JPQL.java:9199)
   at 
 org.apache.openjpa.kernel.jpql.JPQL.conditional_primary(JPQL.java:1895)
   at 
 org.apache.openjpa.kernel.jpql.JPQL.conditional_factor(JPQL.java:1873)
   at org.apache.openjpa.kernel.jpql.JPQL.conditional_term(JPQL.java:1739)
   at 
 org.apache.openjpa.kernel.jpql.JPQL.conditional_expression(JPQL.java:1701)
   at org.apache.openjpa.kernel.jpql.JPQL.where_clause(JPQL.java:1548)
   at org.apache.openjpa.kernel.jpql.JPQL.select_statement(JPQL.java:90)
   at org.apache.openjpa.kernel.jpql.JPQL.parseQuery(JPQL.java:62)
   at 
 org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1652)
   ... 50 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: svn commit: r534647 - /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java

2007-05-02 Thread Michael Dick

How about a testcase? :-)

On 5/2/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Author: wisneskid
Date: Wed May  2 15:53:39 2007
New Revision: 534647

URL: http://svn.apache.org/viewvc?view=revrev=534647
Log:
Fix for issue OPENJPA-51. It should also resolve issue OPENJPA-173.
Change to use BitSet.

Modified:


incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java

Modified:
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
URL:
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java?view=diffrev=534647r1=534646r2=534647

==
---
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
(original)
+++
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SelectImpl.java
Wed May  2 15:53:39 2007
@@ -26,6 +26,7 @@
import java.sql.Types;
import java.util.AbstractList;
import java.util.ArrayList;
+import java.util.BitSet;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -164,7 +165,7 @@
 // bit 1 : correspond to alias 1, etc.
 // if the bit is set, the corresponding alias has been removed from
parent
 // and recorded under subselect.
-private int _removedAliasFromParent = 0;
+private BitSet _removedAliasFromParent = new BitSet(16);

 /**
  * Helper method to return the proper table alias for the given alias
index.
@@ -1496,7 +1497,7 @@
 return;
 if (_parent._joins != null  !_parent._joins.isEmpty()) {
 boolean removed = false;
-if (_removedAliasFromParent  0)
+if (!_removedAliasFromParent.isEmpty())
 removed = _parent._joins.joins().removeAll(pj.joins());
 if (!removed)
 pj.joins().removeAll(_parent._joins.joins());
@@ -1914,7 +1915,7 @@
 if (alias != null) {
 if (removeAliasFromParent) {
 recordTableAlias(table, key, alias);
-_removedAliasFromParent |= (1  alias.intValue());
+_removedAliasFromParent.set(alias.intValue());
 }
 return alias;
 }