Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring Security OAuth2 not loading(Cannot resolve optional dependency to junit)
Spring Security OAuth2 not loading [message #892049] Tue, 26 June 2012 20:53 Go to next message
Steve Suh is currently offline Steve Suh
Messages: 3
Registered: June 2012
Junior Member
We are running Virgo 3.5.0.M03 with spring security oauth 2 version 1.0.0.M6d. It is failing to load the bundle because it cannot resolve an optional dependency to junit. Any help would be greatly appreciated.

Thanks,
Steve


[2012-06-26 17:30:14.378] ERROR fs-watcher org.eclipse.virgo.medic.eventlog.default HD0002E Hot deploy failed for file 'spring-security-oauth2-1.0.0.M6d.jar'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Dependency satisfaction failed
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:363)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:184)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:139)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:252)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeployerFileSystemListener.java:163)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeployerFileSystemListener.java:67)
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:48)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.springframework.security.oauth' at version '1.0.0.M6d': Cannot resolve: org.springframework.security.oauth
Resolver report:
An Import-Package could not be resolved. Resolver error data <Import-Package: org.junit.internal; version="[4.8.2,5.0.0)">. Caused by missing constraint in bundle <org.springframework.security.oauth_1.0.0.M6d>
constraint: <Import-Package: org.junit.internal; version="[4.8.2,5.0.0)">
with attributes {optional=true}


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:360)

Re: Spring Security OAuth2 not loading [message #892170 is a reply to message #892049] Wed, 27 June 2012 05:49 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
It looks like the import of the junit package does not specify resolution:=optional. At least that's the impression I get from the diagnostic "with attributes {optional=true}" since there is no standard attribute or directive named "optional" and the resolution directive is a directive (:=) rather than an attribute (=).

Where did you get that bundle from?
Re: Spring Security OAuth2 not loading [message #892171 is a reply to message #892170] Wed, 27 June 2012 05:52 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I just wanted to check something else.

Hot-deploying that security bundle will happen after the Spring framework included with Virgo has been resolved, which will only work if there are no dependencies from Spring to the security bundle.

If the Spring framework has any (optional) dependencies on the security bundle, then you'll need to add the security bundle to repository/usr so that Spring will be wired to it when it is resolved.
Re: Spring Security OAuth2 not loading [message #892301 is a reply to message #892170] Wed, 27 June 2012 12:37 Go to previous messageGo to next message
Steve Suh is currently offline Steve Suh
Messages: 3
Registered: June 2012
Junior Member
It is the latest release of the spring security oauth 2. The weird thing is that it was working with the 1.0.0.M6 release but starting with 1.0.0.M6a release that error seems to have been introduced.
Re: Spring Security OAuth2 not loading [message #892303 is a reply to message #892171] Wed, 27 June 2012 12:38 Go to previous message
Steve Suh is currently offline Steve Suh
Messages: 3
Registered: June 2012
Junior Member
I think the dependency resolution is the other way. Spring Security depends on spring not the other way around.
Previous Topic:installing spring-security-cas-client-3.0.5.RELEASE.jar
Next Topic:How do I include virgo/gemini support in my own tomcat
Goto Forum:
  


Current Time: Thu Jul 31 07:43:21 EDT 2014

Powered by FUDForum. Page generated in 0.02755 seconds