Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

Auditing a project with a remote CommandLine

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II
Contributor II

Auditing a project with a remote CommandLine

Last Update:

Feb 9, 2024 1:22:49 PM

Updated By:

Jamie_Gregory

Created date:

Apr 1, 2021 6:02:27 AM

Overview

When auditing a project using a remote CommandLine that doesn't have access to the H2 audit database, a NullPointerException will be returned.

 

Symptoms/Description

Below is the exception returned while fetching an audit report for a project where a remote CommandLine is used and where the audit database location is not on a shared location:

 

java.lang.RuntimeException: java.lang.NullPointerException
   at org.talend.commandline.command.ExtensionCommandSwitch.caseExtensionServerCommand(ExtensionCommandSwitch.java:148)
   at org.talend.commandline.client.command.extension.AbstractExtensionCommandSwitch.doSwitch(AbstractExtensionCommandSwitch.java:31)
   at org.talend.commandline.command.CommandProcessorSwitch.caseExtensionCommand(CommandProcessorSwitch.java:161)
   at org.talend.commandline.client.util.CommandAbstractSwitch.doSwitch(CommandAbstractSwitch.java:70)
   at org.talend.commandline.command.CommandConsumer.executeCommand(CommandConsumer.java:57)
   at org.talend.commandline.command.CommandConsumer.execute(CommandConsumer.java:35)
   at org.talend.commandline.mode.ServerCommandLine$CommmandConsumerRunnable.run(ServerCommandLine.java:139)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
   at org.talend.commandline.audit.datasource.HibernateUtils.checkAuditDB(HibernateUtils.java:141)
   at org.talend.commandline.audit.datasource.HibernateUtils.init(HibernateUtils.java:106)
   at org.talend.commandline.audit.TalendAuditSelectMode2.createHibernateSessionFactory(TalendAuditSelectMode2.java:305)
   at org.talend.commandline.audit.command.PopulateAuditExecuteCommand.execute(PopulateAuditExecuteCommand.java:130)
   at org.talend.commandline.command.ExtensionCommandSwitch.caseExtensionServerCommand(ExtensionCommandSwitch.java:146)
   ... 7 more

Resolution

With a remote CommandLine, ensure that the H2 audit database location is shared so that both tomcat and commandline can access it.

This error can also be reported if a CommandLine local to TAC is used without enough permissions on the audit database directory.

Ensure that the CommandLine user has sufficient permissions on H2 audit database directory and is able to read and write files.

The exact cause of the error can be found in the .log file of the CommandLine directory available at CMD_LINE/commandline-workspace/.metadata

 

Documentation suggests using the same user to start the CommandLine and Tomcat: to ensure correct management, make sure to launch Tomcat using the same administrator account as for the CommandLine.

 

For example: Create an account TISAdmin for both Tomcat and CommandLine.

Version history
Last update:
‎2024-02-09 01:22 PM
Updated by: