WinXP Petstore 2.0 Installation Error

Hi all,

I wish to deploy and run the Java petstore 2.0 demo. I have the following OS and platforms:

- WinXP Home SP2

- Java EE 5 SDK (installation dir: C:\Sun\SDK)

- NetBeans IDE 5.5 Beta

I've followed the procedures outlined in the index.html packed in the javaPetStore JAR file. I've downloaded the JAR file in C:\ and execute it, which unzipped into a project folder.

I then open the project folder with netBeans and start up the PE 9 sever and database. I didn't change the build.properties file beside the first property javaee.home=C:/sun/sdk.

I then run the project and resulted in a failed build. I've tried this over 10 times can still can't get it right. Can any pros help me out here?

Cheers

RMS

[773 byte] By [bronze-starDukes] at [2007-11-26 12:15:00]
# 1
Could you share with us the error you are seeing?ThanksShreedhar
bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 2

Hi RMS,

You also have to change the javaee.server.passwordfile property in the build.properties file.

This is used by the ant tasks that execute asadmin commands to access the appserver's admin server.

This information should be in the index.html file that is the root directory of the petstore bits.

Maybe we should highlight that property better...

Hope this helps - Mark

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 3

I've modifty the build.properties file like as follow:

javaee.home=C:/Sun/SDK

javaee.server.name=localhost

javaee.server.port=8080

javaee.adminserver.port=4848

javaee.server.username=admin

javaee.server.passwordfile=D:/sdkFile.txt

proxy.host=

proxy=port=

appserver.instance=server

The sdkFile.txt file contains the following:

AS_ADMIN_PASSWORD=adminstration

I have tried to run the project once again, and the following erros displayed:

Duplicated project name in import. Project petstore-impl defined first in D:\javapetstore-2.0-ea3\nbproject\ant-deploy.xml and again in D:\javapetstore-2.0-ea3\nbproject\build-impl.xml

In-place deployment at D:\javapetstore-2.0-ea3\build\web

Start registering the project's server resources

Finished registering server resources

moduleID=javapetstore-2

Application javapetstore-2 is already deployed on other targets. Please use create-application-ref command to create reference to the specified target

D:\javapetstore-2.0-ea3\nbproject\build-impl.xml:491: Deployment error:The module has not been deployed.

See the server log for details.

BUILD FAILED (total time: 3 minutes 53 seconds)

Thanks for help and very appreciated :D

RMS

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 4

I've found out one of the errors, which is very stupid ><. The errors is the forward slash and back slash in defining the directory path:

javaee.home=C:\Sun\SDK

javaee.server.passwordfile=D:\sdkFile.txt

After correcting these errors, the build is successful, however, the petstore didn't show up and the following errors displayed in the web browser:

HTTP Status 503 - This applicaiton is not available

type status report

message This application is not currently available

description The requested service (This applcaiton is not currently available) is not currently available.

Sun Java system Application Server Platform Edition 9.0_01

Can anyone tell me what is going wrong? By the way, the duplication error during the build process exist, should i fix that or ignore that?

Cheers

RMS

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 5

Hi,

I would recommend removing the two petstore projects and undeploying the petstore from the app server, and cleaning up, then start over with a fresh petstore code. This way you dont have duplication error and can start with a corrct environment.

Also, did you run setup?

hth,

Sean

> I've found out one of the errors, which is very

> stupid ><. The errors is the forward slash and back

> slash in defining the directory path:

>

> javaee.home=C:\Sun\SDK

> javaee.server.passwordfile=D:\sdkFile.txt

>

> After correcting these errors, the build is

> successful, however, the petstore didn't show up and

> the following errors displayed in the web browser:

>

> HTTP Status 503 - This applicaiton is not

> available

> type status report

> message This application is not currently

> available

> description The requested service (This

> applcaiton is not currently available) is not

> currently available.

>

> Sun Java system Application Server Platform

> Edition 9.0_01

>

> Can anyone tell me what is going wrong? By the way,

> the duplication error during the build process exist,

> should i fix that or ignore that?

>

> Cheers

> RMS

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 6

Hi,

I will describe my installaiton procedures step-by-step and please notify me if anything thats wrong or something stupid that I've done :D Here it is:

Platform - - WinXP Home SP2

[1] Download JDK 6 and install.

[2] Download the Java EE 5 SDK with Tools (NetBeams IDE and App Server PE9) bundle.

[3] Install the Java EE 5 SDK at default sitting at directory C:\Sun\AppServer

[4] Download the Pet Store jar file and execute the file and extract the project folder.

[5] Open the project folder with NetBeam 5.5.

[6] Edit the build.properties file with the following variables:

javaee.home=C:\Sun\AppServer

javaee.server.name=localhost

javaee.server.port=8080

javaee.adminserver.port=4848

javaee.server.username=admin

javaee.server.passwordfile=C:\sdkFile.txt

proxy.host=

proxy=port=

appserver.instance=server

The sdkFile.txt file contains the following:

AS_ADMIN_PASSWORD=adminstration

[7] I then select the PetStore project folder and run the project.

After all these steps, the resulted turn out to be error:

Duplicated project name in import. Project petstore-impl defined first in D:\javapetstore-2.0-ea3\nbproject\ant-deploy.xml and again in D:\javapetstore-2.0-ea3\nbproject\build-impl.xml

In-place deployment at D:\javapetstore-2.0-ea3\build\web

Start registering the project's server resources

Finished registering server resources

moduleID=javapetstore-2

Application javapetstore-2 is already deployed on other targets. Please use create-application-ref command to create reference to the specified target

D:\javapetstore-2.0-ea3\nbproject\build-impl.xml:491: Deployment error:The module has not been deployed.

See the server log for details.

BUILD FAILED (total time: 3 minutes 53 seconds)

Can any pros help me out with this? Many thanks

RMS

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 7

First of all, sorry for all the installation troubles you are having, and thanks for persisting with this application. We will try to make it easier in our next release.

I am a little confused: did you install the SDK at C:/Sun/SDK or C:/Sun/AppServer? (confirm that by ensuring that c:/Sun/SDK/bin/asadmin.ba t file is present). Also, as you found out, java does not handle "\" properly because "\" is an escape character in Java strings. You need to use "\\" or "/".

Here is one thing you can try that is guaranteed to work:

Download the Java EE 5 SDK bundle without the tools, and install it. Start the database and the application server.

For running the petstore, you don't need to configure any property file. Just go to c:/Sun/SDK directory and run "ant setup" and "ant run" to have the application open up in the browser.

Once you have this working, download a fresh copy of NetBeans 5.5 and then open the petstore directory in it. That should work.

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 8
There is an error in the instructions above. You need to go to "C:/Sun/SDK/blueprints/petstore" directory to run "ant setup" and "ant run".
bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 9

I'm experiencing the exact same problem here with the "This Application Is Not Currently Available" error message. Same specs as the thread author, and similar issues, with the additional problem that when I go to "run" the petstore application the "Starting Application Server" output box just hangs and hangs and hangs. I waited for a while without any luck, so I closed out Netbeans and restarted... this only seems to make things worse. At that point I can no longer navigate to the web admin console for the domain. I tried stopping and starting the server numerous times. < The following might be out of sequence for my explanation> Two exceptions I see in the server logs during startup are:

[#|2007-01-08T20:53:16.410-0500|SEVERE|sun-appserver-pe9.0|com.sun.org.apache.commons.modeler.Registry|_ThreadID=16;_ThreadName=Thread-27;_RequestID=2d47b2b6-9591-493f-8380-acc8a8603e9b;|Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/petstore,J2EEApplication=null,J2EEServer=server|#]

[#|2007-01-08T20:53:16.430-0500|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=Thread-27;petstore;java.lang.RuntimeException: java.lang.RuntimeException: javax.naming.NameNotFoundException;_RequestID=2d47b2b6-9591-493f-8380-acc8a8603e9b;|WEB0123: WebModule [petstore] failed to deploy and has been disabled: [java.lang.RuntimeException: java.lang.RuntimeException: javax.naming.NameNotFoundException].|#]

The first time I encountered this I was basically stuck, and ended up re-installing the app server, which allowed me to once again log in to the admin console... but as soon as I followed the petstore instructions again... same issue happened. This time I discovered that by finding all occurences of folders with the text 'petstore' under domain1 and deleting them, as well as deleting the project folder created when I extracted the petstore-2.0.jar, I was able to get back into the admin console without having to reinstall the app server.

So now... I have no idea what to do. I tried using the admin console to manually deploy the war file (not even sure if I'm right about that)... it seemed to take, but required a restart of the server, which left me in the hanging server situation as described above.

What the heck is going on here? Sorry if my lingo is off, or my explanation is rambling....hoping one of the details I give will help.

Thanks.

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 10
I'm an idiot. I didn't do the "/path/to/passwordfile" file stage. I won't bother trying to explain how I repeatedly neglected to do that properly.
bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 11

Hi,

are you still having any problems?

One thing that seems to be causing confusion is that pestore 2.0 is available as a download and also is bundled already in the Java EE 5 SDK. The instructions are slightly different for the two since the bundled SDK has some of the environemnet stuff set up already.

I recommend trying the petstore that is bundled in the SDK since it has fewer steps. Can you maybe try that?

Let us know if you still have questions.

hth,

Sean

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 12
Not sure if that was directed at me, but I'm all sorted out now.... thanks! Didn't know about the bundling of petstore, but the downloaded version works great.... now I'm just dissecting it.
bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 13
Great!!Let us know if you have any other questions...Thanks - Mark
bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 14

> I've found out one of the errors, which is very

> stupid ><. The errors is the forward slash and back

> slash in defining the directory path:

>

> javaee.home=C:\Sun\SDK

> javaee.server.passwordfile=D:\sdkFile.txt

>

> After correcting these errors, the build is

> successful, however, the petstore didn't show up and

> the following errors displayed in the web browser:

>

> HTTP Status 503 - This applicaiton is not

> available

> type status report

> message This application is not currently

> available

> description The requested service (This

> applcaiton is not currently available) is not

> currently available.

>

> Sun Java system Application Server Platform

> Edition 9.0_01

>

> Can anyone tell me what is going wrong? By the way,

> the duplication error during the build process exist,

> should i fix that or ignore that?

>

> Cheers

> RMS

Hi,

I need help from u,

Hi all,

I wish to deploy and run the Java petstore 2.0 demo. I have the following OS and platforms:

- WinXP Home SP2

- Java EE 5 SDK (installation dir: C:\Sun\appserver)

- NetBeans IDE 5.5 Beta

i did following changein build.xml

javaee.server.passwordfile=D:/javapetstore-2.0-ea1/password.txt

password file contains:

AS_ADMIN_PASSWORD=adminadmin

and i decide to run setup.xml.

it shows following error.

in case of any clarification mail me : prakasamr@gmail.com

Awaiting your reply.

check:

tools:

create-pool-local:

Registering jdbc-connection-pool PetstorePool.

ds=org.apache.derby.jdbc.ClientDataSource

check:

tools:

create-jdbc-connection-pool:

JdbcConnectionPool already exists: cannot add duplicate

CLI137 Command create-jdbc-connection-pool failed.

create-resource-local:

Registering jdbc resource jdbc/PetstoreDB.

check:

tools:

create-jdbc-resource:

JdbcResource already exists: cannot add duplicate

CLI137 Command create-jdbc-resource failed.

delete-db:

driver=org.apache.derby.jdbc.ClientDriver

url=jdbc:derby://localhost:1527/petstore;create=true;

user=APP

password=APP

D:\javapetstore-2.0-ea1\setup\setup.xml:58: org.apache.derby.client.am.SqlException: Connection authorization failure occurred. Reason: userid invalid.

BUILD FAILED (total time: 2 seconds)

bronzestar at 2007-7-7 14:18:18 > top of Java-index,Archived Forums,Socket Programming...
# 15

Hi,

I need help from u,

Hi all,

I wish to deploy and run the Java petstore 2.0 demo. I have the following OS and platforms:

- WinXP Home SP2

- Java EE 5 SDK (installation dir: C:\Sun\appserver)

- NetBeans IDE 5.5 Beta

i did following changein build.xml

javaee.server.passwordfile=D:/javapetstore-2.0-ea1/password.txt

password file contains:

AS_ADMIN_PASSWORD=adminadmin

and i decide to run setup.xml.

it shows following error.

in case of any clarification mail me : prakasamr@gmail.com

Awaiting your reply.

check:

tools:

create-pool-local:

Registering jdbc-connection-pool PetstorePool.

ds=org.apache.derby.jdbc.ClientDataSource

check:

tools:

create-jdbc-connection-pool:

JdbcConnectionPool already exists: cannot add duplicate

CLI137 Command create-jdbc-connection-pool failed.

create-resource-local:

Registering jdbc resource jdbc/PetstoreDB.

check:

tools:

create-jdbc-resource:

JdbcResource already exists: cannot add duplicate

CLI137 Command create-jdbc-resource failed.

delete-db:

driver=org.apache.derby.jdbc.ClientDriver

url=jdbc:derby://localhost:1527/petstore;create=true;

user=APP

password=APP

D:\javapetstore-2.0-ea1\setup\setup.xml:58: org.apache.derby.client.am.SqlException: Connection authorization failure occurred. Reason: userid invalid.

BUILD FAILED (total time: 2 seconds)

Message was edited by:

prakasamr

bronzestar at 2007-7-7 14:18:21 > top of Java-index,Archived Forums,Socket Programming...