[jboss-jira] [JBoss JIRA] (AS7-3799) Problem with a remote EJB: java.io.StreamCorruptedException: invalid stream header: 0000000C

jaikiran pai (JIRA) jira-events at lists.jboss.org
Thu Feb 16 11:51:36 EST 2012


    [ https://issues.jboss.org/browse/AS7-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12667156#comment-12667156 ] 

jaikiran pai commented on AS7-3799:
-----------------------------------

{code}
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
properties.put(Context.PROVIDER_URL, "127.0.0.1:4447"); 
{code}
This code is incorrect. An example of correct code is here https://github.com/jbossas/jboss-as/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/naming/remote/ejb/RemoteNamingEjbTestCase.java#L61.

Michaël, I'm closing this as not a bug since the application code itself is wrong. If you are still running into issues with the correct code and if you are sure it's a bug, then please reopen this JIRA with more details. If you are unsure whether it's a bug, then feel free to open a forum discussion here https://community.jboss.org/community/jbossas7?view=discussions.


                
> Problem with a remote EJB: java.io.StreamCorruptedException: invalid stream header: 0000000C
> --------------------------------------------------------------------------------------------
>
>                 Key: AS7-3799
>                 URL: https://issues.jboss.org/browse/AS7-3799
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 7.1.0.Final
>            Reporter: Michaël Mathieu
>            Assignee: jaikiran pai
>
> Properties properties = new Properties();
> properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
> properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");      
> properties.put(Context.PROVIDER_URL, "127.0.0.1:4447");      
> Context ctx = new InitialContext(properties);       
> ITestTransactionRemote beanEJB3 = (ITestTransactionRemote) ctx.lookup("TestTransactionBean/remote");
> That generates:
> javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:4447 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server /127.0.0.1:4447 [Root exception is java.io.StreamCorruptedException: invalid stream header: 0000000C]]
> 	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763)
> 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)
> 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
> 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
> 	at com.sicpa.training.ejb.CallEJB.main(CallEJB.java:38)
> Caused by: javax.naming.CommunicationException: Failed to retrieve stub from server /127.0.0.1:4447 [Root exception is java.io.StreamCorruptedException: invalid stream header: 0000000C]
> 	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:327)
> 	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)
> 	... 4 more
> Caused by: java.io.StreamCorruptedException: invalid stream header: 0000000C
> 	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
> 	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
> 	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:312)
> 	... 5 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jboss-jira mailing list