This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Getting a SocketOrChannelConnectionImpl in Weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Getting a SocketOrChannelConnectionImpl in Weblogic" Watch "Getting a SocketOrChannelConnectionImpl in Weblogic" New topic
Author

Getting a SocketOrChannelConnectionImpl in Weblogic

Thilak Prakash
Greenhorn

Joined: May 11, 2007
Posts: 5
Here is a simple ejb program.

Remote interface

import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.rmi.Remote;
public interface Hello extends EJBObject
{
public String hello() throws java.rmi.RemoteException;
}

Home interface

import javax.ejb.*;
import java.rmi.RemoteException;
public interface HelloHome extends EJBHome {
Hello create() throws RemoteException, CreateException;
}

HelloBean

import java.rmi.RemoteException;

import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

public class HelloBean implements SessionBean {
public void ejbCreate(){
System.out.println("ejbCreate()");
}
public void setSessionContext(SessionContext ctx) throws EJBException,
RemoteException {
System.out.println("setSessionContext()");
}
public void ejbRemove() throws EJBException, RemoteException {
System.out.println("ejbRemove");
}
public void ejbActivate() throws EJBException, RemoteException {
System.out.println("ejbActivate()");
}
public void ejbPassivate() throws EJBException, RemoteException {
System.out.println("ejbPassivate()");
}
public String hello(){
System.out.println("hello()");
return "Hello, World";
}
}

Client

import javax.ejb.*;
import javax.naming.*;
import java.rmi.*;
import java.util.Properties;

public class HelloClient {

public static void main(String[] args) {
try{
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
HelloHome home = (HelloHome) ctx.lookup("HelloBean");
Hello hello = home.create();
System.out.println(hello.hello());
hello.remove();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

Ive created the jar file in weblogic 8.1. And deployed it sucessfully. The jndi name matches the one in the client program and weblogic builde. Tried to run HelloClient.
I get the following error. Here is the error message.

com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)

And goes on in an infinite loop.
The same program works on sun application server 8.2 but not on weblogic 8.1. Please help.
[ May 14, 2007: Message edited by: Mark Spritzler ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Moving this thread to the Weblogic forum. This seems to be Weblogic specific.

Also please name your threads appropriate to what you are asking. Putting something like "Pleaes don't ignore" makes people want to ignore the thread.

Good Luck

Maybe your jndi.properties is pointing to the wrong IP ort.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Thilak Prakash
Greenhorn

Joined: May 11, 2007
Posts: 5
any ideas?
Thilak Prakash
Greenhorn

Joined: May 11, 2007
Posts: 5
I would be grateful if anybody would help me figure out this problem.
 
jQuery in Action, 2nd edition
 
subject: Getting a SocketOrChannelConnectionImpl in Weblogic