Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JNDI setting in the java proxy

Hi~ all..

I was be worried about the result of java server proxy in

the tomcat.

I have implemented inbound and outbound proxy to transfer file. but I have an problem.

-


[1. InvokeProxy.java ]----


...

queryOutLocalHome = (MIRequestUserRoleOutSync_PortTypeLocalHome)ctx.lookup("java:comp/env/<b>ejb/MIRequestUserRoleOutSync_PortTypeBean</b>");

...

-


[2. ejb-jar.xml ]----


<ejb-jar>

<description>EJB JAR description</description>

<display-name>EJB JAR</display-name>

<enterprise-beans>

<session>

<ejb-name><b>ejb/MIRequestUserRoleOutSync_PortTypeBean</b></ejb-name>

<home>net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeHome</home>

<remote>net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeRemote</remote>

<local-home>net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeLocalHome</local-home>

<local>net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeLocal</local>

<ejb-class>net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeBean</ejb-class>

<session-type>Stateless</session-type>

<transaction-type>Container</transaction-type>

</session>

</enterprise-beans>

</ejb-jar>

-


[3. server.xml in the tomcat ]----


...

<Resource name="ejb/MIRequestUserRoleOutSync_PortTypeBean" auth="Container" type="Stateless" value="net.**.**.javaproxy2Jdbc.MIRequestUserRoleOutSync_PortTypeBean." />

<ResourceParams name="ejb/MIRequestUserRoleOutSync_PortTypeBean">

<parameter>

<name>factory</name>

<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>

</parameter>

<parameter>

<name>pathname</name>

<value>webapps/proxy/WEB-INF/ejb-jar.xml</value>

</parameter>

</ResourceParams>

...

-


[4. web.xml in the tomcat ]----


...

<resource-ref>

<description>MIRequestUserRoleOutSync_PortTypeBean Data Source</description>

<res-ref-name>ejb/MIRequestUserRoleOutSync_PortTypeBean</res-ref-name>

<res-type>Stateless</res-type>

<res-auth>Container</res-auth>

</resource-ref>

...

error Message on the startup tomcat ...

javax.naming.NamingException: Cannot create resource instance

at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF

actory.java:132)

at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3

01)

at org.apache.naming.NamingContext.lookup(NamingContext.java:791)

at org.apache.naming.NamingContext.lookup(NamingContext.java:138)

at org.apache.naming.NamingContext.lookup(NamingContext.java:779)

at org.apache.naming.NamingContext.lookup(NamingContext.java:138)

at org.apache.naming.NamingContext.lookup(NamingContext.java:779)

help me plz... I don't know what is problem...

reference : http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

Regards...

So..thanks...

Not what you were looking for? View more on this topic or Ask a question