www.studyjava.org

EJB Tutorial

Tutorial Index Page

Troubleshooting checklist

If you are having trouble, the following checklist might help:



Creating an Entity Bean:
  1. Did you remember to change the bean name to "Props" on the last page of the wizard?  If not, run the wizzard again and make sure to do this.  The wizzard offers "PropsTable", but in the tutorial we are using "Props".
  2. Did you fix the PATH and CLASSPATH as required by the EJB compiler and server?


Deploying an Entity Bean
If you are connecting to the net using a modem, you may need your modem to be connected while you are doing the testing.  Even if you are not using the modem, an "IP address" is required for your PC.  The IP address gets assigned to most modem users only when they connect to the net using their modem.


Using an Entity Bean
  1. Did you remember to place the client Java files in a different folder from the EJB Java files?  If you placed the EntityClientSample.java file (or your own test program) in the same c:\Ejbtut folder as the EJB files, that may be the source of your problems.  Create a different folder such as "Ejbtest" and move the client Java files to that folder, and build it there.
  2. Did you place the EJB jar file in your client's classpath?  If you did, did you make sure it is not the source file Props.jar, but the generated PropsEjb.jar EJB file that you placed in the client's classpath?
  3. Try changing the "localhost" to your actual machine name.
  4. Did you change the EJB port number from "2050" when you installed the Blazix server?  If you did, make sure to change it in the EntityClientSample.java file also!
  5. When you were creating the Entity Bean, did you remember to change the name to "Props"?  The wizzard's default name is "PropsTable", but the tutorial uses the name "Props".
  6. If you are writing your own programs to use the EJB but cannot access it using the syntax "java:comp/env/ejb/Props", you may have another JAR file in your classpath that also has the EJB classes (such as "j2ee.jar").  Remove the other JAR files from your classpath.