War shared library [message #716532] |
Wed, 17 August 2011 15:58 |
Erdal Karaca Messages: 854 Registered: July 2009 |
Senior Member |
|
|
I have deployed a war (apache jackrabbit), but it needs a shared library to be deployed to the shared libs folder of the application server... how do I expose the missing library (javax.jcr packaged as osgi bundle) to the war? just uploading and starting the osgi bundle does not seem to work...
This is the error message:
JCR API Not Found
The javax.jcr.Repository interface from the JCR API could not be loaded.
To resolve this issue, you need to make the jcr-2.0.jar file available in the shared classpath of the servlet container.
[Updated on: Wed, 17 August 2011 16:01] Report message to a moderator
|
|
|
Re: War shared library [message #716741 is a reply to message #716532] |
Thu, 18 August 2011 09:43 |
|
Hi,
I've added the javax.jcr 2.0.0 bundle to the EBR but it will take a while for it to show on the website, it is available elsewhere however already packaged as an OSGi bundle. All you need to do is place the bundle in one of Virgos repositories, I suggest 'usr'. Then modify the manifest of your war file to include the following.
Import-Package: javax.jcr;version=[2.0.0,2.0.0]
Obviously append this to the list if you already have some import package declarations. Please ask back if your having difficulty still.
Chris.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
|
|
|
|
Re: War shared library [message #716830 is a reply to message #716781] |
Thu, 18 August 2011 14:34 |
|
It depends on what you are using the bundle for. Bundles in a repository are not installed and started, they are just available in case they are needed. Bundles in the pickup directory or uploaded by the admin console are actively installed and started with any dependencies they have being resolved. (If the dependancies can't be resolved then
If the War file worked before with no problem, in something like Tomcat, where was it getting javax.jcr from if it's not in it's lib directory?
Chris.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
|
|
|
|
|
|
Re: War shared library [message #717132 is a reply to message #717106] |
Fri, 19 August 2011 11:50 |
|
Could you modify the org.eclipse.virgo.web.properties properties file located in the $SERVER_HOME/repository/ext directory. Change the WABHeaders property to have a value of 'defaulted'. That may help you out.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
|
|
|
|
Re: War shared library [message #720303 is a reply to message #719932] |
Tue, 30 August 2011 10:41 |
|
Hi,
So that setting makes Virgo add some headers to help out with Web Bundles but it isn't compliant with the spec so it is going away. The problem you have run in to is a know bug and should be fixed shortly but setting the WABHeaders is a work around that solves the bug for now. It will not be required once the bug fix is in and this will happen before we remove the WABHeaders switch.
Chris.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
|
|
|
Powered by
FUDForum. Page generated in 0.03934 seconds