I have been trying to set up a CASE study from the CD supplied with the SAMS book "Teach Yourself
J2EE in 21 Days "
The case study requires a small database for storing information. A
Java program to create the database has been provided on the CD. The program uses the Cloudscape database provided with the J2EE RI and according to the book "can be easily adapted to work with any
JDBC compatible database."
I am using Windows 2000, J2SDK 1.4.0 and J2SDKEE1.3.1-Java Plug-in and Java Plug-in 1.4.0
I have set my PATH statement to: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\system32\nls\English;c:\j2sdkee1.3.1\bin;c:\Ant\jakarta-ant-1.4.1\bin,%PATH%;%ANT_HOME%\bin;c\orawin95\bin;%J2EE_HOME%\bin;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\locale
In System Variables field of Environmental Variables in Cotrol Panel I have:
J2EE_HOME variable maps to c:\j2sdkee1.3.1
JAVA_HOME maps to c:\j2sdk1.4.0
The instructions are as follows:
To create and install the database, you will need to do the following:
1.Copy the following files from the CD to the Cloudscape sub-directory of the J2EE installation directory : CreateAgency.java, CreateAgency.class, and CreateAgency.bat - I have done this
2.From the Cloudscape sub-directory run the following script program as follows:
CreateAgency - I have run this batch file
* At which point a new sub-directory called Agency was successfully created under the currect Cloudscape directory-so far so good!
3.Having created the database, you must now add a data source called Agency to J2EE. Run the following command to add the data source:
j2eeadmin -addJdbcDatasource jdbc/Agency jdbc:cloudscape:rmi:Agency;create=true
I have done this with no errors
I have a problem trying to open the case study EAR file from the CD
I start the cloudscape database and j2ee successfully with commands:
cloudscape -start
j2ee -verbose
I then run deploytool.bat under bin directory of J2EE_HOME
GUI Screen opens as per the book but when I try to open the EAR file via File, Open then browse for the EAR file in the Open Object Dialog box I get error message:
"agency.ear is corrupt or cannot be read
java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively<Native Method>
etc
and at end of Deployment Tool diagnositc output I get:
Error: Opening Application - java.lang.NullPointerException
for more details see j2eeDeploytoolExceptionLog.out
I am truely stumped - I am sure I have set the J2EE_HOME environment variable to the location on the c: drive where the J2EE reference implementation is located and have added the bin directory below J2EE_HOME to the executable search path (%PATH%) so that I can run tools and batch files from the command line
Any help would be greatly appreciated