UcanAccess error reading .MDB db from samba connection - java

I'm using UcanAccess (http://ucanaccess.sourceforge.net/site.html) to read a .MDB database from Java.
The application is running in a Ubuntu server and it is reading the database from a Samba connection.
On Windows machine it works, but on Linux I've some problems.
Here some data:
Url: jdbc:ucanaccess:///mnt/database/TEST.MDB;jackcessOpener=it.plugins.CryptCodecOpener
The database requires a password when I open it from Access. The database is used from another application, in fact I see in the same folder the .ldb file.
When I try to read data from DB I've this exception:
Dataset App.ti 1gg mdb (17) Plugin: TestMdb.jar: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.5 invalid authorization specification - not found: Admin
at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at it.test.plugins.Testmdb.TestMdb.getConnection(TestMdb.java:120)
at it.test.plugins.Testmdb.TestMdb.testConnessione(TestMdb.java:135)
at it.test.plugins.PluginManager.getAppuntamenti(PluginManager.java:247)
at it.test.plugins.PluginManager$$FastClassBySpringCGLIB$$180b607d.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at it.test.plugins.PluginManager$$EnhancerBySpringCGLIB$$ece2d5aa.getAppuntamenti(<generated>)
at it.test.task.AppuntamentiTask.esegui(AppuntamentiTask.java:176)
at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::3.0.5 invalid authorization specification - not found: Admin
at net.ucanaccess.jdbc.UcanaccessConnection.<init>(UcanaccessConnection.java:110)
at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:254)
... 28 more
Caused by: java.sql.SQLInvalidAuthorizationSpecException: invalid authorization specification - not found: Admin
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at net.ucanaccess.jdbc.DBReference.getHSQLDBConnection(DBReference.java:440)
at net.ucanaccess.jdbc.UcanaccessConnection.<init>(UcanaccessConnection.java:107)
... 29 more
Caused by: org.hsqldb.HsqlException: invalid authorization specification - not found: Admin
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.rights.UserManager.get(Unknown Source)
at org.hsqldb.rights.UserManager.getUser(Unknown Source)
at org.hsqldb.Database.connect(Unknown Source)
at org.hsqldb.DatabaseManager.newSession(Unknown Source)
... 36 more
But if I do a cp originalDatabase.MDB copiedDatabase.MDB and I change UcanAccess url using the copied database, everything works fine without any change!
This is how I mounted the share:
//192.168.101.100/g/DATABASE /mnt/database cifs user=,password=,gid=1005,uid=1001 0 0
where 1001 is the uid of the user that runs my java application.
I want to point out that the same application on Windows works fine without the need to copy the original database in order to access to it.
Am I missing something?

Related

Hibernate error when executing JDBC statements - unexpected token 'UNIQUE'

I searched around and the only similar StackOverflow thread doesn't address what I'm looking for.
I have defined an auxillary database object in Hibernate like so:
<database-object>
<create>ALTER TABLE project ADD CONSTRAINT UNIQUE `unique_id` (`userId`);</create>
<drop></drop>
</database-object>
Upon setting up my database and running against passing tests, I get this error thrown:
01:56:04.337> WARN ExceptionHandlerLoggedImpl:27 GenerationTarget encountered exception accepting command : Error executing DDL "ALTER TABLE project ADD CONSTRAINT UNIQUE `unique_id` (`userId`);" via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "ALTER TABLE project ADD CONSTRAINT UNIQUE `unique_id` (`userId`);" via JDBC Statement
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:458)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:442)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:406)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:169)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:138)
at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:124)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:164)
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:81)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:335)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:471)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:728)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:746)
at com.ekotrope.server.jdo.BaseJdoTestClass.startServices(BaseJdoTestClass.java:221)
at com.ekotrope.server.jdo.BaseJdoTestClass.beforeClass(BaseJdoTestClass.java:112)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.sql.SQLSyntaxErrorException: unexpected token: UNIQUE
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
... 31 more
Caused by: org.hsqldb.HsqlException: unexpected token: UNIQUE
at org.hsqldb.error.Error.parseError(Unknown Source)
at org.hsqldb.ParserBase.unexpectedToken(Unknown Source)
at org.hsqldb.ParserBase.checkIsNonCoreReservedIdentifier(Unknown Source)
at org.hsqldb.ParserDQL.checkIsSchemaObjectName(Unknown Source)
at org.hsqldb.ParserDQL.readNewSchemaObjectName(Unknown Source)
at org.hsqldb.ParserDQL.readNewDependentSchemaObjectName(Unknown Source)
at org.hsqldb.ParserDDL.compileAlterTable(Unknown Source)
at org.hsqldb.ParserDDL.compileAlter(Unknown Source)
at org.hsqldb.ParserCommand.compilePart(Unknown Source)
at org.hsqldb.ParserCommand.compileStatements(Unknown Source)
at org.hsqldb.Session.executeDirectStatement(Unknown Source)
at org.hsqldb.Session.execute(Unknown Source)
... 35 more
This is incredibly confusing because executing the above statement within my database (MariaDB) is perfectly valid, yet JDBC doesn't recognize a perfectly fine statement.

Java Firebase Admin SDK connect behind proxy

I am new in firebase development, I'am trying to save a data to realtime database, but it always throw an error when I connected behind my company proxy, I already tried this approach but still no luck,
here my stack trace :
4517 [firebase-websocket-worker] ERROR
com.google.firebase.database.connection.WebsocketConnection - [ws_1]
WebSocket error
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection
refused: no further information: testing-
5786c.firebaseio.com/35.201.97.85:443
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: no further information
... 16 more
any suggestion?

IBM DB2 Connection error with autoReconnect

I am using db2jcc4.jar version 4.19.26 and JDBC4 .
When I am adding autoReconnect=true in the connection URL ,
<datasource jta="true" jndi-name="java:/jdbc/Name" pool-name="Name" enabled="true" use-ccm="false">
<connection-url>jdbc:db2://host:port/db?autoReconnect=true</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<driver>db2jcc4.jar</driver> ....
I am getting the following error :
Caused by: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:347)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:354)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:288)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:1166)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:446)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getTransactionNewConnection(AbstractPool.java:541)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:442)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:379)
... 129 more
Caused by: com.ibm.db2.jcc.am.DisconnectNonTransientException: [jcc][t4][2034][11148][4.19.26] Execution failed due to a distribution protocol error that caused deallocation of the conversation.
A DRDA Data Stream Syntax Error was detected. Reason: 0x2110. ERRORCODE=-4499, SQLSTATE=58009
at com.ibm.db2.jcc.am.kd.a(Unknown Source)
at com.ibm.db2.jcc.am.kd.a(Unknown Source)
at com.ibm.db2.jcc.t4.y.j(Unknown Source)
at com.ibm.db2.jcc.t4.z.bb(Unknown Source)
at com.ibm.db2.jcc.t4.z.y(Unknown Source)
at com.ibm.db2.jcc.t4.z.T(Unknown Source)
at com.ibm.db2.jcc.t4.z.i(Unknown Source)
at com.ibm.db2.jcc.t4.z.a(Unknown Source)
at com.ibm.db2.jcc.t4.b.c(Unknown Source)
at com.ibm.db2.jcc.t4.b.b(Unknown Source)
at com.ibm.db2.jcc.t4.b.b(Unknown Source)
at com.ibm.db2.jcc.t4.b.a(Unknown Source)
at com.ibm.db2.jcc.t4.b.a(Unknown Source)
at com.ibm.db2.jcc.t4.b.a(Unknown Source)
at com.ibm.db2.jcc.t4.b.<init>(Unknown Source)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(Unknown Source)
at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:322)
... 136 more
IBM documentation shows that the resolution to this issue is to use a different version of the JCC jar, hope that this works out for you. You could've at least added what version of DB you are using in the question. Please check this solution if it works for your situation!
The solution suggested in this documentation is to:
Use JCC driver version 4.11.77 and above or upgrade to DB2 V9.5 FP7 or DB2 V9.7 FP3a and above.

How to connect Pentaho 6.0 to Hadoop-Hive

I am trying to connect Pentaho to Hive, so that I can run Hive queries through Pentaho.
I have installed Pentaho 6.0 on my Windows 7 (Professional 64bit).
I have configured Hadoop on "Bare metal server". The details of Hadoop system are as follows:
Apache Hadoop V 2.6
Hive v 1.1
YARN
I tried connecting to Pentaho by using connection type:Hadoop-Hive 2, Database name:default and Port No:10000. I have added Hive JDBC jar file from this web link: http://mvnrepository.com/artifact/org.apache.hive/hive-jdbc/1.1.0. At the end when I try to connect, I get the following errors:
Error connecting to database [Hive_connect] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
org/apache/hive/service/cli/thrift/TCLIService$Iface
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
org/apache/hive/service/cli/thrift/TCLIService$Iface
at org.pentaho.di.core.database.Database.normalConnect(Database.java:459)
at org.pentaho.di.core.database.Database.connect(Database.java:357)
at org.pentaho.di.core.database.Database.connect(Database.java:328)
at org.pentaho.di.core.database.Database.connect(Database.java:318)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2734)
at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:588)
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:497)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
at org.pentaho.ui.xul.swt.tags.SwtButton.access$500(SwtButton.java:43)
at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:136)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:389)
at org.pentaho.ui.xul.swt.tags.SwtDialog.show(SwtDialog.java:318)
at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)
at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:60)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:470)
at org.pentaho.di.ui.spoon.delegates.SpoonDBDelegate.newConnection(SpoonDBDelegate.java:457)
at org.pentaho.di.ui.spoon.Spoon.newConnection(Spoon.java:8750)
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:497)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43)
at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1339)
at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939)
at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9214)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:653)
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:497)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
org/apache/hive/service/cli/thrift/TCLIService$Iface
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:574)
at org.pentaho.di.core.database.Database.normalConnect(Database.java:443)
... 55 more
Caused by: java.lang.NoClassDefFoundError: org/apache/hive/service/cli/thrift/TCLIService$Iface
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:554)
... 56 more
Caused by: java.lang.ClassNotFoundException: org.apache.hive.service.cli.thrift.TCLIService$Iface
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 60 more
There should be a JDBC Driver for Hive and you can use it to connect Penthao to your Hive Storage. It should be as simple as to register a new database instance.
Have a look at this link: HiveClient
Get the JDBC Driver for Hive if it isn't available
Follow the instructions to install the JDBC Driver Penthao Description
Configure a new Hive Database Connection

I cant select in DB2

I have an application consisting of: Spring, WebSphere, accessing DB2 jdbc.
Everything is set up ok, the application is usually published, because when I go to select a seat at any table I get this following error.
OsjsSQLErrorCodeSQLExceptionTranslator DEBUG - Translating SQLException with SQL
state '42Y07 ', error code '30000', message [Schema 'DBPROD' does not exist]; SQL was
[SELECT * FROM DBPROD.EXPUR_CONS_CRIVO] for task [PreparedStatementCallback]
[10/24/11 10:11:54:257 EST] 0000001b SystemOut The 10:11:54.249 [WebContainer: 1]
ERROR bcbwahdHistoricoDescontoDAOImpl - [requestID A8IUK52K =]
HistoricoDescontoDAOImpl.consultarHistoricoDesconto Terminating with error ()
org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback;
SQL [SELECT * FROM DBPROD.EXPUR_CONS_CRIVO]; Schema 'DBPROD' does not exist;
java.sql.SQLSyntaxErrorException nested exception is: Schema 'DBPROD' does not exist
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]
at [spring-jdbc-3.0.1.RELEASE.jar: 3.0.1.RELEASE]
Caused by: org.apache.derby.impl.jdbc.EmbedSQLException: Schema 'DBPROD' does not exist
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) [derby-10.5.3.0_1.jar:na]
... 191 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Schema 'DBPROD' does not exist
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.QueryTreeNode.getSchemaDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.compile.CursorNode.bindStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) [derby-10.5.3.0_1.jar:na]
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) [derby-10.5.3.0_1.jar:na]
... 185 common frames omitted
my user has full access to the database, since I do not know what to do.
SQL State codes beginning with '42' refer usually to Syntax errors, but in your Case its pretty clear that Schema is missing.
Check these Links hope they will help you solve this problem:
CURRENT SCHEMA special register
how do i get the current schema on DB2 if i have a JDBC conneciton?
As it has been mentioned, the error messages you get are from an Apache Derby JDBC driver. Check that you chose the correct datasource when you configured your application in WebSphere.

Categories

Resources