After installing CXF feature I met some problem with datasource recognition
from bundle that uses JPA and registers servet.
javax.naming.NoInitialContextException: Unable to find the
InitialContextFactory org.eclipse.jetty.jndi.InitialContextFactory.
at
org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:148)
at
org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at
org.apache.aries.jpa.container.unit.impl.JndiDataSource.getDs(JndiDataSource.java:64)
at
org.apache.aries.jpa.container.unit.impl.DelayedLookupDataSource.getConnection(DelayedLookupDataSource.java:36)
at
org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:110)
at
org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:87)
at
org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:91)
at
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:603)
The same DataSource works nice when I inject dao service that uses the same
datasource in my command bundle. After command invocation servlets starts to
work properly.
The problem seems to occur for JPA bundles only. There is some sort of
InitialContextFactory replacement.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Problem-with-JPA-JNDI-after-installing-CXF-feature-tp4040429.html
Sent from the Karaf - User mailing list archive at Nabble.com.