[
https://issues.jboss.org/browse/AS7-2941?page=com.atlassian.jira.plugin.s...
]
Thomas Diesler commented on AS7-2941:
-------------------------------------
You can add these capabilities to enable OSGi webapp support
{code}
<capability name="org.ops4j.pax.web:pax-web-jsp:1.1.2"
startlevel="1"/>
<capability name="org.ops4j.pax.web:pax-web-jetty-bundle:1.1.2"
startlevel="1"/>
<capability name="org.ops4j.pax.web:pax-web-extender-war:1.1.2"
startlevel="1"/>
{code}
when you then deploy a grails.war that was generated with grails-2.0.0 you get
{code}
15:06:11,099 INFO [stdout] (Executor: 1) Caused by: java.lang.ClassNotFoundException:
javax.naming.NamingException from [Module "deployment.as2941:0.1.0" from Service
Module Loader]
15:06:11,099 INFO [stdout] (Executor: 1) at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
15:06:11,100 INFO [stdout] (Executor: 1) at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
15:06:11,100 INFO [stdout] (Executor: 1) at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
15:06:11,100 INFO [stdout] (Executor: 1) at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
15:06:11,100 INFO [stdout] (Executor: 1) at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
15:06:11,100 INFO [stdout] (Executor: 1) at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
{code}
This is correct because a Package-Import of javax.naming is missing in the grails bundle.
Instead we have
{code}
15:06:08,255 DEBUG [org.jboss.osgi.framework.internal.ResolverPlugin] (MSC service thread
1-2) Mark resolved: [as2941:0.1.0]
Wire[[as2941:0.1.0],Import-Package[javax.servlet:[2.5.0,3.0.0);resolution:=mandatory]
--> [jbosgi-http-api:1.0.5],Export-Package[javax.servlet:2.5.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.http:[2.5.0,3.0.0);resolution:=mandatory]
--> [jbosgi-http-api:1.0.5],Export-Package[javax.servlet.http:2.5.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.resources:[2.5.0,3.0.0);resolution:=mandatory]
--> [jbosgi-http-api:1.0.5],Export-Package[javax.servlet.resources:2.5.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp:[2.1.0,3.0.0);resolution:=optional]
--> [org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.el:[2.1.0,3.0.0);resolution:=optional]
--> [org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.el:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.jstl.core:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.jstl.core:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.jstl.fmt:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.jstl.fmt:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.jstl.sql:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.jstl.sql:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.jstl.tlv:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.jstl.tlv:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.tagext:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.tagext:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.servlet.jsp.resources:[2.1.0,3.0.0);resolution:=optional]
-->
[org.ops4j.pax.web.pax-web-jsp:1.1.2],Export-Package[javax.servlet.jsp.resources:2.1.0]]
Wire[[as2941:0.1.0],Import-Package[javax.xml.parsers:0.0.0;resolution:=mandatory] -->
[system.bundle:0.0.0],Export-Package[javax.xml.parsers:0.0.0]]
Wire[[as2941:0.1.0],Import-Package[org.w3c.dom:0.0.0;resolution:=mandatory] -->
[system.bundle:0.0.0],Export-Package[org.w3c.dom:0.0.0]]
Wire[[as2941:0.1.0],Import-Package[org.xml.sax:0.0.0;resolution:=mandatory] -->
[system.bundle:0.0.0],Export-Package[org.xml.sax:0.0.0]]
Wire[[as2941:0.1.0],Import-Package[org.xml.sax.ext:0.0.0;resolution:=mandatory] -->
[system.bundle:0.0.0],Export-Package[org.xml.sax.ext:0.0.0]]
Wire[[as2941:0.1.0],Import-Package[org.xml.sax.helpers:0.0.0;resolution:=mandatory]
--> [system.bundle:0.0.0],Export-Package[org.xml.sax.helpers:0.0.0]]
{code}
Please provide instructions on how to produce a valid bundle deployment.
Problem deploying grails app
----------------------------
Key: AS7-2941
URL:
https://issues.jboss.org/browse/AS7-2941
Project: Application Server 7
Issue Type: Bug
Components: OSGi
Affects Versions: 7.1.0.Beta1, 7.1.0.CR1
Environment: Grails 1.3.4 and 2.0.0
Reporter: Idar Borlaug
Assignee: Thomas Diesler
Fix For: 7.1.1.Final
Trying to deploy a grails 1.3.4 app on jboss 7.1.0.Beta1
The same app works fine on jboss 4.
12:26:44,722 ERROR [byfjell] (Thread-59) FrameworkEvent ERROR:
org.apache.felix.log.LogException: org.osgi.framework.BundleException: Cannot resolve
bundle resModule: [byfjell:0.1.0]
at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:157)
at
org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(AbstractBundleState.java:551)
at
org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:211)
at
org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494)
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144)
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119)
at
org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1429)
at
org.jboss.msc.service.ServiceControllerImpl.access$2600(ServiceControllerImpl.java:49)
at
org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1952)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[:1.6.0_22]
at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]
Caused by: org.apache.felix.log.LogException: org.jboss.osgi.resolver.XResolverException:
Unable to resolve Module[byfjell:0.1.0]: missing requirement [Module[byfjell:0.1.0]]
package; (&(package=javax.servlet)(version>=2.4.0)(!(version>=3.0.0)))
at
org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolver.java:117)
at
org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.java:148)
at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.java:155)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira