Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Gemini Naming java:comp URL Context(Name: java:comp was not found. A URL Context Factory was not registered to handle this URL scheme)
Gemini Naming java:comp URL Context [message #1781156] Fri, 02 February 2018 08:18
Marco Descher is currently offline Marco DescherFriend
Messages: 197
Registered: October 2010
Location: Austria
Senior Member
I do struggle with the following situation:

I have an Equinox based server, running OSGI Jetty hosting a webapp employing spring. The Equinox server already uses gemini naming to provide the non-jta-data-source to eclipselink, which works perfectly.

Now I want to pass this DataSource to the spring application. My research so far brought me to the following steps:

* Register the datasource with JNDI
** Employ gemini naming for this
* Register a reference within web.xml for the web-application
** Activate JNDI initialization for jetty via jetty-web.xml
		<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>

** Add the resource in web.xml
<resource-ref>
		<description>Elexis DB Connection</description>
		<res-ref-name>osgi:service/jdbc/poolable</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>

* Reference the DataSource out of the spring-application
<bean id="dataSourceElexis" class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiName" value="jdbc/poolable">
		</property>
	</bean>



This all does not look to bad - but I can't seem to figure out the following: Why does gemini naming not care for "java:comp"?

I get the following exception when initializing org.eclipse.jetty.plus.webapp.EnvConfiguration.createEnvContext

2018-02-02 09:05:00,350 WARN  o.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext@51c85cbe{/org.mitre,file:///Users/marco/Development/elexis-server-master/ws/org.mitre.openid-connect-server-webapp/,null}{file:/Users/marco/Development/elexis-server-master/ws/org.mitre.openid-connect-server-webapp/}
javax.naming.NameNotFoundException: Name: java:comp was not found.  A URL Context Factory was not registered to handle this URL scheme
	at org.eclipse.gemini.naming.ContextWrapperImpl.getURLContextOrDefaultContext(ContextWrapperImpl.java:220) ~[na:na]
	at org.eclipse.gemini.naming.ContextWrapperImpl.lookup(ContextWrapperImpl.java:51) ~[na:na]
Previous Topic:Gemini injection not working
Next Topic:Changes in the upcoming Gemini Blueprint 3.0.0.M1 release
Goto Forum:
  


Current Time: Wed Sep 11 13:34:12 GMT 2024

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

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

Back to the top