Author Topic: Full Text - issues with ODFTIExporter.jar  (Read 1789 times)

LairFilho

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Full Text - issues with ODFTIExporter.jar
« on: June 22, 2020, 03:14:39 PM »
Hi, everyone,

I tried to install and configure the FTI feature, but I got this error:

java.util.Base64 exists
Mon Jun 22 18:38:29 BRT 2020 main SEVERE: Exception thrown while indexing:
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:333)
        at com.ibm.cm.od.fti.exporter.Database.configureDB(Database.java:158)
        at com.ibm.cm.od.fti.exporter.Database.<init>(Database.java:51)
        at com.ibm.cm.od.fti.exporter.Exporter.<init>(Exporter.java:46)
        at com.ibm.cm.od.fti.exporter.Export.main(Export.java:633)
Exception: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

The command line used was this:

java -Djava.library.path="/opt/IBM/ondemand/V10.5/www" -jar /opt/IBM/ondemand/V10.5/jars/ODFTIExporter.jar index -dbEngine DB2 -dbHostname 10.20.116.185 -dbPort 50000 -dbName ARCHIVE -dbUser d2neg -dbPassword 123456 -dbOwner arsusr -odInstance ARCHIVE -odUser admin -odPassword 123456 -odInstallDir "/opt/IBM/ondemand/V10.5"

I created the symbolic links for db2 drivers (db2jcc and db2jcc_license), with name jdbc1.jar and jdbc2.jar. I created too the links with same name of the drivers (db2jcc.jar and db2jcc_license_cu.jar)

Previously I tried to use the cfg file (odfts.cfg). This file is configured like this:

#Thu Jun 18 11:51:33 BRT 2020
dbEngine=DB2
dbHostname=172.20.116.185
dbPort=50000
dbUser=R2heJ5CaiSR/yX1YvZDs+alA\=\=7+sLSG2MOL7uqdbaoCAWKw\=\=
dbPassword=R236nzn3f4nvyyCPyKGLqO9Q\=\=igw7MVzb0FoAz7G7zr2DqQ\=\=
dbName=archive
dbOwner=arsusr
odInstance=ARCHIVE
odUser=R2BvVVUv6vSxLnsUXSS8VyCg\=\=yi+GjuC11bIFofCUVLlmOw\=\=
odPassword=R2WI9URs0kUeZQu8wf6FRKjg\=\=Kc9qizcE7y7p5nksg5yuLw\=\=
odInstallDir=/opt/IBM/ondemand/V10.5
pollDelay=60
ftiToken=bXyhxDc\=
command=NONE
tempDir=/tmp
traceDir=/tmp
traceLevel=FINEST

I already configured the application group to work with FTI (in General, advanced: set on server name and port).

Finnaly, I searched in the table ARSFTIWORK and saw some registries. But nothing works.

Some suggestion? Some idea what might be going on?

Thanks in advance,

Lair Martins da Silva Filho
IBM - Brazil

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Full Text - issues with ODFTIExporter.jar
« Reply #1 on: June 22, 2020, 03:49:42 PM »
I don't think you can get away with symbolic links, I think you need to add the directories where the jar files are to the CLASSPATH.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

LairFilho

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Full Text - issues with ODFTIExporter.jar
« Reply #2 on: June 26, 2020, 07:42:38 AM »
Hi,

This error was solved (I need to change the JDBC drivers names to jdbc1.jar and jdbc2,jar (db2jcc.jar and db2jcc_license_cu.jar)), but now I stopped in another:

# java -Djava.library.path="/opt/IBM/ondemand/V10.5/lib64;/opt/IBM/ondemand/V10.5/jars" -jar /opt/IBM/ondemand/V10.5/jars/ODFTIExporter.jar index -configFile /opt/IBM/ondemand/V10.5/jars/odfts.cfg
java.util.Base64 exists
java.util.Base64 exists
Exception in thread "main" java.lang.NoClassDefFoundError: com.google.gson.JsonSyntaxException
        at com.ibm.cm.od.fti.exporter.ODWEK.<init>(ODWEK.java:79)
        at com.ibm.cm.od.fti.exporter.Exporter.<init>(Exporter.java:47)
        at com.ibm.cm.od.fti.exporter.Export.main(Export.java:633)
Caused by: java.lang.ClassNotFoundException: com.google.gson.JsonSyntaxException
        at java.net.URLClassLoader.findClass(URLClassLoader.java:609)
        at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:926)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:871)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:343)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:854)
        ... 3 more

The log generated after run the java command:

# cat ftiexport_0.0_2606201115.log
Fri Jun 26 11:15:36 BRT 2020 main INFO: Trace started
Fri Jun 26 11:15:36 BRT 2020 contructor FINER: ENTRY
Fri Jun 26 11:15:37 BRT 2020 getConnection FINEST: databaseURL  = jdbc:db2://172.20.116.185:50000/ARCHIVE  >> Connected <<
Fri Jun 26 11:15:37 BRT 2020 getConnection FINER: RETURN
Fri Jun 26 11:15:37 BRT 2020 <init> INFO: Database product: DB2/AIX64
Fri Jun 26 11:15:37 BRT 2020 <init> INFO: Database version: SQL11014
[root@dpa1ged00011:/tmp]\

The environment is setting:

CLASSPATH=/opt/IBM/ondemand/V10.5/www/api/ODApi.jar:/opt/IBM/ondemand/V10.5/www/libars3wapi32.so:/opt/IBM/ondemand/V10.5/www/libars3wapi64.so:/opt/IBM/ondemand/V10.5/jars/gson-2.8.6.jar:.

PATH=/opt/IBM/ondemand/V10.5/www:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8/jre/bin:/usr/java8/bin:/opt/IBM/ondemand/V10.5/jars

LIBPATH=/usr/lib:/usr/lpp/X11/lib/R7:/lib:/opt/IBM/ondemand/V10.5/www:/opt/IBM/ondemand/V10.5/jars

I read this technote and followed the instructions:
https://www.ibm.com/support/pages/how-do-i-resolve-javalangunsatisfiedlinkerror-javalangnoclassdeffounderror-or-gskit-errors-when-deploying-odwek-java-api-application

This command is correct?
java -Djava.library.path="/opt/IBM/ondemand/V10.5/lib64;/opt/IBM/ondemand/V10.5/jars" -jar /opt/IBM/ondemand/V10.5/jars/ODFTIExporter.jar index -configFile /opt/IBM/ondemand/V10.5/jars/odfts.cfg

It appears that the "gson-2.8.6.jar" is not being loaded properly.

Best regards.
Lair Martins.

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1199
    • View Profile
Re: Full Text - issues with ODFTIExporter.jar
« Reply #3 on: June 26, 2020, 09:51:06 PM »
Lair - not my strong suit but I remembered something about gson.

This is from the 10.1 readme:

     - Notes:
        - The ODApi.jar file now has a dependency on GSON. ODWEK install now
          ships the gson-2.8.1.jar file in the jars directory. This jar file
          must be copied to the same directory as the ODApi.jar file.


Ed
#zOS #ODF

LairFilho

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: Full Text - issues with ODFTIExporter.jar
« Reply #4 on: June 29, 2020, 04:37:10 PM »
Hey, guys!!!

Problem solved:

# export CLASSPATH=/opt/IBM/ondemand/V10.5/jars/ecmts.jar:/opt/IBM/ondemand/V10.5/jars/commons-configuration2-2.6.jar:/opt/IBM/ondemand/V10.5/jars/commons-lang3-3.9.jar:/opt/IBM/ondemand/V10.5/jars/commons-collections4-4.4.jar:/opt/IBM/ondemand/V10.5/jars/commons-logging-1.2.jar:/opt/IBM/ondemand/V10.5/jars/commons-text-1.8.jar:/opt/IBM/ondemand/V10.5/jars/jdbc1.jar:/opt/IBM/ondemand/V10.5/jars/jdbc2.jar:/opt/IBM/ondemand/V10.5/jars/gson-2.8.6.jar:/opt/IBM/ondemand/V10.5/www/libars3wapi32.so:/opt/IBM/ondemand/V10.5/www/libars3wapi64.so:/opt/IBM/ondemand/V10.5/jars/log4j-api-2.13.0.jar:/opt/IBM/ondemand/V10.5/jars/log4j-core-2.13.0.jar

[root@dpa1ged00011:/opt/IBM/ondemand/V10.5/jars]\
# java -cp $CLASSPATH:/opt/IBM/ondemand/V10.5/jars/ODFTIExporter.jar com.ibm.cm.od.fti.exporter.Export index -configFile odfts.cfg

Thank you, Ed_Arnold and  Justin Derrick!

Lair Martins
IBM Brazil

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2229
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Full Text - issues with ODFTIExporter.jar
« Reply #5 on: June 30, 2020, 08:26:52 AM »
FYI, you can use an asterix ("*") to include all of the jars in a specific directory, to make that CLASSPATH variable shorter.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR