Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Grails on VTS Constraint Issues
Grails on VTS Constraint Issues [message #788294] Wed, 01 February 2012 16:03 Go to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
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 #788904 is a reply to message #788294] Thu, 02 February 2012 11:10 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

did you restart VTS after placing the required bundle to ${VIRGO_HOME}/repository/usr ?
As far as I know new files in this directory are not observed during runtime as it is done with the pickup directory.

The bundle com.springsource.antlr does not have any other requirements and should be resolved properly after a
restart of VTS.

...
        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">
...


VTS 3.0 contains servlet 3.0. You can either add the 2.5.0 bundle to repository/usr or give Virgo 2.1.x a try which comes with servlet 2.5.

...
        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)">
...


Regards,
Florian
Re: Grails on VTS Constraint Issues [message #789097 is a reply to message #788904] Thu, 02 February 2012 15:53 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
Thanks for the tip on the servlet bundle. I pulled down the servlet 2.5 bundle and that seemed to cleanup some of the errors.

I'm still having errors with the antlr bundle.

In the manifest it is generated as:
Require-Bundle: com.springsource.antlr;version="[2.7.7,2.7.7]",

but every thing else uses the ) at the end of the versions.

I've tried it both ways but it doesn't seem to matter either way.

Here is where I'm at now.

[2012-02-02 09:38:04.017] ERROR fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0002E Installation of bundle 'GrailsOSGiTest' version '0.1.0' failed. 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">

	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.deployIfNotDeployed(HotDeploymentFileSystemListener.java:186)
	at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:87)
	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)

[2012-02-02 09:38:04.017] INFO  fs-watcher                   o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'GrailsOSGiTest' version '0.1.0' 
[2012-02-02 09:38:04.019] ERROR fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'GrailsOSGiTest' version '0.1.0'. 
[2012-02-02 09:38:04.023] ERROR fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0500E Unable to install application from URI 'file:/C:/VTS-30~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">
. 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">

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:45)


It looks like I'm getting closer but who knows.

Is there a publicly available repository that I can point to rather than having to pull down the bundles individually?

Thanks again for any help.
Re: Grails on VTS Constraint Issues [message #789295 is a reply to message #788904] Thu, 02 February 2012 20:33 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
Since I'm pretty much stuck on the 3.0.2 VTS I am also trying to get it to work on VWS 2.1.1

I've gotten rid of quite a few errors by pulling down the correct bundles but now I have errors that are Virgo specific I think.

Any thoughts?

[2012-02-02 14:17:18.952] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0000I Installing bundle 'org.eclipse.virgo.web.tomcat' version '2.1.1.RELEASE'. 
[2012-02-02 14:17:18.954] system-artifacts             o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator   Calculating missing dependencies of bundle(s) 'org.eclipse.gemini.web.core_1.1.1.RELEASE' 
[2012-02-02 14:17:20.581] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         ME0003I Dump 'serviceability\dump\2012-02-02-14-17-859' generated 
[2012-02-02 14:17:20.616] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0002E Installation of plan 'org.eclipse.virgo.web' version '2.1.1' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.eclipse.virgo.web.dm' at version '2.1.1.RELEASE': Cannot resolve: org.eclipse.virgo.web.dm
    Resolver report:
        Uses violation: <Import-Package: org.springframework.web.context; version="[2.5.6,4.0.0)"> in bundle <org.eclipse.virgo.web.dm_2.1.1.RELEASE>
             Resolver reported uses conflict for import

	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:271)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:151)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:123)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:190)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.deployArtifacts(InitialArtifactDeployer.java:155)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.run(InitialArtifactDeployer.java:145)
	at java.lang.Thread.run(Thread.java:662)

[2012-02-02 14:17:20.617] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'org.eclipse.gemini.web.core' version '1.1.1.RELEASE' 
[2012-02-02 14:17:20.623] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'org.eclipse.gemini.web.core' version '1.1.1.RELEASE'. 
[2012-02-02 14:17:20.624] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'org.eclipse.gemini.web.tomcat' version '1.1.1.RELEASE' 
[2012-02-02 14:17:20.630] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'org.eclipse.gemini.web.tomcat' version '1.1.1.RELEASE'. 
[2012-02-02 14:17:20.630] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'org.eclipse.virgo.web.core' version '2.1.1.RELEASE' 
[2012-02-02 14:17:20.636] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'org.eclipse.virgo.web.core' version '2.1.1.RELEASE'. 
[2012-02-02 14:17:20.636] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'org.eclipse.virgo.web.dm' version '2.1.1.RELEASE' 
[2012-02-02 14:17:20.642] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'org.eclipse.virgo.web.dm' version '2.1.1.RELEASE'. 
[2012-02-02 14:17:20.642] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for bundle 'org.eclipse.virgo.web.tomcat' version '2.1.1.RELEASE' 
[2012-02-02 14:17:20.648] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for bundle 'org.eclipse.virgo.web.tomcat' version '2.1.1.RELEASE'. 
[2012-02-02 14:17:20.648] system-artifacts             o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing install failed event for plan 'org.eclipse.virgo.web' version '2.1.1' 
[2012-02-02 14:17:20.652] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0003E Install failed for plan 'org.eclipse.virgo.web' version '2.1.1'. 
[2012-02-02 14:17:20.661] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         DE0500E Unable to install application from URI 'file:/C:/vws-2.1.1/repository/ext/org.eclipse.virgo.web-2.1.1.RELEASE.plan'. Cannot satisfy constraints for bundle 'org.eclipse.virgo.web.dm' version '2.1.1.RELEASE'. Cannot resolve: org.eclipse.virgo.web.dm
    Resolver report:
        Uses violation: <Import-Package: org.springframework.web.context; version="[2.5.6,4.0.0)"> in bundle <org.eclipse.virgo.web.dm_2.1.1.RELEASE>
             Resolver reported uses conflict for import
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.eclipse.virgo.web.dm' at version '2.1.1.RELEASE': Cannot resolve: org.eclipse.virgo.web.dm
    Resolver report:
        Uses violation: <Import-Package: org.springframework.web.context; version="[2.5.6,4.0.0)"> in bundle <org.eclipse.virgo.web.dm_2.1.1.RELEASE>
             Resolver reported uses conflict for import

	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:271)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:151)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:123)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:190)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.deployArtifacts(InitialArtifactDeployer.java:155)
	at org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.run(InitialArtifactDeployer.java:145)
	at java.lang.Thread.run(Thread.java:662)

[2012-02-02 14:17:20.664] system-artifacts             org.eclipse.virgo.medic.eventlog.default                         UR0002E User region failed while deploying initial artifacts. Shutting down. 
[2012-02-02 14:17:20.668] System Bundle Shutdown       org.eclipse.virgo.medic.eventlog.default                         KE0010I Shutdown initiated. 
Re: Grails on VTS Constraint Issues [message #789365 is a reply to message #789295] Thu, 02 February 2012 22:39 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

I have a RAP demo bundle where I added a com.springsource.antlr requirement:

Require-Bundle: org.eclipse.rap.rwt,
 org.eclipse.rap.jface,
 com.springsource.net.sf.cglib,
 com.springsource.antlr;version="[2.7.7,2.7.7]"


Now I was able to reproduce your resolver report:

    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">


I fetched ANTLR 1.7.7 from the SpringSource Enterprise Bundle Repository (http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.antlr&version=2.7.7)
added it to repository/usr

> find . -name "*antlr*"
./repository/usr/com.springsource.antlr-2.7.7.jar


...and the demo still does not resolve. I'll try to reproduce this with a smaller setup.

Regards,
Florian

[Updated on: Thu, 02 February 2012 23:37]

Report message to a moderator

Re: Grails on VTS Constraint Issues [message #789917 is a reply to message #789365] Fri, 03 February 2012 15:18 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
Those are the same steps that I took. Still won't resolve the antlr bundle. At least I know that I'm not the only one.

Thanks for looking at this.
Re: Grails on VTS Constraint Issues [message #793088 is a reply to message #789917] Tue, 07 February 2012 19:14 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
I have still had no luck getting this to work. I don't get why it can't find/resolve the bundles. Like I've said they have all been placed in ../repository/usr so they should be found correct?

Can someone tell me what the difference is between the [version,version] and [version,version)?

I've also tried running with -clean since I've seen references to some bundles not being picked up but I think that only pertained to the repository/ext directory.

Any thoughts would be great.
Re: Grails on VTS Constraint Issues [message #793331 is a reply to message #793088] Wed, 08 February 2012 02:29 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Difference is that ) is exclusive and ] is inclusive.

[1,2) == all versions 1 up to but not including 2
[1,2] == all versions from 1 including 2 but no higher.

-clean will delete all of the server caches and osgi deployment state.
Re: Grails on VTS Constraint Issues [message #793563 is a reply to message #793331] Wed, 08 February 2012 09:41 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

I created a new bundle project with the following MANIFEST.MF:

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Bundle-Name: test.bundle.which.requires.antlr
Bundle-ManifestVersion: 2
Bundle-SymbolicName: test.bundle.which.requires.antlr
Require-Bundle: com.springsource.antlr


Then added it into a running VTS (with the antlr bundle in repository/usr) and the bundle successfully started:

[2012-02-08 10:29:18.153]  TCP Connection(4)-127.0.0.1 <DE0000I> Installing bundle 'test.bundle.which.requires.antlr' version '1.0.0'. 
[2012-02-08 10:29:18.187]  TCP Connection(4)-127.0.0.1 <DE0001I> Installed bundle 'test.bundle.which.requires.antlr' version '1.0.0'. 
[2012-02-08 10:29:18.199]  TCP Connection(4)-127.0.0.1 <DE0004I> Starting bundle 'test.bundle.which.requires.antlr' version '1.0.0'. 
[2012-02-08 10:29:18.212] start-signalling-4           <DE0005I> Started bundle 'test.bundle.which.requires.antlr' version '1.0.0'. 


With declared versions:

Require-Bundle: com.springsource.antlr;version="[2.7.7,2.7.7]"


The deployment failes.

I'll add an additional comment if I have more information.
Re: Grails on VTS Constraint Issues [message #794100 is a reply to message #793563] Wed, 08 February 2012 22:59 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
I don't know if it's a good thing or not but I removed all the version parameters from the Required-Bundles piece and seem to have gotten a lot farther.

Now I get a ClassNotFoundException on org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext

The only place this is reference in in the web.xml so I am assuming that the app is attemting to start?

<context-param>
  <param-name>contextClass</param-name> 
  <param value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value> 
</context-param>


I can't find this class in any of the bundled jar files so I don't know what to do about it.
Re: Grails on VTS Constraint Issues [message #794229 is a reply to message #794100] Thu, 09 February 2012 03:27 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
I spent a bit a time looking at Grails OSGi support. 2 things:
1. looks like Grails OSGi plugin is dead.
2. looks like some of its functionality found its way into Grails Core in 2.0

The class you are seeing - is a spring-dm specific ApplicationContext extension. It is not used in Virgo.
You will need to change it to:

<context-param>
		<param-name>contextClass</param-name>
		<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
	</context-param>


See here - http://www.eclipse.org/virgo/documentation/virgo-documentation-3.5.0.M02/docs/virgo-programmer-guide/html/ch04s05.html

Also an import for "org.eclipse.virgo.web.dm" must exist in your manifest.

You will only need that specialized AppContext if you are planning to import OSGi services with spring-dm or blueprint. You can always get a handle to bundleContext from ServletContext if you so desire.

There are few ways you can approach this situation:
1. Create a script _Events.groovy in your application and plugin into build process.
2. Disable grails osgi support and post process the war.
3. Create a new plugin Smile

I got fairly far in creating a simple example project that based on the config will run either bundlor or bnd prior to finishing packaging the war. Will try to clean it up over the weekend and post it to wiki. One interesting facet of Grails Osgi plugin - is ability to run war in place with support from pax-runner. I am not even going to try to duplicate that. Too many variables.
Re: Grails on VTS Constraint Issues [message #794752 is a reply to message #794229] Thu, 09 February 2012 17:01 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
Dmitry, thanks for looking into this.

I've been in touch with the creator of the Grails OSGi plugin and you are correct, he has ceased development on the plugin. He suggested that I take his plugin and try to modify it for use with Virgo. Maybe someday I'll have time to go down that avenue.

For the time being I think that the dependencies that the plugin creates are, for the most part, just out of date (version wise) and don't include the virgo libraries in the manifest. Should the other org.eclipse.virgo.XYZ packages be included in the manifest also?

I'm trying the Import-Package: org.eclipse.virgo.web.dm;version="2.1.1.RELEASE" as you suggested but now get a Uses violation/conflict, I'm looking into that now.

Thanks again for the help.
Re: Grails on VTS Constraint Issues [message #795258 is a reply to message #793563] Fri, 10 February 2012 09:01 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

I finally have MANIFEST.MF entry with a correct version:

Require-Bundle: com.springsource.antlr;bundle-version="[2.7.7,2.7.7]"


which works as expected.

If you use the header Require-Bundle you have to use the directive bundle-version.

Thanks Glyn for spotting this.

Regards,
Florian
Re: Grails on VTS Constraint Issues [message #795276 is a reply to message #795258] Fri, 10 February 2012 09:21 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Just a small correction: please note bundle-version is an (OSGi standard) attribute rather than a directive (directives are of the form "name:=value").
Re: Grails on VTS Constraint Issues [message #795322 is a reply to message #795276] Fri, 10 February 2012 10:26 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
As you pointed out this is "an old chestnut about Require-Bundle" I updated the Virgo FAQ (http://wiki.eclipse.org/Virgo/FAQ).
Re: Grails on VTS Constraint Issues [message #797646 is a reply to message #794229] Mon, 13 February 2012 18:46 Go to previous messageGo to next message
Jon Cook is currently offline Jon CookFriend
Messages: 9
Registered: February 2012
Junior Member
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] Tue, 28 February 2012 02:19 Go to previous message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
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
Previous Topic:What's the difference between Virgo Tomcat and Virgo Jetty
Next Topic:Snaps issues with dispatchservlet mapped to (snap) root and separate resources folder
Goto Forum:
  


Current Time: Thu Apr 18 09:54:15 GMT 2024

Powered by FUDForum. Page generated in 0.03304 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top