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.
Created attachment 134189 [details] WebLogic server log. It is not possible to deploy Maven EAR project to WebLogic 12. To reproduce: - create Maven Enterprise Application project (Java EE 6, WebLogic 12.1.1) - add new session bean with business method to -ejb project - build with dependencies covering project - run -ear project but it fails Deployment failed. The message was: problem: cvc-complex-type.2.4c: Expected element 'module@http://java.sun.com/xml/ns/javaee' before the end of the content in element application@http://java.sun.com/xml/ns/javaee:<null> Product Version: NetBeans IDE Dev (Build web-main-javaee7-290-on-20130507) Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Thanks Jirko, I'll take a look at it at Thursday
The problem lies in application.xml which is empty in Maven EAR project but obviously it need to contains some additional configuration: For now the workarround is to manually update application.xml and put the following configuration inside the <application> open-close tags: <display-name>SomeApplicationName</display-name> <module> <web> <web-uri>NameOfTheWebModule-war.war</web-uri> <context-root>/ContextRootUsedInWebModule</context-root> </web> </module> <module> <ejb>NameOfTheEjbModule-ejb.jar</ejb> </module> ..for the correct fix I'll need to reuse some code that is currently only in non-public j2ee.earproject module (specifically EarProjectGenerator.setupDD() method). I'll investigate it further..
Fixed in: web-main #a5d3d680a862 I guess this should be a 7.3.1 HR fix candidate ??
Yes it is - thanks a lot Martin.
Integrated into 'main-golden', will be available in build *201305132300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a5d3d680a862 User: Martin Janicek <mjanicek@netbeans.org> Log: #229465 - Cannot deploy Maven EAR to WebLogic
Verified in NetBeans IDE Dev (Build 201305132300).
CCing to MartinF. May I ask you for peer code review?
I'm really not an EAR expert, :) but as far as I saw the patch seems safe to me. There is place for possible NPE at "docBase.getFileObject(APPLICATION_XML);" but nothing what couldn't occur before too and which shouldn't happen for new projects. From my point of view free to integrate, patch is fine.
Transplanted in: releases #abccacf64976
Integrated into 'releases', will be available in build *201305202200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/abccacf64976 User: Martin Janicek <mjanicek@netbeans.org> Log: #229465 - Cannot deploy Maven EAR to WebLogic (transplanted from a5d3d680a862dcfc45d8b3ba59937bf1d6f6a4a5)
In trunk it works, in 7.3.1 it doesn't. The difference between projects is that in trunk only weblogic-application.xml is created but in 7.3.1 there is also application.xml which causes problems. Deployment failed. The message was: problem: cvc-complex-type.2.4c: Expected element 'module@http://java.sun.com/xml/ns/javaee' before the end of the content in element application@http://java.sun.com/xml/ns/javaee:<null>
I was unable to find out why the patch does not work in 7.3.1. Thus I have created and pushed another patch (web-main #d01bae271af4) which should be more reliable. The previous patch were using EarModuleProviderImpl.getChildModuleProviders() for collecting sub-projects. But for some reason this solution worked randomly (in some cases J2eeModuleProviders of child projects weren't initialized during the creation and thus the application.xml was not created in the correct form). Updated patch is using child project's directly from the wizard iterator (these should be always available) which I think will solve the problem.
Jirko could you please verify it in trunk once the patch will be propagated? (hard to say if it will be anytime soon since the web-main isn't stable at the moment - alternatively I can send you maven.j2ee jar built with the patch)
Patch tested with 7.3.1 works for me.
Thanks! I'm going to push the changes to the relases repository.
Patch integrated in: releases #f4b5aa98dfed
Integrated into 'releases', will be available in build *201305272201* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/f4b5aa98dfed User: Martin Janicek <mjanicek@netbeans.org> Log: #229465 - Cannot deploy Maven EAR to WebLogic
Integrated into 'main-golden', will be available in build *201305281155* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d01bae271af4 User: Martin Janicek <mjanicek@netbeans.org> Log: #229465 - Cannot deploy Maven EAR to WebLogic