How to fix a "com.compositesw.common.UserException: An internal error has occurred" error when importing a Full Server Backup in an SSL encrypted TIBCO Data Virtualization sever?

How to fix a "com.compositesw.common.UserException: An internal error has occurred" error when importing a Full Server Backup in an SSL encrypted TIBCO Data Virtualization sever?

book

Article ID: KB0071419

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

Importing a Full Server Backup (FSB) into an SSL-encrypted TIBCO Data Virtualization (TDV) server fails with the below error: 

Import command: 
[TDV_Install_Dir]/bin> ./backup_import.sh -server <hostname> -port <TDV_base_port> -pkgfile <path_to_the_FSB>.car -user admin -password <admin_password> -encryptionPassword <FSB_CAR_file_password> -verbose

Error from cs_server.log:

ERROR [jetty thread pool-142] 2023-05-09 11:48:06.969 -0400 Util - User Exception Occurred
com.compositesw.common.UserException: An internal error has occurred.
at com.compositesw.common.UserException$Builder.build(UserException.java:165) [cscommon.jar:?]
at com.compositesw.cdms.webapi.service.Util.createWebapiException(Util.java:87) [cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.Util.createWebapiException(Util.java:73) [cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WArchiveImpl.decodeImportArchive(WArchiveImpl.java:756) [cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WArchiveImpl.performImport(WArchiveImpl.java:503) [cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataImpl.archive_performImport(WMetaDataImpl.java:1718) [cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataSvc_Tie.invoke_archive_performImport(WMetaDataSvc_Tie.java:10253) [cswebapi.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataSvc_Tie.processingHook(WMetaDataSvc_Tie.java:22035) [cswebapi.jar:?]
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:350) [webservices-rt-2.1.jar:2.1]
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:465) [webservices-rt-2.1.jar:?]
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:119) [webservices-rt-2.1.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [servlet-api-3.1-cis-trunk.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [servlet-api-3.1-cis-trunk.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:811) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at com.compositesw.server.services.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:106) [csserver.jar:?]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:142) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:576) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:222) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1126) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:514) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1060) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:140) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:212) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:96) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.Server.handle(Server.java:498) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at com.compositesw.server.api.core.ArchiveBinaryFileCoder.decodeKeystore(ArchiveBinaryFileCoder.java:335) ~[csserver.jar:?]
at com.compositesw.server.api.core.ArchiveBinaryFileCoder.decodeBinaryFiles(ArchiveBinaryFileCoder.java:683) ~[csserver.jar:?]
at com.compositesw.server.api.core.Archive.applyBinaryFile(Archive.java:2441) ~[csserver.jar:?]
at com.compositesw.server.api.core.Archive.applyBackupArchive(Archive.java:610) ~[csserver.jar:?]
at com.compositesw.server.api.core.Archive.applyBackupArchive(Archive.java:500) ~[csserver.jar:?]
at com.compositesw.cdms.webapi.service.WArchiveImpl.decodeImportArchive(WArchiveImpl.java:736) ~[cswebapi-server.jar:?]
... 32 more


Note:
- Check the last 'Caused by' of the error stack trace and note the line "at com.compositesw.server.api.core.ArchiveBinaryFileCoder.decodeKeystore(ArchiveBinaryFileCoder.java:335) ~[csserver.jar:?]" that points to the keystore files being the reason for the error. 
- Even with this error, other SSL-related functionality in TDV works fine (Example: TDV Web manager opening on HTTPS)
 

Issue/Introduction

How to fix a "com.compositesw.common.UserException: An internal error has occurred" error when importing a Full Server Backup in an SSL encrypted TIBCO Data Virtualization sever?

Resolution

This error is because of the access permissions on the directory where the keystore and trust store files are located on the machine. 

(i) The error is unlikely to occur if the files are located in the default keystore folder ([TDV_Install_Dir]/conf/server/security) since the TDV/login user has required permissions to access this folder. If the custom keystore/truststore files are placed in another directory on the machine, check the permissions of the TDV login user for it. 

(ii) If the user has only Read access, grant Read, and Write access to the directory.
On Linux: chmod 755 [keystore/truststore directory]
On Windows: Right-click on folder >> Properties on Windows and uncheck the Read-Only attribute in the General tab.