J2EE Blueprints

Java (TM) Pet Store Demo

 installation and configuration
   troubleshooting your installation
 
  1. Be patient.
    Each time you deploy the Java Pet Store application, and each time a J2EE server is restarted, the JSP pages are recompiled to servlets on demand. As a result, the first access to each page may take a while. Subsequent accesses to those pages will be much quicker.
  2. See if the server is running.
    To check if the J2EE SDK server is running without accessing the Java Pet Store application, point your browser to http://hostname:port, where hostname is the host running the J2EE SDK server, and port is the port number it is running on. For example, to connect to host localhost, port 8000, visit the following URL: http://localhost:8000/index.html.

    If the J2EE SDK server is running, you will get a Web page; if not, you'll get an error message.

  3. Some Cloudscape "errors" aren't errors.
    The first time you run the command startIJ cloudscape.sql in the installation procedure, you'll see some error messages that look something like:
    ERROR 42X05: Table 'LINEITEM' does not exist.
    These error messages can be safely ignored. The SQL script cloudscape.sql drops all tables before creating them, so that it can be used more than once. Since these tables don't exist the first time cloudscape.sql is run, the database reports errors. Later runs of the script will not result in errors, since the tables will exist, and therefore will drop correctly.
  4. Shut down your Cloudscape database cleanly.
    The best way to shut down the cloudscape database and ensure a proper cleanup is to change directory to $J2EE_HOME/bin and run cloudscape -stop
  5. Manual deinstallation of a J2EE application.
    If you'd rather uninstall a J2EE application manually, instead of using the uninstall feature of your server's deployment tool (deploytool in the J2EE Reference Implementation), follow these steps:
    1. Shutdown the J2EE SDK server
    2. Shutdown the database (such as described above for Cloudscape)
    3. Go to the $J2EE_HOME/bin directory and run the cleanup script
    4. Redeploy the application, if desired.
  6. Tips on switching databases
    If you would like to use a database other than cloudscape, you need to make sure that its JDBC drivers are present in the J2EE_CLASSPATH of userconfig.sh (or userconfig.bat) of the J2EE SDK. You must also make sure that the default.properties file (present in the config directory of your J2EE SDK installation) is set up appropriately to use the datasources present in your new database. Finally, you will need to populate your database with the data for the sample application.

    For more on switching databases, see Configuring the Java Pet Store for Oracle.