java.net.MalformedURLException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Jacek Laskowski,
  • Re: LTS 1.424.1 RC
    via by vjuranek,
  • MC4J JMX Console
    via mc4j by irinaberd
    ,
    • 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)

    Users with the same issue

    Hiren Amaliyar
    1 times, last one,
    Aravind
    1 times, last one,
    mist69
    2 times, last one,
    pulse00
    3 times, last one,
    Unknown visitor1 times, last one,
    93 more bugmates