Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Multiple spring deployments on Virgo 3.7.2(Multiple spring deployments on Virgo 3.7.2)
Multiple spring deployments on Virgo 3.7.2 [message #1792911] Wed, 25 July 2018 15:48 Go to next message
Jesus Martinez is currently offline Jesus MartinezFriend
Messages: 4
Registered: July 2018
Junior Member
Hello,

I'm trying to start migrating to Eclipse Virgo 3.7.2 to move to Spring 4.3.9.
I'm getting a stream of Uses violation errors that we didn't have before with 3.6.4. I had to make some adjustments to migrate the spring schemas and remove the springframework libd which seems to be gone now but nothing to explain the following:

[2018-07-23 19:20:12.040] fs-watcher                   <DE0002E> Installation of plan 'multi-artifact.plan' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'multi-artifact.plan-1-org.geppetto.frontend' at version '0.3.9': Cannot resolve: multi-artifact.plan-1-org.geppetto.frontend
    Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.web.servlet; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-org.geppetto.frontend_0.3.9>
             constraint: <Import-Package: org.springframework.web.servlet; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.geppetto.frontend.admin; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-synthetic.context_1.0.0>
             constraint: <Import-Package: org.geppetto.frontend.admin; version="0.0.0"> constrained to bundle <multi-artifact.plan-1-org.geppetto.frontend> constrained bundle version range "[0.3.9,0.3.9]"
            with attributes {module_scope=multi-artifact.plan-1}

        Uses violation: <Import-Package: org.springframework.http.converter.xml; version="[4.3.9.RELEASE,4.3.9.RELEASE]"> in bundle <org.springframework.webmvc_4.3.9.RELEASE[1532366399144]>
             Resolver reported uses conflict for import

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(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:359)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeployerFileSystemListener.java:225)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeployerFileSystemListener.java:237)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeployerFileSystemListener.java:88)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:380)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:289)
	at org.eclipse.virgo.nano.deployer.hot.WatchTask.run(WatchTask.java:49)
	at java.lang.Thread.run(Thread.java:748)

[2018-07-23 19:20:12.041] fs-watcher                   <DE0003E> Install failed for bundle 'multi-artifact.plan-1-org.geppetto.model' version '0.3.9'. 
[2018-07-23 19:20:12.042] fs-watcher                   <DE0003E> Install failed for bundle 'multi-artifact.plan-1-org.geppetto.core' version '0.3.9'. 
[2018-07-23 19:20:12.043] fs-watcher                   <DE0003E> Install failed for bundle 'multi-artifact.plan-1-org.geppetto.model.neuroml' version '0.3.9'. 
[2018-07-23 19:20:12.044] fs-watcher                   <DE0003E> Install failed for bundle 'multi-artifact.plan-1-org.geppetto.simulation' version '0.3.9'. 
[2018-07-23 19:20:12.046] fs-watcher                   <DE0003E> Install failed for bundle 'multi-artifact.plan-1-org.geppetto.frontend' version '0.3.9'. 
[2018-07-23 19:20:12.047] fs-watcher                   <DE0003E> Install failed for plan 'multi-artifact.plan' version '1.0.0'. 
[2018-07-23 19:20:12.048] fs-watcher                   <DE0500E> Unable to install application from URI 'file:/home/walrus/code/virgo-tomcat-server-3.7.2.RELEASE/pickup/geppetto.plan'. Cannot satisfy constraints for bundle 'multi-artifact.plan-1-org.geppetto.frontend' version '0.3.9'. Cannot resolve: multi-artifact.plan-1-org.geppetto.frontend
    Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.web.servlet; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-org.geppetto.frontend_0.3.9>
             constraint: <Import-Package: org.springframework.web.servlet; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.geppetto.frontend.admin; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-synthetic.context_1.0.0>
             constraint: <Import-Package: org.geppetto.frontend.admin; version="0.0.0"> constrained to bundle <multi-artifact.plan-1-org.geppetto.frontend> constrained bundle version range "[0.3.9,0.3.9]"
            with attributes {module_scope=multi-artifact.plan-1}

        Uses violation: <Import-Package: org.springframework.http.converter.xml; version="[4.3.9.RELEASE,4.3.9.RELEASE]"> in bundle <org.springframework.webmvc_4.3.9.RELEASE[1532366399144]>
             Resolver reported uses conflict for import
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'multi-artifact.plan-1-org.geppetto.frontend' at version '0.3.9': Cannot resolve: multi-artifact.plan-1-org.geppetto.frontend
    Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.web.servlet; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-org.geppetto.frontend_0.3.9>
             constraint: <Import-Package: org.springframework.web.servlet; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.geppetto.frontend.admin; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-synthetic.context_1.0.0>
             constraint: <Import-Package: org.geppetto.frontend.admin; version="0.0.0"> constrained to bundle <multi-artifact.plan-1-org.geppetto.frontend> constrained bundle version range "[0.3.9,0.3.9]"
            with attributes {module_scope=multi-artifact.plan-1}

        Uses violation: <Import-Package: org.springframework.http.converter.xml; version="[4.3.9.RELEASE,4.3.9.RELEASE]"> in bundle <org.springframework.webmvc_4.3.9.RELEASE[1532366399144]>
             Resolver reported uses conflict for import

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(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:359)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeployerFileSystemListener.java:225)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeployerFileSystemListener.java:237)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeployerFileSystemListener.java:88)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:380)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:289)
	at org.eclipse.virgo.nano.deployer.hot.WatchTask.run(WatchTask.java:49)
	at java.lang.Thread.run(Thread.java:748)

[2018-07-23 19:20:12.053] fs-watcher                   <HD0002E> Hot deploy failed for file 'geppetto.plan'. org.eclipse.virgo.nano.deployer.api.core.DeploymentException: Dependency satisfaction failed
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:362)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeployerFileSystemListener.java:225)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeployerFileSystemListener.java:237)
	at org.eclipse.virgo.nano.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeployerFileSystemListener.java:88)
	at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:380)
	at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:289)
	at org.eclipse.virgo.nano.deployer.hot.WatchTask.run(WatchTask.java:49)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'multi-artifact.plan-1-org.geppetto.frontend' at version '0.3.9': Cannot resolve: multi-artifact.plan-1-org.geppetto.frontend
    Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.web.servlet; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-org.geppetto.frontend_0.3.9>
             constraint: <Import-Package: org.springframework.web.servlet; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.geppetto.frontend.admin; version="0.0.0">. Caused by missing constraint in bundle <multi-artifact.plan-1-synthetic.context_1.0.0>
             constraint: <Import-Package: org.geppetto.frontend.admin; version="0.0.0"> constrained to bundle <multi-artifact.plan-1-org.geppetto.frontend> constrained bundle version range "[0.3.9,0.3.9]"
            with attributes {module_scope=multi-artifact.plan-1}

        Uses violation: <Import-Package: org.springframework.http.converter.xml; version="[4.3.9.RELEASE,4.3.9.RELEASE]"> in bundle <org.springframework.webmvc_4.3.9.RELEASE[1532366399144]>
             Resolver reported uses conflict for import

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(StandardPipeline.java:62)
	at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessGraph(CompensatingPipeline.java:73)
	at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
	at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessGraph(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:359)
	... 10 common frames omitted


Our project is maven based, and in the pom.xml file we are using the following dependencies:

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>


Where the spring.version = 4.3.9

Virgo 3.7.2 also comes with springframework 4.3.9 dependencies in repository/ext folder.

The pickpup plan I'm using looks like this:
index.php/fa/33500/0/

The artifact that's causing the problem is the last one, org.geppetto.frontend. If I remove it from the plan, and then go to http://localhost:8080/admin/content/artifacts and manually deploy the artifact from there, I don't get the error.

Any ideas on what's going on are much appreciated !
Re: Multiple spring deployments on Virgo 3.7.2 [message #1792970 is a reply to message #1792911] Thu, 26 July 2018 16:09 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 57
Registered: November 2015
Member
Hi,

your plan is scoped [1] and this may explain why you have a different behavior when you remove the front end bundle from the plan and deploy it separately.
Artifacts in a scoped plan are deployed as a "whole" and the requirements of a bundle in a scoped plan are resolved against the capabilities of other bundles in the same plan.

The uses conflict normally arises when two bundles depend on different versions of the same package and a third bundle depends on both and reaches via its dependency tree the two different versions of the same package.

Please check:
- all of your bundles require the same version of the Spring packages
- that none of your bundles by mistake declares to export a spring package
- that you did not add another version of the spring bundles to a virgo repository folder

Could you also try to make the plan not scoped and see what happens?

GianMaria.


[1] https://www.eclipse.org/virgo/documentation/virgo-documentation-3.7.2.RELEASE/docs/virgo-programmer-guide/html5/virgo-programmer-guide.html#developing-applications-plans-scoping
Re: Multiple spring deployments on Virgo 3.7.2 [message #1793009 is a reply to message #1792970] Fri, 27 July 2018 12:58 Go to previous messageGo to next message
Jesus Martinez is currently offline Jesus MartinezFriend
Messages: 4
Registered: July 2018
Junior Member
Thanks for the feedback.

I tried making my plan not scope but it didn't work, I still get the same result.
This is how my plan looks now.
<?xml version="1.0" encoding="UTF-8"?>
<plan name="multi-artifact.plan" version="1.0.0" scoped="false" atomic="true"
        xmlns="http://www.springsource.org/schema/dm-server/plan"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
            http://www.springsource.org/schema/dm-server/plan
            http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">
    <artifact type="bundle" name="org.geppetto.model" version="0.3.9"/>
    <artifact type="bundle" name="org.geppetto.core" version="0.3.9"/>
    <artifact type="bundle" name="org.geppetto.model.neuroml" version="0.3.9"/>
    <artifact type="bundle" name="org.geppetto.simulation" version="0.3.9"/>
    <artifact type="bundle" name="org.geppetto.frontend" version="0.3.9"/>
</plan>


I double checked and all the bundles are using spring 4.3.9 . The spring bundles that are in virgo's repostitory folder "usr" are also 4.3.9, same version than the ones in virgo's repository "ext" folder, except that the ones in "usr" are not OSGI bundles and come directly from maven.

Looking at the Manifest file for the org.geppetto.frontend bundle, I do see some references to spring packages from the export-package section.

Should these not be there?

Manifest-Version: 1.0
Bundle-SymbolicName: org.geppetto.frontend
Import-Library: org.springframework.spring;version="4.3.9.RELEASE"
Archiver-Version: Plexus Archiver
Built-By: walrus
Bnd-LastModified: 1532694315220
Bundle-ManifestVersion: 2
Import-Package: com.fasterxml.jackson.core;version="[2.1,3)",com.faste
 rxml.jackson.core.type;version="[2.1,3)",com.fasterxml.jackson.databi
 nd;version="[2.1,3)",com.google.gson;version="[2.2,3)",com.google.gso
 n.annotations;version="[2.2,3)",com.google.gson.reflect;version="[2.2
 ,3)",javax.servlet;version="[3.1,4)",javax.servlet.http;version="[3.1
 ,4)",javax.websocket,javax.websocket.server,net.sf.cglib.beans;versio
 n="[2.2,3)",net.sf.cglib.core;version="[2.2,3)",net.sf.cglib.proxy;ve
 rsion="[2.2,3)",net.sf.cglib.reflect;version="[2.2,3)",net.sf.cglib.t
 ransform;version="[2.2,3)",net.sf.cglib.util;version="[2.2,3)",org.ap
 ache.commons.io;version="[1.4,2)",org.apache.commons.logging;version=
 "[1.2,2)",org.apache.shiro;version="[1.2,2)",org.apache.shiro.authc;v
 ersion="[1.2,2)",org.apache.shiro.realm;version="[1.2,2)",org.apache.
 shiro.subject;version="[1.2,2)",org.apache.shiro.web.env;version="[1.
 2,2)",org.apache.shiro.web.servlet;version="[1.2,2)",org.eclipse.emf.
 common.util,org.eclipse.emf.ecore,org.eclipse.emf.ecore.util,org.ecli
 pse.virgo.web.dm;version="2.1.1.RELEASE",org.geppetto.core.auth;versi
 on="[0.3,1)",org.geppetto.core.beans;version="[0.3,1)",org.geppetto.c
 ore.common;version="[0.3,1)",org.geppetto.core.data;version="[0.3,1)"
 ,org.geppetto.core.data.model;version="[0.3,1)",org.geppetto.core.dat
 asources;version="[0.3,1)",org.geppetto.core.manager;version="[0.3,1)
 ",org.geppetto.core.model;version="[0.3,1)",org.geppetto.core.s3;vers
 ion="[0.3,1)",org.geppetto.core.services.registry;version="[0.3,1)",o
 rg.geppetto.core.simulation;version="[0.3,1)",org.geppetto.core.utili
 ties;version="[0.3,1)",org.geppetto.model;version="[0.3,1)",org.geppe
 tto.model.datasources;version="[0.3,1)",org.geppetto.model.util;versi
 on="[0.3,1)",org.geppetto.simulation;version="[0.3,1)",org.geppetto.s
 imulation.manager;version="[0.3,1)",org.geppetto.simulation.visitor;v
 ersion="[0.3,1)",org.osgi.framework;version="[1.7,2)",org.springframe
 work.beans.factory.annotation,org.springframework.beans.factory.confi
 g,org.springframework.context,org.springframework.core.annotation,org
 .springframework.core.io,org.springframework.http,org.springframework
 .http.converter,org.springframework.stereotype,org.springframework.ui
 ,org.springframework.util,org.springframework.web.bind.annotation,org
 .springframework.web.context,org.springframework.web.context.support
Tool: Bnd-1.50.0
Export-Package: org.geppetto.frontend;uses:="org.springframework.conte
 xt";version="0.3.9",org.geppetto.frontend.admin;uses:="org.apache.shi
 ro,org.geppetto.core.common,org.apache.commons.logging,org.geppetto.c
 ore.manager,org.springframework.stereotype,org.geppetto.core.data.mod
 el,org.springframework.web.bind.annotation,org.geppetto.core.data,org
 .geppetto.core.s3,org.springframework.beans.factory.annotation,org.ap
 ache.shiro.subject";version="0.3.9",org.geppetto.frontend.controllers
 ;uses:="org.springframework.ui,org.apache.shiro,javax.servlet.http,or
 g.geppetto.core.utilities,org.geppetto.core.common,javax.servlet,org.
 apache.commons.logging,org.geppetto.core.manager,org.geppetto.fronten
 d.tests,org.springframework.stereotype,org.geppetto.core.auth,org.spr
 ingframework.web.bind.annotation,org.geppetto.core.data.model,org.gep
 petto.core.data,org.springframework.beans.factory.annotation,com.goog
 le.gson,org.apache.shiro.subject,org.osgi.framework,org.geppetto.mode
 l.util,org.geppetto.core.services.registry,com.fasterxml.jackson.core
 ,org.apache.commons.io,org.geppetto.model,org.geppetto.core.simulatio
 n,org.geppetto.frontend,org.geppetto.model.datasources,com.fasterxml.
 jackson.databind,org.eclipse.emf.ecore,org.geppetto.core.beans,org.ge
 ppetto.core.model,org.geppetto.simulation.manager,com.fasterxml.jacks
 on.core.type,org.geppetto.core.datasources,org.geppetto.frontend.mess
 ages,javax.websocket,org.apache.shiro.authc,org.apache.shiro.realm,or
 g.springframework.http,org.springframework.http.converter,org.springf
 ramework.util,org.springframework.web.context,org.springframework.cor
 e.annotation,javax.websocket.server,org.springframework.beans.factory
 .config,com.google.gson.reflect,org.geppetto.frontend.messaging,org.e
 clipse.emf.common.util,org.springframework.web.context.support";versi
 on="0.3.9",org.geppetto.frontend.dashboard.service;uses:="org.geppett
 o.core.utilities,org.springframework.core.io,org.geppetto.core.beans,
 org.geppetto.core.common,org.geppetto.core.manager,org.springframewor
 k.stereotype,org.geppetto.core.data.model,org.springframework.web.bin
 d.annotation,org.geppetto.core.data,org.springframework.beans.factory
 .annotation,org.eclipse.emf.ecore,org.geppetto.model.util,org.geppett
 o.core.model,org.geppetto.model,org.geppetto.simulation.visitor,org.e
 clipse.emf.ecore.util,org.apache.shiro,org.apache.commons.logging,org
 .apache.shiro.subject";version="0.3.9",org.geppetto.frontend.messages
 ;uses:="org.geppetto.frontend,com.google.gson";version="0.3.9",org.ge
 ppetto.frontend.messaging;uses:="org.apache.commons.logging,org.geppe
 tto.frontend.messages,javax.websocket,com.google.gson";version="0.3.9
 ",org.geppetto.frontend.tests;uses:="com.google.gson.annotations";ver
 sion="0.3.9"
Bundle-Name: frontend
Bundle-Version: 0.3.9
Bundle-ClassPath: .,WEB-INF/classes
Web-ContextPath: org.geppetto.frontend
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_171
Re: Multiple spring deployments on Virgo 3.7.2 [message #1793054 is a reply to message #1793009] Mon, 30 July 2018 10:28 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 57
Registered: November 2015
Member
Hi,

in my Virgo 3.7.2, spring Jars are located in repository/ext and in plugins, I don't have them in repository/usr. Those in repository/ext and in plugins have OSGi metadata. If you have the same Jars in repository/usr you should delete them.

Your MANIFEST export-package looks okay, because the spring packages show up in the "uses" directive.
However, your imports do not specify the version of the spring packages, so I would suggest to get rid of the Jars in /usr and to specify the spring version in the imports.

Re: Multiple spring deployments on Virgo 3.7.2 [message #1793367 is a reply to message #1793054] Mon, 06 August 2018 16:57 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi,

to reproduce your issue I followed the instructions at https://docs.geppetto.org/en/latest/osxlinuxsetup.html to build Geppetto and imported the code into an IDE.
I bumped the Spring Framework version to 4.3.9 and Tomcat to 8.5.16, but wasn't able to compile the code.
There were compile errors in `org.geppetto.frontend`.
Some classes have been removed in Tomcat 8 and "Replaced by the JSR356 WebSocket 1.1 implementation".
Since this is another topic I switched back to the previous Tomcat version.
Do you plan to work on a migration to Websocket 1.1?
I think this is a requirement to run your app on Virgo 3.7.2.

Despite this findings I did some more local investigations:

The frontend has dependencies to spring-osgi which has been replaced by Gemini Blueprint.
Maybe this dependency is responsible for picking up a different version of the Spring Framework?

After some small changes in the OSGi metadata generation I was able to deploy all but the Geppetto frontend bundles one after another via pickup directory.

Once you upgraded the Websocket code I can have a closer look at the OSGi metadata generation of the frontend bundle.
Maybe Violetta can give you some pointers how to deal with `org.apache.catalina.websocket.MessageInbound` and other removed classes.

Regards,
florian
Re: Multiple spring deployments on Virgo 3.7.2 [message #1793395 is a reply to message #1793367] Tue, 07 August 2018 13:02 Go to previous messageGo to next message
Jesus Martinez is currently offline Jesus MartinezFriend
Messages: 4
Registered: July 2018
Junior Member
@GianMaria RomanatoFriend I get the same fail result even without the spring bundles in the repository/usr. One thing I haven't mentioned, is that if I use the Eclipse IDE to start virgo with the same bundles it works,
these spring errors we are getting only happen when starting virgo through the console with the virgo "startup.sh" file.

@ Florian WaibelFriend Thanks for testing ! We did the migration already, but it's on another branch not yet on master/development https://github.com/openworm/org.geppetto.frontend/tree/update-virgo-test .
In that branch the outdated spring-osgi dependencies have already been replaced, at least the ones we were aware of. The errors can only be seen when running virgo through the console using the default "startup.sh" file. In Eclipse IDE I can start virgo with the same bundles and it works.
Re: Multiple spring deployments on Virgo 3.7.2 [message #1794206 is a reply to message #1793395] Mon, 27 August 2018 13:45 Go to previous messageGo to next message
Jesus Martinez is currently offline Jesus MartinezFriend
Messages: 4
Registered: July 2018
Junior Member
I finally fixed this bug. The problem was a package ("javax.xml.bind") with different version numbers been used by two bundles.
To fix it I removed the following code from the file "virgo/configuration/java-server.profile"
 javax.xml.bind,\
 javax.xml.bind;version="2.0",\
 javax.xml.bind.annotation,\
 javax.xml.bind.annotation;version="2.0",\
 javax.xml.bind.annotation.adapters,\
 javax.xml.bind.annotation.adapters;version="2.0",\
 javax.xml.bind.attachment,\
 javax.xml.bind.attachment;version="2.0",\
 javax.xml.bind.helpers,\
 javax.xml.bind.helpers;version="2.0",\
 javax.xml.bind.util,\
 javax.xml.bind.util;version="2.0",\


Removing those lines removes the conflict between "javax.xml.bind" versions.

Not sure if removing those lines would have other undesired consequences. What's the purpose of having those lines in the java-server.profile?
Re: Multiple spring deployments on Virgo 3.7.2 [message #1795020 is a reply to message #1794206] Wed, 12 September 2018 19:56 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 57
Registered: November 2015
Member
Sorry for the late reply, I missed this.
The OSGi container will make available certain Java packages included in the JDK by exporting them through the system bundle, the bundle that by specification has id 0.
In Equinox this list of packages is defined in the profile file.

The version should be there to declare which level of specification is provided, but packages are also listed without a version to make resolution possible also for bundles that import packages without specifying a version. The specification allows a bundle to export the same package with multiple versions (this makes sense for backward compatibility).

If you have two bundles, one that imports javax.xml.bind with no version and one that imports with version 2.0, both bundles will be wired to the system bundle, and since the system bundle is only one there will be no conflict.

You may instead experience a problem if in your repository you have another bundle that exports the same javax.xml.bind* packages. If that is the case, some bundles of yours (bundle A) could be wired to the system bundle, and some other (bundle B) could be wired to the bundle located in the repository and exporting the same packages.
This could result in a conflict of uses (if there is a bundle C that depends on bot A and B).
Re: Multiple spring deployments on Virgo 3.7.2 [message #1808207 is a reply to message #1792970] Wed, 19 June 2019 10:31 Go to previous message
nilesh pitale is currently offline nilesh pitaleFriend
Messages: 3
Registered: January 2019
Junior Member
Contact Us for solution
https://www.mcl.in/mcl-develops-attractive-lo-pipeline-report-synched-encompass-los-emailed-daily-loan-officers-processors/
Previous Topic:An issue with upgrading taglibs-standard to 1.2.5 in virgo-tomcat-server-3.6.4.RELEASE.zip
Next Topic:FIXED: Unable to get REST sample to work
Goto Forum:
  


Current Time: Wed Apr 24 19:10:37 GMT 2024

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

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

Back to the top