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.
Product Version = NetBeans IDE 8.1 (Build 201510222201) Operating System = Mac OS X version 10.11.3 running on x86_64 Java; VM; Vendor = 1.8.0_45 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Reproducibility: Happens every time STEPS: * Create a Maven WAR project * Generate a JAX-WS client to a web service * Inject a reference to the JAX-WS client in a managed bean (EJB, WS Endpoint, etc) * Run the application and try an action that constructs an instance of the managed bean * JAX-WS tries to connect to the URL of the client to retrieve the WSDL instead of retrieving it from the jax-ws catalog. Disable your network connection to see what happens if the URL of the WSDL is not reachable (the application freezes) * This is because in the POM, the Maven WAR pluging is configured to copy the jax-ws catalog to "WEB-INF" instead of "WEB-INF/classes/META-INF" as specified in the JavaEE/JAX-WS spec ACTUAL: JAX-WS client instantiation/injection does not succeed and app freezes because the JAX-WS implementation tries to connect to the WSDL URL to retrieve it EXPECTED: JAX-WS client injection should succeed even when working offlin
Can you be more precise on steps to reproduce? The code you have generated etc. Though I have prepared a fix, I'm not able to reproduce the original behavior.
When you add a web service client to a Maven web project, NetBeans generates this (take note of plugin.configuration.webResources.resource.targetPath): <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>myapp.war</warName> <webResources> <resource> <directory>src</directory> <targetPath>WEB-INF</targetPath> <includes> <include>jax-ws-catalog.xml</include> </includes> </resource> </webResources> </configuration> </plugin> Instead of this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> <warName>myapp.war</warName> <webResources> <resource> <directory>src</directory> <targetPath>WEB-INF/classes/META-INF</targetPath> <includes> <include>jax-ws-catalog.xml</include> </includes> </resource> </webResources> </configuration> </plugin>
AFAIK when using the web service as client you are right and I have made a quick fix exactly for this. However I'd like to test it really fixes the thing. Alternatively I could push the fix so you can try it.
Hi, thanks a lot. I'm not sure how I could be more precise about reproduction steps. Please push the change and I'll test. What do I need to update from my end to get the new code?
Attempt to fix in web-main c7ab29ab922d. Please verify once the message about integration to dev build appears here. Thanks in advance.
Please can you test your usecase with the latest daily build?
Awaiting user response.
I've tested the nightly build. The generates two resources. One in WEB-INF (wrong) and another in WEB-INF/classes/META-INF (correct). This fixes the problem.
Thank you for your effort!