Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 178540 - Cannot deploy and run EAR
Cannot deploy and run EAR
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: EAR
6.x
PC Windows XP
: P2 (vote)
: 6.x
Assigned To: Vince Kraemer
issues@javaee
68patch1-verified
:
: 178924 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-13 07:12 UTC by ostermann_bernd
Modified: 2010-01-20 07:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
build-impl.xml regenerated by NB 6.8 (27.08 KB, application/xml)
2009-12-13 07:12 UTC, ostermann_bernd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ostermann_bernd 2009-12-13 07:12:56 UTC
Created attachment 92476 [details]
build-impl.xml regenerated by NB 6.8

Recently I installed NetBeans 6.8 and let it take over the configuration of NB 6.7.1. Running my EAR worked fine. But after I changed some porject properties,
I got the message, that build-impl.xml was regenerated. 
Running my EAR then ends with the following error message:
C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:347: The following error occurred while executing this line:
C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:413: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not found.
BUILD FAILED (total time: 14 seconds)

Server log:

Error attempting to process extensions from the manifest of JAR file C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar; ignoring it and continuing
java.io.FileNotFoundException: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar (Das System kann die angegebene Datei nicht finden)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:97)

After I replaced Build-impl.xml by the old version generated in NB6.7.1 starting the EAR works again.
Comment 1 ostermann_bernd 2009-12-13 09:28:40 UTC
(In reply to comment #0)
> Created an attachment (id=92476) [details]
> build-impl.xml regenerated by NB 6.8
> 
> Recently I installed NetBeans 6.8 and let it take over the configuration of NB
> 6.7.1. Running my EAR worked fine. But after I changed some porject properties,
> I got the message, that build-impl.xml was regenerated. 
> Running my EAR then ends with the following error message:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:347:
> The following error occurred while executing this line:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:413:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not
> found.
> BUILD FAILED (total time: 14 seconds)
> 
> Server log:
> 
> Error attempting to process extensions from the manifest of JAR file
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar;
> ignoring it and continuing
> java.io.FileNotFoundException:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar
> (Das System kann die angegebene Datei nicht finden)
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:114)
>         at java.util.jar.JarFile.<init>(JarFile.java:133)
>         at java.util.jar.JarFile.<init>(JarFile.java:97)
> 
> After I replaced Build-impl.xml by the old version generated in NB6.7.1
> starting the EAR works again.

Ich checked the log file of NB and found:

INFO [org.apache.tools.ant.module]: Cannot find import C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\ant-deploy.xml from C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\build-impl.xml

java.io.IOException: Cannot find import C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\ant-deploy.xml from C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\build-impl.xml
	at org.apache.tools.ant.module.api.support.TargetLister$Script.interpretTasks(TargetLister.java:410

ant-deploy.xml is in subdirectory .\nbproject, not in \OopsWeb.
I moved ant-deploy.xml into the main directory \OopsWeb. Then running The EAR worked.
Comment 2 David Konecny 2009-12-13 14:47:03 UTC
Both build-impl.xml and ant-deploy.xml should be located in nbproject subfolder. Your earlier error log confirms that, eg. "[...]java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:347[...]" but in your last report you seem to moved build-impl.xml to project root? Btw. opening of project checks whether nbproject/build-impl.xml is uptodate and if it is not the IDE will regenerate it. So if you moved your one to project root then IDE should regenerated one in nbproject folder and use that one. Could you confirm or shed more light please? Thanks.
Comment 3 ostermann_bernd 2009-12-14 04:57:33 UTC
(In reply to comment #0)
> Created an attachment (id=92476) [details]
> build-impl.xml regenerated by NB 6.8
> 
> Recently I installed NetBeans 6.8 and let it take over the configuration of NB
> 6.7.1. Running my EAR worked fine. But after I changed some porject properties,
> I got the message, that build-impl.xml was regenerated. 
> Running my EAR then ends with the following error message:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:347:
> The following error occurred while executing this line:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:413:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not
> found.
> BUILD FAILED (total time: 14 seconds)
> 
> Server log:
> 
> Error attempting to process extensions from the manifest of JAR file
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar;
> ignoring it and continuing
> java.io.FileNotFoundException:
> C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\javaws.jar
> (Das System kann die angegebene Datei nicht finden)
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:114)
>         at java.util.jar.JarFile.<init>(JarFile.java:133)
>         at java.util.jar.JarFile.<init>(JarFile.java:97)
> 
> After I replaced Build-impl.xml by the old version generated in NB6.7.1
> starting the EAR works again.

(In reply to comment #2)
> Both build-impl.xml and ant-deploy.xml should be located in nbproject
> subfolder. Your earlier error log confirms that, eg.
> "[...]java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:347[...]" but in your
> last report you seem to moved build-impl.xml to project root? Btw. opening of
> project checks whether nbproject/build-impl.xml is uptodate and if it is not
> the IDE will regenerate it. So if you moved your one to project root then IDE
> should regenerated one in nbproject folder and use that one. Could you confirm
> or shed more light please? Thanks.

Hallo David,
no, I did not move build-impl.xml to  the project root, but a copy of the NB7.1.1 version was there.
I reproduced the case with a copy of ant-deploy.xml in the project root. Running my EAR did not work as opposed to my second comment. So forget this second comment.
I repeated the test with all files at their correct locations. I got the same error message as in my first report. The build failed and the EAR did not run.
I found the following lines in the NB log:
WARNING [org.openide.filesystems.Ordering]: Not all children in Loaders/text/x-ant+xml/Factories/ marked with the position attribute: [org-apache-tools-ant-module-loader-AntProjectDataLoader.instance], but some are: [org.apache.tools.ant.module.resources.xml-ergonomics.instance]
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
moduleID=OopsWeb
I am using glassfish V2.1.1.
As long as deploying and running does not work I will stay with NB 6.7.1
Regards
Ostermann_Bernd
Comment 4 Vince Kraemer 2009-12-14 15:39:32 UTC
http://hg.netbeans.org/web-main/rev/a2db451f99a7
Comment 5 Vince Kraemer 2009-12-14 15:41:26 UTC
if you add failonerror="false" to the copy task you will be able to proceed, otherwise you will need to wait for the patch to 6.8 that includes these changes.
Comment 6 Vince Kraemer 2009-12-14 15:41:46 UTC
mark as fixed
Comment 7 ostermann_bernd 2009-12-15 06:35:21 UTC
(In reply to comment #6)
> mark as fixed

Hallo Vince,
(In reply to comment #6)
> mark as fixed

Hallo Mark,
I added failonerror="false" to the copy task in build-impl.xml. The EAR started. I got the following warnings:
Warning: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not found.
Warning: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not found.

But after accessing the first ejb module I got the following exception:

Exception in thread "AWT-EventQueue-0" javax.ejb.NoSuchEJBException
        at oops.database.remote._UserHandlerRemote_Wrapper.getUser(oops/database/remote/_UserHandlerRemote_Wrapper.java)
        at oops.app.OopsLogin.doLogin(OopsLogin.java:371)
        at oops.app.OopsLogin.btnLoginActionPerformed(OopsLogin.java:323)

...
When I start the deployed EAR by the browser and JavaWebStart allworks fine.
Comment 8 Quality Engineering 2009-12-15 12:43:58 UTC
Integrated into 'main-golden', will be available in build *200912151400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a2db451f99a7
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #178540: cannot deploy and run ear that includes an app client and targets gf v2
Comment 9 ostermann_bernd 2009-12-16 05:08:24 UTC
(In reply to comment #8)
> Integrated into 'main-golden', will be available in build *200912151400* on
> http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> Changeset: http://hg.netbeans.org/main/rev/a2db451f99a7
> User: Vince Kraemer <vkraemer@netbeans.org>
> Log: #178540: cannot deploy and run ear that includes an app client and targets
> gf v2

Hallo Vince,
I installed the recommended build *200912151400* of NB6.8.
But I run still glassfish V2.1.1.
Clicking "deploy" does not deploy my EAR.
I got the following messagesof run-deploy:

pre-run-deploy:
Initial deploying OopsWeb to C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy
Completed initial distribution of OopsWeb
Start registering the project's server resources
Finished registering server resources
moduleID=OopsWeb
deployment started : 0%

Deploying application in domain failed; Error loading deployment descriptors for module [OopsWeb] -- error in opening zip file --  invalid zip file: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsCommon.jar

C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\nbproject\build-impl.xml:268: The module has not been deployed.
BUILD FAILED (total time: 8 seconds)

Comment: 
the location of the file OopsCommon.jar is \gfdeploy\lib\OopsCommon.jar, not gfdeploy\OopsCommon.jar
Similiar messages are issued for 2 other libraries.

Log of glassfish V2.x:
LDR5203: An error occurred while adding URL [file:/C:/Work-BO/Eigene-Programme/java_NetBeans_6_8/OopsWeb/dist/gfdeploy/OopsCommon.jar] to the EJB class loader. Please check the content of this URL. 
LDR5200:MalformedURLException.
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:97)
Comment 10 Vince Kraemer 2009-12-16 08:46:22 UTC
Can you describe the content of your ear for me?

Or better yet, attach an ear file that demonstrates this issue?  That will speed up the fix, since it will eliminate a lot of guess work.
Comment 11 ostermann_bernd 2009-12-16 13:08:25 UTC
(In reply to comment #10)
> Can you describe the content of your ear for me?
> 
> Or better yet, attach an ear file that demonstrates this issue?  That will
> speed up the fix, since it will eliminate a lot of guess work.

Hallo Vince,
seems that my system or me works rather randomly, sorry for that.
I repeated the test with NetBeans 6.8 IDE Build 200912151400.
Results:
deploy: ok without any warnings or error message.
run EAR within netbeans: works, but with the following warnings:

Warning: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not found.
Warning: C:\Work-BO\Eigene-Programme\java_NetBeans_6_8\OopsWeb\dist\gfdeploy\OopsWeb not found.

That is correct: \dist\gfdeploy\OopsWeb does not exist.
But why does netbeans ask for this sub folder; \dist\gfdeploy is created by netbeans.

Launching the application in a browser using JavaWebStart works too.
So all is ok.
So there is no reason, to look at an EAR file. But if you will do so, you will find it at:
http://sourceforge.net/projects/oops-easytrack

Click "view all files" and select the zip file below release web-3.5.
Comment 12 Vince Kraemer 2009-12-21 14:17:29 UTC
*** Bug 178924 has been marked as a duplicate of this bug. ***
Comment 13 pgebauer 2010-01-14 04:18:40 UTC
The fix has been ported into the release68_fixes repository.
http://hg.netbeans.org/release68_fixes/rev/9bdec93adc87


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo