java.net.MalformedURLException: no protocol: and

openejb-dev | Jacek Laskowski | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 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)

    Apache's JIRA Issue Tracker | 1 decade ago | Jacek Laskowski
    java.net.MalformedURLException: no protocol: and
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.MalformedURLException

      no protocol: and

      at java.net.URL.<init>()
    2. Java RT
      MarshalledObject.get
      1. java.net.URL.<init>(URL.java:567)
      2. java.net.URL.<init>(URL.java:464)
      3. java.net.URL.<init>(URL.java:413)
      4. sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
      5. sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:147)
      6. java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
      7. java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
      8. sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
      9. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
      10. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
      11. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
      12. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
      13. java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
      14. java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      14 frames
    3. OpenEJB :: Server :: Client
      ThrowableArtifactTest.testThrowableArtifact
      1. org.openejb.client.ThrowableArtifactTest.marshal(ThrowableArtifactTest.java:67)
      2. org.openejb.client.ThrowableArtifactTest.testThrowableArtifact(ThrowableArtifactTest.java:40)
      2 frames