cannot deploy webapps-simple

Hi,

I have installed sun system application server beta (j2eesdk-1_4_2004Q4-beta-windows.exe)

and I have started Samples Server.

First clarification

* we have to use 8090 as the port. where is this information?

Secondly, I was trying to undeploy webapps-simple present in the

C:\Sun\AppServer\samples\webapps\apps\simple>

I got the following messages when I did asant undeploy

setup_env:

keydel_common:

[echo] Deleting key for user j2ee in server server

[sun-appserv-admin] Attribute password is deprecated. Please use passwordfile i

nstead.

[sun-appserv-admin] Executing: delete-file-user --port 4858 --host mv-asatr-01 -

-password admin222 --user admin j2ee

[sun-appserv-admin] Operation 'removeUser' failed in 'configs' Config Mbean.

[sun-appserv-admin] Target exception message: No such user [j2ee].

BUILD FAILED

file:C:/Sun/AppServer/samples/common-ant.xml:1004: An exception occurred while r

unning the command. The exception message is: CLI137 Command delete-file-user f

ailed..

Total time: 1 second

[1147 byte] By [aswath] at [2007-9-30 22:29:34]
# 1

> Hi,

> I have installed sun system application server beta

> (j2eesdk-1_4_2004Q4-beta-windows.exe)

> and I have started Samples Server.

> First clarification

> * we have to use 8090 as the port. where is this

> information?

<install_dir>/samples/docs/installing.html talks about the values used in <install_dir>/samples/common.properties

The samples/common.properties file will already have the required settings.

Here is an example of samples/common.properties filled out for installed location of c:\Sun\appserver :

C:\Sun\appserver\samples>cat common.properties

com.sun.aas.pointbaseRoot=C:/Sun/appserver/pointbase

com.sun.aas.webServicesLib=C:/Sun/appserver/lib

com.sun.aas.imqLib=C:/Sun/appserver/imq/lib

com.sun.aas.installRoot=C:/Sun/appserver

com.sun.aas.javaRoot=c:/Sun/appserver/jdk

#admin password will not be saved as default. user can enter it and save it manually.

admin.password=admin

admin.host=localhost

appserver.instance=server

appserver.instance.port=8080

admin.user=admin

admin.port=4848

db.port=9092

db.driver=com.pointbase.jdbc.jdbcUniversalDriver

db.classpath=${com.sun.aas.pointbaseRoot}/lib/pbclient.jar;${com.sun.aas.pointbaseRoot}/lib/pbembedded.jar;${com.sun.aas.pointbaseRoot}/lib/pbtools.jar

domain.name=domain1

You can change:

appserver.instance.port=8080

to

appserver.instance.port=8090

or whatever port value you specified for your http listener during installation.

<install_dir>/samples/docs/setupenv.html also talks about this appserver.instance.port and defines it usage:

appserver.instance.portThe HTTP port number on which the application server instance is listening.

For this particular sample you should change the source codes references 8080 to 8090 and rebuild the application, and then deploy and use your rebuilt application which would now have the correct port information embedded within this application.

See svgexample.html files for this type of reference:

<a href="http://localhost:8080/webapps-simple/jsp/jsp2/jspx/textRotate.jspx?name=JSPX">

http://localhost:8080/webapps-simple/jsp/jsp2/jspx/textRotate.jspx?name=JSPX</a>

and change appropriately to your specified port of 8090.

These samples are designed to work on the default port, and you'll need to update hard coded references to 8080 within any application that uses this port value directly.

> Secondly, I was trying to undeploy webapps-simple

> present in the

> C:\Sun\AppServer\samples\webapps\apps\simple>

> I got the following messages when I did asant

> undeploy

>

> setup_env:

>

> keydel_common:

> [echo] Deleting key for user j2ee in server

> erver server

> [sun-appserv-admin] Attribute password is deprecated.

> Please use passwordfile i

> nstead.

> [sun-appserv-admin] Executing: delete-file-user

> --port 4858 --host mv-asatr-01 -

> -password admin222 --user admin j2ee

> [sun-appserv-admin] Operation 'removeUser' failed in

> 'configs' Config Mbean.

> [sun-appserv-admin] Target exception message: No such

> user [j2ee].

>

> BUILD FAILED

> file:C:/Sun/AppServer/samples/common-ant.xml:1004: An

> exception occurred while r

> unning the command. The exception message is: CLI137

> Command delete-file-user f

> ailed..

>

> Total time: 1 second

It seems as it you either undeployed once already, or never had successfully deployed, because the user which is attempted to be deleted is not found. The undeploy target depends on "unsetup,undeploy_common" so if you have already performed unsetup successfully, then you can just performasant undeploy_common to undeploy the application and not attempt to clean the environment of file users. Please look at the setup and unsetup targets to see what they are doing, and you can perform asant setup/asant unsetup as needed.. The application build.xml file is designed to just allow you to perform asant deploy and asant undeploy without having to worry about separate setup/unsetup steps.

Please let me know how you are doing after reading this post.

Regards,

Jon

jbenoit at 2007-7-7 12:52:57 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Hi Jon,Thanks for your detailed reply.I am looking at *1 and making progress and able to deploy other j2ee tutorial examples-aswath
aswath at 2007-7-7 12:52:57 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...