Skip to main content

can't deploy app in win7 + GF + NB (xp works fine)

3 replies [Last post]
senderj
Offline
Joined: 2008-09-24
Points: 0

I am using NB7.0.1 with GF3.1.1. I developed an jee6 app on win xp. Everything run smoothly without problem. I can deploy my app from NB to GF. I can also start GF alone and deploy via asadmin. Recently, I port everything to win 7 and encoutered a lot of problems:

1. In win7, I found that the GF server (the only one in my NB) has deployment dir pointing to "C:\Users\myID\.netbean....." instead of "C:\Program Files\glassfish-3.1.1.....". I am able to start GF from NB, the GF seems to work fine (I can see GF default front page) but afterward when I deploy my app in NB, nothing happen, no log, no message, nothing. I tried to deploy my app via asadmin command, but I can't found any asadmin in the "C:\Users\myID\.netbean.....\bin" folder, it's empty.

2. I tried to start GF outside NB by running asadmin from the "C:\Program Files\glassfish-3.1.1.....\bin" folder. But even using an Administartors ID in win 7, it failed with:

</p>
<p>java.io.IOException: Couldn't get lock for C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\logs\server.log <br />
Waiting for domain1 to start .Error starting domain domain1. <br />
The server exited prematurely with exit code 1. <br />
Before it died, it produced the following output:</p>
<p>Launching GlassFish on Felix platform <br />
ERROR: Error creating bundle cache. (java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Access is denied)) <br />
java.lang.Exception: Unable to create bundle cache lock file: java.io.FileNotFoundException: C:\Program Files\glassfish-3.1.1\glassfish\domains\domain1\osgi-cache\felix\cache.lock (Access is denied) <br />

I've checked that Administors group has full control on both server.log and cache.lock file.

3. I tried to add the "C:\Program Files\glassfish-3.1.1....." GF installation as my second GF v3.x server in NB. But NB always reject with invalid GF installation for all subfolder under it. In fact the GF was installed from the NB package.

Any help would be much appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
senderj
Offline
Joined: 2008-09-24
Points: 0

OK, I finally made it works by switching off the UAC of win7. But still NB/GF didn't behave the same as in xp.

1. After deploying my app in NB to GF, GF started, deployed my app and it works fine. But my app didn't appear in the Services tab of NB. The GF appeared as running, but under it there is no app deployed. But my app (both servlet and EJB) is working normally.

2. After changing my coding and redeploy my app, NB console said that the port is occupied. The original deployment remains unchanged.

3. The Stop button in the GF console (in NB) is grey and stopping the GF in the Service tab has no effect. The only way to stop the GF is to kill the process in win task manager.

It appears to me that sometimes NB is able to link up the right GF installation, but sometimes it can't (remember in win7 there are two GF installations, in Program Files and in Users, even if you only install once.) Anybody experince the same?

emiddio
Offline
Joined: 2007-04-16
Points: 0

in Services tab - Servers node -- you can add a new server;

you can right moust -- view properties of the existing servers -- see where
they are located.

you can have many servers -- add a new glassfish -- for you installation.

gary
----- Original Message -----
From:
To:
Sent: Sunday, December 11, 2011 6:58 PM
Subject: Re: can't deploy app in win7 + GF + NB (xp works fine)

OK, I finally made it works by switching off the UAC of win7. But still
NB/GF
didn't behave the same as in xp.

1. After deploying my app in NB to GF, GF started, deployed my app and it
works fine. But my app didn't appear in the Services tab of NB. The GF
appeared as running, but under it there is no app deployed. But my app (both
servlet and EJB) is working normally.

2. After changing my coding and redeploy my app, NB console said that the
port is occupied. The original deployment remains unchanged.

3. The Stop button in the GF console (in NB) is grey and stopping the GF in
the Service tab has no effect. The only way to stop the GF is to kill the
process in win task manager.

It appears to me that sometimes NB is able to link up the right GF
installation, but sometimes it can't (remember in win7 there are two GF
installations, in Program Files and in Users, even if you only install
once.)
Anybody experince the same?

--

[Message sent by forum member 'senderj']

View Post: http://forums.java.net/node/866676

senderj
Offline
Joined: 2008-09-24
Points: 0

emiddio,

Thanks for the reply. Please read my post again. My problem is NOT knowing how to add server. My problem is when I add server, NB rejects it saying the folder is not a proper GF installation but in fact it is a proper GF installation from where I can launch GF.