I created an Alias from the EJB Adaptor (Admin) page for an EJB running locally on Websphere server. As required, I provided the Initial Context factory and the provider URL. I also selected ‘Websphere 4’ as the JNDI Server Type since I am running Websphere 4.0 test environment on WSAD 4.0.3 .
When I click on Test button, the test connection fails and I get this message - “testConnFail: AliasTestImpl.test - found null or closed connection”.
On Integration Server console, this is what I see:
On the error log, it says: 2002-10-18 14:08:40 EDT com.wm.pkg.imdk.alias.AliasTestFailException:testConnFail: AliasTestImpl.test - found null or closed connection
I too am getting this exact same error, though when running WebLogic 7.
I’ve found that the alias succeeds when running on the same machine as the WebLogic instance, but a different host on the same subnet fails. I don’t know why this is happening. The configurations on both machines are exactly the same. I have the client EJB jars and weblogic.jar in the IS/lib/system directory, and IS is directed to use the jvm included with the weblogic install via setting the JAVA_DIR in the server.bat file.
What’s the reason it would work on localhost but not remotely?
Hi everyone. I have figured out the problem I was having when trying to connect to the v4.0.1 EJB Server from my IS version 6. It turns out that if I do not install the service pack 2, I am able to establish a connection to the EJB Server following the installation directions from the pdf file. When I do install the service pack 2, I get connection errors. Does anyone know why this is the case? In the meantime, I will have to work without the service pack.
I am having the same problem after I upgraded the IS 6.0.1 to SP2. I have a custom adapter connecting to EJB on WAS 4.0.5. It works fine with SP1. Any solution/resolution/advice from webMethods? Here is the stack trace.
javax.naming.ConfigurationException: Could not create an instance of the class null. . Root exception is java.lang.NullPointerException
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInitialContextFactory.java:123)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:76)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.(InitialContext.java:207)
at com.ams.adapter.advantage.connection.AdvantageConnection.getInitialContext(AdvantageConnection.java:514)
To connect to a version 4.0.1 (and supposable any version 4):
copy from the <WebSphere_install_directory>\AppServer\java\jre someplace locally
remove <local_copy>\jre\lib\ext\ibmjcefw.jar
copy to following jar files from <WebSphere_install_directory>\AppServer\lib to <IS_DIR>\packages\imdk\code\jars
bootstrap.jar
csicpi.jar
ejbcontainer.jar
iwsorb.jar
j2ee.jar
jts.jar
ns.jar
ras.jar
ujc.jar
utils.jar
websphere.jar
Copy the beans from <WebSphere_install_directory>\AppServer\installedApps<whatever>.ear to <IS_DIR>\packages\imdk\code\jars
Update <IS_DIR>\bin\server.bat to set JAVA_DIR=<local_copy>\jre
make sure ejb.jar is in <IS_DIR>\lib\jars
To connect to a version 5:
copy from the <WebSphere_install_directory>\AppServer\java\jre someplace locally
remove <local_copy>\jre\lib\ext\ibmjcefw.jar
copy to following jar files from
<WebSphere_install_directory>\AppServer\lib to <IS_DIR>\packages\imdk\code\jars
ecutils.jar
ejbcontainer.jar
ejbportable.jar
ffdc.jar
idl.jar
iwsorb.jar
j2ee.jar
lmproxy.jar
naming.jar
namingclient.jar
ras.jar
sas.jar
tx.jar
txPrivate.jar
utils.jar
wsexception.jar
wssec.jar
Copy from <WebSphere_install_directory>\AppServer\properties to <IS_dir>\packages\WmEJB\code\classes\
implfactory.properties
jndi.properties
jndiprovider.properties
Copy the beans from <WebSphere_install_directory>\AppServer\installedApps<whatever>.ear to <IS_DIR>\packages\imdk\code\jars
Update <IS_DIR>\bin\server.bat to set JAVA_DIR=<local_copy>\jre
we have followed your instructions but am still getting the same error, which I have explained in the EJB 1.2 error post.
One thing I have observed in the above instructions for WebSphere 5.0 is
step 4. I could not find jndi.properties and jndiprovider.properties files.
Should I be having in any of the .jar files ?
I followed the steps specified by Siva. I was able to test the connection and see the bean that has been deployed using the Service Browser.
I created a service, using Service Generation. When I run this service, it fails at the point of invoking the method with the following error. Does anybody have an idea regarding the same.
The Context.class is present in client.jar in IntegrationServer/lib directory.
EJBServices.invokeEJBMethod - beanWrap.invokeMethod threw this: type(com.wm.pkg.ejb.EJBException), msg(RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException:
Trace from server: 1198777258 at host BRDT86075 >>
java.rmi.RemoteException: ; nested exception is:
java.lang.NoClassDefFoundError: com/wm/app/b2b/client/Context
at com.wm.ejb.samples.hello.HelloBean.getMessage(HelloBean.java:119)
at com.wm.ejb.samples.hello.EJSRemoteStatelessHello_404ee3b2.getMessage(EJSRemoteStatelessHello_404ee3b2.java:32)
at com.wm.ejb.samples.hello._EJSRemoteStatelessHello_404ee3b2_Tie._get_message(_EJSRemoteStatelessHello_404ee3b2_Tie.java:152)
at com.wm.ejb.samples.hello._EJSRemoteStatelessHello_404ee3b2_Tie._invoke(_EJSRemoteStatelessHello_404ee3b2_Tie.java:88)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
<< END server: 1198777258 at host BRDT86075
; nested exception is:
java.lang.NoClassDefFoundError: com/wm/app/b2b/client/Context)
Did the following steps as suggested by Siva and from the Install guide
copied implfactory.properties to WmWJB/code/classes
copied IBMJDK to local directory
set IS to point to this JDK in the server.bat
removed sun_micr.rsa and sun_micr.sf from activation.jar
removed the following jars from IBMJDKLOCALCOPY/lib/ext
ibmjcefw.jar
ibmjceprovider.jar
ibmpkcs.jar
ibmpkcs11.jar
local_policy.jar
US_export_policy.jar
copied the following jars from websphere/Appserver/lib to imdk/code/jars
ecutils.jar
ejbcontainer.jar
ejbportable.jar
ffdc.jar
idl.jar
iwsorb.jar
j2ee.jar
lmproxy.jar
naming.jar
namingclient.jar
ras.jar
sas.jar
tx.jar
txPrivate.jar
utils.jar
wsexception.jar
wssec.jar
extracted jndi.properties and jndiprovider.properties from naming.jar and extracted them to WmEJB/code/classes
when i try to test the alias i get an error saying
com.wm.ejb.samples.hello.HelloBean.getMessage is my own EJB bean which has been deployed. In the flow service, when an invoke is made to this bean, i get the error which has been mentioned above
was there any resolution to this… we are encountering a similar exception in talking from webMethods 6.01sp2 to websphere 5.02
the jndiprovider.properties file is indeed in the classpath.
-mark
javax.naming.ConfigurationException: The property com.ibm.ws.naming.wsn.factory.initial is not set. The most likely cause is that the jar which contains the file com/ibm/websphere/naming/jndiprovider.properties cannot be found by the class loader.
at com.ibm.websphere.naming.WsnInitialContextFactory.init_implClassCtor(WsnInitialContextFactory.java:190)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:108)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.(InitialContext.java:207)
at LCOMM100.Utils.getInitialContext(Utils.java:2332)
at LCOMM100.Utils.GetInitialContext(Utils.java:987)
at java.lang.reflect.Method.invoke(Native Method)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:287)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:344)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:97)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:167)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:204)
at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
at java.lang.Thread.run(Thread.java:512)