cancel
Showing results for 
Search instead for 
Did you mean: 

Test rmi-iiop for SAP Netweaver

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

please help ,thank a lot!