alexanderpetrous
asked on
jboss deployment problem--javax.naming.NameNotFoundException
The exception is :
javax.naming.NameNotFoundE xception: Mail not bound
at org.jnp.server.NamingServe r.getBindi ng(NamingS erver.java :495)
at org.jnp.server.NamingServe r.getBindi ng(NamingS erver.java :503)
at org.jnp.server.NamingServe r.getObjec t(NamingSe rver.java: 509)
at org.jnp.server.NamingServe r.lookup(N amingServe r.java:282 )
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm p
java:39)
************************** **
The relevant part of my stand alone application:
ctx = new InitialContext();
System.out.println("Loadin g mail properties ");
Session mailSession = (Session)PortableRemoteObj ect.narrow (ctx.looku p("java:/M ail"), Session.class);
************************** ****
When i ran the jboss server 3.2.5, i get this information:
16:35:49,187 INFO [MailService] Mail Service bound to java:/Mail
*********************
The relevant parts of my ejb-jar.xml file:
<message-driven>
<resource-ref>
<res-ref-name>email/MyMail </res-ref- name>
<res-type>javax.mail.Sessi on</res-ty pe>
<res-auth>Container</res-a uth>
</resource-ref>
</message-driven>
************************** ********** ********** ***
The relevant parts of my jboss.xml file:
<resource-managers>
<resource-manager>
<res-name>email/MyMail</re s-name>
<res-jndi-name>java:/Mail< /res-jndi- name>
</resource-manager>
*************************
The jndi.properties file:
java.naming.factory.initia l=org.jnp. interfaces .NamingCon textFactor y
java.naming.factory.url.pk gs=org.jbo ss.naming: org.jnp.in terfaces
java.naming.provider.url=l ocalhost
and this file is in the class path of my client stand-alone application.
************************** **
Hope i supplied all the information you may need!
Thanks in advance,
alexander.
javax.naming.NameNotFoundE
at org.jnp.server.NamingServe
at org.jnp.server.NamingServe
at org.jnp.server.NamingServe
at org.jnp.server.NamingServe
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
java:39)
**************************
The relevant part of my stand alone application:
ctx = new InitialContext();
System.out.println("Loadin
Session mailSession = (Session)PortableRemoteObj
**************************
When i ran the jboss server 3.2.5, i get this information:
16:35:49,187 INFO [MailService] Mail Service bound to java:/Mail
*********************
The relevant parts of my ejb-jar.xml file:
<message-driven>
<resource-ref>
<res-ref-name>email/MyMail
<res-type>javax.mail.Sessi
<res-auth>Container</res-a
</resource-ref>
</message-driven>
**************************
The relevant parts of my jboss.xml file:
<resource-managers>
<resource-manager>
<res-name>email/MyMail</re
<res-jndi-name>java:/Mail<
</resource-manager>
*************************
The jndi.properties file:
java.naming.factory.initia
java.naming.factory.url.pk
java.naming.provider.url=l
and this file is in the class path of my client stand-alone application.
**************************
Hope i supplied all the information you may need!
Thanks in advance,
alexander.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.