Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » How to access resource via JNDI in RCPTT(Can't access resource via JNDI while running RCPTT)
How to access resource via JNDI in RCPTT [message #1749992] Wed, 14 December 2016 23:13 Go to next message
Nick Gr is currently offline Nick GrFriend
Messages: 2
Registered: December 2016
Junior Member
Hi,

I have an already RAPiefed web application which works fine in Tomcat 7.

However, when using RCPTT (and RAP support plugin) I'm having a problem with accessing db resource over JNDI, specified in of the Spring context XMLs.

Searched the web, followed some articles and installed Jetty JNDI and Osgi.Boot (and relevant dependencies) in a hope that the JNDI configuration will be picked-up from the jetty.xml (I tried to use -Djetty.home because Boot activator can use this one for external jetty home).

I can see in the OSGi console that both JNDI and Boot bundles are active and the best I got is ClassNotFoundException: org.eclipse.jetty.jndi.InitialContextFactory.

Previously, it was complaining on missing java.naming.factory.initial, which I fixed by adding a system property.

The above error is usually a sign that a package is not exported, but I may be wrong.

Is there a way to work with JNDI resources and RCPTT?

Any help is highly appreciated.

Tnx,
Re: How to access resource via JNDI in RCPTT [message #1750106 is a reply to message #1749992] Fri, 16 December 2016 08:06 Go to previous messageGo to next message
Artem Kovalev is currently offline Artem KovalevFriend
Messages: 25
Registered: April 2016
Junior Member
Hi Nick,

Do you have a log file with errors?

Thanks, Artem
Re: How to access resource via JNDI in RCPTT [message #1750182 is a reply to message #1750106] Fri, 16 December 2016 22:54 Go to previous message
Nick Gr is currently offline Nick GrFriend
Messages: 2
Registered: December 2016
Junior Member
Hi Artem,

I resolved the problem by adding org.eclipse.jetty.jndi into Required-Bundle attribute of my bundle, requiring JNDI resource. However, that partially solved the problem because it complains that can't find the rest of the name e.g env/jndi/myDs. The main cause for this, is missing JNDI resource definition which is usually created in jetty.xml and/or jetty-env.xml.

But, I don't how to point Jetty server to look at the external Jetty home folder. I couldn't find any system property that could do the job.

On the other side, I found org.eclipse.jetty.osgi.boot bundle which reads "jetty.home" system property, but don't know if (and how) can be used instead org.eclipse.equinox.http.jetty.

So, to wrap-up the question: how to point RCPTT RAP plugin to external Jetty home so JNDI resources can work properly for my app?

Cheers,
Previous Topic:Custom ECL Commands
Next Topic:RCPTT RAP testing with a deployed application
Goto Forum:
  


Current Time: Sat May 04 18:47:52 GMT 2024

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

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

Back to the top