Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » OSGi access to Apache Tomcat JNDI
OSGi access to Apache Tomcat JNDI [message #1043185] Wed, 17 April 2013 11:45 Go to next message
Jan Stamer is currently offline Jan Stamer
Messages: 13
Registered: February 2012
Junior Member
Hi,

I need to access a datasource of Apache Tomcat (and later also IBM WebSphere) from OSGi. I am trying this using Gemini Naming but without success yet.

What I got working so far:
When I try to access the JNDI this goes through Gemini Naming. Yet I don't get hold of Tomcat's JNDI.

Are there tutorials or sample projects which access resources of an application or web server via JNDI?

Currently I get the following exception:
2013-04-17 12:29:32,727 [EclipseGeminiBlueprintExtenderThread-24] ERROR o.e.g.b.e.i.a.ContextLoaderListener [ ] - Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=com.pe-international.gabi.gw.repository.db, config=osgibundle:/META-INF/spring/*.xml))
javax.naming.NoInitialContextException: Client's BundleContext could not be located
	at org.eclipse.gemini.naming.TraditionalInitialContextFactoryBuilder$TraditionalInitialContextFactory.getInitialContext(TraditionalInitialContextFactoryBuilder.java:81) ~[na:na]
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) ~[na:1.6.0_27]
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) ~[na:1.6.0_27]
	at javax.naming.InitialContext.init(InitialContext.java:223) ~[na:1.6.0_27]
	at javax.naming.InitialContext.<init>(InitialContext.java:197) ~[na:1.6.0_27]


Any help appreciated!

Thanks,
Jan
Re: OSGi access to Apache Tomcat JNDI [message #1043247 is a reply to message #1043185] Wed, 17 April 2013 13:14 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta Georgieva
Messages: 242
Registered: October 2010
Senior Member
Quote:
I need to access a datasource of Apache Tomcat (and later also IBM WebSphere) from OSGi.


When you specify Apache Tomcat, do you mean Gemini Web or pure Apache Tomcat?

If you mean Gemini Web please check the documentation [1]

Regards
Violeta

[1] http://eclipse.org/gemini/web/documentation/gemini-web-documentation-2.2.1.RELEASE/gemini-web-user-guide/htmlsingle/gemini-web-user-guide.html#configuring-tomcat -> Chapter "JNDI Resources"
Re: OSGi access to Apache Tomcat JNDI [message #1043250 is a reply to message #1043247] Wed, 17 April 2013 13:17 Go to previous message
Jan Stamer is currently offline Jan Stamer
Messages: 13
Registered: February 2012
Junior Member
Hi,

I am talking about pure Apache Tomcat here.

Our setup is running Eclipse Equinox embedded in a WAR file. We use the servlet bridge to manage the OSGi framework.

Thanks,
Jan
Previous Topic:"Sometimes", Gemini misses some service creation
Next Topic:Refactoring Databases Dynamically
Goto Forum:
  


Current Time: Fri Oct 24 21:25:25 GMT 2014

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

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