org.osgi.framework.ServiceException: Service factory exception: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)]

Hibernate JIRA | Susan Javurek | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    We've set up injection as follows: {code} <bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.teradata.jdbc.TeraDriver" /> <!--property name="url" value="$(DB_URL)" /--> <property name="url" value="jdbc:mysql://localhost/hibernate-test" /> <property name="username" value="root" /> <property name="password" value="XXX" /> </bean> <service interface="javax.sql.DataSource" ref="datasource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/datasource" /> </service-properties> </service> {code} And in our hibernate config: {code} <session-factory> <property name="hibernate.connection.datasource">osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/datasource)</property> {code} This is results in the error [1]. The test case is based on the unmanaged-native osgi demo provided with hibernate. [1] ERROR {code} 17:29:44,934 | INFO | l Console Thread | Console | 16 - org.apache.karaf.shell.console - 2.3.0.redhat-611423 | Exception caught while executing command java.lang.NullPointerException at org.hibernate.osgitest.HibernateUtil.getSession(HibernateUtil.java:39)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.DataPointServiceImpl.add(DataPointServiceImpl.java:42)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.command.AddCommand.execute(AddCommand.java:40)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] 17:29:44,934 | DEBUG | lixDispatchQueue | osgi | 282 - org.hibernate.osgi - 4.2.9.Final | FrameworkEvent ERROR - org.hibernate.osgi org.osgi.framework.ServiceException: Service factory exception: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)] at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:349)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl.access$100(ServiceRegistrationImpl.java:47)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl$1.call(ServiceRegistrationImpl.java:249)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.Felix.runInContext(Felix.java:2188)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:238)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:328)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.Felix.getService(Felix.java:3819)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.hibernate.osgitest.HibernateUtil.getSessionFactory(HibernateUtil.java:49)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.HibernateUtil.getSession(HibernateUtil.java:39)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.DataPointServiceImpl.add(DataPointServiceImpl.java:42)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.command.AddCommand.execute(AddCommand.java:40)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] Caused by: org.hibernate.service.jndi.JndiException: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)] at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:92)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:63)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1825)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1783)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.osgi.OsgiSessionFactoryService.getService(OsgiSessionFactoryService.java:115)[282:org.hibernate.osgi:4.2.9.Final] at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:345)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] ... 21 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)[:1.7.0_51] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_51] at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)[:1.7.0_51] at javax.naming.InitialContext.getNameParser(InitialContext.java:499)[:1.7.0_51] at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)[280:org.hibernate.core:4.2.9.Final] ... 35 more 17:30:43,841 | DEBUG | l Console Thread | Console | 16 - org.apache.karaf.shell.console - 2.3.0.redhat-611423 | Unknown command entered org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found: osgi:servicelist at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] {code}

    Hibernate JIRA | 2 years ago | Susan Javurek
    org.osgi.framework.ServiceException: Service factory exception: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)]
  2. 0

    We've set up injection as follows: {code} <bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.teradata.jdbc.TeraDriver" /> <!--property name="url" value="$(DB_URL)" /--> <property name="url" value="jdbc:mysql://localhost/hibernate-test" /> <property name="username" value="root" /> <property name="password" value="XXX" /> </bean> <service interface="javax.sql.DataSource" ref="datasource"> <service-properties> <entry key="osgi.jndi.service.name" value="jdbc/datasource" /> </service-properties> </service> {code} And in our hibernate config: {code} <session-factory> <property name="hibernate.connection.datasource">osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/datasource)</property> {code} This is results in the error [1]. The test case is based on the unmanaged-native osgi demo provided with hibernate. [1] ERROR {code} 17:29:44,934 | INFO | l Console Thread | Console | 16 - org.apache.karaf.shell.console - 2.3.0.redhat-611423 | Exception caught while executing command java.lang.NullPointerException at org.hibernate.osgitest.HibernateUtil.getSession(HibernateUtil.java:39)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.DataPointServiceImpl.add(DataPointServiceImpl.java:42)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.command.AddCommand.execute(AddCommand.java:40)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] 17:29:44,934 | DEBUG | lixDispatchQueue | osgi | 282 - org.hibernate.osgi - 4.2.9.Final | FrameworkEvent ERROR - org.hibernate.osgi org.osgi.framework.ServiceException: Service factory exception: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)] at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:349)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl.access$100(ServiceRegistrationImpl.java:47)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl$1.call(ServiceRegistrationImpl.java:249)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.Felix.runInContext(Felix.java:2188)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:238)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:328)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.Felix.getService(Felix.java:3819)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] at org.hibernate.osgitest.HibernateUtil.getSessionFactory(HibernateUtil.java:49)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.HibernateUtil.getSession(HibernateUtil.java:39)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.DataPointServiceImpl.add(DataPointServiceImpl.java:42)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.hibernate.osgitest.command.AddCommand.execute(AddCommand.java:40)[344:org.hibernate.osgi.unmanaged-native:1.0.0] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] Caused by: org.hibernate.service.jndi.JndiException: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)] at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:92)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:63)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1825)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1783)[280:org.hibernate.core:4.2.9.Final] at org.hibernate.osgi.OsgiSessionFactoryService.getService(OsgiSessionFactoryService.java:115)[282:org.hibernate.osgi:4.2.9.Final] at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:345)[org.apache.felix.framework-4.0.3.redhat-610379.jar:] ... 21 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)[:1.7.0_51] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_51] at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)[:1.7.0_51] at javax.naming.InitialContext.getNameParser(InitialContext.java:499)[:1.7.0_51] at org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)[280:org.hibernate.core:4.2.9.Final] ... 35 more 17:30:43,841 | DEBUG | l Console Thread | Console | 16 - org.apache.karaf.shell.console - 2.3.0.redhat-611423 | Unknown command entered org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found: osgi:servicelist at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423] at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423] {code}

    Hibernate JIRA | 2 years ago | Susan Javurek
    org.osgi.framework.ServiceException: Service factory exception: Error parsing JNDI name [osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/adwTeraDS)]
  3. 0

    [PersistenceUnit: ] Unable to build EntityManagerFace

    com.br | 1 year ago
    javax.persistence.PersistenceException: [PersistenceUnit: ocp] Unable to build EntityManagerFactory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to use JPA entity manager instead of Ivy Entity Manager? - Axon.ivy | Q&A

    axonivy.com | 9 months ago
    javax.persistence.PersistenceException: [PersistenceUnit: xrfl_unit] Unable to build EntityManagerFactory
  6. 0

    Test JPQL with NetBeans IDE 7.3 Tools (Geertjan's Blog)

    oracle.com | 7 months ago
    javax.persistence.PersistenceException: [PersistenceUnit: WebApplication1PU2] Unable to build EntityManagerFactory

    12 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.NoInitialContextException

      Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

      at javax.naming.spi.NamingManager.getInitialContext()
    2. Java RT
      InitialContext.getNameParser
      1. javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)[:1.7.0_51]
      2. javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_51]
      3. javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)[:1.7.0_51]
      4. javax.naming.InitialContext.getNameParser(InitialContext.java:499)[:1.7.0_51]
      4 frames
    3. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.service.jndi.internal.JndiServiceImpl.parseName(JndiServiceImpl.java:86)[280:org.hibernate.core:4.2.9.Final]
      2. org.hibernate.service.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:63)[280:org.hibernate.core:4.2.9.Final]
      3. org.hibernate.service.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:116)[280:org.hibernate.core:4.2.9.Final]
      4. org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final]
      5. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final]
      6. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final]
      7. org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)[280:org.hibernate.core:4.2.9.Final]
      8. org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)[280:org.hibernate.core:4.2.9.Final]
      9. org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:76)[280:org.hibernate.core:4.2.9.Final]
      10. org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:158)[280:org.hibernate.core:4.2.9.Final]
      11. org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:130)[280:org.hibernate.core:4.2.9.Final]
      12. org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1825)[280:org.hibernate.core:4.2.9.Final]
      13. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1783)[280:org.hibernate.core:4.2.9.Final]
      13 frames
    4. org.hibernate.osgi
      OsgiSessionFactoryService.getService
      1. org.hibernate.osgi.OsgiSessionFactoryService.getService(OsgiSessionFactoryService.java:115)[282:org.hibernate.osgi:4.2.9.Final]
      1 frame
    5. Apache Felix Framework
      BundleContextImpl.getService
      1. org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:345)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      2. org.apache.felix.framework.ServiceRegistrationImpl.access$100(ServiceRegistrationImpl.java:47)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      3. org.apache.felix.framework.ServiceRegistrationImpl$1.call(ServiceRegistrationImpl.java:249)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      4. org.apache.felix.framework.Felix.runInContext(Felix.java:2188)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      5. org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:238)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      6. org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:328)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      7. org.apache.felix.framework.Felix.getService(Felix.java:3819)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      8. org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]
      8 frames
    6. org.hibernate.osgitest
      AddCommand.execute
      1. org.hibernate.osgitest.HibernateUtil.getSessionFactory(HibernateUtil.java:49)[344:org.hibernate.osgi.unmanaged-native:1.0.0]
      2. org.hibernate.osgitest.HibernateUtil.getSession(HibernateUtil.java:39)[344:org.hibernate.osgi.unmanaged-native:1.0.0]
      3. org.hibernate.osgitest.DataPointServiceImpl.add(DataPointServiceImpl.java:42)[344:org.hibernate.osgi.unmanaged-native:1.0.0]
      4. org.hibernate.osgitest.command.AddCommand.execute(AddCommand.java:40)[344:org.hibernate.osgi.unmanaged-native:1.0.0]
      4 frames
    7. Apache Karaf :: Shell :: Console
      AbstractCommand.execute
      1. org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423]
      1 frame
    8. Apache Felix Gogo Runtime
      CommandSessionImpl.execute
      1. org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      2. org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      3. org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      4. org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      5. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      6. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      7. org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[18:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      7 frames
    9. Apache Karaf :: Shell :: Console
      DelayedStarted.run
      1. org.apache.karaf.shell.console.jline.Console.run(Console.java:189)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423]
      2. org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:61)[16:org.apache.karaf.shell.console:2.3.0.redhat-611423]
      2 frames