Home » Eclipse Projects » Virgo » Grails on VTS Constraint Issues
Grails on VTS Constraint Issues [message #788294] |
Wed, 01 February 2012 11:03  |
Eclipse User |
|
|
|
I'm a complete noob to OSGi/Virgo so bear with me. I'm trying to get a Grails app to run on the VTS. I've created a default Grails app and installed the OSGi plugin which gives an option to bundle the war file as an OSGi artifact.
I have VTS installed and running (on windows 7 for now).
When I drop the war file into the pickup directory or try importing it via the admin console I get a whole bunch of constraint errors.
I figured they were just not in the repository so I pulled the bundles that are under the Require-Bundle piece of the manifest file from the SpringSource bundle repository and placed them under the /usr repo location.
Here is the error I get:
[2012-02-01 09:34:52.397] INFO fs-watcher o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener Processing install failed event for bundle 'GrailsOSGITest' version '0.1.0'
[2012-02-01 09:34:52.398] ERROR fs-watcher org.eclipse.virgo.medic.eventlog.default DE0003E Install failed for bundle 'GrailsOSGITest' version '0.1.0'.
[2012-02-01 09:34:52.428] ERROR fs-watcher org.eclipse.virgo.medic.eventlog.default DE0500E Unable to install application from URI 'file:/C:/VIRGO-~1.2/pickup/GrailsOSGITest.war'. Cannot satisfy constraints for bundle 'GrailsOSGITest' version '0.1.0'. Cannot resolve: GrailsOSGITest
Resolver report:
A Require-Bundle could not be resolved. Caused by missing constraint in bundle <GrailsOSGITest_0.1.0>
constraint: <Require-Bundle: com.springsource.antlr; bundle-version="0.0.0">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.el_1.0.0>
constraint: <Import-Package: javax.servlet; version="[2.5.0,3.0.0)">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.fileupload_1.2.1>
constraint: <Import-Package: javax.servlet; version="[2.5.0,3.0.0)">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.validator_1.3.1>
constraint: <Import-Package: org.apache.commons.digester; version="[1.6.0,2.0.0)">
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'GrailsOSGITest' at version '0.1.0': Cannot resolve: GrailsOSGITest
Resolver report:
A Require-Bundle could not be resolved. Caused by missing constraint in bundle <GrailsOSGITest_0.1.0>
constraint: <Require-Bundle: com.springsource.antlr; bundle-version="0.0.0">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.el_1.0.0>
constraint: <Import-Package: javax.servlet; version="[2.5.0,3.0.0)">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.fileupload_1.2.1>
constraint: <Import-Package: javax.servlet; version="[2.5.0,3.0.0)">
An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.org.apache.commons.validator_1.3.1>
constraint: <Import-Package: org.apache.commons.digester; version="[1.6.0,2.0.0)">
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:45)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:285)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:164)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:136)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:203)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:174)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:78)
at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:245)
at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:166)
at org.eclipse.virgo.kernel.deployer.hot.WatchTask.run(WatchTask.java:58)
at java.lang.Thread.run(Thread.java:662)
... and here is the manifest that the Grails OSGi plugin creates:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 20.0-b11 (Sun Microsystems Inc.)
Bundle-ManifestVersion: 2
Bundle-Name: GrailsOSGITest
Bundle-SymbolicName: GrailsOSGITest
Bundle-Version: 0.1
Bundle-ClassPath: .,WEB-INF/classes,WEB-INF/lib/commons-codec-1.4.jar,
WEB-INF/lib/commons-dbcp-1.3.jar,WEB-INF/lib/commons-pool-1.5.5.jar,W
EB-INF/lib/concurrentlinkedhashmap-lru-1.0_jdk5.jar,WEB-INF/lib/ehcac
he-core-1.7.1.jar,WEB-INF/lib/ejb3-persistence-1.0.2.GA.jar,WEB-INF/l
ib/grails-bootstrap-1.3.7.jar,WEB-INF/lib/grails-core-1.3.7.jar,WEB-I
NF/lib/grails-crud-1.3.7.jar,WEB-INF/lib/grails-gorm-1.3.7.jar,WEB-IN
F/lib/grails-resources-1.3.7.jar,WEB-INF/lib/grails-spring-1.3.7.jar,
WEB-INF/lib/grails-tomcat-plugin-1.0.jar,WEB-INF/lib/grails-web-1.3.7
.jar,WEB-INF/lib/groovy-all-1.7.8.jar,WEB-INF/lib/hibernate-annotatio
ns-3.4.0.GA.jar,WEB-INF/lib/hibernate-commons-annotations-3.1.0.GA.ja
r,WEB-INF/lib/hibernate-core-3.3.1.GA.jar,WEB-INF/lib/hibernate-ehcac
he-3.3.1.GA.jar,WEB-INF/lib/hibernate-validator-3.1.0.GA.jar,WEB-INF/
lib/hsqldb-1.8.0.10.jar,WEB-INF/lib/log4j-1.2.16.jar,WEB-INF/lib/org.
springframework.aop-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework
.asm-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework.aspects-3.0.5.
RELEASE.jar,WEB-INF/lib/org.springframework.beans-3.0.5.RELEASE.jar,W
EB-INF/lib/org.springframework.context-3.0.5.RELEASE.jar,WEB-INF/lib/
org.springframework.context.support-3.0.5.RELEASE.jar,WEB-INF/lib/org
.springframework.core-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframewo
rk.expression-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework.instr
ument-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework.jdbc-3.0.5.RE
LEASE.jar,WEB-INF/lib/org.springframework.jms-3.0.5.RELEASE.jar,WEB-I
NF/lib/org.springframework.orm-3.0.5.RELEASE.jar,WEB-INF/lib/org.spri
ngframework.oxm-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework.tra
nsaction-3.0.5.RELEASE.jar,WEB-INF/lib/org.springframework.web-3.0.5.
RELEASE.jar,WEB-INF/lib/org.springframework.web.servlet-3.0.5.RELEASE
.jar,WEB-INF/lib/sitemesh-2.4.jar
Import-Package: javax.servlet;version="[2.4.0, 2.6.0)",javax.servlet.h
ttp;version="[2.4.0, 2.6.0)",javax.servlet.resources;version="[2.4.0,
2.6.0)",javax.servlet.jsp;version="[2.1.0, 2.3.0)";resolution:=optio
nal,javax.servlet.jsp.el;version="[2.1.0, 2.3.0)";resolution:=optiona
l,javax.servlet.jsp.jstl.core;version="[1.1.0, 2.0.0)";resolution:=op
tional,javax.servlet.jsp.jstl.fmt;version="[1.1.0, 2.0.0)";resolution
:=optional,javax.servlet.jsp.jstl.sql;version="[1.1.0, 2.0.0)";resolu
tion:=optional,javax.servlet.jsp.jstl.tlv;version="[1.1.0, 2.0.0)";re
solution:=optional,javax.servlet.jsp.tagext;version="[2.1.0, 2.3.0)";
resolution:=optional,javax.servlet.jsp.resources;version="[2.1.0, 2.3
.0)";resolution:=optional,javax.xml.parsers,org.w3c.dom,org.xml.sax,o
rg.xml.sax.ext,org.xml.sax.helpers,org.apache.xml.security;resolution
:=optional,org.apache.xml.security.exceptions;resolution:=optional,or
g.osgi.framework;version="[1.5.0, 5.0.0)";resolution:=optional,org.sp
ringframework.context;version="[3.0.1, 4.0.0)",org.springframework.we
b.context;version="[3.0.1, 4.0.0)",org.springframework.osgi.context;v
ersion="[2.0.0, 3.0.0)";resolution:=optional,org.springframework.osgi
.web.context.support;version="[2.0.0, 3.0.0)";resolution:=optional,or
g.apache.log4j,org.apache.log4j.xml,org.apache.log4j.helpers,org.apac
he.log4j.jdbc;resolution:=optional,org.apache.log4j.varia;resolution:
=optional,org.aopalliance.aop;version="1.0.0",org.aopalliance.interce
pt;version="1.0.0",org.apache.commons.logging;version="[1.1.1, 1.2.0)
",javax.transaction,org.slf4j;version="[1.5.6, 1.6.0)"
Require-Bundle: com.springsource.antlr;version="[2.7.7,2.7.7)",com.spr
ingsource.org.aspectj.runtime;version="1.6.8.RELEASE",com.springsourc
e.org.aspectj.runtime;version="1.6.8.RELEASE",com.springsource.net.sf
.cglib;version="[2.1.3,2.2.0)",com.springsource.org.apache.commons.be
anutils;version="1.8.0",com.springsource.org.apache.commons.collectio
ns;version="3.2.1",com.springsource.org.apache.commons.el;version="1.
0.0",com.springsource.org.apache.commons.fileupload;version="1.2.1",c
om.springsource.org.apache.commons.io;version="1.4.0",com.springsourc
e.org.apache.commons.lang;version="2.4.0",com.springsource.org.apache
.commons.validator;version="1.3.1",com.springsource.org.dom4j;version
="1.6.1",com.springsource.org.apache.ivy;version="[2.0, 2.2.0)",com.s
pringsource.javassist;version="[3.9.0, 4.0.0)",com.springsource.org.a
pache.oro;version="[2.0.8, 2.1.0)"
Webapp-Context: GrailsOSGITest
Any help on this would be great.
|
|
| | | | | | | | | | | | | | |
Re: Grails on VTS Constraint Issues [message #797646 is a reply to message #794229] |
Mon, 13 February 2012 13:46   |
Eclipse User |
|
|
|
Dmitry,
I removed the context-param as it sounds linke you're saying that it is not necessary.
Since I removed it does that mean that I do not need to import the "org.eclipse.virgo.web.dm" dependency?
After removing the context param from my web.xml and removing the "org.eclipse.virgo.web.dm" dependency I believe that I was able to get farther into the deployment than before.
What I get now is this:
IllegalStateException: Cannot convert value of type [org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean] to required type [org.codehaus.groovy.grails.compiler.support.GrailsResourceLoader] for property 'grailsResourceLoader': no matching editors or conversion strategy found
Here is the output in the log file before the exception:
[2012-02-13 09:55:55.370] start-signalling-2 org.springframework.web.context.ContextLoader Root WebApplicationContext: initialization started
[2012-02-13 09:55:55.374] start-signalling-2 org.springframework.web.context.support.XmlWebApplicationContext Refreshing Root WebApplicationContext: startup date [Mon Feb 13 09:55:55 PST 2012]; root of context hierarchy
[2012-02-13 09:55:55.376] start-signalling-2 org.springframework.beans.factory.xml.XmlBeanDefinitionReader Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
[2012-02-13 09:55:55.477] start-signalling-2 o.s.beans.factory.support.DefaultListableBeanFactory Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@189193f: defining beans [grailsApplication,pluginManager,grailsConfigurator,grailsResourceLoader,grailsResourceHolder,characterEncodingFilter]; root of factory hierarchy
[2012-02-13 09:55:55.501] start-signalling-2 o.s.beans.factory.support.DefaultListableBeanFactory Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@189193f: defining beans [grailsApplication,pluginManager,grailsConfigurator,grailsResourceLoader,grailsResourceHolder,characterEncodingFilter]; root of factory hierarchy
[2012-02-13 09:55:55.506] start-signalling-2 StackTrace Sanitizing stacktrace: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean' to required type 'org.codehaus.groovy.grails.compiler.support.GrailsResourceLoader' for property 'grailsResourceLoader'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean] to required type [org.codehaus.groovy.grails.compiler.support.GrailsResourceLoader] for property 'grailsResourceLoader': no matching editors or conversion strategy found
I don't know if you got into it any farther but did you happen to make any progress on your example project?
I believe what you were suggesting was using bundlor to convert the war file for OSGi compatiblity? Is that what you meant when you suggested "2. Disable grails osgi support and post process the war."?
Thanks,
Jon
|
|
|
Re: Grails on VTS Constraint Issues [message #808679 is a reply to message #797646] |
Mon, 27 February 2012 21:19  |
Eclipse User |
|
|
|
Jon,
Sorry just coming back to this. I was using grails 2.0 in my example. I will rebuild with 1.3.7 and post an example here.
All I was doing is running grails through bundlor prior to packaging of the web-app.
Hope to have it wrapped up tonight.
Dmitry
|
|
|
Goto Forum:
Current Time: Sat May 24 08:05:07 EDT 2025
Powered by FUDForum. Page generated in 0.06737 seconds
|