Uploaded image for project: 'JBoss Naming'
  1. JBoss Naming
  2. JBNAME-61

Remote JNDI lookup failure with sun.io.serialization.extendedDebugInfo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 5.0.3.GA
    • jnp-client
    • None
    • Hide

      Start a JNDI server (such as the one embedded in JBoss AS).
      Run the following from a standalone client:

      System.setProperty ( "sun.io.serialization.extendedDebugInfo", "true" );

      Properties p = new Properties ();
      p.put ( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
      p.put ( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
      p.put ( Context.PROVIDER_URL, "jnp://127.0.0.1:1099" );
      p.put ( "jnp.disableDiscovery", "true" );
      new InitialContext( p ).lookup("foo");

      Show
      Start a JNDI server (such as the one embedded in JBoss AS). Run the following from a standalone client: System.setProperty ( "sun.io.serialization.extendedDebugInfo", "true" ); Properties p = new Properties (); p.put ( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" ); p.put ( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); p.put ( Context.PROVIDER_URL, "jnp://127.0.0.1:1099" ); p.put ( "jnp.disableDiscovery", "true" ); new InitialContext( p ).lookup("foo");

      When the system property sun.io.serialization.extendedDebugInfo is set, a remote lookup fails with the exception:

      java.lang.UnsupportedOperationException
      at org.jnp.interfaces.FastNamingProperties.toString(FastNamingProperties.java:175)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
      at javax.naming.CompoundName.writeObject(CompoundName.java:541)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
      at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)

              rhn-support-dereed Dennis Reed
              rhn-support-dereed Dennis Reed
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: