Manual for setting up the J2EE PetStore enviroment:
//Run the configuration Wizard of WebLogic
//Set the "EmbeddedLDAP" option in the "config.xml" file: change value of CredentialEncrypted to ""
//Change the "Targets" value of WebServer element to "petstore" if necessary
//Set the class path of "startPetStoreWebLogic.cmd" file
//Add ;C:/Program Files/Java/jdk1.5.0_04/lib/msbase.jar;C:/Program Files/Java/jdk1.5.0_04/lib/mssqlserver.jar;C:/Program Files/Java/jdk1.5.0_04/lib/msutil.jar;
//Open a command window
cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd
//Open a new command command
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/bea/user_projects/domains/petstore/db.setup
ant
//Copy over files from bea folder to petstore src folder
//Change the weblogic.j2ee.home of the build.properties file in petstore src folder
//Compile scripts
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/petstore1.3.1_02/src
ant
//Copy files
Copy c:/petstore1.3.1_02/src/apps/admin/build/petstoreadmin.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/opc/build/opc.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/petstore/build/petstore.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/supplier/build/supplier.ear c:/bea/user_projects/domains/petstore/applications /y
//Start the server
cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd
-------------------------------------------------Combined commands start-------------------------------------
cd c:/bea/user_projects/domains/petstore
setPetStoreEnv.cmd
cd c:/petstore1.3.1_02/src
ant
Copy c:/petstore1.3.1_02/src/apps/admin/build/petstoreadmin.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/opc/build/opc.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/petstore/build/petstore.ear c:/bea/user_projects/domains/petstore/applications /y
Copy c:/petstore1.3.1_02/src/apps/supplier/build/supplier.ear c:/bea/user_projects/domains/petstore/applications /y
cd C:/bea/user_projects/domains/petstore/PetStore/stage
del /f/s/q _appsdir_opc_ear
rd _appsdir_opc_ear/META-INF
rd _appsdir_opc_ear
del /f/s/q _appsdir_petstore_ear
rd _appsdir_petstore_ear/META-INF
rd _appsdir_petstore_ear
del /f/s/q _appsdir_petstoreadmin_ear
rd _appsdir_petstoreadmin_ear/META-INF
rd _appsdir_petstoreadmin_ear
del /f/s/q _appsdir_supplier_ear
rd _appsdir_supplier_ear/META-INF
rd _appsdir_supplier_ear
cd c:/bea/user_projects/domains/petstore
startPetStoreWebLogic.cmd
-------------------------------------------------Combined commands end---------------------------------------
----------------------------------------------------------------------------------------------------------------------
Something must be careful with:
1. It must be totally successful when you first run the server after setup complete, otherwise you have to resetup again;
2. The database access driver is very important:
First, you must get the correct driver files;
Second, you must specify the correct class path of the driver files;
Third, you can specify the classpath either in the OS Environment Variables or in the startPetStoreWeblogic.cmd file.
3. There are something were not on the manual file of BEA:
a) Sometime you must change the "EmbeddedLDAP" option in the "config.xml" file;
b) If you renamed your PetStore server, you should change the "Targets" value of WebServer element in the "config.xml" file.