Hi,
I tried to practise the J2EE Blueprint Java Pet Store Demo and followed
the steps as in the attached file. When I
deploy the
application (step 11) I got the follwoing error message. Please advise
what wrong with the it.
There was a deployment error.java.rmi.ServerException:RemoteException
occurred in server thread; nested
exception is:
java.rmi.RemoteException:Error while loading JAR
C:\j2sdkee1.2.1\repository\t1527\applicatoin\petstore977360151716Server.jar;
nested exception is:
javax.naming.invalidNameException:JNDI name 'jdbc/InventoryDB' for
resource 'jdbc/InventoryDataSource'
is not valid
Thanks
Da-Ming
=============================================================================
J2EE Blueprints
Java TM Pet Store Demo
installation and configuration
installing the javaTM pet store on windows systems
This document describes how to install and configure the Java Pet Store
sample application on Windows NT,
Windows 2000, and Windows 98. Please be sure to follow the instructions
closely.
1.Install Java Standard and Enterprise SDKs. If you don't already
have them, download and install each
of the following:
Java 2 Enterprise Edition SDK v. 1.2.1 (J2EE SDK),
downloadable from
http://java.sun.com/j2ee/download.html.
Java 2 Standard Edition SDK; either v. 1.3 (preferred),
downloadable from
http://java.sun.com/j2se/1.3; or v. 1.2.2, downloadable from
http://java.sun.com/products/jdk/1.2.
2.Configure Java home directory environment variable. In your
autoexec.bat file (on Windows 98),
or in your Windows Environment settings (under My
Computer/Properties/Advanced/Environment
Variables... in NT and 2000), set JAVA_HOME to the base directory
where you installed the J2SE SDK.
For example, if you installed the J2SE SDK in C:\jdk1.3, set
JAVA_HOME to C:\jdk1.3. In Windows 98,
the line in autoexec.bat would be:
set JAVA_HOME=C:\jdk1.3
3.Configure J2EE home directory environment variable. In the same
manner as in the previous step, set
the environment variable J2EE_HOME to the base directory of the
J2EE SDK. For example, if you installed
the J2EE SDK at C:\j2sdkee1.2.1 , set J2EE_HOME to C:\j2sdkee1.2.1.
In Windows 98, the
autoexec.bat line would be:
set J2EE_HOME=C:\j2sdkee1.2.1
On Windows 98 only: Extend the environment space by placing the
following line in your CONFIG.SYS file
(usually in C:\CONFIG.SYS):
SHELL C:\COMMAND.COM /E:8192 /P
After setting these environment variables, be sure to set them in
your command interpreter by restarting
Windows.
4.Start the Cloudscape database server. This command will run the
Cloudscape server, so your command
prompt will not return. You'll want to run this command in a
separate window. Change directory to
%J2EE_HOME%\bin and run:
cloudscape -start
You will probably see some error messages that look like: ERROR
42X05: Table 'LINEITEM' does
not exist. These messages can safely be ignored: they're simply
table drop statements for future
invocations of this script. Since no tables exist in an empty
database, they fail (harmlessly) the first time this
script is run.
5.Unzip the Java Pet Store Use your favorite ZIP decompression tool
to unzip the Java Pet Store file
petstore.zip to a convenient directory. Everything in the zip file
will decompress to a directory called
jps1.1.1, referenced in subsequent steps.
6.Create the Java Pet Store database. The top-level directory of the
Java Pet Store is jps1.1.1. Change
directory to jps1.1.1/database.sql and run
populate
7.Configure the J2EE SDK to use the Java TM Pet Store database. Edit
the file
%J2EE_HOME%\config\default.properties, and append to the
jdbc.datasources property the
following text:
|jdbc/EstoreDB|jdbc:cloudscape:rmi:CloudscapeDB;create=true|
jdbc/InventoryDB|jdbc:cloudscape:rmi:CloudscapeDB;create=true.
Be sure the variable and its value appear on a single line, not
broken in two pieces as shown here.
8.Enable creation of new Java Pet Store users.
Edit the file %J2EE_HOME%\lib\security\server.policy, and append
the following line to the very
last grant section of the file:
permission java.io.FilePermission "<<ALL FILES>>",
"read,write,delete";
9.Start the J2EE server.
This command runs the J2EE server, so your command prompt will not
return. You'll want to run this
command in a separate window. Change directory to %J2EE_HOME%\bin
and run:
j2ee
For copious debugging output, run:
j2ee -verbose
10.Start the deploy tool.
Still in the %J2EE_HOME%\bin directory, run:
deploytool
11.Deploy the application.
Click on the File menu, click on Open Application... menu item, and
select the file
jps1.1.1\petstore.ear. Then, click on Tools menu, click Deploy
Application, and go through the
dialog boxes to complete the deployment. You can choose to use the
default values, if you do not want to
change any settings.
12.Visit the Java Pet Store
Open your Web browser to the site:
http://localhost:8000/estore/index.html
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".