InfoCenter Home > 4.7.2.3: Troubleshooting guide for the J2EE application clientThis section provides some debugging tips for resolving common J2EE application client problems. To use this troubleshooting guide, review the trace entries for one of the J2EE application client exceptions, and then locate the exception in the guide.
Error: java.lang.NoClassDefFoundError Explanation: This exception is thrown when Java cannot load the specified class. Possible causes:
User response: First check to determine if the specified class exists in a jar file within your ear file. If it does, make sure the path for the class is correct. For example, if you get the exception: java.lang.NoClassDefFoundError: WebSphereSamples.HelloEJB.HelloHomeensure the class HelloHome exists in one of the jar files in your ear file. If it exists, ensure the path for the class is WebSphereSamples.HelloEJB. If both the class and path are correct, then it is a classpath issue. Most likely, you do not have the failing class's jar file specified in the client jar file's manifest. To check this, open your ear file with the Application Assembly Tool and click on the Application Client. Add the names of the other jar files in the ear file to the Classpath field. This exception is generally caused by a missing EJB module name from the Classpath field. If you have multiple jars to enter in the Classpath field, be sure to separate the jar names with spaces. If you still have the problem, you have a situation where a class is being loaded from the hard
drive instead of the ear file. This is a very difficult situation to debug because the offending
class is not the one specified in the exception. Instead, another class is loaded from the hard drive
before the one specified in the exception. To correct this, review the classpaths
specified with the If you are using the Note: The system classpath is not used by the Application Client runtime if you use the launchClient batch or shell files. In this case, the system classpath would not cause this problem. However, if you load the launchClient class directly, you do have to search through the system classpath as well. Error: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while attempting to get an instance of the object for the specified reference object. [Root exception is javax.naming.NameNotFoundException: xxxxxxxxxx] Explanation: This exception occurs when you perform a lookup on an object that is not installed on the host server. Your program can look up the name in the local client JNDI name space, but received a NameNotFoundException exception because it is not located on the host server. One typical example is looking up an EJB that is not installed on the host server that you access. This exception might also occur if the JNDI name you configured in your Application Client module does not match the actual JNDI name of the resource on the host server. Possible causes:
User response: If you are accessing the wrong host server, run the
Error: javax.naming.ServiceUnavailableException: Caught exception when resolving initial reference=NameService. Root exception is org.omg.CORBA.INTERNAL: JORB00105: In Profile.getIPAddress(), InetAddress.getByName( invalidhostname ) threw an UnknownHostException minor code: 0 completed: No Explanation: This exception occurs when you specify an invalid host server name. Possible causes:
User response: Run the Error: javax.naming.CommunicationException: Caught CORBA.COMM_FAILURE when resolving initial reference=WsnNameService. Root exception is org.omg.CORBA.COMM_FAILURE: minor code: 3 completed: No Explanation: This exception occurs when you run launchClient to a host server that does not have the Application Server started. You also receive this exception when you specify an invalid host server name. This might happen if you do not specify a host server name when you run launchClient. The default behavior is for launchClient to run to localhost, because WebSphere Application Server does not know the name of your host server. This default behavior only works when you are running the client on the same computer as where WebSphere Application Server is installed. Possible causes:
User Response: If you are not running to the correct host server, run the
launchClient command again and specify the name of your host server with the
Error: javax.naming.NameNotFoundException: Name comp/env/ejb
not found in context "java:"
Possible causes:
Error: java.lang.ClassCastException: Unable to load
class: org.omg.stub.WebSphereSamples.HelloEJB._HelloHome_Stub
at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(portableRemoteObject.java:269)
Note: The HelloHome_Stub reference in the Error description, is a sample Possible causes:
Error: WSCL0206E: File [EAR file name] is not a
valid Enterprise Archive file. WSCL0100E: Exception received: com.ibm.etools.archive.exception.OpenFailureException
Possible cause: The most likely cause of this error is the EAR file cannot be found in the path specified on the launchClient command. User Response: Verify that the path and filename specified on the launchclient command are correct. If you are running on Windows NT and the path and file name are correct, use a short version of the path and file name (8 character file name and 3 character extension). |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|