[jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-14 Thread Neil Hornbeck (JIRA)
[ 
http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#action_12427870 ] 

Neil Hornbeck commented on OPENJPA-8:
-

Updated to revision 431325.  I am now able to us the Enhancer from the command 
line.

 java.util.MissingResourceException: system is missing product derivations
 -

 Key: OPENJPA-8
 URL: http://issues.apache.org/jira/browse/OPENJPA-8
 Project: OpenJPA
  Issue Type: Bug
 Environment: Windows 2000, using ant build.
Reporter: Neil Hornbeck
Priority: Blocker

 I am trying to run the openjpac from within ant.  I am getting the error that 
 the file META-INF/services/org.apache.openjpa.conf.ProductDerivation is 
 missing but it is right on the classpath that the Enhancer is running from.
 +++
  [openjpac] java.lang.ExceptionInInitializerError
  [openjpac] at 
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigurationImpl.java:516)
  [openjpac] at 
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigurationImpl.java:165)
  [openjpac] at 
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigurationImpl.java:155)
  [openjpac] at 
 org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77)
  [openjpac] at 
 org.apache.openjpa.lib.ant.AbstractTask.getConfiguration(AbstractTask.java:89)
  [openjpac] at 
 org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:84)
  [openjpac] at 
 org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:153)
  [openjpac] at 
 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [openjpac] at org.apache.tools.ant.Task.perform(Task.java:364)
  [openjpac] at org.apache.tools.ant.Target.execute(Target.java:341)
  [openjpac] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [openjpac] at 
 org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [openjpac] at 
 org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  [openjpac] at 
 org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
  [openjpac] at 
 org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [openjpac] at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [openjpac] at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [openjpac] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  [openjpac] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
  [openjpac] Caused by: java.util.MissingResourceException: Your system is 
 missing product derivations.  Product derivations provide configuration 
 options for supported da
 ta stores and specifications.  You must have a 
 META-INF/services/org.apache.openjpa.conf.ProductDerivation file in your 
 classpath listing the available derivation classes
 , and some listed class must be instantiable.  Typically this file is bundled 
 as part of the distribution.  Have you unbundled it, or unbundled its listed 
 classes?
  [openjpac] at 
 org.apache.openjpa.conf.ProductDerivations.clinit(ProductDerivations.java:53)
  [openjpac] ... 19 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




Re: [jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-14 Thread Bryan Noll
So... before I got update the jira, I want to go make sure it's not 
something stupid I'm doing.


Classpath defined like this in ant...

   path id=project.classpath
   pathelement location=${basedir}/lib/commons-collections-3.2.jar/
   pathelement location=${basedir}/lib/commons-lang-2.1.jar/
   pathelement location=${basedir}/lib/commons-logging-1.0.4.jar/
   pathelement location=${basedir}/lib/commons-pool-1.3.jar/
   pathelement location=${basedir}/lib/derby-10.1.3.1.jar/
   pathelement 
location=${basedir}/lib/geronimo-j2ee-connector_1.5_spec-1.0.1.jar/
   pathelement 
location=${basedir}/lib/geronimo-jms_1.1_spec-1.0.1.jar/
   pathelement 
location=${basedir}/lib/geronimo-jta_1.0.1B_spec-1.0.1.jar/

   pathelement location=${basedir}/lib/openjpa-jdbc-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-jdbc-5-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-kernel-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-kernel-4-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-kernel-5-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-lib-0.9.0.jar/
   pathelement 
location=${basedir}/lib/openjpa-persistence-0.9.0.jar/
   pathelement 
location=${basedir}/lib/openjpa-persistence-jdbc-0.9.0.jar/

   pathelement location=${basedir}/lib/openjpa-project-0.9.0.jar/
   pathelement location=${basedir}/lib/openjpa-xmlstore-0.9.0.jar/
   pathelement location=${basedir}/lib/persistence-api-1.0.jar/
   pathelement location=${basedir}/lib/serp-1.11.0.jar/
   /path

(have also tried it like)

   path id=project.classpath
   fileset dir=${basedir}/lib includes=*.jar/
   /path


===

Task defined like...

   taskdef name=openjpac 
classname=org.apache.openjpa.ant.PCEnhancerTask

   classpath refid=project.classpath /
   /taskdef

Target defined like...

   target name=enhance-src
   openjpac
   classpath refid=project.classpath/
   fileset dir=.
   include 
name=${basedir}/src/main/java/tutorial/persistence/*.java /

   /fileset
   /openjpac
   /target


and I still get that same MissingResourceException...

When digging into the Services.getImplementors(String serviceName, 
ClassLoader loader) method, I print out all the URL's returned by a call 
to URLClassLoader.getURLs, and it gives me the following:


file:/c:/tools/apache-ant-1.6.5/lib/ant-antlr.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-bcel.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-bsf.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-log4j.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-oro.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-regexp.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-apache-resolver.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-commons-logging.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-commons-net.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-icontract.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-jai.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-javamail.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-jdepend.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-jmf.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-jsch.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-junit.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-launcher.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-netrexx.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-nodeps.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-starteam.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-stylebook.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-swing.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-trax.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-vaj.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-weblogic.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-xalan1.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant-xslp.jar
file:/c:/tools/apache-ant-1.6.5/lib/ant.jar
file:/c:/tools/apache-ant-1.6.5/lib/junit-3.8.1.jar
file:/c:/tools/apache-ant-1.6.5/lib/junit.jar
file:/c:/tools/apache-ant-1.6.5/lib/xercesImpl.jar
file:/c:/tools/apache-ant-1.6.5/lib/xml-apis.jar
file:/c:/tools/jdk1.5.0_06/lib/tools.jar


Obviously, the 
'META-INF/services/org.apache.openjpa.conf.ProductDerivation' file is 
not gonna be in any of those libraries.


What am I missing?

Neil Hornbeck (JIRA) wrote:
[ http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#action_12427870 ] 

Neil Hornbeck commented on OPENJPA-8:

-

Updated to revision 431325.  I am now able to us the Enhancer from the command 
line.

  

java.util.MissingResourceException: system is missing product derivations
-

Key: OPENJPA-8
URL: http://issues.apache.org/jira/browse/OPENJPA-8
Project: OpenJPA
 Issue Type: Bug
Environment: Windows 2000, using ant build.
   Reporter: Neil Hornbeck
   Priority: Blocker

I am trying 

RE: [jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-11 Thread hornbn
Bryan,
I am not so sure that I have a fix.  I was using the ant task, and when
I fixed this, other issues popped up.   I am hesitant to publish a fix
since I still don't know what the root cause was, and the fact that new
problems popped up makes me doubt its value, but here it is.
The 'fix' was to add the classpath to both the taskdef and the target:

taskdef name=openjpac
 classname=org.apache.openjpa.ant.PCEnhancerTask
 classpathref=ojpa.cp/
   
target name=enhance
openjpac
fileset dir=.
include name=./src/mymoney/**/*.java /
/fileset
classpath refid=ojpa.cp/
/openjpac
/target

 
opja.cp referrences both the openjpa code and my code, it may be cleaner
to create one classpath to the Enhancer code for the taskdef, and
another classpath for source code that the target uses.  I haven't tried
this yet.
 
Neil
 
 




-Original Message-
From: Bryan Noll (JIRA) [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 10, 2006 5:53 PM
To: open-jpa-dev@incubator.apache.org
Subject: [jira] Commented: (OPENJPA-8)
java.util.MissingResourceException: system is missing product
derivations


[
http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#action_1242
7355 ]
   
Bryan Noll commented on OPENJPA-8:
--

Would you mind attaching your solution.  I've run into the same
problem... and it would be a time saving thing to havve a fix for it
acceible here.  Thanks.

 java.util.MissingResourceException: system is missing product
 derivations


-

 Key: OPENJPA-8
 URL: http://issues.apache.org/jira/browse/OPENJPA-8
 Project: OpenJPA
  Issue Type: Bug
 Environment: Windows 2000, using ant build.
Reporter: Neil Hornbeck
Priority: Blocker

 I am trying to run the openjpac from within ant.  I am getting the
 error that the file
META-INF/services/org.apache.openjpa.conf.ProductDerivation is missing
but it is right on the classpath that the Enhancer is running from.
 +++
  [openjpac] java.lang.ExceptionInInitializerError
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:516)
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:165)
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:155)
  [openjpac] at
org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.ja
va:77)
  [openjpac] at
org.apache.openjpa.lib.ant.AbstractTask.getConfiguration(AbstractTask.ja
va:89)
  [openjpac] at
org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:84)
  [openjpac] at
org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:153)
  [openjpac] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [openjpac] at org.apache.tools.ant.Task.perform(Task.java:364)
  [openjpac] at
org.apache.tools.ant.Target.execute(Target.java:341)
  [openjpac] at
org.apache.tools.ant.Target.performTasks(Target.java:369)
  [openjpac] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [openjpac] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  [openjpac] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
  [openjpac] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [openjpac] at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [openjpac] at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [openjpac] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  [openjpac] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
  [openjpac] Caused by: java.util.MissingResourceException: Your system
 is missing product derivations.  Product derivations provide
 configuration options for supported da ta stores and specifications.
You must have a
META-INF/services/org.apache.openjpa.conf.ProductDerivation file in your
classpath listing the available derivation classes , and some listed
class must be instantiable.  Typically this file is bundled as part of
the distribution.  Have you unbundled it, or unbundled its listed
classes?
  [openjpac] at
org.apache.openjpa.conf.ProductDerivations.clinit(ProductDerivations.j
ava:53)
  [openjpac] ... 19 more

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira

   



FW: [jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-11 Thread hornbn
I forgot one piece of this.  If the Enhancer classpath points to the lib
with the jar files, this error will occur.  I had to unpack all of the
jars into a single directory and call that the classpath to get past
this problem.
 
 
-Original Message-
From: Hornbeck, Neil 
Sent: Friday, August 11, 2006 7:56 AM
To: 'open-jpa-dev@incubator.apache.org'
Subject: RE: [jira] Commented: (OPENJPA-8)
java.util.MissingResourceException: system is missing product
derivations


Bryan,
I am not so sure that I have a fix.  I was using the ant task, and when
I fixed this, other issues popped up.   I am hesitant to publish a fix
since I still don't know what the root cause was, and the fact that new
problems popped up makes me doubt its value, but here it is.
The 'fix' was to add the classpath to both the taskdef and the target:

taskdef name=openjpac
 classname=org.apache.openjpa.ant.PCEnhancerTask
 classpathref=ojpa.cp/
   
target name=enhance
openjpac
fileset dir=.
include name=./src/mymoney/**/*.java /
/fileset
classpath refid=ojpa.cp/
/openjpac
/target

 
opja.cp referrences both the openjpa code and my code, it may be cleaner
to create one classpath to the Enhancer code for the taskdef, and
another classpath for source code that the target uses.  I haven't tried
this yet.
 
Neil
 
 




-Original Message-
From: Bryan Noll (JIRA) [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 10, 2006 5:53 PM
To: open-jpa-dev@incubator.apache.org
Subject: [jira] Commented: (OPENJPA-8)
java.util.MissingResourceException: system is missing product
derivations


[
http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#action_1242
7355 ]
   
Bryan Noll commented on OPENJPA-8:
--

Would you mind attaching your solution.  I've run into the same
problem... and it would be a time saving thing to havve a fix for it
acceible here.  Thanks.

 java.util.MissingResourceException: system is missing product
 derivations


-

 Key: OPENJPA-8
 URL: http://issues.apache.org/jira/browse/OPENJPA-8
 Project: OpenJPA
  Issue Type: Bug
 Environment: Windows 2000, using ant build.
Reporter: Neil Hornbeck
Priority: Blocker

 I am trying to run the openjpac from within ant.  I am getting the
 error that the file
META-INF/services/org.apache.openjpa.conf.ProductDerivation is missing
but it is right on the classpath that the Enhancer is running from.
 +++
  [openjpac] java.lang.ExceptionInInitializerError
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:516)
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:165)
  [openjpac] at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJPAConfigura
tionImpl.java:155)
  [openjpac] at
org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.ja
va:77)
  [openjpac] at
org.apache.openjpa.lib.ant.AbstractTask.getConfiguration(AbstractTask.ja
va:89)
  [openjpac] at
org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:84)
  [openjpac] at
org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:153)
  [openjpac] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [openjpac] at org.apache.tools.ant.Task.perform(Task.java:364)
  [openjpac] at
org.apache.tools.ant.Target.execute(Target.java:341)
  [openjpac] at
org.apache.tools.ant.Target.performTasks(Target.java:369)
  [openjpac] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [openjpac] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
  [openjpac] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
  [openjpac] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
  [openjpac] at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [openjpac] at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [openjpac] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
  [openjpac] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
  [openjpac] Caused by: java.util.MissingResourceException: Your system
 is missing product derivations.  Product derivations provide
 configuration options for supported da ta stores and specifications.
You must have a
META-INF/services/org.apache.openjpa.conf.ProductDerivation file in your
classpath listing the available derivation classes , and some listed
class must be instantiable.  Typically this file is bundled as part of
the distribution.  Have you unbundled it, or unbundled its listed
classes?
  [openjpac] at
org.apache.openjpa.conf.ProductDerivations.clinit(ProductDerivations.j

RE: [jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-11 Thread Patrick Linskey
Do you mean that you were putting the directory that contained the
OpenJPA jars into the taskdev-time classpath? In Java prior to version
6, you must always enumerate jar files themselves; putting the dir that
contains the jar files into the classpath doesn't get its contents into
the classpath.

This is changing in Java 6 with the addition of a new property for
listing dirs containing jars, but I'm not sure how that manifests itself
in ant, or if you're using Java 6.

Also, you will need the execution-time classpath to include your
persistent types. As it turns out, you don't need the OpenJPA jars in
the execution-time classpath; just in the taskdef-time one. The
duplication won't hurt, but isn't strictly necessary.

Hope this helps,

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.  

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Friday, August 11, 2006 5:17 AM
 To: open-jpa-dev@incubator.apache.org
 Subject: FW: [jira] Commented: (OPENJPA-8) 
 java.util.MissingResourceException: system is missing product 
 derivations
 
 I forgot one piece of this.  If the Enhancer classpath points 
 to the lib
 with the jar files, this error will occur.  I had to unpack all of the
 jars into a single directory and call that the classpath to get past
 this problem.
  
  
 -Original Message-
 From: Hornbeck, Neil 
 Sent: Friday, August 11, 2006 7:56 AM
 To: 'open-jpa-dev@incubator.apache.org'
 Subject: RE: [jira] Commented: (OPENJPA-8)
 java.util.MissingResourceException: system is missing product
 derivations
 
 
 Bryan,
 I am not so sure that I have a fix.  I was using the ant 
 task, and when
 I fixed this, other issues popped up.   I am hesitant to publish a fix
 since I still don't know what the root cause was, and the 
 fact that new
 problems popped up makes me doubt its value, but here it is.
 The 'fix' was to add the classpath to both the taskdef and the target:
 
 taskdef name=openjpac
  classname=org.apache.openjpa.ant.PCEnhancerTask
  classpathref=ojpa.cp/

 target name=enhance
 openjpac
 fileset dir=.
 include name=./src/mymoney/**/*.java /
 /fileset
 classpath refid=ojpa.cp/
 /openjpac
 /target
 
  
 opja.cp referrences both the openjpa code and my code, it may 
 be cleaner
 to create one classpath to the Enhancer code for the taskdef, and
 another classpath for source code that the target uses.  I 
 haven't tried
 this yet.
  
 Neil
  
  
 
 
 
 
 -Original Message-
 From: Bryan Noll (JIRA) [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 10, 2006 5:53 PM
 To: open-jpa-dev@incubator.apache.org
 Subject: [jira] Commented: (OPENJPA-8)
 java.util.MissingResourceException: system is missing product
 derivations
 
 
 [
 http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#a
 ction_1242
 7355 ]

 Bryan Noll commented on OPENJPA-8:
 --
 
 Would you mind attaching your solution.  I've run into the same
 problem... and it would be a time saving thing to havve a fix for it
 acceible here.  Thanks.
 
  java.util.MissingResourceException: system is missing product
  derivations
 
 --
 --
 -
 
  Key: OPENJPA-8
  URL: http://issues.apache.org/jira/browse/OPENJPA-8
  Project: OpenJPA
   Issue Type: Bug
  Environment: Windows 2000, using ant build.
 Reporter: Neil Hornbeck
 Priority: Blocker
 
  I am trying to run the openjpac from within ant.  I am getting the
  error that the file
 META-INF/services/org.apache.openjpa.conf.ProductDerivation is missing
 but it is right on the classpath that the Enhancer is running from.
  +++
   [openjpac] java.lang.ExceptionInInitializerError
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:516)
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:165)
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:155)
   [openjpac] at
 org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhan
 cerTask.ja
 va:77)
   [openjpac] at
 org.apache.openjpa.lib.ant.AbstractTask.getConfiguration(Abstr
 actTask.ja
 va:89)
   [openjpac] at
 org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask
 .java:84)
   [openjpac] at
 org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:153)
   [openjpac] at
 org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   [openjpac] at org.apache.tools.ant.Task.perform(Task.java:364)
   [openjpac] at
 org.apache.tools.ant.Target.execute(Target.java:341)
   [openjpac] at
 org.apache.tools.ant.Target.performTasks(Target.java:369)
   [openjpac

RE: [jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations

2006-08-11 Thread hornbn
I am using this with SE5:

fileset dir=D:/Personal/projects/MyMoney/openjpa-0.9.0/lib
include name=**/*.jar/
/fileset

Which doesn't work.  Unpacking the jars and pointing the classpath at
that directory does the trick.  


-Original Message-
From: Patrick Linskey [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 11, 2006 10:14 AM
To: open-jpa-dev@incubator.apache.org
Subject: RE: [jira] Commented: (OPENJPA-8)
java.util.MissingResourceException: system is missing product
derivations


Do you mean that you were putting the directory that contained the
OpenJPA jars into the taskdev-time classpath? In Java prior to version
6, you must always enumerate jar files themselves; putting the dir that
contains the jar files into the classpath doesn't get its contents into
the classpath.

This is changing in Java 6 with the addition of a new property for
listing dirs containing jars, but I'm not sure how that manifests itself
in ant, or if you're using Java 6.

Also, you will need the execution-time classpath to include your
persistent types. As it turns out, you don't need the OpenJPA jars in
the execution-time classpath; just in the taskdef-time one. The
duplication won't hurt, but isn't strictly necessary.

Hope this helps,

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.  

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 11, 2006 5:17 AM
 To: open-jpa-dev@incubator.apache.org
 Subject: FW: [jira] Commented: (OPENJPA-8) 
 java.util.MissingResourceException: system is missing product 
 derivations
 
 I forgot one piece of this.  If the Enhancer classpath points
 to the lib
 with the jar files, this error will occur.  I had to unpack all of the
 jars into a single directory and call that the classpath to get past
 this problem.
  
  
 -Original Message-
 From: Hornbeck, Neil
 Sent: Friday, August 11, 2006 7:56 AM
 To: 'open-jpa-dev@incubator.apache.org'
 Subject: RE: [jira] Commented: (OPENJPA-8)
 java.util.MissingResourceException: system is missing product
 derivations
 
 
 Bryan,
 I am not so sure that I have a fix.  I was using the ant
 task, and when
 I fixed this, other issues popped up.   I am hesitant to publish a fix
 since I still don't know what the root cause was, and the 
 fact that new
 problems popped up makes me doubt its value, but here it is.
 The 'fix' was to add the classpath to both the taskdef and the target:
 
 taskdef name=openjpac
  classname=org.apache.openjpa.ant.PCEnhancerTask
  classpathref=ojpa.cp/

 target name=enhance
 openjpac
 fileset dir=.
 include name=./src/mymoney/**/*.java /
 /fileset
 classpath refid=ojpa.cp/
 /openjpac
 /target
 
  
 opja.cp referrences both the openjpa code and my code, it may
 be cleaner
 to create one classpath to the Enhancer code for the taskdef, and
 another classpath for source code that the target uses.  I 
 haven't tried
 this yet.
  
 Neil
  
  
 
 
 
 
 -Original Message-
 From: Bryan Noll (JIRA) [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 10, 2006 5:53 PM
 To: open-jpa-dev@incubator.apache.org
 Subject: [jira] Commented: (OPENJPA-8)
 java.util.MissingResourceException: system is missing product 
 derivations
 
 
 [ http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#a
 ction_1242
 7355 ]

 Bryan Noll commented on OPENJPA-8:
 --
 
 Would you mind attaching your solution.  I've run into the same 
 problem... and it would be a time saving thing to havve a fix for it 
 acceible here.  Thanks.
 
  java.util.MissingResourceException: system is missing product 
  derivations
 
 --
 --
 -
 
  Key: OPENJPA-8
  URL: http://issues.apache.org/jira/browse/OPENJPA-8
  Project: OpenJPA
   Issue Type: Bug
  Environment: Windows 2000, using ant build.
 Reporter: Neil Hornbeck
 Priority: Blocker
 
  I am trying to run the openjpac from within ant.  I am getting the 
  error that the file
 META-INF/services/org.apache.openjpa.conf.ProductDerivation is missing

 but it is right on the classpath that the Enhancer is running from.
  +++
   [openjpac] java.lang.ExceptionInInitializerError
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:516)
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:165)
   [openjpac] at
 org.apache.openjpa.conf.OpenJPAConfigurationImpl.init(OpenJP
 AConfigura
 tionImpl.java:155)
   [openjpac] at
 org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhan
 cerTask.ja
 va:77)
   [openjpac] at
 org.apache.openjpa.lib.ant.AbstractTask.getConfiguration(Abstr
 actTask.ja
 va:89)
   [openjpac