on 06-13-2006 8:37 AM
hi,experts!
I have deployed an EJBModule on a machine ,and have deployed an WebModule on other machine.
Now i want use a servlet of WebModule lookup the EJB of other machine.But can't lookup.
Servlet:
Properties connProp = new Properties();
connProp.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
connProp.setProperty(Context.PROVIDER_URL, hostname + ":50004"); connProp.setProperty(Context.SECURITY_PRINCIPAL, "Administrator");
connProp.setProperty(Context.SECURITY_CREDENTIALS, "");
return new InitialContext(connProp);
InitialContext ctx = new InitialContext(connProp);
Object lookup = ctx.lookup("sap.com/ejbtest/TestRMIBean");
EJB:
ejb-jar.xml
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>TestRMIBean</ejb-name>
<home>com.***.TestRMIHome</home>
<remote>com.***.TestRMI</remote>
<ejb-class>com.***.TestRMIBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
application-j2ee-engine.xml
<application-j2ee-engine>
<provider-name>sap.com</provider-name>
<fail-over-enable mode="disable" />
</application-j2ee-engine>
application.xml
<application>
<display-name>ejbtest</display-name>
<description>EAR description</description>
<module>
<ejb>ejbModule.jar</ejb>
</module>
</application>
lookup Exception:
NamingException=com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of TestRMIBean. com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of TestRMIBean. at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:646) at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:254) at com.sap.engine.services.jndi.implclient.OffsetClientContext.lookup(OffsetClientContext.java:271) at javax.naming.InitialContext.lookup(InitialContext.java:347) at javax.naming.InitialContext.lookup(InitialContext.java:347)
Question:
1.How to configure SAP Netweaver can use rmi-iiop?
2.Why my ejb can't lookuped by Other Servlet?
thank a lot!
Hi wei zhang,
Do you still have this problem ? What server version do you use ?
Check if the application is successfully deployed and started. Also the "servlet" application should have classpath to the "Other" application interfaces and client support.
Best regards,
Nikolai.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please help ,thank a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.