Skip to main content


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 StamerFriend
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 GeorgievaFriend
Messages: 278
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 messageGo to next message
Jan Stamer is currently offline Jan StamerFriend
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
Re: OSGi access to Apache Tomcat JNDI [message #1733841 is a reply to message #1043250] Wed, 01 June 2016 11:54 Go to previous message
Sachin Bhosale is currently offline Sachin BhosaleFriend
Messages: 1
Registered: June 2016
Junior Member
Hi Jan

I am also looking for the similar issue, do you have any inputs on this?

Thanks,
Sachin

Jan Stamer wrote on Wed, 17 April 2013 13:17
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:java.lang.IllegalArgumentException while stopping my bundle
Next Topic:JPA: EntityGraph -> FetchGroupException when Entity is in another bundle
Goto Forum:
  


Current Time: Tue Oct 15 00:15:54 GMT 2024

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

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

Back to the top