Stand-alone JNDI lookup of an EJB in an Enterprise Application (EAR) build
Hi All,
I am having some difficulty doing JNDI look up an EJB 3.0 Bean that is part of an Enterprise Application (EAR) build. Below are all the related codes:
package ejb;
import javax.ejb.Local;
@Local
public interface Hello1Local {
public String getHello1();
package ejb;
import javax.ejb.Stateless;
@Stateless
public class Hello1Bean implements Hello1Local {
public String getHello1() {
return "I am Hello1 Bean!";
package ejb;
import javax.ejb.Remote;
@Remote
public interface Hello2Remote {
public String getHello2();
package ejb;
import javax.ejb.Stateless;
import javax.ejb.EJB;
@Stateless
@EJB(name="ejb/Hello1",
beanInterface=Hello1Local.class,
beanName="Hello1Bean")
public class Hello2Bean implements Hello2Remote {
@EJB private Hello1Local hello1bean;
public String getHello2() {
return hello1bean.getHello1();
There is no problem looking up Hello2 Bean using an Application Client such as the following:
public class LocalHelloApplicationClient {
@EJB(name="Hello2")
private static Hello2Remote hello2Bean;
public static void main(String[] args) {
System.out.println("hello2Bean.getHello2(): " + hello2Bean.getHello2());
}There is also no problem doing JNDI lookup (from a Stand-Alone Client the same bean if both Hello1 and Hello2 were created by themselves. ie not part of an Enterprise Application (EAR) build. However, I am wondering whether it is possible to do JNDI lookup of the same bean (Hello2) that is part of an Enterprise Application (EAR) built. Below are the type of JNDI lookup entries that I have tried without success:
public class StandalonePojoCallHelloWorld {
public static void main(String [] args)
try
InitialContext jndiContext = new InitialContext();
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("ejb.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.Hello2.remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.ejb.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.Hello2Remote");
or
Hello2Remote hello2Bean = (Hello2Remote) jndiContext.lookup("LocalHelloEnterpriseApplication.LocalHelloEnterpriseApplication-ejb.Hello2Remote");
System.out.println("hello2Bean.getHello2(): " + hello2Bean.getHello2());
catch (javax.naming.NamingException ne)
ne.printStackTrace();
They all came up with the same error message:
javax.naming.NameNotFoundException: LocalHelloEnterpriseApplication.LocalHelloEnterpriseApplication-ejb.Hello2Remote not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
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)Any suggestion would be appreciated.
Thanks,
Jack
Hello
I've somme problems to get access to ejb interface from remote stand-alone client.
Here is my EJB code :
package stateless;
import javax.ejb.Stateless;
@Stateless(name = "TestSB", mappedName = "ejb/stateless/TestSB")
public class TestEJBBean implements TestEJBRemote {
public String getMessage() {
return "Hello EJB World";
}And the remote interface :
package stateless;
import javax.ejb.Remote;
@Remote
public interface TestEJBRemote {
String getMessage();
} In client side, i just edit main.java like this :
package testclient;
import java.io.FileInputStream;
import java.util.Properties;
import javax.naming.InitialContext;
import stateless.TestEJBRemote;
public class Main {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
props.load(new FileInputStream("jndi.properties"));
InitialContext ctx = new InitialContext(props);
TestEJBRemote testEJB = (TestEJBRemote) ctx.lookup("ejb/stateless/TestSB");
System.out.println(testEJB.getMessage());
}here is my jndi.properties file (my glassfish server IP is 192.168.0.10) :
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
org.omg.CORBA.ORBInitialHost = 192.168.0.10
org.omg.CORBA.ORBInitialPort = 3918when i run client on the same machine than the glassfish app server, it works fine.
But i run it on the different machine than the glassfish app server (on the same LAN without firewall), it fails with this error message :
eclan@eclan-laptop:~/NetBeansProjects/TestClient$ java -jar dist/TestClient.jar
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3918"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4038"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4138"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3918"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4038"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
24 août 2008 09:53:05 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 4138"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at testclient.Main.main(Main.java:14)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 13 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 14 more
eclan@eclan-laptop:~/NetBeansProjects/TestClient$ THANKS YOU FOR YOUR HELP
Justin
Similar Messages
-
EJB Modul: SAP Enterprise Connector, configuring build path
Hello,
first of all I'm using SAP NW CE.
I created an 2 Development Components, an EJB Module and a Enterprise Application(EAR). In the EJB Module I use the SAP Enterprise Connector to generate Java Proxy Classes to do RFC calls.
In the EAR-DC I add in Properties-->J2EE Module Dependencies the needed jar-files. And in the EJB-DC I reference this.
When I don't work with DCs and I create a "normal" EJB and EAR project that is the way it works.
But with DCs I have a problem when I want to build the DC. I have this error:
package com.sap.aii.proxy.framework.core does not exist
So the build-process don't realize the J2EE Module Dependencies. How can I solve this problem?
Regards,
ArminDid you mean the Development Infrastructure Perspective? If yes I don't find DC -> DC Metadata -> DC Definitino -> Right-click Used DCs -> Add Used DC... if I browse through my DC.
Apart from that I don't want to reference DCs as I write above. I want to reference only jar-files. Because the DCs com.sap.aii.proxy.framework, com.sap.aii.util..misc and com.sap.mw.jco are deprecated. And if I reference DCs I have to use this DCs to use the proxy classes made by the SAP Enterprise Connector. So I want to reference the jar-files where the needed source isn't deprecated.
By the way I use SAP NW CE. -
Stand-alone client - lookup problem
I have a stand-alone Java client application (ContactClient) that I want to use to access an EJB called Contact. I am using J2EE, deploying with deploytool. The EJB has a JNDI name of "MyContact", and the Client reference is "ejb/TheContact". The relevant code in the app is:
try
java.util.Properties props = new java.util.Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.cosnaming.CNCtxFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:1050");
Context initial = new InitialContext(props);
Object objref = initial.lookup("ejb/TheContact");
ContactHome home =
(ContactHome)PortableRemoteObject.narrow(objref,
ContactHome.class);
contact = home.create();
catch (Exception ex)
System.err.println("Exception: " + ex.getMessage());
ex.printStackTrace();
The following exception is thrown by initial.lookup("ejb/TheContact");
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
I have tried changing the name to "TheContact", and to "java:comp/env/TheContact" with no success. If I change it to the JNDI name "MyContact", the lookup works, but the following call, PortableRemoteObject.narrow(), throws a java.lang.ClassCastException.
What am I doing wrong?
JohnHi, Thanks for your fast reply, but it still doesn't work.
With your Code I get a classCastException in this line:
"SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");"
Here is the code from the whole thing, as it works with the appclient script:
SessionHome: //RemoteHomeInterface
package ejb;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
public interface SessionHome extends EJBHome {
Session create() throws RemoteException, CreateException;
Session //Session RemoteInterface
package ejb;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface Session extends EJBObject {
public String getString() throws RemoteException;
SessionBeanInstance //The SessionBean
package ejb;
import javax.ejb.SessionBean;
import javax.ejb.CreateException;
import javax.ejb.SessionContext;
public class SessionBeanInstance implements SessionBean{
public SessionContext context;
public String getString(){ return "works"; }
public SessionBeanInstance() { }
public void ejbCreate() throws CreateException { System.out.println("Bean created"); }
public void ejbActivate() { }
public void ejbPassivate() { }
public void ejbRemove() { }
public void setSessionContext(SessionContext ctx) { context = ctx; }
clientMain //The client class
package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.NamingEnumeration;
import javax.rmi.PortableRemoteObject;
import ejb.*;
import java.util.Hashtable;
public class clientMain {
private SessionHome home;
private Session mySession;
private Context ctx;
private Object objref;
public clientMain() {
try{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL, "iiop://127.0.0.1:3700");
try{
Context ctx = new InitialContext(env);
SessionHome home = (SessionHome)ctx.lookup("SessionBeanInstance");
Session remote = (Session)home.create();
String test = remote.getString();
System.out.println(test);
catch(Exception e){ e.printStackTrace(); }
catch (Exception ex) {
System.err.println("Caught an exception.");
ex.printStackTrace();
The error occurs only if is start with the "java -jar" script. Here is the error:
lang.ClassCastException: com.sun.corba.se.impl.corba.CORBAObjectImpl
at client.clientMain.<init>(clientMain.java:27)
at client.Client.main(Client.java:10)
I don't know what to do, to get it work... -
Doing a jndi lookup() for an EJB deployed on Glassfish v3
Hello.
I have deployed a Stateful Sesion EJB on a Glassfish v3 AppServer.
It is running under 'localhost' on my laptop pc.
I am also running a stand-alone java application on the same pc... it attempts to get a remote connection from the client-app to the Glassfish Server and then do a jndi lookup() to get a reference to my EJB.
here is the client source code:
public class LookupTest {
static Properties props = null;
public static void main(String[] args) {
try {
props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
props.put(Context.PROVIDER_URL, "iiop://localhost:3700");
Context ctx = new InitialContext(props);
System.out.println( "the context is: " + ctx);
System.out.println( "the environment contains: " + ctx.getEnvironment() );
System.out.println( " ");
// do a lookup.
Object elementObj = ctx.lookup("SerialContextProvider");
System.out.println(elementObj);
} catch (NamingException e) {
e.printStackTrace();
When I run this app, there are no Errors or Exceptions. It appears that the connection succeeds. But there are no EJB references in the context that is created. The only item that seems to be present in the context is an item named "SerialContextProvider", as noted in the return value from a list("") method invocation. Why can i not see the EJB within the context? Is my code wrong ??
Thanks,
Andy Jerpe
Edited by: user1169567 on Nov 28, 2010 12:12 PMOk, but the communication seems to be OK over the wire because if I use netstat -a I can see the ESTABLISHED connection with the server in the right RMI port.
TCP PORTAL35:1581 caapiranga:12405 ESTABLISHED
and then when I stop the instance in the OAS, the client shows an exception telling that the connection was lost.
An curious thing is that the ons.log doesn't log this connection ;/ -
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my web
service with a declarative security model by implementing steps provided in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. When prompted
to accept the digital certificate, click Yes, when prompted for network
authentication information, enter username and password, navigate to the
Test Form tab of Test View, invoke the method by clicking the button and I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I tested my
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order to get
that working. Has anyone seen similar behavior? Is there a known resolution?
Or a suggested way to work around the problem?
Thank you.
AndreAndre,
It would be best if this issue is handled as an Eval Support case. Please
BEA Customer Support at http://support.beasys.com along with the required
files, and request that an Eval support case be created for this issue.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Anurag,
I removed "t3", still get an error but a different one (Unable to create
InitialContext:null):
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB[Unable to
create InitialContext:null] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetVisaHistoryTransactions.getVisaHistoryTxn(GetVisaHistoryTransactions
.jws:67) </jwErrorDetail>
</detail>
</error>
Note: inter-domain communication is configured properly. The Web Service to
remote EJB works fine without a declarative security.
Any other ideas?
Thank you for your help.
Andre
"Anurag" <[email protected]> wrote in message
news:[email protected]...
Andre,
It seems you are using the URL
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB
whereas you should not be specifying the "t3:" protocol.
The URL should be like
jndi://secuser1:[email protected]:7131/AccountDelegatorEJB
Please do let me know if you see any issues with this.
Note that this will only allow you to access remote EJBs in the same WLS
domain. For accessing EJBs on another domain, you need to configure
inter-domain communication by
following a few simple steps as mentioned at
http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1106135. This link has
been provided in the EJB Control Workshop documentation.
Regards,
Anurag
"Andre Shergin" <[email protected]> wrote in message
news:[email protected]...
Raj,
I tried that before, it didn't help. I got similar error message:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB]</faultstr
ing>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during JNDI
lookup from
jndi:t3://secuser1:[email protected]:7131/AccountDelegatorEJB[Lookup
failed for
name:t3://secuser1:[email protected]:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260) at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64) </jwErrorDetail>
</detail>
</error>
Anything else should I try?
P.S. AccountDelegatorEJB, the remote EJB my Web Service calls is NOTaccess
restricted.
I hope there is a solution.
Thanks,
Andre
"Raj Alagumalai" <[email protected]> wrote in message
news:[email protected]...
Andre,
Can you try using the following url with username and password
jndi://username:password@host:7001/my.resource.jndi.object ?
once you add webapp level security, the authenticated is the user who
invokes the EJB.
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/ejb/con
CreatingANewEJBControl.html?skipReload=true
has more info on using remote EJB's.
Hope this helps.
Thanks
Raj Alagumalai
WebLogic Workshop Support
"Alla Resnik" <[email protected]> wrote in message
news:[email protected]...
Hello everyone,
I developed a Web Service prototype accessing remote EJB using the EJB
control with special syntax in the jndi-name attribute: @jws:ejb
home-jndi-name="t3://10.10.245.70:7131/AccountDelegatorEJB"
Everything works fine, but I get an error when I restrict access to my
web
service with a declarative security model by implementing steps
provided
in
help doc:
- Define the web resource you wish to protect
- Define which security role is required to access the web resource
- Define which users are granted the required security role
- Configure WebLogic Server security for my web service(Compatibility
Security/Users)
I launch the service by entering the address in a web browser. Whenprompted
to accept the digital certificate, click Yes, when prompted for
network
authentication information, enter username and password, navigate tothe
Test Form tab of Test View, invoke the method by clicking the buttonand
I
get the following exception:
<error>
<faultcode>JWSError</faultcode>
<faultstring>Error during JNDI lookup from
jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookup failed for
name:t3://10.10.245.70:7131/AccountDelegatorEJB]</faultstring>
<detail>
<jwErrorDetail> weblogic.jws.control.ControlException: Error during
JNDI
lookup from jndi:t3://10.10.245.70:7131/AccountDelegatorEJB[Lookupfailed
for name:t3://10.10.245.70:7131/AccountDelegatorEJB] at
weblogic.knex.control.EJBControlImpl.acquireResources(EJBControlImpl.java:27
8) at
weblogic.knex.context.JwsInternalContext.acquireResources(JwsInternalContext
.java:220) at
weblogic.knex.control.ControlHandler.invoke(ControlHandler.java:260)at
ibas.AccountControl.getTransactionHistory(AccountControl.ctrl) at
ibas.GetSecure.retrieveVisaHistoryTxn(GetSecure.jws:64)</jwErrorDetail>
</detail>
</error>
I have a simple Hello method as well in my WebService (which is also
restricted) and it works fine, but remote EJB access doesn't. I testedmy
prototype on Weblogic 7.2 and 8.1 platforms - same result.
Is that a bug or I am missing some additional configuration in order
to
get
that working. Has anyone seen similar behavior? Is there a knownresolution?
Or a suggested way to work around the problem?
Thank you.
Andre -
JNDI Lookup of ConnectionFactory fails from inside Glassfish application
This may very well end up being a glassfish specific question.
I've got a stand-alone WAR using JSF, where I have a backing bean use some helper objects that will send a JMS message. When this WAR is running from inside of Glassfish, it fails to do the lookup of the ConnectionFactory.
The application pulls the Queue JNDI and the Provider URL from a database, and uses a env Hashtable to do the JNDI InitialContext (which succeeds.) Using this Context, the ConnectionFactory lookup fails.
The remote server in this instance is WebLogic 9.2 (the JNDI is publically available with no user authentication, verified with a JMS developer tool we use internally.)
Here's the stacktrace...
2007-10-15 19:48:04,514 ERROR [net.acadiasoft.shared.jms.util.JMSSenderHelper:130] NamingException: messageFactory not found
javax.naming.NameNotFoundException: messageFactory not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:339)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at net.acadiasoft.shared.jms.util.JMSSenderHelper.getConnectionFactory(JMSSenderHelper.java:128)
at net.acadiasoft.shared.jms.util.JMSSenderHelper.init(JMSSenderHelper.java:58)
at net.acadiasoft.shared.jms.util.JMSSenderHelper.<init>(JMSSenderHelper.java:36)
at net.acadiasoft.web.shared.jms.util.AdminJmsHelper.<init>(AdminJmsHelper.java:19)
at net.acadiasoft.web.server.pages.SchedulerBackingBean.deleteJobs(SchedulerBackingBean.java:75)I've found the problem, and it's something I simply overlooked. I don't know why I didnt realize, but i was setting the java.naming.factory.initial env variable to what Glassfish uses, not WebLogic.
-
How a stand-alone java client to access EJB?
I have problems to access a ejb.
====================================
client code:
Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty (Context.PROVIDER_URL,"IIOP://127.0.0.1:1050");
System.err.println("Attempting to create context...");
Context init = new InitialContext( prop );
Object obj = init.lookup("hi_bean");
hihome home =(hihome)PortableRemoteObject.narrow(obj, hihome.class);
hi c= home.create();
System.out.println(c.greeting());
====================================================
in Dos. I have the following command:
java -Dorg.com.CORBA.ORBInitialHost=127.0.0.1 hiclient
I already open the EJB application on J2EE server on port 80, but run hiclient
in dos, it has ClassCastException coming from the code :
hihome home =(hihome)PortableRemoteObject.narrow(obj, hihome.class);
dose anyone have any ideas about this?
ThanksCheck the JNDI name specified in the xml file.
Hope this will help
Ashish Mangla -
Servlet jndi lookup to remote EJB, servlet and EJB not in the same application
Hi,
I think that the subject explain my problem.
I have Oracle IAS9i 9.0.2.0.0, and JDeveloper 9.0.2.829
I have deployed and EJB in IAS9i and i want to use from the developer machines, which have JDeveloper.
how can i to do remote calls from JDeveloper?.
I have modifed the orion-application.xml, and added remote=true.
I have modifed the rmi.xml and added the hosts where the Jdeveloper placed.
Any ideas?
Thanks and cheers
P.D The app server and jdeveloper are in the same net.
if it is posible replys me to [email protected] too.Steps to access a remote EJB from within OC4J
++++++++++++++++++++++++++++++++++++++++++++++
1) Deploy EJB application (ApplicationRemote) to remote container (REMOTE)
"java -jar admin.jar -deploy ormi://REMOTE.hostname:REMOTE.port REMOTE.username REMOTE.password -deploy -file ApplicationRemote.ear
-deploymentName ApplicationRemote"
2) Ensure that local application (ApplicationLocal) has ejb-ref tags for remote EJBs accessed (in web.xml or ejb-jar.xml)
3) Deploy to local container (LOCAL) an empty application (ApplicationEmpty) with the same name as the remote application (ApplicationRemote)
"java -jar admin.jar -deploy ormi://LOCAL.hostname:LOCAL.port LOCAL.username LOCAL.password -deploy -file ApplicationEmpty.ear -deploymentName
ApplicationRemote"
5) Deploy local application (ApplicationLocal) to local container (LOCAL)
"java -jar admin.jar -deploy ormi://LOCAL.hostname:LOCAL.port LOCAL.username LOCAL.password -deploy -file ApplicationLocal.ear -deploymentName
ApplicationLocal"
4)Restart local container
ApplicationEmpty should consist of just an application.xml file - no modules. The same file can be deployed with different application names for all the remote
applications that must be accessed.
ApplicationLocal should access the remote EJB by using the following JNDI properties
java.naming.factory.initial = "com.evermind.server.rmi.RMIInitialContextFactory"
java.naming.provider.url = "ormi://REMOTE.hostname:REMOTE.port/ApplicationRemote"
java.naming.security.principal = "REMOTE.username"
java.naming.security.credentials = "REMOTE.password"
regards
Debu Panda -
EJB 3.0 JNDI lookup gives ClassCastException
The object returned by the JNDI lookup of a EJB 3.0 Statefull Session Bean is not of the expected type, but rather of an obviously generated Proxy type (ejb_DistributionProcessor_LocalProxy_4h350 instead of expected DistributionProcessor). Does anybody have any idea about what this could be?
Details:
We are using annotations @Statefull and @Local and are deploying on a standalone OC4J 10.1.3.1. The beans are presumably loaded correctly since they get listed in Enterprise Managers list of beans for the application. There is also obviously an object at the desired JNDI location, presumably some kind of proxy. Unfortunately the proxy cannot be cast to the original type making the retrieved object useless.
I can supply more details if necessary, but really don't know what more is relevant.Well, I figured it out, it seems I had the classes in both the EJB and the WEB deployment, so when casting it tried to cast X from EJB to X from WEB application and since they reside in different locations they weren't the same file and therefore not castable.
-
Local jndi lookup - present in 1 appln, lookup in 2nd appln (same server)
Hi,
I have deployed 2 applications ( A.ear, B.ear ) on the same server.
There is ejb( has only local interface no remote interface ) which is present in A.ear.
Now I want to do a local jndi lookup of the ejb in 2nd application (B.ear )
Can we do this in weblogic ? Any ideas
I have an annotation like this in the ejb :
@Stateless(name = "DisConfigManager", mappedName = "DisConfigManagerImpl")
@Local
Regards,
HarshaHarsha,
I'm not very knowledgeable on granular details of the EJB specification, but I don't think local ejbs are accessible to other applications.
Consider this snippet from this old OReilly link:
http://onjava.com/pub/a/onjava/2004/11/03/localremote.html
Before you start running to implement local client view into your application, you need to be aware of some restrictions. Local client view can only be accessed:
When enterprise beans are packaged within the same EJB-JAR package.
When enterprise beans are packaged within different EJB-JAR packages, but everything is still packaged within the same application's EAR package.
When a web component in a WAR file is packaged within the same application's EAR package.
Local client view cannot be accessed:
When an EJB or web component is packaged in a different application's EAR packages.
When a web component is deployed in a web container, and EJBs are deployed in an EJB container, and these containers are separated (even if they are running on the same machine). -
Hi all,
I have 3 ear projects and 1 utility project.
1- utility jar
1- EJB
1- Web UI client for ejb
1 - MDB client for ejb
i am able to compile with out errors and started the server successfully.
As i go through the application and when i look up for the ejb bean i am getting the following error.
[10/12/07 16:41:27:035 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_0.txt
[10/12/07 16:41:27:051 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_0.txt
[10/12/07 16:41:27:066 CDT] 00000021 BeanMetaData E CNTR0075E: The user-provided class "com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_fcba446f" needed by the EnterpriseBean could not be found or loaded.
[10/12/07 16:41:27:332 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_1.txt
[10/12/07 16:41:27:379 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_1.txt
[10/12/07 16:41:27:691 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_2.txt
[10/12/07 16:41:27:707 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_2.txt
[10/12/07 16:41:27:723 CDT] 00000021 EJBContainerI E WSVR0068E: Attempt to start EnterpriseBean PerConfinementEARProject#PerConfinementEJBProject.jar#PerConfinementService failed with exception: com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance; nested exception is:
java.lang.ClassNotFoundException: com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_c3c0b315
at com.ibm.ejs.container.BeanMetaData.<init>(BeanMetaData.java:1433)
at com.ibm.ws.runtime.component.EJBContainerImpl.createBeanMetaData(EJBContainerImpl.java:1956)
at com.ibm.ws.runtime.component.EJBContainerImpl.createDeferredBeanMetaData(EJBContainerImpl.java:4600)
at com.ibm.ws.runtime.component.EJBContainerImpl.access$000(EJBContainerImpl.java:435)
at com.ibm.ws.runtime.component.EJBContainerImpl$3.run(EJBContainerImpl.java:4399)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.runtime.component.EJBContainerImpl.initializeDeferredEJB(EJBContainerImpl.java:4396)
at com.ibm.ejs.container.HomeOfHomes.getHome(HomeOfHomes.java:345)
at com.ibm.ejs.container.HomeOfHomes.internalCreateWrapper(HomeOfHomes.java:481)
at com.ibm.ejs.container.EJSContainer.createWrapper(EJSContainer.java:4278)
at com.ibm.ejs.container.WrapperManager.faultOnKey(WrapperManager.java:528)
at com.ibm.ejs.util.cache.Cache.findAndFault(Cache.java:496)
at com.ibm.ejs.container.WrapperManager.keyToObject(WrapperManager.java:481)
at com.ibm.ejs.oa.EJSOAImpl.keyToObject(EJSOAImpl.java:553)
at com.ibm.ejs.oa.EJSRootOAImpl.keyToObject(EJSRootOAImpl.java:271)
at com.ibm.rmi.corba.ObjectManager.lookupServant(ObjectManager.java:104)
at com.ibm.CORBA.iiop.ServerDelegate.getServant(ServerDelegate.java:302)
at com.ibm.rmi.iiop.ORB.lookupLocalObject(ORB.java:591)
at com.ibm.CORBA.iiop.ORB.lookupLocalObject(ORB.java:1446)
at com.ibm.rmi.iiop.CDRInputStream.newObjRef(CDRInputStream.java:1298)
at com.ibm.rmi.iiop.CDRInputStream.read_Object(CDRInputStream.java:1275)
at com.ibm.rmi.iiop.CDRInputStream.read_Object(CDRInputStream.java:1239)
at com.ibm.rmi.corba.IorURL.iorbytesToObjref(IorURL.java:107)
at com.ibm.rmi.corba.IorURL.resolve(IorURL.java:95)
at com.ibm.rmi.corba.ORB.objectURLToObject(ORB.java:3677)
at com.ibm.CORBA.iiop.ORB.objectURLToObject(ORB.java:3227)
at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:3578)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:2154)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1895)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:599)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2215)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:536)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4351)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1901)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at com.bcbsmn.claims.perconf.managedbean.SearchBean.search(SearchBean.java:315)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Caused by: java.lang.ClassNotFoundException: com.bcbsmn.claims.perconf.ejb.EJSStatelessPerConfinementServiceHomeBean_c3c0b315
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:472)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:373)
at java.lang.ClassLoader.loadClass(ClassLoader.java:561)
at com.ibm.ejs.container.BeanMetaData.loadExistedClass(BeanMetaData.java:3763)
at com.ibm.ejs.container.BeanMetaData.<init>(BeanMetaData.java:1329)
... 71 more
[10/12/07 16:41:27:973 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_3.txt
[10/12/07 16:41:27:988 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.27_3.txt
[10/12/07 16:41:28:238 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_0.txt
[10/12/07 16:41:28:254 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_0.txt
[10/12/07 16:41:28:504 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_1.txt
[10/12/07 16:41:28:519 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_1.txt
[10/12/07 16:41:28:754 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_2.txt
[10/12/07 16:41:28:848 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.28_2.txt
[10/12/07 16:41:29:066 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.29_0.txt
[10/12/07 16:41:29:113 CDT] 00000021 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\Program Files\ibm\SDP70\runtimes\base_v61\profiles\AppSrv02\logs\ffdc\server1_7dc27dc2_07.10.12_16.41.29_0.txt
[10/12/07 16:41:29:113 CDT] 00000021 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookupExt
Context name: BCBSMN79477Node02Cell/nodes/BCBSMN79477Node02/servers/server1
Target name: com/bcbsmn/claims/perconf/PerConfinementService
Other data: ""
Exception stack trace: javax.naming.NamingException: Error during resolve [Root exception is org.omg.CORBA.portable.UnknownException: vmcid: 0x0 minor code: 0 completed: Maybe]
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1939)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1862)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1552)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1354)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:172)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at com.bcbsmn.claims.perconf.managedbean.SearchBean.search(SearchBean.java:315)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:298)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:412)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Caused by: org.omg.CORBA.portable.UnknownException: vmcid: 0x0 minor code: 0 completed: Maybe
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolveUnresolvedBinding(WsnOptimizedNamingImpl.java:2193)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.resolve_binding(WsnOptimizedNamingImpl.java:1895)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:599)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2215)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:536)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:4351)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1901)
... 38 moreCan any body tell me what's wrong with it? i have seen all the stubs generated it is looking for but not able to load/recognize it? And also i need to mention other problem is that everytime i compile, deploy and start the server i am getting open failure exception and server not recognizing the ejb jar and if i close and restart the RSA server starts well.
Pls help me in solving this issue.Hi All
Two separate webapps, have different names for
Datasources, on the same host and port. Both
application work fine independently.
When we deploy both applications on the same app
server(websphere), whichever we executes first gets
its datasource from JNDI lookup and works fine, but
when we try second application it have problem in
finding its data source from JNDI lookup. If we start
this second application first, it will work fine, but
now another will have the same problem in its JNDI
lookup.
Any idea why.
Thanks
....RanvirHi Ranvir,
Do you mean you try to reach the same datasource with different names or do you try to reach different datasources over the same port?
If you try the first issue you shouldn't get any trouble. At least it works fine with JBOSS for example.
But if you try to do the latter in my oppinion you don't have a JNDI problem but a problem with socket binding: the two different databases must be contacted over different ports.
What do WebSphere's logs tell?
Best regards
Andy -
JNDI lookup on clustered server
I am very new to clustering Weblogic servers, and I'm lost. Here is what my config.xml
file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<Domain ConfigurationVersion="8.1.0.0" Name="mydomain">
<Cluster MulticastAddress="237.0.0.1" MulticastPort="8035" Name="DomainCluster"/>
<Server ListenAddress="" ListenPort="8031" Machine="Machine1"
Name="DomainAdmin" NativeIOEnabled="true" ServerVersion="8.1.0.0" StdoutEnabled="false">
<SSL Enabled="true" HostnameVerificationIgnored="false"
IdentityAndTrustLocations="KeyStores" ListenPort="8032" Name="DomainAdmin"/>
<Log FileCount="1" FileTimeSpan="72" Name="DomainAdmin"
NumberOfFilesLimited="true" RotationType="byTime"/>
</Server>
<Server IIOPEnabled="false" ListenPort="80" Machine="Machine1"
Name="DomainProxy" NativeIOEnabled="true" StdoutEnabled="false">
<SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
ListenPort="443" Name="DomainProxy"/>
<Log FileCount="1" FileTimeSpan="72" Name="DomainProxy"
NumberOfFilesLimited="true" RotationType="byTime"/>
<ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="100"/>
</Server>
<Server Cluster="DomainCluster" DomainLogFilter="DomainLogFilter"
IIOPEnabled="true" ListenPort="8035" Machine="Machine1"
Name="DomainAppServer1a" NativeIOEnabled="true"
ServerVersion="8.1.1.0" StdoutEnabled="false">
<SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
ListenPort="8036" Name="DomainAppServer1a"/>
<Log FileCount="1" FileTimeSpan="72" Name="DomainAppServer1a"
NumberOfFilesLimited="true" RotationType="byTime"/>
<ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="50"/>
</Server>
<Server Cluster="DomainCluster" DomainLogFilter="DomainLogFilter"
IIOPEnabled="false" ListenPort="8037" Machine="Machine1"
Name="DomainAppServer1b" NativeIOEnabled="true" StdoutEnabled="false">
<SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
ListenPort="8038" Name="DomainAppServer1b"/>
<Log FileCount="1" FileTimeSpan="72" Name="DomainAppServer1b"
NumberOfFilesLimited="true" RotationType="byTime"/>
<ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="50"/>
</Server>
<MigratableTarget Cluster="DomainCluster"
Name="DomainAppServer1a (migratable)"
Notes="This is a system generated default migratable target for a server.
Do not delete manually." UserPreferredServer="DomainAppServer1a"/>
<MigratableTarget Cluster="DomainCluster"
Name="DomainAppServer1b (migratable)"
Notes="This is a system generated default migratable target for a server.
Do not delete manually." UserPreferredServer="DomainAppServer1b"/>
<UnixMachine Name="Machine1" PostBindGID="domain"
PostBindGIDEnabled="true" PostBindUID="DOMAIN" PostBindUIDEnabled="true">
<NodeManager ListenAddress="" ListenPort="8033" Name="Machine1"/>
</UnixMachine>
<JMSServer Name="DomainJMSServer1a" Store="DomainJMSFileStore1a" Targets="DomainAppServer1a">
<JMSTopic CreationTime="..."
JNDIName="topic.someTopic" Name="someTopic" StoreEnabled="false"/>
</JMSServer>
<JMSServer Name="DomainJMSServer1b" Store="DomainJMSFileStore1b" Targets="DomainAppServer1b"/>
<DomainLogFilter Name="DomainLogFilter" SeverityLevel="1"/>
<Security Name="Domain" PasswordPolicy="wl_default_password_policy"
Realm="wl_default_realm" RealmSetup="true"/>
<EmbeddedLDAP
Credential="..." Name="Domain"/>
<SecurityConfiguration
Credential="..."
Name="Domain" RealmBootStrapVersion="1"/>
<Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
<FileRealm Name="wl_default_file_realm"/>
<PasswordPolicy Name="wl_default_password_policy"/>
<JDBCConnectionPool ConnectionCreationRetryFrequencySeconds="60"
DriverName="oracle.jdbc.driver.OracleDriver" MaxCapacity="5"
Name="domainPOOL" Password="..."
Properties="..." ShrinkFrequencySeconds="18000"
Targets="DomainCluster" TestConnectionsOnCreate="true"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestFrequencySeconds="300" TestTableName="DUAL" URL="..."/>
<JDBCTxDataSource JNDIName="domainSource" Name="domainSource"
PoolName="domainPOOL" Targets="DomainCluster"/>
<Application Name="MyDomain" Path="domain.ear"
StagingMode="nostage" TwoPhase="true">
<EJBComponent Name="domainejb" Targets="DomainCluster" URI="domainEjb.jar"/>
</Application>
</Domain>
As you can, I have two servers configured in my DomainCluster. My EJB, domainejb,
is tied to
this cluster. I can't seem to do a JNDI lookup of this EJB, or the JMS Topic
that I've created.
When I attempt to do the lookup (from a client on the local machine) using the
URL
t3://localhost:8031, I get a NameNotFound Exception. This makes sense, because
the
Admin server isn't a part of the cluster. However, when I do the lookup using
t3://localhost:8035, I get an exception that states that it could not connect
to a host. I have
insured that the server at this port is running, and the EJB is located in it's
JNDI tree.
I am stumped and could really use someone's help. Please advice.
Thanks, Joel
Prasad Peddada <[email protected]> wrote:
>Joel wrote:
>> I am very new to clustering Weblogic servers, and I'm lost. Here is
>what my config.xml
>> file looks like:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Domain ConfigurationVersion="8.1.0.0" Name="mydomain">
>> <Cluster MulticastAddress="237.0.0.1" MulticastPort="8035" Name="DomainCluster"/>
>> <Server ListenAddress="" ListenPort="8031" Machine="Machine1"
>> Name="DomainAdmin" NativeIOEnabled="true" ServerVersion="8.1.0.0"
>StdoutEnabled="false">
>> <SSL Enabled="true" HostnameVerificationIgnored="false"
>> IdentityAndTrustLocations="KeyStores" ListenPort="8032"
>Name="DomainAdmin"/>
>> <Log FileCount="1" FileTimeSpan="72" Name="DomainAdmin"
>> NumberOfFilesLimited="true" RotationType="byTime"/>
>> </Server>
>> <Server IIOPEnabled="false" ListenPort="80" Machine="Machine1"
>> Name="DomainProxy" NativeIOEnabled="true" StdoutEnabled="false">
>> <SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
>> ListenPort="443" Name="DomainProxy"/>
>> <Log FileCount="1" FileTimeSpan="72" Name="DomainProxy"
>> NumberOfFilesLimited="true" RotationType="byTime"/>
>> <ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="100"/>
>> </Server>
>> <Server Cluster="DomainCluster" DomainLogFilter="DomainLogFilter"
>> IIOPEnabled="true" ListenPort="8035" Machine="Machine1"
>> Name="DomainAppServer1a" NativeIOEnabled="true"
>> ServerVersion="8.1.1.0" StdoutEnabled="false">
>> <SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
>> ListenPort="8036" Name="DomainAppServer1a"/>
>> <Log FileCount="1" FileTimeSpan="72" Name="DomainAppServer1a"
>> NumberOfFilesLimited="true" RotationType="byTime"/>
>> <ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="50"/>
>> </Server>
>> <Server Cluster="DomainCluster" DomainLogFilter="DomainLogFilter"
>> IIOPEnabled="false" ListenPort="8037" Machine="Machine1"
>> Name="DomainAppServer1b" NativeIOEnabled="true" StdoutEnabled="false">
>> <SSL Enabled="true" IdentityAndTrustLocations="KeyStores"
>> ListenPort="8038" Name="DomainAppServer1b"/>
>> <Log FileCount="1" FileTimeSpan="72" Name="DomainAppServer1b"
>> NumberOfFilesLimited="true" RotationType="byTime"/>
>> <ExecuteQueue Name="weblogic.kernel.Default" ThreadCount="50"/>
>> </Server>
>> <MigratableTarget Cluster="DomainCluster"
>> Name="DomainAppServer1a (migratable)"
>> Notes="This is a system generated default migratable target
>for a server.
>> Do not delete manually." UserPreferredServer="DomainAppServer1a"/>
>> <MigratableTarget Cluster="DomainCluster"
>> Name="DomainAppServer1b (migratable)"
>> Notes="This is a system generated default migratable target
>for a server.
>> Do not delete manually." UserPreferredServer="DomainAppServer1b"/>
>> <UnixMachine Name="Machine1" PostBindGID="domain"
>> PostBindGIDEnabled="true" PostBindUID="DOMAIN" PostBindUIDEnabled="true">
>> <NodeManager ListenAddress="" ListenPort="8033" Name="Machine1"/>
>> </UnixMachine>
>> <JMSServer Name="DomainJMSServer1a" Store="DomainJMSFileStore1a"
>Targets="DomainAppServer1a">
>> <JMSTopic CreationTime="..."
>> JNDIName="topic.someTopic" Name="someTopic" StoreEnabled="false"/>
>> </JMSServer>
>> <JMSServer Name="DomainJMSServer1b" Store="DomainJMSFileStore1b"
>Targets="DomainAppServer1b"/>
>> <DomainLogFilter Name="DomainLogFilter" SeverityLevel="1"/>
>> <Security Name="Domain" PasswordPolicy="wl_default_password_policy"
>> Realm="wl_default_realm" RealmSetup="true"/>
>> <EmbeddedLDAP
>> Credential="..." Name="Domain"/>
>> <SecurityConfiguration
>> Credential="..."
>> Name="Domain" RealmBootStrapVersion="1"/>
>> <Realm FileRealm="wl_default_file_realm" Name="wl_default_realm"/>
>> <FileRealm Name="wl_default_file_realm"/>
>> <PasswordPolicy Name="wl_default_password_policy"/>
>> <JDBCConnectionPool ConnectionCreationRetryFrequencySeconds="60"
>> DriverName="oracle.jdbc.driver.OracleDriver" MaxCapacity="5"
>> Name="domainPOOL" Password="..."
>> Properties="..." ShrinkFrequencySeconds="18000"
>> Targets="DomainCluster" TestConnectionsOnCreate="true"
>> TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
>> TestFrequencySeconds="300" TestTableName="DUAL" URL="..."/>
>> <JDBCTxDataSource JNDIName="domainSource" Name="domainSource"
>> PoolName="domainPOOL" Targets="DomainCluster"/>
>> <Application Name="MyDomain" Path="domain.ear"
>> StagingMode="nostage" TwoPhase="true">
>> <EJBComponent Name="domainejb" Targets="DomainCluster" URI="domainEjb.jar"/>
>> </Application>
>> </Domain>
>>
>> As you can, I have two servers configured in my DomainCluster. My
>EJB, domainejb,
>> is tied to
>> this cluster. I can't seem to do a JNDI lookup of this EJB, or the
>JMS Topic
>> that I've created.
>> When I attempt to do the lookup (from a client on the local machine)
>using the
>> URL
>> t3://localhost:8031, I get a NameNotFound Exception. This makes sense,
>because
>> the
>> Admin server isn't a part of the cluster. However, when I do the lookup
>using
>>
>> t3://localhost:8035, I get an exception that states that it could not
>connect
>> to a host. I have
>> insured that the server at this port is running, and the EJB is located
>in it's
>> JNDI tree.
>>
>> I am stumped and could really use someone's help. Please advice.
>>
>> Thanks, Joel
>
>Trying setting a listen address to specific ip instead of localhost
>address. Have you tried view the JNDI tree of Managed Servers from console.
>
>Cheers,
>
>-- Prasad
>
Though some problems still remained, having the client use the weblogic.jar rather
than the thin
client jars (wljmsclient.jar and wlclient.jar) seemed to cure many of the issues.
-
Failed in WD JNDI lookup in QA Portal
Hello Experts,
I am facing the issue in custom WD application in QA portal system, in dev portal the application is working fine and after transporting the objects into QA portal ,while on preview the iview its giving me error : "Failed in WD JNDI lookup ".
I have tested the WD application from Web dynpro console and its working fine , even i have created iview in QA portal and its working fine but while transporting the iview from DEV to QA Portal is not working . Can any one help me on that .
Your help will highly appreciated ..
Details error :
com.sapportals.portal.prt.runtime.PortalRuntimeException: Failed in WD JNDI lookup. javax.naming.NameNotFoundException: No child found in WebDynproContext with name home~eth_dis
at com.sap.portal.pcm.iview.admin.AdminBaseiView.createAttrSetLayersList(AdminBaseiView.java:357)
at com.sap.portal.pcm.iview.admin.AdminBaseiView.getAttrSetLayersList(AdminBaseiView.java:205)
at com.sap.portal.pcm.iview.admin.AdminBaseiView.getCustomImplementation(AdminBaseiView.java:148)
at com.sap.portal.pcm.admin.PcmAdminBase.getImplementation(PcmAdminBase.java:530)
at com.sapportals.portal.ivs.iviews.IviewServiceObjectFactory.getObjectInstance(IviewServiceObjectFactory.java:442)
... 40 moreHi Shanti,
Thanks for the quick response.
My portal version is EP 7 with SP21 .As I mention in my thread that I have tested custom application on QA Portal and its working fine. But the problem is only appearing with the transported iview into QA portal.
Regards
Rashi -
Hi All
Two separate webapps, have different names for Datasources, on the same host and port. Both application work fine independently.
When we deploy both applications on the same app server(websphere), whichever we executes first gets its datasource from JNDI lookup and works fine, but when we try second application it have problem in finding its data source from JNDI lookup. If we start this second application first, it will work fine, but now another will have the same problem in its JNDI lookup.
Any idea why.
Thanks
....RanvirHi All
Two separate webapps, have different names for
Datasources, on the same host and port. Both
application work fine independently.
When we deploy both applications on the same app
server(websphere), whichever we executes first gets
its datasource from JNDI lookup and works fine, but
when we try second application it have problem in
finding its data source from JNDI lookup. If we start
this second application first, it will work fine, but
now another will have the same problem in its JNDI
lookup.
Any idea why.
Thanks
....RanvirHi Ranvir,
Do you mean you try to reach the same datasource with different names or do you try to reach different datasources over the same port?
If you try the first issue you shouldn't get any trouble. At least it works fine with JBOSS for example.
But if you try to do the latter in my oppinion you don't have a JNDI problem but a problem with socket binding: the two different databases must be contacted over different ports.
What do WebSphere's logs tell?
Best regards
Andy -
11g preview version 3: JNDI Lookup problem when calling PL/SQL webservice
Hi,
I am experiencing a problem when calling a PL/SQL Webservice from a BPEL flow.
When I am trying to test my BPEL flow from the SOA Console I get a "Error doing JNDI lookup on target jdbc/MyDBDS"
The composite application including the BPEL flow is deployed in one application. "CompositeApp" and the web service in another Application called
"WebServiceApp".
Both applications are deployed on the same built in OC4J Application Server
If I test the webservice in isolation from the SOA console it works. It also seems to be working if the webservice and the and the BPEL flow is in the same project.
If anyone has any ideas on this one I would be very greatful.
Thanks in advancetry creating the MyDBDS connection as an application resource in both applications.
Maybe you are looking for
-
How do I change the function of the Run button?
I recently got a new hard drive and had to install all of my National Instruments software Now, the Run button in TestStand only runs the selected sequence. How do I change it back to Single Pass execution of the process model and MainSequence? Solv
-
I have a pinnacle movie box av adapter for my canon Hi8 camcorder. It has worked successfully for me in the past but recentley when I attempted to use it to capture footage in Imovie HD the computer never detected the camera attachment. I tried cycli
-
SAP GRC AC 5.3 RAR Background jobs are cancelled
Hi Experts, we have newly implemented theS AP GRC AC 5.3 RAR Help me in troubleshooting the Background jobs cancellation in SAP GRC AC5.3 RAR.. we have reported this issue to customersupport they asked us to upgrade the front end patch level to Sp1
-
How do I create and use a ringtone without syncing and without jailbreaking?
How do I create and use a ringtone without syncing and without jailbreaking?
-
How to reduce size of iPhoto library ? (after the usual auto-rotate issue)
Hi, This is my first message here, even I am oftenly reading and searching these forums... I found many topics about this issue of "auto-rotate settings on camera, that will increase the size of the library". Thanks Terrence and also Toad, for replyi