Home » Eclipse Projects » Virgo » deploying simple war file causes IllegalArgumentException: Required 'bundleContext' property was not
| |
Re: deploying simple war file causes IllegalArgumentException: Required 'bundleContext' property was [message #555454 is a reply to message #555275] |
Thu, 26 August 2010 16:23 |
chrisatpinguin Messages: 18 Registered: May 2010 |
Junior Member |
|
|
Hi,
thanks for the info.
I added the entry to the web.xml (global) and add the package to my import in the manifest, but the Virgoserver could not find a bundle exporting the package.
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <my.company.osgi-webservices_0.0.0>
constraint: <Import-Package: org.eclipse.virgo.server.web.dm; version="0.0.0">
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'my.company.osgi-webservices' at version '0.0.0': Cannot resolve: my.company.osgi-webservices
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <my.company.osgi-webservices_0.0.0>
constraint: <Import-Package: org.eclipse.virgo.server.web.dm; 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)
So I tried looking for a jar file with an applicable name and I found
./work/org.eclipse.virgo.kernel.deployer_2.1.0.M03-incubation/staging/global/bundle/org.eclipse.virgo.web.dm/2.1.0.M03-incubation/org.eclipse.virgo.web.dm-2.1.0.M03-incubation.jar
Is this package visible for the bundles installed by user? Which package should export the needed package?
here is my web.xml file:
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>osgi-webservices</display-name>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml,
/WEB-INF/osgi-context.xml
</param-value>
</context-param>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.server.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
and my Manifest
Manifest-Version: 1.0
Bundle-Vendor: COMPANY AG
Bundle-Version: 0.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: my.company.osgi-webservices
Bundle-ManifestVersion: 2
Bundle-SymbolicName: my.company.osgi-webservices
Web-ContextPath: wsapi
Import-Package: javax.servlet,javax.
servlet.http,javax.servlet.resources,org.aopalliance.aop,org.eclipse.
virgo.server.web.dm,org.springframework.aop,org.springframework.aop.f
ramework,org.springframework.aop.support,org.springframework.beans.fa
ctory,org.springframework.beans.factory.config,org.springframework.co
ntext,org.springframework.osgi.config,org.springframework.remoting.ht
tpinvoker,org.springframework.remoting.support,org.springframework.ut
il,org.springframework.web.context,org.springframework.web.context.su
pport
Thanks for helping out. Perhaps I missed something very easy but its late here in Germany and I play around with virgo for some hours today, it is hard to see anything
|
|
| | | | |
Re: deploying simple war file causes IllegalArgumentException: Required 'bundleContext' property was [message #635433 is a reply to message #635370] |
Tue, 26 October 2010 18:46 |
Ellen Strnod Messages: 17 Registered: October 2010 |
Junior Member |
|
|
There is no dump created. This is from the log:
2010-10-26 11:34:14.578|start-signalling-3|ERROR|o.s.web.context.Contex tLoader.initWebApplicationContext:208|Context initialization failed org.springframework.context.ApplicationContextException: Failed to load custom context class [org.eclipse.virgo.server.web.dm.ServerOsgiBundleXmlWebAppli cationContext]; nested exception is java.lang.ClassNotFoundException: org.eclipse.virgo.server.web.dm.ServerOsgiBundleXmlWebApplic ationContext
at org.springframework.web.context.ContextLoader.determineConte xtClass(ContextLoader.java:280)
at org.springframework.web.context.ContextLoader.createWebAppli cationContext(ContextLoader.java:233)
at org.springframework.web.context.ContextLoader.initWebApplica tionContext(ContextLoader.java:192)
at org.springframework.web.context.ContextLoaderListener.contex tInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(Stand ardContext.java:4182)
at org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4682)
at org.apache.catalina.core.ContainerBase.addChildInternal(Cont ainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBas e.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost. java:546)
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContaine r.startWebApplication(TomcatServletContainer.java:120)
at org.eclipse.gemini.web.internal.StandardWebApplication.start (StandardWebApplication.java:90)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListen er.onStarted(WebBundleLifecycleListener.java:120)
at org.eclipse.virgo.kernel.install.artifact.internal.ArtifactS tateMonitor.onStarted(ArtifactStateMonitor.java:205)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractI nstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.j ava:273)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractI nstallArtifact.access$0(AbstractInstallArtifact.java:270)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractI nstallArtifact$StateMonitorSignal.signalSuccessfulCompletion (AbstractInstallArtifact.java:223)
at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1. run(BundleStartTracker.java:140)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: org.eclipse.virgo.server.web.dm.ServerOsgiBundleXmlWebApplic ationContext
at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappC lassLoader.loadClass(BundleWebappClassLoader.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.springframework.util.ClassUtils.forName(ClassUtils.java: 258)
at org.springframework.web.context.ContextLoader.determineConte xtClass(ContextLoader.java:277)
... 19 common frames omitted
Here is the manifest:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: 1.6.0_16 (Sun Microsystems Inc.)
Built-By: estrnod
Build-Jdk: 1.6.0_16
JDK_VERSION: 1.6
Tool: Bnd-0.0.357
Bundle-Name: HTTP Interface Application Bundle
Import-Library: org.springframework.spring;version="[3.0.0.RELEASE,3.0
.0.RELEASE]"
Web-ContextPath: ocs
Import-Bundle: com.delphidisplay.insight.common;version="[1.1.0.b,1.1.
0.b]",org.springframework.security.core;version="[2.0.5.RELEASE,2.0.5
.RELEASE]",com.springsource.org.apache.commons.codec;version="[1.3.0,
1.3.0]",org.springframework.osgi.core;version="[1.2.1,1.2.1]",org.ecl
ipse.virgo.web.dm;version="[2.1.0.RC1-incubation,2.1.0.RC1-incubation
]",com.springsource.org.hibernate;version="3.3.2.GA"
Bundle-Version: 1.1.0.b
Bnd-LastModified: 1288117932424
Bundle-ManifestVersion: 2
Import-Package: com.delphidisplay.configuration,com.delphidisplay.pers
istence.service,com.delphidisplay.security,com.delphidisplay.sockets,
javax.servlet;version="2.5",javax.servlet.http;version="2.5",org.apac
he.commons.io;version="1.4",org.apache.commons.lang;version="2.2",org
.bouncycastle.util.encoders,org.slf4j;version="1.5",org.springframewo
rk.security;version="2.0",org.springframework.security.context;versio
n="2.0",org.springframework.web.servlet;version="3.0",org.springframe
work.web.servlet.mvc;version="3.0"
Bundle-SymbolicName: com.delphidisplay.insight.ocs-http
This manifest is created by Maven using the following plugin configuration:
<!-- create the manifest -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<source>2.0.0</source>
<target>2.0.0</target>
<manifestLocation>${project.build.directory}/${project.build.finalName}/META-INF</manifestLocation>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<!--
for MANIFEST.MF to be created by build, it must not already exist
in source directory
-->
<Bundle-Name>HTTP Interface Application Bundle</Bundle-Name>
<Bundle-SymbolicName>com.delphidisplay.insight.ocs-http</Bundle-SymbolicName>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Import-Package>
*;-split-package:=merge-last</Import-Package>
<Import-Library>org.springframework.spring;version="[${springframework_bundle_version},${springframework_bundle_version}]"</Import-Library>
<Import-Bundle>com.delphidisplay.insight.common;version="[${project_version},${project_version}]",org.springframework.security.core;version="[${spring_security_bundle_version},${spring_security_bundle_version}]",com.springsource.org.apache.commons.codec;version="[${apache_commons_codec_bundle_version},${apache_commons_codec_bundle_version}]",org.springframework.osgi.core;version="[${springramework_osgi_core_version},${springramework_osgi_core_version}]",org.eclipse.virgo.web.dm;version="[${dm_server_version},${dm_server_version}]",com.springsource.org.hibernate;version="${hibernate_bundle_version}"</Import-Bundle>
<Export-Package>!*</Export-Package>
<Web-ContextPath>ocs</Web-ContextPath>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 18:24:58 GMT 2024
Powered by FUDForum. Page generated in 0.11148 seconds
|