nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chee Pei Lim <CheePei_...@manulife.com>
Subject RE: Nifi connect to AS400 using JT400.jar
Date Mon, 04 Dec 2017 02:54:50 GMT
Here are the details.

The jt400.jar is located in Nifi's lib folder.

Here is the log from bootstrap. jt400.jar has been included in the classpath.

2017-11-30 09:47:00,785 INFO [main] org.apache.nifi.bootstrap.Command Command: C:\Program
Files\Java\jre1.8.0_152\bin\java.exe -classpath D:\LCP\nifi-1.4.0\.\conf;D:\LCP\nifi-1.4.0\.\lib\db2.jar;D:\LCP\nifi-1.4.0\.\lib\javax.servlet-api-3.1.0.jar;D:\LCP\nifi-1.4.0\.\lib\jcl-over-slf4j-1.7.25.jar;D:\LCP\nifi-1.4.0\.\lib\jetty-schemas-3.1.jar;D:\LCP\nifi-1.4.0\.\lib\jt400.jar;D:\LCP\nifi-1.4.0\.\lib\jul-to-slf4j-1.7.25.jar;D:\LCP\nifi-1.4.0\.\lib\log4j-over-slf4j-1.7.25.jar;D:\LCP\nifi-1.4.0\.\lib\logback-classic-1.2.3.jar;D:\LCP\nifi-1.4.0\.\lib\logback-core-1.2.3.jar;D:\LCP\nifi-1.4.0\.\lib\nifi-api-1.4.0.jar;D:\LCP\nifi-1.4.0\.\lib\nifi-framework-api-1.4.0.jar;D:\LCP\nifi-1.4.0\.\lib\nifi-nar-utils-1.4.0.jar;D:\LCP\nifi-1.4.0\.\lib\nifi-properties-1.4.0.jar;D:\LCP\nifi-1.4.0\.\lib\nifi-runtime-1.4.0.jar;D:\LCP\nifi-1.4.0\.\lib\ojdbc6.jar;D:\LCP\nifi-1.4.0\.\lib\slf4j-api-1.7.25.jar
-Dorg.apache.jasper.compiler.disablejsr199=true -Xmx512m -Xms512m -Djava.security.egd=file:/dev/urandom
-Dsun.net.http.allowRestrictedHeaders=true -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true
-XX:+UseG1GC -Djava.protocol.handler.pkgs=sun.net.www.protocol -Dnifi.properties.file.path=D:\LCP\nifi-1.4.0\.\conf\nifi.properties
-Dnifi.bootstrap.listen.port=61439 -Dapp=NiFi -Dorg.apache.nifi.bootstrap.config.log.dir=D:\LCP\nifi-1.4.0\bin\..\\logs
org.apache.nifi.NiFi

Here is the log message from nifi-app.log
2017-11-30 15:58:02,946 ERROR [StandardProcessScheduler Thread-2] org.apache.nifi.engine.FlowEngine
A flow controller task execution stopped abnormally
java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.nifi.engine.FlowEngine.afterExecute(FlowEngine.java:100)
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.lang.reflect.InvocationTargetException: null
at sun.reflect.GeneratedMethodAccessor262.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
at org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1306)
at org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1302)
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)
... 3 common frames omitted
Caused by: org.apache.nifi.processor.exception.ProcessException: org.apache.commons.dbcp.SQLNestedException:
Cannot load JDBC driver class ' com.ibm.as400.access.AS400JDBCDriver'
at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:275)
at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:89)
at com.sun.proxy.$Proxy80.getConnection(Unknown Source)
at org.apache.nifi.processors.standard.AbstractDatabaseFetchProcessor.setup(AbstractDatabaseFetchProcessor.java:242)
at org.apache.nifi.processors.standard.AbstractDatabaseFetchProcessor.setup(AbstractDatabaseFetchProcessor.java:226)
at org.apache.nifi.processors.standard.QueryDatabaseTable.setup(QueryDatabaseTable.java:181)
... 15 common frames omitted
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ' com.ibm.as400.access.AS400JDBCDriver'
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:272)
... 23 common frames omitted
Caused by: java.lang.ClassNotFoundException:  com.ibm.as400.access.AS400JDBCDriver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 26 common frames omitted

- Lim Chee Pei

-----Original Message-----
From: Joe Witt [mailto:joe.witt@gmail.com]
Sent: Monday, December 04, 2017 10:47 AM
To: users@nifi.apache.org
Subject: Re: Nifi connect to AS400 using JT400.jar

Hello

When you say that the jar is in the classpath can you please clarify what you mean?  Is in
the lib folder of NiFi or is it in the nar?
Which nar?

Please share code and/or details about the structure of the Nar(s).

Thanks
Joe

On Sun, Dec 3, 2017 at 9:27 PM, Chee Pei Lim <CheePei_Lim@manulife.com> wrote:
> I am unable to use Apache NIFI to connect to AS400 using jt400.jar. My
> controller service is enabled successfully using classname
> com.ibm.as400.access.AS400JDBCDriver
>
> However, when I start QueryDatabaseTable process, it fails to connect
> to
> AS400 with the following exception.
>
> Caused by: java.lang.ClassNotFoundException:
> com.ibm.as400.access.AS400JDBCDriver
>
>     at java.net.URLClassLoader.findClass(Unknown Source)
>
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>
>     at java.lang.ClassLoader.loadClass(Unknown Source)
>
>     at
> org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicD
> ataSource.java:1420)
>
>
>
> The jt400.jar is in the classpath.
>
>
>
> I would like to know if anyone has using Nifi to connect to AS400
> successfully using JT400.jar from IBM.
>
>
>
> So far, no luck with this for the past 1 week.
>
>
>
> Thanks in advance.
>
>
>
> - Lim Chee Pei
>
>
>
> STATEMENT OF CONFIDENTIALITY The information contained in this email
> message and any attachments may be confidential and legally privileged
> and is intended for the use of the addressee(s) only. If you are not
> an intended recipient, please: (1) notify me immediately by replying
> to this message;
> (2) do not use, disseminate, distribute or reproduce any part of the
> message or any attachment; and (3) destroy all copies of this message
> and any attachments.


STATEMENT OF CONFIDENTIALITY The information contained in this email message and any attachments
may be confidential and legally privileged and is intended for the use of the addressee(s)
only. If you are not an intended recipient, please: (1) notify me immediately by replying
to this message; (2) do not use, disseminate, distribute or reproduce any part of the message
or any attachment; and (3) destroy all copies of this message and any attachments.
Mime
View raw message