By: lavanya muthyam user 04 Mar 2021 at 10:07 a.m. CST

7 Responses
lavanya muthyam gravatar
Hi Team, We are trying to install jans-client-api and tring to start server using client-api-start.bat Steps we have followed: 1. Downloaded the Zip from https://maven.jans.io/maven/io/jans/jans-client-api-server/<version>/jans-client-api-server-<version>-distribution.zip 2. Did configuration changes in client-api-server.yml file with openid provider and client details 3. Tried starting client-api-start.bat from bin

By lavanya muthyam user 06 Mar 2021 at 7:05 a.m. CST

lavanya muthyam gravatar
Hi Team, Please let us know in case of any other details needed to explain the issue. Thanks & Regards, Lavanya Muthyam,.

By Arnab Dutta staff 09 Mar 2021 at 9:46 a.m. CST

Arnab Dutta gravatar
Hi Lavanya, Thanks for reporting this issue. If you getting any error when try to run `client-api-start.bat` on windows OS then please share the logs. Regards, Arnab

By Arnab Dutta staff 15 Mar 2021 at 10:11 a.m. CDT

Arnab Dutta gravatar
Closing this ticket due to inactivity.

By lavanya muthyam user 20 Mar 2021 at 1:43 p.m. CDT

lavanya muthyam gravatar
Hi Team, Please find below the message which is triggring when i am trying to run the batch file **ERROR in Command Prompt:** C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>client-api-start.bat C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>"cd /d C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin\" '"cd /d C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin\"' is not recognized as an internal or external command, operable program or batch file. C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>set LIB=../lib C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>set CONF=../conf/client-api-server.yml C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>echo CONF=../conf/client-api-server.yml CONF=../conf/client-api-server.yml C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>start /b javaw -Djava.net.preferIPv4Stack=true -cp ../lib/jans-client-api-server.jar;../lib/* io.jans.ca.server.RpServerApplication server ../conf/client-api-server.yml ============================================================= Thanks & Regards, Lavanya Muthyam.

By Arnab Dutta staff 23 Mar 2021 at 12:24 p.m. CDT

Arnab Dutta gravatar
Hi Lavanya, The batch file `client-api-start.bat` will start `jans-client-api` without printing the logs. So please check taskmanager processes to find if any java process is running and execute health-check endpoint to find if `jans-client-api` is running. To run `jans-client-api` with logs please use `client-api-console.bat`. Regards, Arnab

By lavanya muthyam user 26 Mar 2021 at 9:28 a.m. CDT

lavanya muthyam gravatar
Hi Arnab, I tried running bat file and i didnot see any process running in the taskmanager. Please find below the logs after running client-api-console.bat. LOGS: C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>client-api-console.bat C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>cd /d C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin\ C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>set LIB=../lib C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>set CONF=../conf/client-api-server.yml C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>echo CONF=../conf/client-api-server.yml CONF=../conf/client-api-server.yml C:\Flying_Contractor_Software_Installs_V2\jans\JANS_CLIENT_API_SERVER\bin>java -Djava.net.preferIPv4Stack=true -cp ../lib/jans-client-api-server.jar;../lib/* io.jans.ca.server.RpServerApplication server ../conf/client-api-server.yml WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. INFO [2021-03-26 10:53:12,848] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / INFO [2021-03-26 10:53:12,848] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/C:/Flying_Contractor_Software_Installs_V2/jans/JANS_CLIENT_API_SERVER/lib/jans-client-api-server.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release INFO [2021-03-26 10:53:13,033] io.jans.ca.server.ServerLauncher: Starting service configuration... INFO [2021-03-26 10:53:13,049] io.jans.ca.server.ServerLauncher: commit: dbbf4df5f164fd18f748746c77dcee166dfceb6f, branch: origin/master, build time:18.02.2021 @ 06:28:42 UTC, oxd_version:1.0.0-SNAPSHOT DEBUG [2021-03-26 10:53:13,080] io.jans.ca.server.ServerLauncher: BC registered: false DEBUG [2021-03-26 10:53:13,149] io.jans.ca.server.ServerLauncher: Registered BC successfully. INFO [2021-03-26 10:53:13,165] io.jans.ca.server.ServerLauncher: Configuration: RpServerConfiguration{, registerClientAppType='web', registerClientResponesType='code', useClientAuthenticationForPat=true, trustAllCerts=false, keyStorePath='', keyStorePassword='', cryptProviderKeyStorePath='/opt/client-api/conf/client-api-jwks.keystore', cryptProviderKeyStorePassword='example', cryptProviderDnName='CN=jans-client CA Certificates', supportGoogleLogout=true, stateExpirationInMinutes=5, nonceExpirationInMinutes=5, dbCleanupIntervalInHours=1, rpCacheExpirationInMinutes=60, publicOpKeyCacheExpirationInMinutes=60, protectCommandsWithAccessToken=true, acceptIdTokenWithoutSignature=false, uma2AuthRegisterClaimsGatheringEndpointAsRedirectUriOfClient=false, migrationSourceFolderPath='', storage='h2', storageConfiguration={"dbFileLocation":"/opt/client-api/data/rp_db"}', defaultSiteConfig={"op_configuration_endpoint":"https://api-sandbox.starlingbank.com","response_types":["code"],"grant_type":["authorization_code"],"acr_values":[""],"scope":["openid","profile","email"],"ui_locales":["en"],"claims_locales":["en"],"contacts":[],"redirect_uris":["http://co.uk.urcash.urcash.co.uk/co.uk.urcash/login"],"logout_redirect_uris":["http://co.uk.urcash.urcash.co.uk/co.uk.urcash/login"],"client_name":"","client_jwks_uri":"","token_endpoint_auth_method":"","token_endpoint_auth_signing_alg":"","request_uris":[],"front_channel_logout_uri":[],"sector_identifier_uri":"","claims_redirect_uri":[],"client_id":"pWmh8FjLUG8blct4nhQj","client_secret":"gaoYiSZ2jAmYp7m5FOSzNS5QEW2VaYSsKNwbv9tJ","trusted_client":false,"access_token_as_jwt":false,"access_token_signing_alg":"","rpt_as_jwt":false,"logo_uri":"","client_uri":"http://co.uk.urcash.urcash.co.uk/co.uk.urcash/login","policy_uri":"","front_channel_logout_session_required":false,"tos_uri":"","jwks":"","id_token_binding_cnf":"","tls_client_auth_subject_dn":"","run_introspection_script_beforeaccess_token_as_jwt_creation_and_include_claims":false,"id_token_signed_response_alg":"","id_token_encrypted_response_alg":"","id_token_encrypted_response_enc":"","user_info_signed_response_alg":"","user_info_encrypted_response_alg":"","user_info_encrypted_response_enc":"","request_object_signing_alg":"","request_object_encryption_alg":"","request_object_encryption_enc":"","default_max_age":null,"require_auth_time":false,"initiate_login_uri":"http://co.uk.urcash.urcash.co.uk/co.uk.urcash/login","authorized_origins":[],"access_token_lifetime":null,"software_id":"","software_version":"","software_statement":"","custom_attributes":{}}', allowedOpHosts=[]', addClientCredentialsGrantTypeAutomaticallyDuringClientRegistration=true, proxyConfiguration=null', idTokenValidationCHashRequired=true', idTokenValidationAtHashRequired=true', validateUserInfoWithIdToken=false', protectCommandsWithRpId=[]', persistenceManagerRemoveCount=1000', bindIpAddresses=null', enableJwksGeneration=true', jwksExpirationInHours=720', requestObjectExpirationInMinutes=5', jwksRegenerationIntervalInHours=720', tlsVersion=null', mtlsEnabled=false', mtlsClientKeyStorePath=null', mtlsClientKeyStorePassword=null', idTokenValidationSHashRequired=false', encodeStateFromRequestParameter=false', encodeNonceFromRequestParameter=false', fapiEnabled=false', iatExpirationInHours=1', encodeClientIdInAuthorizationUrl=false'} ERROR [2021-03-26 10:53:13,212] io.jans.ca.server.persistence.service.SqlPersistenceServiceImpl: Failed to create schema. Error: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:/opt/client-api/data/rp_db". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-194] ! org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:/opt/client-api/data/rp_db". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-194] ! at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) ! at org.h2.message.DbException.get(DbException.java:179) ! at org.h2.message.DbException.get(DbException.java:155) ! at org.h2.engine.ConnectionInfo.getName(ConnectionInfo.java:400) ! at org.h2.engine.Engine.openSession(Engine.java:49) ! at org.h2.engine.Engine.openSession(Engine.java:176) ! at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) ! at org.h2.engine.Engine.createSession(Engine.java:137) ! at org.h2.engine.Engine.createSession(Engine.java:27) ! at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:354) ! at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:116) ! at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:100) ! at org.h2.Driver.connect(Driver.java:69) ! at org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:188) ! at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:351) ! at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:383) ! at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:226) ! at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:198) ! at io.jans.ca.server.persistence.providers.H2PersistenceProvider.getConnection(H2PersistenceProvider.java:46) ! at io.jans.ca.server.persistence.service.SqlPersistenceServiceImpl.createSchema(SqlPersistenceServiceImpl.java:48) ! at io.jans.ca.server.persistence.service.SqlPersistenceServiceImpl.create(SqlPersistenceServiceImpl.java:42) ! at io.jans.ca.server.persistence.service.PersistenceServiceImpl.create(PersistenceServiceImpl.java:34) ! at io.jans.ca.server.ServerLauncher.configureServices(ServerLauncher.java:49) ! at io.jans.ca.server.RpServerApplication.run(RpServerApplication.java:43) ! at io.jans.ca.server.RpServerApplication.run(RpServerApplication.java:13) ! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44) ! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87) ! at io.dropwizard.cli.Cli.run(Cli.java:78) ! at io.dropwizard.Application.run(Application.java:94) ! at io.jans.ca.server.RpServerApplication.main(RpServerApplication.java:23)

By Arnab Dutta staff 28 Mar 2021 at 12:48 a.m. CDT

Arnab Dutta gravatar
The log says: ``` io.jans.ca.server.persistence.service.SqlPersistenceServiceImpl: Failed to create schema. Error: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:/opt/client-api/data/rp_db". Use an absolute path, ~/name, ./name, or the baseDir setting instead. ``` Please set `dbFileLocation` in `client-api-server.yml`. It location should be as per windows directory structure and not `/opt/client-api/data/rp_db` (this is for linux). Regards Arnab