You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2006/11/07 05:36:36 UTC
[jira] Created: (OPENJPA-76) add-was-interfaces ant task throws
exception on a "non-clean" build.
add-was-interfaces ant task throws exception on a "non-clean" build.
---------------------------------------------------------------------
Key: OPENJPA-76
URL: http://issues.apache.org/jira/browse/OPENJPA-76
Project: OpenJPA
Issue Type: Bug
Components: kernel
Reporter: Michael Dick
Patrick Linskey found the problem and posted to the dev mailing list. Here's the original post :
Hi,
I get the following stack trace when running 'mvn package'. It looks
like I don't have some required IBM classes in my classpath.
Surprisingly, this exception does not cause the build to fail, but
presumably, the output bytes are not the same as if this had run
successfully.
Does anyone have any suggestions for either getting the classes into the
classpath or moving the exception to runtime, so that there aren't
build-time dependency issues resulting in different jars from the same
sources?
Thanks,
-Patrick
Partial stack trace:
[INFO] [antrun:run {execution: add-was-interfaces}]
[INFO] Executing tasks
[java] java.lang.IllegalArgumentException:
java.lang.NoClassDefFoundError:
com/ibm/websphere/jtaextensions/SynchronizationCallback
[java] at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
[java] at
org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
[java] at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:341)
[java] at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
ojo.java:108)
[java] at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
[java] at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:412)
[java] at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:534)
.....
[java] Caused by: java.lang.IllegalArgumentException:
java.lang.NoClassDefFoundError:
com/ibm/websphere/jtaextensions/SynchronizationCallback
[java] at serp.util.Strings.toClass(Strings.java:211)
[java] at serp.util.Strings.toClass(Strings.java:140)
[java] at serp.bytecode.BCClass.getType(BCClass.java:565)
[java] at serp.bytecode.BCClass.write(BCClass.java:202)
[java] at
org.apache.openjpa.ee.WASManagedRuntime.main(WASManagedRuntime.java:412)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Upon further examination the problem occurs if the WASSynchronization class is modified a second time (ie you don't run mvn clean before running mvn package).
--
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-76) add-was-interfaces ant task throws
exception on a "non-clean" build.
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OPENJPA-76?page=all ]
Michael Dick updated OPENJPA-76:
--------------------------------
Attachment: openjpa-76-patch.txt
Attaching a patch file which avoids the problem (at least for the time being).
The problem occurs when the new BCClass is written out to the file system. The patch will check whether the interface is already included in the class. If the "new" interface is already there the program will terminate.
The larger question remains: should Serp be used in this manner, or should a stub class be created and used at compile time. Currently a stub class for misc.sun.Perf is being created in the openjpa-lib project, but is removed before the jar files are created and is not distributed with OpenJPA.
> add-was-interfaces ant task throws exception on a "non-clean" build.
> --------------------------------------------------------------------
>
> Key: OPENJPA-76
> URL: http://issues.apache.org/jira/browse/OPENJPA-76
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Reporter: Michael Dick
> Attachments: openjpa-76-patch.txt
>
>
> Patrick Linskey found the problem and posted to the dev mailing list. Here's the original post :
> Hi,
> I get the following stack trace when running 'mvn package'. It looks
> like I don't have some required IBM classes in my classpath.
> Surprisingly, this exception does not cause the build to fail, but
> presumably, the output bytes are not the same as if this had run
> successfully.
> Does anyone have any suggestions for either getting the classes into the
> classpath or moving the exception to runtime, so that there aren't
> build-time dependency issues resulting in different jars from the same
> sources?
> Thanks,
> -Patrick
> Partial stack trace:
> [INFO] [antrun:run {execution: add-was-interfaces}]
> [INFO] Executing tasks
> [java] java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
> [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
> [java] at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
> [java] at
> org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
> [java] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [java] at org.apache.tools.ant.Task.perform(Task.java:364)
> [java] at org.apache.tools.ant.Target.execute(Target.java:341)
> [java] at
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
> ojo.java:108)
> [java] at
> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
> [java] at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:412)
> [java] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:534)
> .....
> [java] Caused by: java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at serp.util.Strings.toClass(Strings.java:211)
> [java] at serp.util.Strings.toClass(Strings.java:140)
> [java] at serp.bytecode.BCClass.getType(BCClass.java:565)
> [java] at serp.bytecode.BCClass.write(BCClass.java:202)
> [java] at
> org.apache.openjpa.ee.WASManagedRuntime.main(WASManagedRuntime.java:412)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> Upon further examination the problem occurs if the WASSynchronization class is modified a second time (ie you don't run mvn clean before running mvn package).
--
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] Resolved: (OPENJPA-76) add-was-interfaces ant task throws
exception on a "non-clean" build.
Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OPENJPA-76?page=all ]
Patrick Linskey resolved OPENJPA-76.
------------------------------------
Resolution: Fixed
I applied the patch with revision 472018. I changed it slightly to make it use resources instead of files.
> add-was-interfaces ant task throws exception on a "non-clean" build.
> --------------------------------------------------------------------
>
> Key: OPENJPA-76
> URL: http://issues.apache.org/jira/browse/OPENJPA-76
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Reporter: Michael Dick
> Attachments: openjpa-76-patch.txt
>
>
> Patrick Linskey found the problem and posted to the dev mailing list. Here's the original post :
> Hi,
> I get the following stack trace when running 'mvn package'. It looks
> like I don't have some required IBM classes in my classpath.
> Surprisingly, this exception does not cause the build to fail, but
> presumably, the output bytes are not the same as if this had run
> successfully.
> Does anyone have any suggestions for either getting the classes into the
> classpath or moving the exception to runtime, so that there aren't
> build-time dependency issues resulting in different jars from the same
> sources?
> Thanks,
> -Patrick
> Partial stack trace:
> [INFO] [antrun:run {execution: add-was-interfaces}]
> [INFO] Executing tasks
> [java] java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
> [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
> [java] at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
> [java] at
> org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
> [java] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [java] at org.apache.tools.ant.Task.perform(Task.java:364)
> [java] at org.apache.tools.ant.Target.execute(Target.java:341)
> [java] at
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
> ojo.java:108)
> [java] at
> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
> [java] at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:412)
> [java] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:534)
> .....
> [java] Caused by: java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at serp.util.Strings.toClass(Strings.java:211)
> [java] at serp.util.Strings.toClass(Strings.java:140)
> [java] at serp.bytecode.BCClass.getType(BCClass.java:565)
> [java] at serp.bytecode.BCClass.write(BCClass.java:202)
> [java] at
> org.apache.openjpa.ee.WASManagedRuntime.main(WASManagedRuntime.java:412)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> Upon further examination the problem occurs if the WASSynchronization class is modified a second time (ie you don't run mvn clean before running mvn package).
--
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-76) add-was-interfaces ant task throws
exception on a "non-clean" build.
Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/OPENJPA-76?page=all ]
Patrick Linskey updated OPENJPA-76:
-----------------------------------
I'm perfectly happy with the use of serp here. Historically, we (the Kodo team) have created stub jars etc. with abandon, since the source was not available and thus we were not at risk of distributing bits that violated copyrights. Obviously, this is more of a concern with an open-source project, so we probably will need to be more careful about things like this in the future.
Currently, this seems to be the only big issue. It used to be that we needed to link against various Oracle-specific classes, but between judicious reflection and Oracle's increased standards compliance over the years, we've been able to avoid that for now. But I'm sure that similar situations will crop up in the future.
> add-was-interfaces ant task throws exception on a "non-clean" build.
> --------------------------------------------------------------------
>
> Key: OPENJPA-76
> URL: http://issues.apache.org/jira/browse/OPENJPA-76
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Reporter: Michael Dick
> Attachments: openjpa-76-patch.txt
>
>
> Patrick Linskey found the problem and posted to the dev mailing list. Here's the original post :
> Hi,
> I get the following stack trace when running 'mvn package'. It looks
> like I don't have some required IBM classes in my classpath.
> Surprisingly, this exception does not cause the build to fail, but
> presumably, the output bytes are not the same as if this had run
> successfully.
> Does anyone have any suggestions for either getting the classes into the
> classpath or moving the exception to runtime, so that there aren't
> build-time dependency issues resulting in different jars from the same
> sources?
> Thanks,
> -Patrick
> Partial stack trace:
> [INFO] [antrun:run {execution: add-was-interfaces}]
> [INFO] Executing tasks
> [java] java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
> [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
> [java] at
> org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
> [java] at
> org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
> [java] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [java] at org.apache.tools.ant.Task.perform(Task.java:364)
> [java] at org.apache.tools.ant.Target.execute(Target.java:341)
> [java] at
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntM
> ojo.java:108)
> [java] at
> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
> [java] at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:412)
> [java] at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
> LifecycleExecutor.java:534)
> .....
> [java] Caused by: java.lang.IllegalArgumentException:
> java.lang.NoClassDefFoundError:
> com/ibm/websphere/jtaextensions/SynchronizationCallback
> [java] at serp.util.Strings.toClass(Strings.java:211)
> [java] at serp.util.Strings.toClass(Strings.java:140)
> [java] at serp.bytecode.BCClass.getType(BCClass.java:565)
> [java] at serp.bytecode.BCClass.write(BCClass.java:202)
> [java] at
> org.apache.openjpa.ee.WASManagedRuntime.main(WASManagedRuntime.java:412)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> Upon further examination the problem occurs if the WASSynchronization class is modified a second time (ie you don't run mvn clean before running mvn package).
--
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