You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Davanum Srinivas <da...@gmail.com> on 2008/04/15 22:54:27 UTC
Issue / workaround - running Maven2 using Apache Harmony
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
FYI, just set JAVA_HOME as usual and run ?mvn clean install?. But there?s a gotcha. You may see the following issue when
surefire tries to run the tests.
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 58 source files to /home/dims/XmlSchema/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /home/dims/XmlSchema/target/surefire-reports
Uncaught exception in main:
java.lang.ClassNotFoundException: org.apache.maven.surefire.booter.SurefireBooter
at java.net.URLClassLoader.findClass(URLClassLoader.java:894)
at java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:981)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at org.apache.harmony.vm.JarRunner.main(JarRunner.java:72)
[INFO] ????????????????????????
[ERROR] BUILD FAILURE
[INFO] ????????????????????????
If you do, then just set your MAVEN_OPTS as follows and run ?mvn clean install? again.
set MAVEN_OPTS=-Dsurefire.useSystemClassLoader=false
More information about this switch can be found at:
http://docs.codehaus.org/display/MAVENUSER/Classloading+and+Forking+under+Maven+Surefire
Not sure if this is a harmony bug. Anyone wanna look?
thanks,
dims
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iD8DBQFIBRYDgNg6eWEDv1kRAg4NAKCsemqifyU0nbUUwBVHRObHqBu7vwCeOMne
4TiK+IIoCuQahcdyBRBF58Y=
=rJPH
-----END PGP SIGNATURE-----
Re: Issue / workaround - running Maven2 using Apache Harmony
Posted by Stepan Mishura <st...@gmail.com>.
On 4/16/08, Tim Ellison <t....@gmail.com> wrote:
<SNIP>
>
> > Still a long way to go to get Axis2 working under Harmony, just saw
> > failures in adb-codegen module.
> >
>
> Clearly we don't have Axis2 in the Harmony build/test suite, but these are
> all good bugs to find and fix on both sides. Thanks for your work in
> tracking down and reporting them.
>
> Once it is running the Axis2 tests successfully the next step is to add the
> automated tests into the regression suite to ensure it stays working.
>
We do have Axis2 automation [1] in the Harmony build/test suite and
run it regularly. For example, it is passed on the last snapshot [2].
That a bit confusing for me - I expected that there should be no
issues with running Axis2 but it looks like the testing scenario
doesn't cover basic application functionality.
[1] http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/adaptors/axis2_app/
[2] http://people.apache.org/~smishura/r648482/Linux_x86/axis2_app/
Thanks,
Stepan.
> Thanks,
> Tim
>
Re: Issue / workaround - running Maven2 using Apache Harmony
Posted by Tim Ellison <t....@gmail.com>.
Davanum Srinivas wrote:
> Apache XmlSchema - Had issue with Maven needing another switch
> - https://issues.apache.org/jira/browse/HARMONY-5745
Looks like that needs some understanding of Maven2/Surefire internals to
figure out what it is doing. Probably a lower priority at the moment
since there is a workaround.
> Apache Neethi - Got rid of sun.misc.Service using code from Batik
> - https://issues.apache.org/jira/browse/WSCOMMONS-322
> - http://svn.apache.org/viewcvs?view=rev&rev=648423
Ack - getting rid of references to non-API classes is goodness.
> Apache Woden - Filed bug in FileURLConnection
> - https://issues.apache.org/jira/browse/HARMONY-5737
Now marked as FIXED.
> Apache Axiom - Filed a patch in ImageIO
> - https://issues.apache.org/jira/browse/HARMONY-5738
Also marked as FIXED, thanks for the patch!
> Apache Axis2 - Checked in one fix in Kernel tests
> - http://svn.apache.org/viewvc?view=rev&revision=648700
>
> In the Axis2/Kernel issue, the problem is when i use the following piece of code
>
> public static void main(String[] args) throws Exception {
> Class clazz = Class.forName(args[0]);
> Field[] fields = clazz.getDeclaredFields();
> for (int i = 0; i < fields.length; i++) {
> Field field = fields[i];
> System.out.println("Field - Name : " + field.getName());
> System.out.println(" - Description : " + field.toString());
> System.out.println(" - Type : " +
> field.getType().getCanonicalName());
> }
> }
>
> I get a different output with Sun/IBM JDK1.5/1.6 compared to Harmony.
> This is not for a trivial class, but for one class in particular in
> Axis2 (org.apache.axis2.context.MessageContext).
What output do you see on each?
> Still a long way to go to get Axis2 working under Harmony, just saw
> failures in adb-codegen module.
Clearly we don't have Axis2 in the Harmony build/test suite, but these
are all good bugs to find and fix on both sides. Thanks for your work
in tracking down and reporting them.
Once it is running the Axis2 tests successfully the next step is to add
the automated tests into the regression suite to ensure it stays working.
Thanks,
Tim
Re: Issue / workaround - running Maven2 using Apache Harmony
Posted by Davanum Srinivas <da...@gmail.com>.
FYI, Status:
Apache XmlSchema - Had issue with Maven needing another switch
- https://issues.apache.org/jira/browse/HARMONY-5745
Apache Neethi - Got rid of sun.misc.Service using code from Batik
- https://issues.apache.org/jira/browse/WSCOMMONS-322
- http://svn.apache.org/viewcvs?view=rev&rev=648423
Apache Woden - Filed bug in FileURLConnection
- https://issues.apache.org/jira/browse/HARMONY-5737
Apache Axiom - Filed a patch in ImageIO
- https://issues.apache.org/jira/browse/HARMONY-5738
Apache Axis2 - Checked in one fix in Kernel tests
- http://svn.apache.org/viewvc?view=rev&revision=648700
In the Axis2/Kernel issue, the problem is when i use the following piece of code
public static void main(String[] args) throws Exception {
Class clazz = Class.forName(args[0]);
Field[] fields = clazz.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
System.out.println("Field - Name : " + field.getName());
System.out.println(" - Description : " + field.toString());
System.out.println(" - Type : " +
field.getType().getCanonicalName());
}
}
I get a different output with Sun/IBM JDK1.5/1.6 compared to Harmony.
This is not for a trivial class, but for one class in particular in
Axis2 (org.apache.axis2.context.MessageContext).
Still a long way to go to get Axis2 working under Harmony, just saw
failures in adb-codegen module.
thanks,
dims
On Wed, Apr 16, 2008 at 4:03 AM, Tim Ellison <t....@gmail.com> wrote:
> It would be good to capture this in a JIRA for tracking. I don't know what
> Surefire does, so if there are any Maven types lurking it would be good to
> get their help with this too (otherwise I'll go over there and ask).
>
> To set this mail in context:
> There is a discussion underway on the ASF members mailing list about
> running more of Apache's applications on Harmony, where I have encouraged
> people to try M5 and report successes|bugs to this list.
> I'm sure such reports will get people's attention as it is good to see
> Harmony being put to good use.
>
> Thanks Dims for trying maven2 and finding this!
>
> Regards,
> Tim
>
>
>
> Davanum Srinivas wrote:
>
> > FYI, just set JAVA_HOME as usual and run ?mvn clean install?. But there?s
> a gotcha. You may see the following issue when
> > surefire tries to run the tests.
> >
> > [INFO] [resources:testResources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:testCompile]
> > [INFO] Compiling 58 source files to
> /home/dims/XmlSchema/target/test-classes
> > [INFO] [surefire:test]
> > [INFO] Surefire report directory:
> /home/dims/XmlSchema/target/surefire-reports
> > Uncaught exception in main:
> > java.lang.ClassNotFoundException:
> org.apache.maven.surefire.booter.SurefireBooter
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:894)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:593)
> > at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:981)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> > at org.apache.harmony.vm.JarRunner.main(JarRunner.java:72)
> > [INFO] ????????????????????????
> > [ERROR] BUILD FAILURE
> > [INFO] ????????????????????????
> >
> > If you do, then just set your MAVEN_OPTS as follows and run ?mvn clean
> install? again.
> >
> > set MAVEN_OPTS=-Dsurefire.useSystemClassLoader=false
> >
> > More information about this switch can be found at:
> >
> http://docs.codehaus.org/display/MAVENUSER/Classloading+and+Forking+under+Maven+Surefire
> >
> > Not sure if this is a harmony bug. Anyone wanna look?
> >
> > thanks,
> > dims
> >
>
--
Davanum Srinivas :: http://davanum.wordpress.com
Re: Issue / workaround - running Maven2 using Apache Harmony
Posted by Tim Ellison <t....@gmail.com>.
It would be good to capture this in a JIRA for tracking. I don't know
what Surefire does, so if there are any Maven types lurking it would be
good to get their help with this too (otherwise I'll go over there and ask).
To set this mail in context:
There is a discussion underway on the ASF members mailing list about
running more of Apache's applications on Harmony, where I have
encouraged people to try M5 and report successes|bugs to this list.
I'm sure such reports will get people's attention as it is good to see
Harmony being put to good use.
Thanks Dims for trying maven2 and finding this!
Regards,
Tim
Davanum Srinivas wrote:
> FYI, just set JAVA_HOME as usual and run ?mvn clean install?. But
> there?s a gotcha. You may see the following issue when
> surefire tries to run the tests.
>
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] Compiling 58 source files to
> /home/dims/XmlSchema/target/test-classes
> [INFO] [surefire:test]
> [INFO] Surefire report directory:
> /home/dims/XmlSchema/target/surefire-reports
> Uncaught exception in main:
> java.lang.ClassNotFoundException:
> org.apache.maven.surefire.booter.SurefireBooter
> at java.net.URLClassLoader.findClass(URLClassLoader.java:894)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:593)
> at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:981)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
> at org.apache.harmony.vm.JarRunner.main(JarRunner.java:72)
> [INFO] ????????????????????????
> [ERROR] BUILD FAILURE
> [INFO] ????????????????????????
>
> If you do, then just set your MAVEN_OPTS as follows and run ?mvn clean
> install? again.
>
> set MAVEN_OPTS=-Dsurefire.useSystemClassLoader=false
>
> More information about this switch can be found at:
> http://docs.codehaus.org/display/MAVENUSER/Classloading+and+Forking+under+Maven+Surefire
>
>
> Not sure if this is a harmony bug. Anyone wanna look?
>
> thanks,
> dims