NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Mon Sep 27, 2010 2:16 pm Post subject: Can't deploy tutorial examples |
|
|
I have a strange proble - and it is probably because I am a complete amateur, but we all have to start somewhere; I am following "The Java EE 6 Tutorial" and building the examples as I go along. My setup is, briefly:
Glassfish 3 on a server
NetBeans 6.9.1 on a workstation
I have been able to deploy everything until I came to the CDI chapter (18 and 19), but now it comes back with an error - in NetBeans:
| Code: | init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Building jar: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war
Distributing /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war to [GlassFish Server 3]
deploy?path=/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war&name=simplegreeting&force=true failed on GlassFish Server 3
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/nbproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED (total time: 1 second)
|
- and when I try with ant:
| Code: | # ant deploy
Buildfile: build.xml
check:
tools:
-pre-deploy:
deploy:
[exec] /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/asadmin: line 13: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/../config/asenv.conf: No such file or directory
BUILD FAILED
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/app-server-ant.xml:350: exec returned: 1
Total time: 1 second
|
I realise that this last one may not be meaningful in this situation, since the examples in the book assume that I am running the server locally. I also tried to deploy from the server:
| Code: | | Exception while loading the app : org.glassfish.deployment.common.DeploymentException: WELD-001202 Error parsing org.xml.sax.SAXParseException: Premature end of file. |
It is all a bit impenetrable when you don't know all the ins and outs of things. Has anybody got any idea what is wrong? |
|
| Back to top |
|
 |
TD Posted via mailing list.
|
Posted: Tue Sep 28, 2010 1:32 am Post subject: Re: Can't deploy tutorial examples |
|
|
I've never figured out WHY that happens, but it does frequently... I just
undeploy the war from the server (Services page), stop the server, clean and
build and retry normally, the problem clears itself most times.
Tony
-----Original Message-----
From: janpla [mailto:address-removed]
Sent: 27 September 2010 15:17
To: address-removed
Subject: [nbj2ee] Can't deploy tutorial examples
I have a strange proble - and it is probably because I am a complete
amateur, but we all have to start somewhere; I am following "The Java EE 6
Tutorial" and building the examples as I go along. My setup is, briefly:
Glassfish 3 on a server
NetBeans 6.9.1 on a workstation
I have been able to deploy everything until I came to the CDI chapter (18
and 19), but now it comes back with an error - in NetBeans:
Code:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Building jar:
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/d
ist/simplegreeting.war
Distributing
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/d
ist/simplegreeting.war to [GlassFish Server 3]
deploy?path=/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simp
legreeting/dist/simplegreeting.war&name=simplegreeting&force=true failed on
GlassFish Server 3
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/n
bproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED (total time: 1 second)
- and when I try with ant:
Code:
# ant deploy
Buildfile: build.xml
check:
tools:
-pre-deploy:
deploy:
[exec]
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../
../../bin/asadmin: line 13:
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../
../../bin/../config/asenv.conf: No such file or directory
BUILD FAILED
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/app-serve
r-ant.xml:350: exec returned: 1
Total time: 1 second
I realise that this last one may not be meaningful in this situation, since
the examples in the book assume that I am running the server locally. I also
tried to deploy from the server:
Code:
Exception while loading the app :
org.glassfish.deployment.common.DeploymentException: WELD-001202 Error
parsing org.xml.sax.SAXParseException: Premature end of file.
It is all a bit impenetrable when you don't know all the ins and outs of
things. Has anybody got any idea what is wrong? |
|
| Back to top |
|
 |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Tue Sep 28, 2010 8:48 am Post subject: |
|
|
I have:
http://forums.sun.com/thread.jspa?messageID=11038095
When I opened the beans.xml file in the XML pane, I found it had 2 lines - ie it contained a line-end. When I deleted that, it deploys. What a bizarre error. |
|
| Back to top |
|
 |
Troy Giunipero Posted via mailing list.
|
Posted: Tue Sep 28, 2010 8:09 pm Post subject: Re: Can't deploy tutorial examples |
|
|
Hi,
The CDI chapters are new - it's possible the problem doesn't have to do with your setup. The JEE 6 Tutorial has its own feedback link (see http://download.oracle.com/javaee/6/tutorial/doc/). You may want to try writing there first.
But looking at the error (WELD-001202 Error parsing org.xml.sax.SAXParseException: Premature end of file), you could try opening your beans.xml file in the editor, then right-click and choose Check XML, or Validate XML. Weld is the reference implementation for CDI - it is the engine that allows CDI to work on your server. SAX is the XML parser that Java uses to parse XML files in your application. beans.xml is the XML configuration file required for CDI.
NetBeans docs also provides some tutorials on CDI: http://netbeans.org/kb/docs/javaee/cdi-intro.html
troy
On 27 Sep 2010, at 15:17, janpla wrote:
| Quote: | I have a strange proble - and it is probably because I am a complete amateur, but we all have to start somewhere; I am following "The Java EE 6 Tutorial" and building the examples as I go along. My setup is, briefly:
Glassfish 3 on a server
NetBeans 6.9.1 on a workstation
I have been able to deploy everything until I came to the CDI chapter (18 and 19), but now it comes back with an error - in NetBeans:
Code:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Building jar: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war
Distributing /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war to [GlassFish Server 3]
deploy?path=/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war&name=simplegreeting&force=true failed on GlassFish Server 3
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/nbproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED (total time: 1 second)
- and when I try with ant:
Code:
# ant deploy
Buildfile: build.xml
check:
tools:
-pre-deploy:
deploy:
[exec] /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/asadmin: line 13: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/../config/asenv.conf: No such file or directory
BUILD FAILED
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/app-server-ant.xml:350: exec returned: 1
Total time: 1 second
I realise that this last one may not be meaningful in this situation, since the examples in the book assume that I am running the server locally. I also tried to deploy from the server:
Code:
Exception while loading the app : org.glassfish.deployment.common.DeploymentException: WELD-001202 Error parsing org.xml.sax.SAXParseException: Premature end of file.
It is all a bit impenetrable when you don't know all the ins and outs of things. Has anybody got any idea what is wrong?
|
|
|
| Back to top |
|
 |
jyeary
Joined: 21 Oct 2008 Posts: 605 Location: Simpsonville, SC
|
Posted: Tue Sep 28, 2010 11:18 pm Post subject: Re: Can't deploy tutorial examples |
|
|
Check if your build.xml is well formed.
Sent from my iPhone
On Sep 27, 2010, at 10:17, "janpla" <address-removed> wrote:
| Quote: | I have a strange proble - and it is probably because I am a complete amateur, but we all have to start somewhere; I am following "The Java EE 6 Tutorial" and building the examples as I go along. My setup is, briefly:
Glassfish 3 on a server
NetBeans 6.9.1 on a workstation
I have been able to deploy everything until I came to the CDI chapter (18 and 19), but now it comes back with an error - in NetBeans:
Code:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Building jar: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war
Distributing /repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war to [GlassFish Server 3]
deploy?path=/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/dist/simplegreeting.war&name=simplegreeting&force=true failed on GlassFish Server 3
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/cdi/simplegreeting/nbproject/build-impl.xml:683: The module has not been deployed.
BUILD FAILED (total time: 1 second)
- and when I try with ant:
Code:
# ant deploy
Buildfile: build.xml
check:
tools:
-pre-deploy:
deploy:
[exec] /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/asadmin: line 13: /repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/../../../../../bin/../config/asenv.conf: No such file or directory
BUILD FAILED
/repo/root/staf/glassfish/docs/javaee-tutorial/examples/bp-project/app-server-ant.xml:350: exec returned: 1
Total time: 1 second
I realise that this last one may not be meaningful in this situation, since the examples in the book assume that I am running the server locally. I also tried to deploy from the server:
Code:
Exception while loading the app : org.glassfish.deployment.common.DeploymentException: WELD-001202 Error parsing org.xml.sax.SAXParseException: Premature end of file.
It is all a bit impenetrable when you don't know all the ins and outs of things. Has anybody got any idea what is wrong?
|
|
|
| Back to top |
|
 |
janpla
Joined: 26 Aug 2010 Posts: 54
|
Posted: Thu Sep 30, 2010 9:22 am Post subject: |
|
|
Troy, jyeary,
Thank you, guys - it was the beans.xml that was wrong: it has a <eol>, which apparently is enough to blow the parser out of the water. The amusing thing is, the file is probably never going to contain anything as I understand it, because we now use annotations, right? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|