You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jacek Laskowski <ja...@laskowski.net.pl> on 2006/07/16 14:17:43 UTC

Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

On 7/14/06, David Blevins <da...@visi.com> wrote:
> This test doesn't fail for me.  Can you post the error maybe?
>
> At least I can't seem to figure out how this test is releated to
> http://jira.codehaus.org/browse/MSUREFIRE-110 and how other tests
> seem to be ok.
>
> Not sure what you discovered.

The comment to the issue may help -
http://jira.codehaus.org/browse/MSUREFIRE-110#action_65652. The error
turns up on Windows when CLASSPATH contains a path that in turn
contains spaces. While a serialized object is restored (with the
serialization-incompatible classpath), the exception is thrown that
forced me to disable the test. Since M2 keeps its own repository in
%USERPROFILE%/.m2/repository that does contain spaces (C:\Documents
and Settings\...) and the surefire plugin doesn't normalize the
classpath entries, the test blows up.

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/18/06, David Blevins <da...@visi.com> wrote:

> I switched it to just use ByteArray{Input,Output}Stream and Object
> {Input,Output}Stream instead of MarshalledObject.
>
> Should work fine on windows now.

Yes, it does. Thanks!

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by David Blevins <da...@visi.com>.
On Jul 17, 2006, at 3:21 PM, Jacek Laskowski wrote:

> On 7/17/06, David Blevins <da...@visi.com> wrote:
>
>> Give running the test in fork mode a try and see if that doesn't just
>> fix it -- i think the openejb-core pom does it.  If not, post a
>> stack  trace and I'll see if I can't make sense of it.
>
> Take a look at the following command line snippets and please explain
> how it could work fine for other tests? It can't be.
>
[...]
> java.net.MalformedURLException: no protocol: and
>        at java.net.URL.<init>(URL.java:567)
>        at java.net.URL.<init>(URL.java:464)
>        at java.net.URL.<init>(URL.java:413)
>        at sun.rmi.server.LoaderHandler.pathToURLs 
> (LoaderHandler.java:747)
>        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java: 
> 147)
>        at java.rmi.server.RMIClassLoader$2.loadClass 
> (RMIClassLoader.java:620)
>        at java.rmi.server.RMIClassLoader.loadClass 
> (RMIClassLoader.java:247)
>        at sun.rmi.server.MarshalInputStream.resolveClass 
> (MarshalInputStream.java:197)
[...]
>        at java.rmi.MarshalledObject.get(MarshalledObject.java:135)

I see.  The sun RMIClassLoader is totally broken.  We had this  
problem in the 2.x codebase as well.

I switched it to just use ByteArray{Input,Output}Stream and Object 
{Input,Output}Stream instead of MarshalledObject.

Should work fine on windows now.

-David


Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/17/06, David Blevins <da...@visi.com> wrote:

> Give running the test in fork mode a try and see if that doesn't just
> fix it -- i think the openejb-core pom does it.  If not, post a
> stack  trace and I'll see if I can't make sense of it.

Take a look at the following command line snippets and please explain
how it could work fine for other tests? It can't be.

jlaskowski@dev /cygdrive/c/oss/openejb3/server/openejb-client
$ mvn -o -X -DforkMode=pertest test
...
[DEBUG]   (f) forkMode = pertest
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.openejb.client.ThrowableArtifactTest
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.094
sec <<< FAILURE!
Forking command line: java -classpath "C:\Documents and
Settings\jlaskowski\.m2\repository\org\apache\maven\surefire\surefire-api\2.0\surefire-api-2.0.jar;C:\Documents
and Settings
\jlaskowski\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Documents
and Settings\jlaskowski\.m2\repository\org\apache\maven\surefire\surefire-booter\2
.0\surefire-booter-2.0.jar"
org.apache.maven.surefire.booter.SurefireBooter
c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefire20080tmp
c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefire20081tmp
Running org.openejb.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec

Results :
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE

jlaskowski@dev /cygdrive/c/oss/openejb3/server/openejb-client
$ less target/surefire-reports/org.openejb.client.ThrowableArtifactTest.txt
-------------------------------------------------------------------------------
Test set: org.openejb.client.ThrowableArtifactTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.094
sec <<< FAILURE!
testThrowableArtifact(org.openejb.client.ThrowableArtifactTest)  Time
elapsed: 0.062 sec  <<< ERROR!
java.net.MalformedURLException: no protocol: and
        at java.net.URL.<init>(URL.java:567)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
        at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
        at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
        at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
        at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
        at org.openejb.client.ThrowableArtifactTest.marshal(ThrowableArtifactTest.java:67)
        at org.openejb.client.ThrowableArtifactTest.testThrowableArtifact(ThrowableArtifactTest.java:40)

jlaskowski@dev /cygdrive/c/oss/openejb3/server/openejb-client
$ mvn -o -X -DforkMode=pertest
-Dmaven.repo.local="c:\DOCUME~1\JLASKO~1/.m2/repository"  test
...
[DEBUG]   (f) forkMode = pertest
...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.openejb.client.ThrowableArtifactTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.093 sec
Forking command line: java -classpath
c:\DOCUME~1\JLASKO~1\.m2\repository\org\apache\maven\surefire\surefire-api\2.0\surefire-api-2.0.jar;c:\DOCUME~1\JLASKO~1\.m2\repository\org\co
dehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;c:\DOCUME~1\JLASKO~1\.m2\repository\org\apache\maven\surefire\surefire-booter\2.0\surefire-booter-2.0.jar
org.apache.maven.suref
ire.booter.SurefireBooter
c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefire14814tmp
c:\DOCUME~1\JLASKO~1\LOCALS~1\Temp\surefire14815tmp
Running org.openejb.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec

Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------

Weird, isn't it?

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by David Blevins <da...@visi.com>.
On Jul 17, 2006, at 10:55 AM, Jacek Laskowski wrote:

> On 7/17/06, David Blevins <da...@visi.com> wrote:
>
>> You might try having the tests fork and see if that doesn't help.  We
>> definitely need to get this test back in.
>
> I'll try to figure it out and commit the change. Given I don't have
> any idea about what's going on there, it may take an unacceptably-long
> time ;-)

Give running the test in fork mode a try and see if that doesn't just  
fix it -- i think the openejb-core pom does it.  If not, post a  
stack  trace and I'll see if I can't make sense of it.

-David




Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/17/06, David Blevins <da...@visi.com> wrote:

> You might try having the tests fork and see if that doesn't help.  We
> definitely need to get this test back in.

I'll try to figure it out and commit the change. Given I don't have
any idea about what's going on there, it may take an unacceptably-long
time ;-)

Jacek

-- 
Jacek Laskowski
http://www.laskowski.net.pl

Re: [openejb-dev] ThrowableArtifactTest ( [openejb-commit 2754] Disable tests until they fixed on MS Windows....)

Posted by David Blevins <da...@visi.com>.
On Jul 16, 2006, at 5:17 AM, Jacek Laskowski wrote:

> On 7/14/06, David Blevins <da...@visi.com> wrote:
>> This test doesn't fail for me.  Can you post the error maybe?
>>
>> At least I can't seem to figure out how this test is releated to
>> http://jira.codehaus.org/browse/MSUREFIRE-110 and how other tests
>> seem to be ok.
>>
>> Not sure what you discovered.
>
> The comment to the issue may help -
> http://jira.codehaus.org/browse/MSUREFIRE-110#action_65652. The error
> turns up on Windows when CLASSPATH contains a path that in turn
> contains spaces. While a serialized object is restored (with the
> serialization-incompatible classpath), the exception is thrown that
> forced me to disable the test. Since M2 keeps its own repository in
> %USERPROFILE%/.m2/repository that does contain spaces (C:\Documents
> and Settings\...) and the surefire plugin doesn't normalize the
> classpath entries, the test blows up.

That's the part that i don't get.  We don't write the serialized form  
to a file, it's all in memory.  And we serialize in tons of places,  
so why would it fail here?

You might try having the tests fork and see if that doesn't help.  We  
definitely need to get this test back in.

-David