I have Phoenix installed phoenix-4.3.1 and successfully connected to it to hbase via sqline
Both on a machine that is part of the cluster as well as a machine that is not part of the cluster and has no hadoop components; just access to zookeeper
sqlline access is fine, but connecting via app (npm) via druid is running into an error
I found npm
https://github.com/gaodazhu/phoenix-client
I am getting the following
May 22, 2015 2:08:25 AM com.alibaba.druid.pool.DruidDataSource error
SEVERE: dataSource init error
java.sql.SQLException: org.apache.phoenix.jdbc.PhoenixDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:514)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:565)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:878)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97)
at com.mlsc.DBClient.query(DBClient.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:512)
... 9 more
May 22, 2015 2:08:25 AM com.alibaba.druid.pool.DruidDataSource info
INFO: {dataSource-1} inited
java.sql.SQLException: org.apache.phoenix.jdbc.PhoenixDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:514)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:565)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:878)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97)
at com.mlsc.DBClient.query(DBClient.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:512)
Have you tried create a 'TEST' table in Phoenix? And make sure to insert some rows into the 'TEST' table.
Related
My application supported on:
Jdk1.7.0_76,
JavaFx2.2.76_b13,
Netbeans IDE,
Ant for building and creating installer.
Supported on Windows and Mac.
It's running successfully till High-Sierra
When I tried to run .app file on Mojave it is giving
Unable to load Info.plist exceptions (eGPUOverrides)
And when I tried to run jar file it gives following error
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 13 more
java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
at situasses.Situassess.<init>(Situassess.java:24)
at myproject.RecomAgent.setup(RecomAgent.java:33)
at jade.core.Agent$ActiveLifeCycle.init(Agent.java:1522)
at jade.core.Agent.run(Agent.java:1468)
at java.lang.Thread.run(Thread.java:744)Caused by: java.lang.ClassNotFoundException: org.apache.http.client.ClientProtocolException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more
ERROR: Agent user61 died without being properly terminated !!!
State was 2
Add HTTPClient.jar to your classpath. And also check this for details.
Anyone ever get this exception from Apache JackRabbit?
This exception occurs on RHEL 6 Linux.
ERROR RepositoryImpl:393 - In addition to startup fail, another unexpected problem occurred while shutting down the repository again.
java.lang.NullPointerException
at org.apache.jackrabbit.core.RepositoryImpl.doShutdown(RepositoryImpl.java:1141)
at org.apache.jackrabbit.core.RepositoryImpl.shutdown(RepositoryImpl.java:1065)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:389)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
at org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:180)
at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
Exception in thread java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverDataSource(ConnectionFactory.java:312)
at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:240)
at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:166)
at org.apache.jackrabbit.core.fs.db.DbFileSystem.getDataSource(DbFileSystem.java:226)
at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
at org.apache.jackrabbit.core.config.RepositoryConfigurationParser$6.getFileSystem(RepositoryConfigurationParser.java:1057)
at org.apache.jackrabbit.core.config.RepositoryConfig.getFileSystem(RepositoryConfig.java:911)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:285)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:605)
at org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:180)
at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:280)
at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:376)
at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool.impl.GenericObjectPool
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 20 more
Hey I've been trying to set up Hibernate Spatial to query geographical data stored in PostGreSQL. I getting the following error while trying to run my code.
session factory creation failed
java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.spatial.integration.SpatialIntegrator could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:339)
at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:57)
at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:247)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:73)
at com.handyhome.service.database.HibernateUtil.buildSessionFactory(HibernateUtil.java:24)
at com.handyhome.service.database.HibernateUtil.getSessionFactory(HibernateUtil.java:39)
at com.handyhome.service.database.App.main(App.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/spi/BasicServiceInitiator
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
at java.lang.Class.getConstructor0(Class.java:2885)
at java.lang.Class.newInstance(Class.java:350)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.spi.BasicServiceInitiator
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 18 more
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.handyhome.service.database.HibernateUtil.buildSessionFactory(HibernateUtil.java:33)
at com.handyhome.service.database.HibernateUtil.getSessionFactory(HibernateUtil.java:39)
at com.handyhome.service.database.App.main(App.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.spatial.integration.SpatialIntegrator could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:339)
at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:57)
at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:247)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:73)
at com.handyhome.service.database.HibernateUtil.buildSessionFactory(HibernateUtil.java:24)
... 7 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/spi/BasicServiceInitiator
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2585)
at java.lang.Class.getConstructor0(Class.java:2885)
at java.lang.Class.newInstance(Class.java:350)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.spi.BasicServiceInitiator
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 18 more
The code for SessionFactoryCreation
private static SessionFactory buildSessionFactory(){
try{
Configuration configuration = new Configuration().configure();
logger.log(Level.INFO,"Hibernate Configuration Loaded");
StandardServiceRegistryBuilder builder
= new StandardServiceRegistryBuilder()
.applySettings(configuration.getProperties())
;
logger.log(Level.INFO,"Service registry created");
return configuration.buildSessionFactory(builder.build());
}catch (Throwable ex){
logger.log(Level.SEVERE,"session factory creation failed",ex);
throw new ExceptionInInitializerError(ex);
}
}
It works fine if I remove hibernate-spatial from my dependencies and code. But I really need to use Spatial as my tables contain lat-long data
Which version of hibernate are you using?
If you are using 4.2.x or lower in your web container, this method of creating a session factory will fail.
This line is deprecated, but worked for me when I ran into a similar problem:
new Configuration().configure().buildSessionFactory();
I am getting the following error:
Exception in Application constructor
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class StartUp
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:884)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.sun.javafx.application.LauncherImpl$7.run(LauncherImpl.java:791)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
... 1 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/Session
at gui.GraphicApplication.<init>(GraphicApplication.java:28)
at StartUp.<init>(StartUp.java:26)
... 15 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
Exception running application StartUp
However i am not even using the Hibernate library, i am using JPA, i tried searching for "Session", "hibernate" and other strings but i can't find any of those and yet it is throwing this error.
These are the libraries i am currently using:
I was using hibernate before but i had to use JPA, so i removed everything that had to do with Hibernate.
The stacktrace is referencing to some of my files but nothing on those lines has anything to do with database management.
Have you added Hibernate JAR's to the lib directory of your server by any chance?
Well the stack trace says clear enough that "gui.GraphicApplication.(GraphicApplication.java:28)" is referencing it, so look at that and fix it?