| Author |
Invoking EJB deployed Weblogic from an application deployed in Websphere
|
mr saurabh gupta
Greenhorn
Joined: Oct 15, 2010
Posts: 2
|
|
Hi Guys ...
I'm facing a wierd issue ... pl. let me know if you have any suggestions/solutions etc.
I have an application that is deployed in websphere 7. This application is required to act as a client for an EJB deployed in Weblogic 10.
The code in the client application is as follows:
Somehow it fails when creating the object of InitialContext.
The system.out.println results into
I get the following exception.
Another thing that i observed was that in the error message, there is one additional property that gets printed.
java.naming.factory.url.pkgs=:com.ibm.ws.naming:com.ibm.ws.naming
I did not add this property in the properties object. Where did it come from ??
I have verified the classpath, url, user, password etc multiple times ... they are all correct.
Pl. suggest what could be the cause of the exception.
Regards
Saurabh
|
 |
Vikram Saxena
Ranch Hand
Joined: Dec 16, 2008
Posts: 53
|
|
There could be following issues which you need to check :
1. Is your server running at the URL : t3://myserver:30362 ?
2. You need to provide weblogic.jndi.WLInitialContextFactory in the classpath, have you placed the appropriate Weblogic jars in the classpath ?
Another thing that i observed was that in the error message, there is one additional property that gets printed.
java.naming.factory.url.pkgs=:com.ibm.ws.naming:com.ibm.ws.naming
This is being picked from your jndi.properties. The Application Server loads all the properties from this file when not explicitly mentioned.
|
Vikram
SCJP 5 , SCBCD [Prep Started ] , WLS 8.1 Server Admin
|
 |
mr saurabh gupta
Greenhorn
Joined: Oct 15, 2010
Posts: 2
|
|
Hi Vikram,
The answer to both of your questions is "yes".
Thanks
Saurabh
|
 |
Vikram Saxena
Ranch Hand
Joined: Dec 16, 2008
Posts: 53
|
|
Then first give it a try with the correct java.naming.factory.url.pkgs for Weblogic. I think this would be the value:
java.naming.factory.url.pkgs=weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
Do not update/change the jndi.properties, Add this property to the Properties object you are passing to the InitialContext.
|
 |
 |
|
|
subject: Invoking EJB deployed Weblogic from an application deployed in Websphere
|
|
|