Hide Forgot
Description of problem: Grails applications with OSGi can't be deployed on EAP. As a workaround, adding OSGi headers to generated WAR file can be disabled (see [2]). Steps to Reproduce: 1. create a Grails application (grails create-app) 2. package the application (grails war) 3. deploy the application to EAP Actual results: deployment fails with following error: ERROR [org.jboss.osgi.framework.internal.FrameworkEventsPlugin] (MSC service thread 1-7) Framework ERROR: org.osgi.framework.BundleException: Cannot resolve bundle resModule: [grails-app:0.1.0] (...) Caused by: org.jboss.osgi.resolver.XResolverException: Unable to resolve Module[grails-app:0.1.0]: missing requirement [Module[grails-app:0.1.0]] package; (&(package=javax.servlet)(version>=2.5.0)(!(version>=3.0.0))) Expected results: application is deployed correctly Additional info: [1] https://issues.jboss.org/browse/AS7-2941 [2] https://docspace.corp.redhat.com/docs/DOC-88882 (section 'Grails')
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: OSGi is not enabled in JBoss Enterprise Application Server. Artifacts produced by Grails misses a Package-Import of javax.naming in the bundle. In order to disable OSGi while packaging your Grails application, set following property. grails.project.war.osgi.headers = false
Where does the grails.project.war.osgi.headers = false property get set?
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,5 +1,3 @@ -OSGi is not enabled in JBoss Enterprise Application Server. Artifacts produced by Grails misses a Package-Import of javax.naming in the bundle. - -In order to disable OSGi while packaging your Grails application, set following property. +OSGi is not enabled in JBoss Enterprise Application Server 6. Artifacts produced by Grails miss a Package-Import of javax.naming in the bundle. The workaround for this issue is to disable OSGi while packaging your Grails application. You can do this by setting the following property: grails.project.war.osgi.headers = false
You have to add it to the BuildConfig.groovy configuration file.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1,3 @@ -OSGi is not enabled in JBoss Enterprise Application Server 6. Artifacts produced by Grails miss a Package-Import of javax.naming in the bundle. The workaround for this issue is to disable OSGi while packaging your Grails application. You can do this by setting the following property: +OSGi is not enabled in JBoss Enterprise Application Server 6. Artifacts produced by Grails miss a Package-Import of javax.naming in the bundle. The workaround for this issue is to disable OSGi while packaging your Grails application. You can do this by setting the following property in the BuildConfig.groovy configuration file: grails.project.war.osgi.headers = false
Doc text edited and inserted into the 2.2.0 release notes book. Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html-single/2.2.0_Release_Notes/index.html Build: JBoss_Web_Framework_Kit-2.2.0_Release_Notes-2.2-en-US-0-26
Verified content in RN.
Migrated to JIRA as https://issues.jboss.org/browse/WFK2-63
I mean https://issues.jboss.org/browse/WFK2-65