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 119105 - Can't build StockQuoteService sample
Summary: Can't build StockQuoteService sample
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Identity (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Peter Liu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 18:00 UTC by Jaroslav Pospisil
Modified: 2007-10-31 16:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Here is updated identity samples module if you want to test things directly from the IDE. Note that I removed the jaxws-build.xml because it shouldn't be part of the sample. (149.09 KB, application/octet-stream)
2007-10-17 18:59 UTC, Peter Liu
Details
Here is the zip file for the actaul StokQuoteService project. (37.15 KB, application/octet-stream)
2007-10-17 19:01 UTC, Peter Liu
Details
Here is the client zip file (42.50 KB, application/octet-stream)
2007-10-17 19:02 UTC, Peter Liu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2007-10-16 18:00:33 UTC
Reproducible in Beta 2 2007101500 build.

pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init:
deps-jar:
deps-j2ee-archive:
init:
deps-jar:
Created dir:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\build\jar
Copying 2 files to
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\build\jar\META-INF
Compiling 2 source files to
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\build\jar
Note:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\src\java\com\samples\StockQuoteSessionBean.java
uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compile:
library-inclusion-in-manifest:
Created dir: C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\dist
Building jar:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\dist\StockQuoteService-ejb.jar
dist-ear:
init:
deps-module-jar:
deps-ear-jar:
init:
deps-jar:
compile:
library-inclusion-in-manifest:
Building jar:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-ejb\dist\StockQuoteService-ejb.jar
dist-ear:
deps-jar:
wsimport-init:
Created dir:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service
Created dir:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\binaries
wsimport-service-check-StockService:
wsimport-service-StockService:
Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
command line: wsimport -d
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\binaries
-extension -keep -s
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service
-catalog
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\catalog.xml
-verbose
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war/src/conf/xml-resources/web-services/StockService/wsdl/StockService.wsdl
parsing WSDL...


generating code...

com\sun\stockquote\ObjectFactory.java
com\sun\stockquote\PriceType.java
com\sun\stockquote\QuoteRequestType.java
com\sun\stockquote\QuoteResponseType.java
com\sun\stockquote\StockQuotePortType.java
com\sun\stockquote\StockService.java
com\sun\stockquote\package-info.java

compiling code...

javac -d
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\binaries
-classpath C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-antlr.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-apache-bcel.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-apache-bsf.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-apache-log4j.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-apache-oro.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-apache-regexp.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-apache-resolver.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-commons-logging.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-commons-net.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-jai.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-javamail.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-jdepend.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-jmf.jar;C:\Program Files\NetBeans
6.0 Beta 2\java1\ant\lib\ant-jsch.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-junit.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-launcher.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-netrexx.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-nodeps.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-starteam.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-stylebook.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-swing.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-testutil.jar;C:\Program Files\NetBeans 6.0 Beta
2\java1\ant\lib\ant-trax.jar;C:\Program Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant-weblogic.jar;C:\Program
Files\NetBeans 6.0 Beta 2\java1\ant\lib\ant.jar;C:\Program Files\NetBeans 6.0 Beta 2;C:\Program Files\NetBeans 6.0 Beta
2\mobility8\modules\ext\jakarta-oro-2.0.8.jar;C:\Program Files\NetBeans 6.0 Beta
2\mobility8\modules\ext\commons-net-1.4.1.jar;C:\Program Files\NetBeans 6.0 Beta
2\ide8\modules\ext\jsch-0.1.24.jar;C:\Program Files\NetBeans 6.0 Beta 2\platform7\lib\boot.jar;C:\Program Files\NetBeans
6.0 Beta 2\platform7\lib\org-openide-modules.jar;C:\Program Files\NetBeans 6.0 Beta
2\platform7\lib\org-openide-util.jar;C:\Program Files\Java\jdk1.6.0_03\lib\dt.jar;C:\Program
Files\Java\jdk1.6.0_03\lib\tools.jar -Xbootclasspath/p:C:\Program Files\glassfish-v2-b58g\lib\javaee.jar;C:\Program
Files\glassfish-v2-b58g\lib\javaee.jar
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\ObjectFactory.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\PriceType.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\QuoteRequestType.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\QuoteResponseType.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\StockQuotePortType.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\StockService.java
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\generated\wsimport\service\com\sun\stockquote\package-info.java

Copying 2 files to
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\${build.web.dir.real}\WEB-INF\wsdl\StockService
wsimport-service-generate:
Created dir:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\web\WEB-INF\classes
Created dir:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\web\META-INF
Copying 1 file to
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\web\META-INF
Copying 5 files to
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\build\web
library-inclusion-in-archive:
library-inclusion-in-manifest:
Copying 1 file to C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\build
wsimport-service-compile:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\nbproject\build-impl.xml:108: The
following error occurred while executing this line:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\nbproject\jaxws-build.xml:72:
The following error occurred while executing this line:
C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\nbproject\build-impl.xml:163:
destination directory
"C:\Users\jp154641\Documents\NetBeansProjects\StockQuoteService1\StockQuoteService1\StockQuoteService-war\${build.classes.dir.real}"
does not exist or is not a directory
BUILD FAILED (total time: 5 seconds)
Comment 1 Srividhya Narayanan 2007-10-17 02:08:23 UTC
I think this is a stopper for beta2. What is the cause for this regression?
Comment 2 Peter Liu 2007-10-17 02:19:28 UTC
Lukas mentioned that there were quite a bit of changes made to the build scripts and a lot of the sample projects are
broken. 

Anyway, the sample project is completely broken. We also noticed that jaxws.xml is getting obliterated.  Rico and I are
trying to figure out what it going on.

Comment 3 Milan Kuchtiak 2007-10-17 18:01:29 UTC
I am working on a fix.

The stylesheet for jaxws-build.xml has been changed from Beta1 to Beta2. This was necessary due to changes in
project.properties in web projects (very last change made by J2EE team).

The problem is that we don't reflect the stylesheet changes when project is opening.
For that case, the jaxws-build.xml script need to be regenerated using new stylesheet.

we need to compute checksum for the styleshhet similarly as it is done for build-impl.xsl.

I believe, tomorrow I will be able check the fix to trunk.
Comment 4 Peter Liu 2007-10-17 18:23:05 UTC
The identity sample project.xml file has the following buildExtensions element from before:

  <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
            <extension file="jaxws-build.xml" id="jaxws">
                <dependency dependsOn="wsimport-service-compile" target="-do-compile"/>
                <dependency dependsOn="wsimport-service-compile" target="-do-compile-single"/>
                <dependency dependsOn="wsimport-service-generate" target="-pre-pre-compile"/>
            </extension>
        </buildExtensions>

I noticed that this doesn't match what's in jaxws-build.xml. Will this be refreshed automatically, too?  
Comment 5 Milan Kuchtiak 2007-10-17 18:43:11 UTC
Can you please attach the projects created from the StockQuote sample.

Peter, can you also update the StockQuote sample to Beta2:

replace "build.classes.dir.real" with "build.classes.dir"
and "build.web.dir.real" with "build.web.dir"

The fix I am working on is pretty complex.
Comment 6 Peter Liu 2007-10-17 18:59:34 UTC
Created attachment 51150 [details]
Here is updated identity samples module if you want to test things directly from the IDE. Note that I removed the jaxws-build.xml because it shouldn't be part of the sample.
Comment 7 Peter Liu 2007-10-17 19:01:45 UTC
Created attachment 51151 [details]
Here is the zip file for the actaul StokQuoteService project.
Comment 8 Peter Liu 2007-10-17 19:02:05 UTC
Created attachment 51152 [details]
Here is the client zip file
Comment 9 Peter Liu 2007-10-17 19:23:12 UTC
Here are the issues I encountered while updating the sample projects in the cvs repository using beta2:

1. When I opened the StockQuoteService-war project in beta2, the content of jaxws.xml got erased. Note that there is
also a missing reference project (which is expected) happening at the same.  I don't know if it is the cause of it.

2. In the project.xml, the dependencies in the buildExtensions element also got erased. This could be related to the
erasure of the jaxws.xml.

3. I reverted the jaxws.xml and buildExtensions element to the previous version and included in the updated. When I
generate the sample project from the IDE, all the build scripts seem to get generated fine. However, build will fail
because none of the jaxws targets got called.  I think this is related to the out-dated buildExtension element.

4. Another I noticed is that if I close and reopen the sample project within the same IDE session, the content of the
jaxws.xml will get erased and the jaxws-build.xml deleted.

Comment 11 Peter Liu 2007-10-17 19:32:24 UTC
Trying it now.

Comment 12 Peter Liu 2007-10-17 19:48:57 UTC
I am still seeing the exact same behaviors I mentioned above after using the patch. 


Comment 13 Jaroslav Pospisil 2007-10-18 09:28:15 UTC
Closing,because no longer reproducible in Beta2 and Trunk. There's however another issue instead,caused by removing
jaxws-build.xml (see 112766 - same as in Beta1).
Comment 14 Jaroslav Pospisil 2007-10-18 10:47:44 UTC
Reopening again,since reproducible in latest Beta2 build (200710172300). From some reason it's not reproducible in Beta2
(200710170700 zip).
Comment 15 Milan Kuchtiak 2007-10-18 13:16:34 UTC
Please fix the following in the StockQuoteService example (StockQuoteService-war):

1. remove jaxws-build.xml (will be generated on project-open)
2. add the buildExtensions element from project.xml : 
        <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
            <extension file="jaxws-build.xml" id="jaxws">
                <dependency dependsOn="wsimport-service-compile" target="-do-compile"/>
                <dependency dependsOn="wsimport-service-compile" target="-do-compile-single"/>
                <dependency dependsOn="wsimport-service-generate" target="-pre-pre-compile"/>
            </extension>
        </buildExtensions>
3 add <wsdl-url> to jax-ws.xml. This is crucial to distinguish this webservice (from WSDL) from webservices created from
java. Otherwise the entire service element is removed due to broken reference on ejb

This should help without my changes to WebJaxWsLookupProvider that were implemented only in trunk.
Comment 16 Milan Kuchtiak 2007-10-18 14:07:57 UTC
I think, the best would be to generate the example again in Beta2 branch. Then, commit to CVS.
Please, don't remove the <service><wsdl-url> element from jax-ws.xml since this is important information :
- distinguish "WS from WSDL" from "WS from JAVA"
- important for Refresh Service action
Comment 17 Milan Kuchtiak 2007-10-18 14:27:36 UTC
Sorry for the typo :

In 2. I  meant 
add the buildExtensions element into project.xml
no
add the buildExtensions element from project.xml

I noticed, there is also one unnecessary import in StockService.java :
import java.util.GregorianCalendar;
Comment 18 Peter Liu 2007-10-18 23:33:19 UTC
The identity sample projects are too fragile to patch for beta2 and there won't be enough time to create brand new
samples. Therefore, they are disabled for beta2.  We will work on recreating the samples from scratch for FCS. 
Comment 19 Petr Blaha 2007-10-19 08:40:57 UTC
Not stopper, downgrading to P2.
Comment 20 Peter Liu 2007-10-26 21:39:49 UTC
The identity sample projects have been completely redone. Closing this issue as fixed. 
Comment 21 Jaroslav Pospisil 2007-10-31 16:47:25 UTC
v.