You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2007/01/08 20:55:27 UTC

[jira] Closed: (OPENEJB-263) Tests fail with 'java.net.MalformedURLException: no protocol: and'

     [ https://issues.apache.org/jira/browse/OPENEJB-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-263.
---------------------------------


> Tests fail with 'java.net.MalformedURLException: no protocol: and'
> ------------------------------------------------------------------
>
>                 Key: OPENEJB-263
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-263
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 2.0
>            Reporter: Jacek Laskowski
>         Assigned To: Jacek Laskowski
>             Fix For: 2.0
>
>
> Some tests are failing because of a way surefire handles CLASSPATH with spaces. These entries are not normalized and RMIClassLoader barfs.
> According to http://java.sun.com/j2se/1.4.2/docs/api/java/rmi/MarshalledObject.html, during the serialization (MarshalledObject.get) an object is annotated with information that's necessary for deserialization. Upon closer look, during debugging session, I've noticed that java.rmi.server.RMIClassLoader is provided with the value of null for codebase parameter in Maven1 while codebase is set to the entire test classpath in M2. Since it contains entires separated with spaces, any directory with spaces is divided inappropriately leading to the above exception. 
> See http://svn.xbean.codehaus.org/browse/xbean/trunk/kernel/src/test/java/org/xbean/kernel/ServiceStateTest.java?r1=135&r2=160&u=-1&ignore=&k=
> See http://www.nabble.com/-M2--Failing-*one*-test-in-the-kernel-module-p3028412.html
> According to Dain's comment in the first See, a solution would be to register an RMI ClassLoader (e.g. org.xbean.rmi.RMIClassLoaderSpiImpl) which should be done at jvm startup. 
> Tests run: 7, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.547 sec <<< FAILURE!
> testHomeInterface(org.openejb.deployment.slsb.StatelessClientContainerTest)  Time elapsed: 0.015 sec  <<< ERROR!
> java.net.MalformedURLException: no protocol: and
>         at java.net.URL.<init>(URL.java:537)
>         at java.net.URL.<init>(URL.java:434)
>         at java.net.URL.<init>(URL.java:383)
>         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:631)
>         at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
>         at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
>         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
>         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
>         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
>         at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
>         at org.openejb.proxy.SerializationHandler.copyObj(SerializationHandler.java:95)
>         at org.openejb.proxy.EJBMethodInterceptor.copyReturnToSourceCL(EJBMethodInterceptor.java:241)
>         at org.openejb.proxy.EJBMethodInterceptor.intercept(EJBMethodInterceptor.java:154)
>         at org.openejb.proxy.SessionEJBHome$$EnhancerByCGLIB$$9a416c9f.create(<generated>)
>         at org.openejb.deployment.slsb.StatelessClientContainerTest.testHomeInterface(StatelessClientContainerTest.java:101)

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