Claims ContextPathStrategy is missing
pendium (4.0.1)
[ 24] [Active ] [ 1] OPS4J - Pax Logging API (1.1.0)
[ 25] [Active ] [ 1] OPS4J - Pax Logging Service (1.1.0)
[ 26] [Active ] [ 1] spring-context-support (2.5.4)
[ 27] [Active ] [ 1] asm.osgi (2.2.3.SNAPSHOT)
[ 28] [Active ] [ 1] backport-util-concurrent.osgi (3.0.0.SNAPSHOT)
[ 29] [Active ] [ 1] cglib-nodep.osgi (2.1.3.SNAPSHOT)
[ 30] [Active ] [ 1] spring-osgi-annotation (1.1.0.m2)
[ 31] [Active ] [ 1] Apache Felix Shell Service (1.0.0)
[ 32] [Active ] [ 1] Apache Felix Shell TUI (1.0.0)Ulrik, try using Knoplfish or Equinox - Felix doesn't support fragments and thus what you are trying to do simply doesn't work.
Thanks for that info. So Felix doesn't support fragments, I had totally missed that.
Now, using Equinox (with Pax Runner), I ran into the same quot;colon in ucl problemquot; as Craig did a while ago.Code:
MalformedObjectNameException: Invalid character ':' in value part of property
Anybody care to post a working ContextPathStrategy for a ucl like this?Code:
/initial@reference:file:com.example.app.web_1.0.0.SNAPSHOTI tried using the link you posted but it doesn't seem to work.
What version of Spring-DM are you using? The nightly build at least fixes the problem by escaping the characters.
Additionally, S2AP's Web-ContextPath header is supported for specifying the context path.
Sorry, made a thread link, should've been a post link. It works now.
Like Craig, I use 1.1-m2. I know that S2AP has a fix, but I'm determined to get my stuff working in plain Spring DM first. It's just a simple Spring MVC bundle and a service bundle, so I'm pretty frustrated I can't get it to work.
I meant that Web-ContextPath, available in S2AP's is also supported by Spring-DM through the nightly build.
You can get it from the S3 repo - if that's not an option then I suggest you look at your bundle location (since that one is used by 1.1.0-m2) or create your own ContextPathStrategy.
More information is available at :
os...:configuration
I checked again and this time I did see the note about Felix and fragments in the docs, but it's not in the FAQ.
The Web-ContextPath works fine.
However, the colon problem remains even if I use rc1-SNAPSHOT:Code:
INFO: Error registering ctx with jmx StandardEngine[Catalina].StandardHost[127.0.0.1].StandardContext[
/initial@reference:file:se.jayway.labs.spring.osgi.web_1.0.0.SNAPSHOT] null javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
javax.management.MalformedObjectNameException: Invalid character ':' in value part of property at javax.management.ObjectName.construct(ObjectName.java:529) at javax.management.ObjectName.lt;initgt;(ObjectName.java:1304) at org.apache.catalina.core.StandardContext.createObjectName(StandardContext.java:5173) at org.apache.catalina.core.StandardContext.preRegisterJMX(StandardContext.java:5182) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4095) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org..osgi.web.deployer.tomcat.TomcatWarDeployer.startCatalinaContext(TomcatWarDeployer.java:144) at org..osgi.web.deployer.tomcat.TomcatWarDeployer.startDeployment(TomcatWarDeployer.java:133) at org..osgi.web.deployer.support.AbstractWarDeployer.deploy(AbstractWarDeployer.java:93) at org..osgi.web.extender.internal.activator.WarLoaderListener$DeploymentManager$DeployTask.run(WarLoaderListener.java:185) at org..scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:66) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)The error suggests that the name contains a colon which is invalid to the JMX exporter. What the name that you are trying to use, the Web-ContextPath or the location?
Can you turn on logging and see what context path Spring-DM is trying to use (in rc1)?
Thanks,
I'm using the bundle location. If I use the Web-ContextPath, it works fine.
After showing a few stack traces from the JMX-related error, the following is logged:Code:
[Timer-1] INFO org..osgi.web.deployer.tomcat.TomcatWarDeployer -
Successfully deployed bundle [se.jayway.labs.spring.osgi.web (se.jayway.labs.spring.osgi.web)]
at [/initial%40reference%3Afile%3Ase.jayway.labs.spring.osgi.web_1.0.0.SNAPSHOT]
on server org.apache.catalina.startup.Embedded/1.0
It hasn't been quot;successfully deployedquot; though, since Catalina failed due to the JMX problem.
Ulrik, for the time being I suggest you use the Web-ContextPath - it seems that in your case the bundle location is referred to by Eclipse (hence the initial:reference:file) so the location becomes useless.
Do you know if the bundles are expanded or not? I would assume the former. |