exception occurred during first invocation java.net.SocketException: Connection reset
chandramoulee18 Mar 29, 2013 9:13 AMHi,
I' m new in Jboss. I've created a JPA project using -
1. Jboss 6.0
2. Eclipse Helios
3. Oracle 10g Database.
The JPA is successfully deployed in Jboss AS. But, when I'm trying to invoke the remote class from my local client, I'm getting below error -
18:12:28,436 INFO [AbstractServer] JBossAS [6.0.0.M1 (build: SVNTag=JBoss_6_0_0_M1 date=200912040958)] Started in 1m:3s:516ms
18:12:44,936 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4622] exception occurred during first invocation
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.refill(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.read(Unknown Source)
at java.io.ObjectInputStream.read(Unknown Source)
at org.jboss.remoting.transport.socket.ServerThread.readVersion(ServerThread.java:1081)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
18:16:23,423 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4647] exception occurred during first invocation
java.io.EOFException
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:717)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
18:17:26,112 INFO [SessionSpecContainer] Stopping jboss.j2ee:ear=CartStateFull.ear,jar=CartStateFullEJB.jar,name=CartBean,service=EJB3
18:17:26,174 INFO [EJBContainer] STOPPED EJB: javaee.ejb.CartBean ejbName: CartBean
18:17:41,065 ERROR [ServerThread] WorkerThread#0[127.0.0.1:4653] exception occurred during first invocation
java.io.EOFException
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:717)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
Here is my client code -
<all required Imports>
public class RosterClient {
private static RosterRequest request;
/**
* @param args
*/
public static void main(String[] args) {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL,"localhost:1099");
InitialContext ctx;
try {
ctx = new InitialContext(props);
System.out.println((ctx==null)? "InitialContext is null" : "InitialContext is not null");
request = (RosterRequest) ctx.lookup("RosterRequestBean/remote");
} catch (NamingException e) {
e.printStackTrace();
}
catch(Exception e)
{
e.printStackTrace();
}
}
Can any one please help me on this? I'm not getting the cause for this exception. Please Help.