[jira] Commented: (OPENJPA-8) java.util.MissingResourceException: system is missing product derivations
[ http://issues.apache.org/jira/browse/OPENJPA-8?page=comments#action_12427355 ] 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.(OpenJPAConfigurationImpl.java:516) > [openjpac] at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:165) > [openjpac] at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(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.(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
[jira] Created: (OPENJPA-11) No Javadoc available on the website
No Javadoc available on the website --- Key: OPENJPA-11 URL: http://issues.apache.org/jira/browse/OPENJPA-11 Project: OpenJPA Issue Type: Task Components: docs Environment: a browser Reporter: Bryan Noll No Javadoc available on the website -- 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
[jira] Updated: (OPENJPA-11) No Javadoc available on the website
[ http://issues.apache.org/jira/browse/OPENJPA-11?page=all ] Bryan Noll updated OPENJPA-11: -- Attachment: javadoc.patch Modifications to the following files from the 'site' directory in svn (not the 'trunk'): xdocs/javadoc.xml docs/javadoc.html This patch (and subsequent tar.gz attachments) may be more than necessary. It contains updates necessary to include the javadoc for all of the following: openjpa-jdbc-5 openjpa-jdbc openjpa-kernel-4 openjpa-kernel-5 openjpa-kernel openjpa-lib openjpa-persistence openjpa-persistence-jdbc openjpa-xmlstore If it is not necessary to have all of those available on the site, I can re-work the patch and attachments. > No Javadoc available on the website > --- > > Key: OPENJPA-11 > URL: http://issues.apache.org/jira/browse/OPENJPA-11 > Project: OpenJPA > Issue Type: Task > Components: docs > Environment: a browser >Reporter: Bryan Noll > Attachments: javadoc.patch > > > No Javadoc available on the website -- 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
[jira] Updated: (OPENJPA-11) No Javadoc available on the website
[ http://issues.apache.org/jira/browse/OPENJPA-11?page=all ] Bryan Noll updated OPENJPA-11: -- Attachment: openjpa-javadocs.tar.gz Extract into the 'site/docs' directory. > No Javadoc available on the website > --- > > Key: OPENJPA-11 > URL: http://issues.apache.org/jira/browse/OPENJPA-11 > Project: OpenJPA > Issue Type: Task > Components: docs > Environment: a browser >Reporter: Bryan Noll > Attachments: javadoc.patch, openjpa-javadocs.tar.gz > > > No Javadoc available on the website -- 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
[jira] Updated: (OPENJPA-11) No Javadoc available on the website
[ http://issues.apache.org/jira/browse/OPENJPA-11?page=all ] Bryan Noll updated OPENJPA-11: -- Attachment: openjpa-javadocs-compressed.tar.gz Extract into the 'site/docs' directory. > No Javadoc available on the website > --- > > Key: OPENJPA-11 > URL: http://issues.apache.org/jira/browse/OPENJPA-11 > Project: OpenJPA > Issue Type: Task > Components: docs > Environment: a browser >Reporter: Bryan Noll > Attachments: javadoc.patch, openjpa-javadocs-compressed.tar.gz, > openjpa-javadocs.tar.gz > > > No Javadoc available on the website -- 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
[jira] Created: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib' -- Key: OPENJPA-14 URL: http://issues.apache.org/jira/browse/OPENJPA-14 Project: OpenJPA Issue Type: Bug Components: lib Environment: Windows XP Reporter: Bryan Noll Ideally, one should be able to run 'ant openjpac' (openjpac would be a target defined in the build script that would use the PCEnhancer task) without having to put the openjpa jars on the system classpath or having to pass them into ant vie the '-lib' argument. Currently this is not possible. The root of the issue can be seen from by looking at the public static String[] getImplementors(String serviceName, ClassLoader loader) method of the Services class. Basically, the call to loader = Thread.currentThread().getContextClassLoader(); returns a ClassLoader with the $ANT_HOME\lib\*.jar and $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' The exception seen when encountering this issue: java.lang.ExceptionInInitializerError at org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) at org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) at org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) at org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) Caused by: java.util.MissingResourceException: Your system is missing product derivations. Product derivations provide configuration options for supported data 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? at org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) ... 17 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
[jira] Updated: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
[ http://issues.apache.org/jira/browse/OPENJPA-14?page=all ] Bryan Noll updated OPENJPA-14: -- Attachment: OPENJPA-14.patch1 Attaching patch named: OPENJPA-14.patch1 So, the issue reported originally was not a problem with the code, but a known problem with ant, as can be seen here: http://ant.apache.org/faq.html#delegating-classloader-1.6 The real fix for this is better documentation, which I will throw together. I updated the 'no-product-derivations' in the 'openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties' file to provide a hint to people who would've run into the same issue I did. The rest of the patch is to deal with another issue in the same realm as this one, ant that is the fact that the PCEnhancerTask would throw a NPE if you didn't have 'META-INF/persistence.xml' on your system classpath, in $ANT_HOME/lib or supply the dir it was in via the 'ant -lib' argument. To resolve this, I created a new required attribute for the PCEnhancerTask, named 'configFile'... that allows the location of the config file to be declared when running the task. Please provide feedback on the patch if you think I didn't grasp the context of what was going on at a higher level and potentially screwed something else up. > PCEnhancer ant task requires openjpa jars to be on the system classpath or > passed into ant with '-lib' > -- > > Key: OPENJPA-14 > URL: http://issues.apache.org/jira/browse/OPENJPA-14 > Project: OpenJPA > Issue Type: Bug > Components: lib > Environment: Windows XP >Reporter: Bryan Noll > Assigned To: Bryan Noll > Attachments: OPENJPA-14.patch1 > > > Ideally, one should be able to run 'ant openjpac' (openjpac would be a > target defined in the build script that would use the PCEnhancer task) > without having to put the openjpa jars on the system classpath or having to > pass them into ant vie the '-lib' argument. Currently this is not possible. > The root of the issue can be seen from by looking at the public static > String[] getImplementors(String serviceName, ClassLoader loader) method of > the Services class. Basically, the call to > loader = Thread.currentThread().getContextClassLoader(); > returns a ClassLoader with the $ANT_HOME\lib\*.jar and > $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain > 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' > The exception seen when encountering this issue: > java.lang.ExceptionInInitializerError > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) > at > org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.Main.runBuild(Main.java:668) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) > Caused by: java.util.MissingResourceException: Your system is missing product > derivations. Product derivations provide configuration options for supported > data 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? > at > org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) > ... 17 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
[jira] Updated: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
[ http://issues.apache.org/jira/browse/OPENJPA-14?page=all ] Bryan Noll updated OPENJPA-14: -- Attachment: OPENJPA-14.patch2 Attaching patch named: OPENJPA-14.patch2 Ignore 'OPENJPA-14.patch1 ', I forgot to make the test class I added as part of it. That's the only difference between this one and that. > PCEnhancer ant task requires openjpa jars to be on the system classpath or > passed into ant with '-lib' > -- > > Key: OPENJPA-14 > URL: http://issues.apache.org/jira/browse/OPENJPA-14 > Project: OpenJPA > Issue Type: Bug > Components: lib > Environment: Windows XP >Reporter: Bryan Noll > Assigned To: Bryan Noll > Attachments: OPENJPA-14.patch1, OPENJPA-14.patch2 > > > Ideally, one should be able to run 'ant openjpac' (openjpac would be a > target defined in the build script that would use the PCEnhancer task) > without having to put the openjpa jars on the system classpath or having to > pass them into ant vie the '-lib' argument. Currently this is not possible. > The root of the issue can be seen from by looking at the public static > String[] getImplementors(String serviceName, ClassLoader loader) method of > the Services class. Basically, the call to > loader = Thread.currentThread().getContextClassLoader(); > returns a ClassLoader with the $ANT_HOME\lib\*.jar and > $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain > 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' > The exception seen when encountering this issue: > java.lang.ExceptionInInitializerError > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) > at > org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.Main.runBuild(Main.java:668) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) > Caused by: java.util.MissingResourceException: Your system is missing product > derivations. Product derivations provide configuration options for supported > data 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? > at > org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) > ... 17 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
[jira] Commented: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
[ http://issues.apache.org/jira/browse/OPENJPA-14?page=comments#action_12428817 ] Bryan Noll commented on OPENJPA-14: --- I thought about making it optional, but it just seemed odd to me that you'd have to have 'META-INF/persistence.xml' in one of the places I mentioned earlier... 1) system classpath 2)$ANT_HOME/lib 3) ant -lib dir_where_META_INF_is 4) I forgot about this before... but a 4th would be ${user.home}/.ant/lib ...in particular, the first two options seem like a round peg in a square hole. Making it optional would be easy, but I just thought making it required would save users the problem of having to get that on their classpath. Maybe I'm not seeing the use case? Like I said though, changing it to optional is trivial. > PCEnhancer ant task requires openjpa jars to be on the system classpath or > passed into ant with '-lib' > -- > > Key: OPENJPA-14 > URL: http://issues.apache.org/jira/browse/OPENJPA-14 > Project: OpenJPA > Issue Type: Bug > Components: lib > Environment: Windows XP >Reporter: Bryan Noll > Assigned To: Bryan Noll > Attachments: OPENJPA-14.patch1, OPENJPA-14.patch2 > > > Ideally, one should be able to run 'ant openjpac' (openjpac would be a > target defined in the build script that would use the PCEnhancer task) > without having to put the openjpa jars on the system classpath or having to > pass them into ant vie the '-lib' argument. Currently this is not possible. > The root of the issue can be seen from by looking at the public static > String[] getImplementors(String serviceName, ClassLoader loader) method of > the Services class. Basically, the call to > loader = Thread.currentThread().getContextClassLoader(); > returns a ClassLoader with the $ANT_HOME\lib\*.jar and > $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain > 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' > The exception seen when encountering this issue: > java.lang.ExceptionInInitializerError > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) > at > org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.Main.runBuild(Main.java:668) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) > Caused by: java.util.MissingResourceException: Your system is missing product > derivations. Product derivations provide configuration options for supported > data 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? > at > org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) > ... 17 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
[jira] Updated: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
[ http://issues.apache.org/jira/browse/OPENJPA-14?page=all ] Bryan Noll updated OPENJPA-14: -- Attachment: OPENJPA-14.patch3 Attaching patch file: OPENJPA-14.patch3 Ignore patch1 and patch2 Thanks for pointing out the 'properties' and 'propertiesFile' values... that's exactly what I thought was missing and what I needed. The patch is a simple update to give someone a hint about where their jars need to go so they don't get the original MissingResourceException. > PCEnhancer ant task requires openjpa jars to be on the system classpath or > passed into ant with '-lib' > -- > > Key: OPENJPA-14 > URL: http://issues.apache.org/jira/browse/OPENJPA-14 > Project: OpenJPA > Issue Type: Bug > Components: lib > Environment: Windows XP >Reporter: Bryan Noll > Assigned To: Bryan Noll > Attachments: OPENJPA-14.patch1, OPENJPA-14.patch2, OPENJPA-14.patch3 > > > Ideally, one should be able to run 'ant openjpac' (openjpac would be a > target defined in the build script that would use the PCEnhancer task) > without having to put the openjpa jars on the system classpath or having to > pass them into ant vie the '-lib' argument. Currently this is not possible. > The root of the issue can be seen from by looking at the public static > String[] getImplementors(String serviceName, ClassLoader loader) method of > the Services class. Basically, the call to > loader = Thread.currentThread().getContextClassLoader(); > returns a ClassLoader with the $ANT_HOME\lib\*.jar and > $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain > 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' > The exception seen when encountering this issue: > java.lang.ExceptionInInitializerError > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) > at > org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.Main.runBuild(Main.java:668) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) > Caused by: java.util.MissingResourceException: Your system is missing product > derivations. Product derivations provide configuration options for supported > data 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? > at > org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) > ... 17 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
[jira] Updated: (OPENJPA-14) PCEnhancer ant task requires openjpa jars to be on the system classpath or passed into ant with '-lib'
[ http://issues.apache.org/jira/browse/OPENJPA-14?page=all ] Bryan Noll updated OPENJPA-14: -- Attachment: OPENJPA-14.patch4 Attaching patch: OPENJPA-14.patch4 This throws a MetaDataException now instead of an NPE. > PCEnhancer ant task requires openjpa jars to be on the system classpath or > passed into ant with '-lib' > -- > > Key: OPENJPA-14 > URL: http://issues.apache.org/jira/browse/OPENJPA-14 > Project: OpenJPA > Issue Type: Bug > Components: lib > Environment: Windows XP >Reporter: Bryan Noll > Assigned To: Bryan Noll > Attachments: OPENJPA-14.patch1, OPENJPA-14.patch2, OPENJPA-14.patch3, > OPENJPA-14.patch4 > > > Ideally, one should be able to run 'ant openjpac' (openjpac would be a > target defined in the build script that would use the PCEnhancer task) > without having to put the openjpa jars on the system classpath or having to > pass them into ant vie the '-lib' argument. Currently this is not possible. > The root of the issue can be seen from by looking at the public static > String[] getImplementors(String serviceName, ClassLoader loader) method of > the Services class. Basically, the call to > loader = Thread.currentThread().getContextClassLoader(); > returns a ClassLoader with the $ANT_HOME\lib\*.jar and > $JAVA_HOME\lib\tools.jar in it... which obviously doesn't contain > 'META-INF/services/org.apache.openjpa.conf.ProductDerivation' > The exception seen when encountering this issue: > java.lang.ExceptionInInitializerError > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:510) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:160) > at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.(OpenJPAConfigurationImpl.java:151) > at > org.apache.openjpa.ant.PCEnhancerTask.newConfiguration(PCEnhancerTask.java:77) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:170) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.Project.executeTarget(Project.java:1185) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.Main.runBuild(Main.java:668) > at org.apache.tools.ant.Main.startAnt(Main.java:187) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:251) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:72) > Caused by: java.util.MissingResourceException: Your system is missing product > derivations. Product derivations provide configuration options for supported > data 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? > at > org.apache.openjpa.conf.ProductDerivations.(ProductDerivations.java:53) > ... 17 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
[jira] Created: (OPENJPA-32) Unnecessary dependencies in poms
Unnecessary dependencies in poms Key: OPENJPA-32 URL: http://issues.apache.org/jira/browse/OPENJPA-32 Project: OpenJPA Issue Type: Bug Environment: Windows XP Reporter: Bryan Noll This dependency currently exists in the /openjpa-lib/ module and is not needed. javax.servlet servlet-api 2.5 compile -- 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
[jira] Commented: (OPENJPA-32) Unnecessary dependencies in poms
[ http://issues.apache.org/jira/browse/OPENJPA-32?page=comments#action_12430259 ] Bryan Noll commented on OPENJPA-32: --- After creating this JIRA, I noticed the following in the assembly configurations under openjpa-project: javax.servlet:servlet-api Maybe it is needed for something I don't know about? > Unnecessary dependencies in poms > > > Key: OPENJPA-32 > URL: http://issues.apache.org/jira/browse/OPENJPA-32 > Project: OpenJPA > Issue Type: Bug > Environment: Windows XP >Reporter: Bryan Noll > > This dependency currently exists in the /openjpa-lib/ module and is not > needed. > > javax.servlet > servlet-api > 2.5 > compile > -- 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
[jira] Commented: (OPENJPA-30) Need some OpenJPA jars for maven 2 projects
[ http://issues.apache.org/jira/browse/OPENJPA-30?page=comments#action_12430350 ] Bryan Noll commented on OPENJPA-30: --- Comments originally on the dev list: from myself: - I saw that Marc got the newly named SNAPSHOT jars up to a repo good stuff. - The next step would have one jar somewhere like http://people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/openjpa/0.9.0-SNAPSHOT/ for people to depend on, instead of many, correct? - David... if you catch this... I would be glad to help (translation... observe and learn) you get the thing publishing nightly from the apache continuum server you spoke of. >From David Blevins in response: We (Geronimo and OpenEJB) use maven 2 which has transitive dependencies, so it's not critical for us. But it'd be real handy for anyone using maven 1 or ant. Or anyone really who just wants to throw that jar in their webapp and say "go!" I added it in (that's the easy part). See http://vmbuild.apache.org/continuum/servlet/continuum That machine is terribly slow The tricky part with any CI system is the whole question of "Gee, what credentials do we use to deploy snapshots?" To skirt the issue of what user to "push" jars as, I've typically setup an rsync on the destination box and "pulled" the jars down. That worked fine with maven 1, but maven 2 has these wonderful index files in the repo that make that impossible to my knowledge. Maybe Brett can confirm. -David >From Marc Prud'hommeaux in response: I notice that there is both a "OpenJPA" and a "OpenJPA Project" build configured in continuum, and "OpenJPA" doesn't seem to actually be building anything. Was this intended? If the snapshot deploy directory /x1/www/people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/ is available from the continuum server, I might be able to override the snapshotRepository to deploy straight to that directly, in which case we'd have automatic deployment of the snapshot (would would be very handy). Does that sound plausible to you? > Need some OpenJPA jars for maven 2 projects > --- > > Key: OPENJPA-30 > URL: http://issues.apache.org/jira/browse/OPENJPA-30 > Project: OpenJPA > Issue Type: Task >Reporter: David Blevins > Assigned To: Marc Prud'hommeaux > > We've introduced a maven 2 dependency on OpenJPA in OpenEJB and will be doing > the same in Geronimo. Whatever you want to publish is fine with us (dev vs. > snapshot), we just need a build published so people can build OpenEJB or > Geronimo without having to build OpenJPA first. > Thanks -- 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
[jira] Commented: (OPENJPA-29) Create aggregate jars of OpenJPA
[ http://issues.apache.org/jira/browse/OPENJPA-29?page=comments#action_12430349 ] Bryan Noll commented on OPENJPA-29: --- Comments originally on the dev list: from myself: openjpa-0.9.0-full.jar // contains all openjpa code, openjpa-*.jars merged openjpa-0.9.0-nodep.jar // contains all openjpa code and all third party dependency jars Do you have your descriptions backwards or am I misunderstanding what you're saying? Seems like 'nodep' would mean "no dependencies for this project are bundled into this jar" to me. IIUC (which I'm not sure that I do, so please correct me) then... openjpa-0.9.0-nodep.jar would extract to: - org/apache/openjpa/*/**.class - META-INF/* (we still need to resolve the 'merge multiple files of the same name and locations (eg.. ProductDerivations) problem for this) openjpa-0.9.0-full.jar would extract to: - org/apache/openjpa/*/**.class - thirdPartyJars.jar (many of these) - META-INF/* .. (same issue as above) Like I said, not sure this is actually correct. Would the openjpa-*.jar files be there instead of the unpacked classes? Can someone with a bit more classloading acuity speak to that? Should the names actually be openjpa-nodep-0.9.0-SNAPSHOT.jar and openjpa-full-0.9.0-SNAPSHOT.jar? >From David Blevins in response (was inline): I very well could have them backwards. As I said, "There's a naming convention for this kind of thing, hope I've got it right." The classes from the third party jars would also have been extracted into the jar. That'd be possible. You'd have to have one maven module for each jar and poke at the assembly plugin setup to not use the default name of --.. The maven guys may know a better way. > Create aggregate jars of OpenJPA > > > Key: OPENJPA-29 > URL: http://issues.apache.org/jira/browse/OPENJPA-29 > Project: OpenJPA > Issue Type: Task >Reporter: David Blevins > > Right now, we have a ton of jars, most of which are needed to actually run > OpenJPA. For real users, we should create aggregates of these jars, for > example: > - *openjpa-0.9.0-full.jar* - contains all openjpa code, openjpa-*.jars merged > | > - *openjpa-0.9.0-nodep.jar* - contains all openjpa code and all third party > dependency jars | -- 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
[jira] Commented: (OPENJPA-13) GenerationType.IDENTITY problem with MS SQL Server
[ http://issues.apache.org/jira/browse/OPENJPA-13?page=comments#action_12439954 ] Bryan Noll commented on OPENJPA-13: --- So... after looking into this issue for a bit, the problem is this: Assumptions: - Driver: jtds-1.2.jar Column Type defined as: [ID] [int] IDENTITY (1, 1) NOT NULL The ClassCastException is coming from this line of the generated code in the PersistenceCapable class... id = (Integer)pcStateManager.replaceObjectField(this, i); As a result of the previous method call, we eventually arrive at the 'org.apache.openjpa.jdbc.sql.DBDictionary.getGeneratedKey' method, where there is this line of code... Object key = rs.getObject(1); When examining this 'key' object at runtime, its type is java.math.BigDecimal, so... the jtds driver is returning this '[int] IDENTITY (1, 1)' type as a BigDecimal. This problem does not occur when using a primitive 'int' as the type of the @Id mapping because the org.apache.openjpa.jdbc.meta.strats.PrimitiveFieldStrategy.setAutoAssignedValue method simply up-casts the 'autoInc' value to a Number (legally because it is a BigDecimal), and then calls the 'intValue' method (all of this inside the 'case JavaTypes.INT' section of the switch statement). The corresponding class that has the setAutoAssignedValue method for the non-primitive types is HandlerFieldStrategy. The same problem occurs with MySQL when attempting to use a 'java.lang.Integer' as the type of the @Id field, because the value is returned by the driver as a 'java.lang.Long' (driver: mysql-connector-java-3.1.11.jar, colum type of 'int(11) - auto_increment'). This doesn't seem as hinky, because using a Long as the @Id type seems more reasonable than having to use a primitive or a BigDecimal. I've thought of a couple of ways to go about resolving this, none of which I really like, and am hoping one of the people more familiar with the code base can point me in the right direction. - Modify the bytecode enhancement so that it is try-catching for a ClassCastException, then instead of casting, explicitly construct the wrapper type that you need, in this case Integer, by casting to a Number, and then calling methods on that. - Override the getGeneratedKey method in the SQLServerDictionary class to return a cast-safe value. Not good at all, because I don't see, as its modeled now, that this object is capable of finding out at runtime in a dynamic way what exactly it needs to return. As a hack, I had it return an Integer, but that only worked because I knew the @Id field was mapped as an Integer. - In the StateManager, add methods that correspond to the replaceField (replaceIntField gets called in the enhanced code when the @Id type is int), such as replaceIntegerWrapperField, replaceLongWrapperField, etc... instead of just having replaceObjectField. - Maybe someone can point out somewhere in the object hierarchy (thinking somewhere around HandlerFieldStrategy.setAutoAssignedValue) where we can get to the information in the PersistenceCapable implementor using the fieldName or index so we can find out what type it is supposed to be, and construct it there from the BigDecimal (or whatever it is, Long with MySQL for instance). - Don't change any code, and document somewhere what we know about what a person can and cannot use for auto-increment @Id types for different databases. This one seems good enough for MySQL. Thoughts... suggestions? > GenerationType.IDENTITY problem with MS SQL Server > -- > > Key: OPENJPA-13 > URL: http://issues.apache.org/jira/browse/OPENJPA-13 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Environment: Microsoft SQL Server 2000 > Windows XP > Java SE 1.5 > OpenJPA - source downloaded today (Aug 14, 2006) >Reporter: Megan >Priority: Critical > > Cannot persist entity with identity column. To reproduce, create a simple > object with identity column > @Entity > @Table(name="JpaType") > public class JpaType implements Serializable > { > @Id > @GeneratedValue(strategy=GenerationType.IDENTITY) > @Column(name="Id") > private Integer id = null; > > @Column(name="Name") > private String name = null; > > public Integer getId() { return id; } > public String getName() { return name; } > public void setName(String name) { this.name = name; } > } > create table JpaType ( > Id int identity(1, 1) not null > , Name varchar(50) null > , constraint JpaType_PK primary key (Id) > ) > JpaType jpa = new JpaType(); > jpa.setName("Test 1"); > em.persist(jpa); > em.flush(); > It works OK if I remove identity column (and set ID myself). > Stack trace > <0|true|0.9.0> org.apache.openjpa.persistence.PersistenceException: > java.math.BigDecimal > at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl
[jira] Commented: (OPENJPA-13) GenerationType.IDENTITY problem with MS SQL Server
[ http://issues.apache.org/jira/browse/OPENJPA-13?page=comments#action_12439977 ] Bryan Noll commented on OPENJPA-13: --- Looks like it's fixed to me (for reference, Abe's commit that fixed it was 'svn commit: r453016') SQL Server @Id type of int - did work before, still works @Id type of Integer - did NOT work before, works now @Id type of Long - did NOT work before, works now MySQL @Id type of int - did work before, still works @Id type of Integer - did NOT work before, works now @Id type of Long - did work before, still works > GenerationType.IDENTITY problem with MS SQL Server > -- > > Key: OPENJPA-13 > URL: http://issues.apache.org/jira/browse/OPENJPA-13 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Environment: Microsoft SQL Server 2000 > Windows XP > Java SE 1.5 > OpenJPA - source downloaded today (Aug 14, 2006) >Reporter: Megan >Priority: Critical > > Cannot persist entity with identity column. To reproduce, create a simple > object with identity column > @Entity > @Table(name="JpaType") > public class JpaType implements Serializable > { > @Id > @GeneratedValue(strategy=GenerationType.IDENTITY) > @Column(name="Id") > private Integer id = null; > > @Column(name="Name") > private String name = null; > > public Integer getId() { return id; } > public String getName() { return name; } > public void setName(String name) { this.name = name; } > } > create table JpaType ( > Id int identity(1, 1) not null > , Name varchar(50) null > , constraint JpaType_PK primary key (Id) > ) > JpaType jpa = new JpaType(); > jpa.setName("Test 1"); > em.persist(jpa); > em.flush(); > It works OK if I remove identity column (and set ID myself). > Stack trace > <0|true|0.9.0> org.apache.openjpa.persistence.PersistenceException: > java.math.BigDecimal > at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1576) > at > org.apache.openjpa.kernel.DelegatingBroker.flush(DelegatingBroker.java:927) > at > org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:421) > at mytest.domain.JpaTest.testJpa(JpaTest.java:30) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) > at > org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) > at > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at > org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) > at > org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) > at > org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71) > at > org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) > at > org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) > at > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > Caused by: java.lang.ClassCastException: java.math.BigDecimal > at mytest.domain.model.JpaType.pcReplaceField(JpaType.java) > at > org.apache.openjpa.kernel.StateManagerImpl.replaceField(StateManagerImpl.java:2824) > at > org.apache.openjpa.kernel.StateManagerImpl.storeObjectField(StateManagerImpl.java:2284) > at > org.apache.openjpa.kernel.StateManagerImpl.storeField(StateManagerImpl.java:2380) > at > org.apache.openjpa.kernel.StateManagerImpl.storeField(StateManagerImpl.java:723) > at > org.apache.openjpa.kernel.StateManagerImpl.store(StateManagerImpl.java:719) > at > org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.setAutoAssignedValue(HandlerFieldStrategy.java:361) >