This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 219377 - Not possible to deploy to GlassFish cluster or standalone instance
Summary: Not possible to deploy to GlassFish cluster or standalone instance
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.3
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 12:09 UTC by Jiri Skrivanek
Modified: 2012-10-15 09:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Server log. (10.92 KB, text/plain)
2012-10-02 12:09 UTC, Jiri Skrivanek
Details
Server log with c1 cluster deployment (11.36 KB, text/plain)
2012-10-05 13:24 UTC, TomasKraus
Details
Build log with c1 cluster deployment (983 bytes, text/plain)
2012-10-05 13:25 UTC, TomasKraus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-10-02 12:09:19 UTC
Created attachment 125226 [details]
Server log.

If you try to deploy to GlassFish cluster, it doesn't work. To reproduce:

- create cluster
cd glassfish3/bin
asadmin start-domain domain1
asadmin create-cluster c1
asadmin create-local-instance --cluster c1 li1c1
asadmin create-local-instance --cluster c1 li2c1
asadmin create-local-instance sli
asadmin stop-domain domain1
- start IDE
- register that GlassFish server in IDE and type c1 in the Target field in Domain Location page of the Add Server Instance wizard
- create web application
- run this application
- browser is opened at address http://localhost:28081/WebApplication1 but there is just error message:

org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required

- repeat with sli target and it also doesn't work

Product Version: NetBeans IDE 7.3 Beta (Build 201210011125)
Java: 1.7.0_07; Java HotSpot(TM) 64-Bit Server VM 23.3-b01
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 1 TomasKraus 2012-10-05 13:24:57 UTC
Created attachment 125453 [details]
Server log with c1 cluster deployment
Comment 2 TomasKraus 2012-10-05 13:25:36 UTC
Created attachment 125454 [details]
Build log with c1 cluster deployment

I saw no problem during the build.
Comment 3 TomasKraus 2012-10-05 13:28:45 UTC
compile-jsps:
Starting GlassFish Instance sli
GlassFish Instance sli is running.
Distributing /tmp/WebApplication1/dist/WebApplication1.war to [GlassFish Instance sli]
Initializing...
run-deploy:
Browsing: http://localhost:28082/WebApplication1
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 28 seconds)

Also no problem with standalone instance.

Looks like I may need some help with debugging (or at least reproducing) this issue.
Comment 4 TomasKraus 2012-10-11 14:43:41 UTC
We did some additional investigation with Jiri and we saw that Java VM used for cluster instances is not the same as Java VM used to start DAS. System default Java was used instead. And in case it was not JDK but JRE instance was unable to call javac on JSPs.

I made 3 changes to pass information about JDK so DAS:
1) -Dcom.sun.aas.javaRoot=<java home> is passed as argument to java executable
2) JAVA_HOME system environment variable is set to Java installation directory
3) AS_JAVA system environment variable is set to Java installation directory

This should be enough to tell the server what Java to use.
Comment 5 TomasKraus 2012-10-11 15:10:22 UTC
I see that it's working in my development environment.
Fix is in glassfish-tooling-sdk-0.3-b012.jar so you can test it when build with this (or later) GF Tooling SDK library will be available.