Bug 790873

Summary: Grails applications cannot be deployed to EAP unless OSGi is disabled
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Oliver Kišš <okiss>
Component: unspecifiedAssignee: Marek Schmidt <maschmid>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Marek Schmidt <maschmid>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0.0.GACC: kpiwko, maschmid, myarboro, oskutka, ppenicka, trepel
Target Milestone: ---   
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
OSGi is not enabled in JBoss Enterprise Application Platform 6, and artifacts produced by Grails miss a Package-Import of javax.naming in the bundle. To workaround this issue, disable adding of OSGi headers while packaging your Grails applications by adding the following configuration into the BuildConfig.groovy configuration file: grails.project.war.osgi.headers = false
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 14:56:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Oliver Kišš 2012-02-15 15:45:38 UTC
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')

Comment 1 Karel Piwko 2012-02-29 12:05:48 UTC
    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

Comment 2 Rebecca Newton 2012-03-08 00:57:38 UTC
Where does the grails.project.war.osgi.headers = false property get set?

Comment 3 Rebecca Newton 2012-03-08 00:57:38 UTC
    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

Comment 4 Karel Piwko 2012-03-12 22:39:48 UTC
You have to add it to the BuildConfig.groovy configuration file.

Comment 6 Rebecca Newton 2012-06-19 06:26:05 UTC
    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

Comment 8 Petr Penicka 2013-04-19 13:32:01 UTC
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

Comment 9 Karel Piwko 2013-04-19 15:09:26 UTC
Verified content in RN.

Comment 11 Marek Schmidt 2013-07-18 14:56:28 UTC
Migrated to JIRA as https://issues.jboss.org/browse/WFK2-63

Comment 12 Marek Schmidt 2013-07-18 14:57:31 UTC
I mean https://issues.jboss.org/browse/WFK2-65