WSO2 API Manager with EnterpriseDb 9.5 - Error java.lang.NullPointerException: tuples must be non-null - jdbc

I am trying to configure WSO2 API Manager 2.0.0 with Enterprise-db Advance Server (postgres) 9.5.
I have configured Postgres JDBC Driver (postgresql-9.4.1212.jre7.jar) with it and configured all required data-sources required for WSO2-AM.
I am getting following error when start wso2-am server, please advise what is wrong here.
Caused by: org.wso2.carbon.user.core.UserStoreException: DB error occurred while checking is existing domain : PRIMARY & tenant id : -1234
Caused by: java.sql.SQLException: Uncaught underlying exception.
Caused by: java.lang.NullPointerException: tuples must be non-null
at org.postgresql.jdbc.PgResultSet.<init>(PgResultSet.java:147)
at org.postgresql.jdbc.PgStatement.createResultSet(PgStatement.java:161)
at org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(PgStatement.java:213)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2037)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269)
at org.postgresql.jdbc.PgConnection.execSQLUpdate(PgConnection.java:480)
at org.postgresql.jdbc.PgConnection.getTransactionIsolation(PgConnection.java:850)
Please Note: When i try to configure EDB-JDBC driver (edb-jdbc17.jar) with it gives different error. Caused by: java.lang.Exception: Unsupported database: EnterpriseDB. Database will not be created automatically by the WSO2 Registry. Please create the database using appropriate database scripts for the database.
Creating db with scripts did not help.

Related

Connecting NIFI to Posgresql instance java.sql.SQLException: No suitable driver

I'm trying to set up a simple test in Apache Nifi to connect to an existing PostgreSQL instance. I'm able to connect outside of nifi using other tools like dBeaver, and am fairly sure my connection string is proper. I have tried putting the postgresql jdbc driver in all sorts of places, but still keep seeing the "No suitable driver" error. I'll include some screenshots of my DBCPConnectionPool controller as well as my stack traces.
I have seen other posts like this, but none of them seem to lead to any solutions for me. Any help is appreciated.
Stack Trace
19-11-05 23:50:09,933 ERROR [Timer-Driven Process Thread-2] o.a.nifi.processors.standard.ExecuteSQL ExecuteSQL[id=3d68fb42-016e-1000-0ea4-abcc7dcc2e48] Unable to execute SQL select query select * from records; due to org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://salt.db.elephantsql.com:5432/oickotoy'. No FlowFile to route to failure: org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://salt.db.elephantsql.com:5432/oickotoy'
org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://salt.db.elephantsql.com:5432/oickotoy'
at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:442)
at org.apache.nifi.dbcp.DBCPService.getConnection(DBCPService.java:49)
at sun.reflect.GeneratedMethodAccessor609.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:87)
at com.sun.proxy.$Proxy91.getConnection(Unknown Source)
at org.apache.nifi.processors.standard.AbstractExecuteSQL.onTrigger(AbstractExecuteSQL.java:223)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1176)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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: java.sql.SQLException: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://salt.db.elephantsql.com:5432/oickotoy'
at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:75)
at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:472)
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:538)
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:753)
at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:438)
... 19 common frames omitted
Caused by: java.sql.SQLException: No suitable driver
at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:68)
... 23 common frames omitted
What solved this issue for me was oddly enough deleting the Database connection URL (jdbc:postgresql://.....), applying the empty connection string to the controller service, then re-typing the connection string and then applying the now re-typed connection string to the controller service.
Seems like some kind of special character has caused this hiccup
What ended up solving this in the end was a version problem. I was apparently working on a dev release of Nifi that this was broken in. After I upgraded to the latest stable release, my problem went away.

Work Performer Exception: org.apache.soap.transport.SOAPTransport while executing ComponentStep in ProcessConfiguration of IBM FileNet

While running component Step in ProcessConfiguration of workflows, facing below issue. This component includes web service calls. Added soap.jar file in the component but issue remains the same.
Work Performer Exception: org.apache.soap.transport.SOAPTransport
When verified in PCCE logs, I find as below.
CMDp.MAS678A PEPrimary2 [Error] CMExecute[12917].MASMEDOC01.XSHDC510_DS_30.AdapterOperations.Y988309 [UKE_IndexingSME:D5C52E6172F0284385411683A8496EAB:sub_local_ExecuteForAttachment:adaptorCall] FAILED.; Exception: java.lang.ClassNotFoundException: org.apache.soap.transport.SOAPTransport
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:240)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:702)
at java.lang.ClassLoader.loadClass(ClassLoader.java:681)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:133)
at java.lang.ClassLoader.loadClass(ClassLoader.java:664)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:617)
at java.lang.ClassLoader.loadClass(ClassLoader.java:664)
Issue : Work Performer Exception: org.apache.soap.transport.SOAPTransport
Can someone help the reason for this issue??
try this
add the supporting jar as a content element within the code module
If 1 doesn't work, add the supporting jar to CPE Websphere library and restart the websphere

eclipselink and weblogic12g CLOB ClassCastException

I have an application deployed in a Weblogic 12g, and a datasource configured against an oracle RAC.
It uses as JPA provider; EclipseLink 2.4.1.
The problem is this exception;
Caused by: Exception [EclipseLink-3001] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB#87a98a], of class [class weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB], could not be converted to [class java.lang.String].
Internal Exception: java.lang.ClassCastException: oracle.sql.CLOB
....
Caused by: java.lang.ClassCastException: oracle.sql.CLOB
at weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB.length(Unknown Source)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToString(ConversionManager.java:679)
at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:100)
....
Well, I understand what is the problem but I can't understand why only occurs when some Oracle instance in the Oracle RAC was reset. When this occurs, the only thing to do is restart the WLS instance. ah! While I have this error, the rest of the datatypes work well!.
Maybe there are some kind of direct relaction between LOB types and instances of Oracle servers inside a RAC? It's possible some kind of scenario that restarting an Oracle instance inside a RAC the CLOB datatypes don't works?
Thanks in advance!
Best regards

Deploying Worklight on WebSphere

I've deployed Worklight 6 on WebSphere 8.5.5 trying to follow these instructions ( http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp ) with a derby database and I've encountered the following error when trying to hit my Worklight instance:
Error 500: javax.servlet.ServletException: Worklight Project not initialized
When I check the log, I can see that the worklight server has not been started due to this exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [jar:file:/C:/IBM/WebSphere/AppServer/lib/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
...
Caused by: java.lang.AbstractMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode
at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:499)
at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:317)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:160)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:62)
I put the worklight jar directly in the WebSphere lib to solve another problem related to an Authentication class not being found if I recall correctly... Perhaps I need more jars in there, or did I solve my previous problem incorrectly? I put the javax.peristence.jar inside websphere as well, but that didn't help.
Are you using Ant scripts for deployment? This happens if you miss some steps while doing the manual application deployment.

Connection is not associated with a managed connection , "Spring application in Jboss Server"

Below Exception is coming in specific server, issue is not consistent.
org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLException:
Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6#49828f4c
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:296)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:320)
at org.springframework.jdbc.support.SQLErrorCodesFactory.getErrorCodes(SQLErrorCodesFactory.java:213)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:141)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:104)
at org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:99)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:969)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1003)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:144)
at com.watsons.tfo.sp.dao.SPSaveTransactionDetail.execute(SupplierPromotionDaoImpl.java:3354)
at com.watsons.tfo.sp.dao.SupplierPromotionDaoImpl.savePromoTransaction(SupplierPromotionDaoImpl.java:422)
at com.watsons.tfo.sp.service.SupplierPromotionServiceImpl.savePromoTransaction(SupplierPromotionServiceImpl.java:158)
at sun.reflect.GeneratedMethodAccessor1010.invoke(Unknown Source)
--
org.springframework.dao.RecoverableDataAccessException: CallableStatementCallback; SQL [{call PKG_TFO_SUPPLIER_PROMOTION.PR_INS_SAVE_TRANSACTION_DET(?, ?)}]; No more data to read from socket; nested exception is java.sql.SQLRecoverableException: No more data to read from socket
at com.watsons.tfo.sp.service.SupplierPromotionServiceImpl.savePromoTransaction(SupplierPromotionServiceImpl.java:160)
at sun.reflect.GeneratedMethodAccessor1010.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy206.savePromoTransaction(Unknown Source)
at com.watsons.tfo.sp.controller.SupplierPromoTransactionController.saveSupplierPromoTransaction(SupplierPromoTransactionController.java:1077)
at com.watsons.tfo.sp.controller.SupplierPromoTransactionController$$FastClassByCGLIB$$8994f9f9.invoke(<generated>)
First i thought the is because of stale connection, So I have added stale connection checker in the oracle-ds.xml. But again the issue is came up
Please help me to resolve this.
Disabling the CachedConnection Manager
<Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve"
cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
transactionManagerObjectName="jboss:service=TransactionManager" />
The above tag is mentioned in server.xml. this cachedconnectionvalve should be turned off in production server.
There are two main configuration parameters that have a direct effect on performance and scalability: cached connection manager and HTTP session replication.
The CachedConnectionManager is configured to be in the servlet container in debug mode. It's also configured in the production configuration but with debug mode off.
I commented the CachedConnectionValve at end of the server.xml file.
Also commented the CachedConnectionManager in META-INF/jboss-service.xml.
The "Connection is not associated with a managed connection" is gone and application is running fine.
Update:
Found one more log for the same error in the oracle log files...
Oracle version: Oracle Database 11.2.0.2
i.e XMLSEQUENC/EEXTRACT FAILS WITH ORA-7445[__INTEL_NEW_MEMCPY()+5395]
This is the bug with the XML Processing in oracle DB version, Then
After instructed by oracle people, Updated the patch (11666959) for oracle .
Same is mentioned in oracle web site.
11666959 is required for the release utility; XMLSEQUENC/EEXTRACT FAILS WITH ORA-7445[__INTEL_NEW_MEMCPY()+5395] IN 11.2.0.2

Resources