osrmt / osrmt

Open Source Requirements Management Tool
GNU General Public License v2.0
163 stars 37 forks source link

com.osrmt.appclient.system.ConnectionXmlNotFoundException #59

Closed yuuyins closed 2 years ago

yuuyins commented 2 years ago

Expected behavior

OSRMT built from source runs without errors.

Happened

After running OSRMT, I get

com.osrmt.appclient.system.ConnectionXmlNotFoundException
    at com.osrmt.appclient.system.LoginController.start(Unknown Source)
    at com.osrmt.appclient.reqmanager.RequirementManagerController.start(Unknown Source)
    at com.osrmt.appclient.reqmanager.RequirementManagerController.main(Unknown Source)

2022-05-09T02-14-58UTC

Steps to reproduce

  1. Install Nix

  2. Build from source using Nix (see Nix package definition, which does NOT enable external database management systems by default)

    nix build --experimental-features "nix-command flakes" --print-build-logs github:yuuyins/nixpkgs/osrmt#osrmt
  3. run the wrapper ./result/bin/osrmt, which contains

    #! /nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash -e
    _JAVA_OPTIONS=${_JAVA_OPTIONS:+':'$_JAVA_OPTIONS':'}
    _JAVA_OPTIONS=${_JAVA_OPTIONS/':''-Dawt.useSystemAAFontSettings=on'':'/':'}
    _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'$_JAVA_OPTIONS
    _JAVA_OPTIONS=${_JAVA_OPTIONS#':'}
    _JAVA_OPTIONS=${_JAVA_OPTIONS%':'}
    export _JAVA_OPTIONS
    exec "/nix/store/ib0l33w15lv6b7bx9czzlywnwmdb9q8j-openjdk-8u322-ga/bin/java"  -classpath /nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/animation-1.1.3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/antlr.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/app-client.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/binding-1.0.3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/castor.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/castor_2.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-beanutils.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-collections-3.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-dbcp-1.2.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-digester-1.7.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-digester.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-fileupload.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-io-1.3.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-lang-2.6.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-logging-1.1.3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-logging.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-pool-1.3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/commons-validator.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/forms-1.0.5.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/helpgui-1.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/hsqldb.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/ijtree.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/itext-1.4.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jackcess-2.1.11.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jakarta-oro.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jasperreports-1.3.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/javaee.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jbossall-client.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jdom.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jgraph.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jlfgr-1_1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/js.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/jtds-1.2.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/log4j.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/looks-2.0.1.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/mail.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/mssql-jdbc-6.4.0.jre7.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/myfaces-all.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/mysql-connector-java-5.1.47-bin.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/odbc.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/ojdbc8-11.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/osupgrade.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/postgresql-8.1-405.jdbc3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/resources.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/struts.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/ucanaccess-4.0.4.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/validation-1.0.3.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/xalan.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/xerces.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/xercesImpl.jar:/nix/store/i0qg2hxfvhrf8yqzjki6jf9wyb83syvy-osrmt-unstable-2020-04-24/opt/xml-apis.jar com.osrmt.appclient.reqmanager.RequirementManagerController "$@"

Backtrace

com.osrmt.appclient.system.ConnectionXmlNotFoundException
    at com.osrmt.appclient.system.LoginController.start(Unknown Source)
    at com.osrmt.appclient.reqmanager.RequirementManagerController.start(Unknown Source)
    at com.osrmt.appclient.reqmanager.RequirementManagerController.main(Unknown Source)

https://github.com/osrmt/osrmt/blob/b4909cd81e53244c15fe4e1a9218a91e37f2965a/src/main/com/osrmt/appclient/system/LoginController.java#L61

System information

More infromation

Question

Is it correct to assume this has something to do with the database? If I build it from source, do I need to configure one of the supported database management systems?

yuuyins commented 2 years ago

This is happening because I'm running the wrapper in ./result/bin/osrmt. if I cd result/opt and run ./osrmt there's not issue with that.

yuuyins commented 2 years ago

https://discourse.nixos.org/t/java-app-expects-files-from-out-opt-so-cant-run-wraper-from-out-bin-only-if-cd-into-out-opt-and-run-wrapper-from-that-how-to-proceed/19056

yuuyins commented 2 years ago

I workaround that by making the wrapper cd into opt before running the app.

#! /nix/store/s7r5cnjj4zy41g2nql3vf2ivr09wfm5p-bash-5.1-p16/bin/bash -e
cd '/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt'
_JAVA_OPTIONS=${_JAVA_OPTIONS:+':'$_JAVA_OPTIONS':'}
_JAVA_OPTIONS=${_JAVA_OPTIONS/':''-Dawt.useSystemAAFontSettings=on'':'/':'}
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on'$_JAVA_OPTIONS
_JAVA_OPTIONS=${_JAVA_OPTIONS#':'}
_JAVA_OPTIONS=${_JAVA_OPTIONS%':'}
export _JAVA_OPTIONS
exec "/nix/store/ib0l33w15lv6b7bx9czzlywnwmdb9q8j-openjdk-8u322-ga/bin/java"  -Duser.dir=/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt -classpath "/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/animation-1.1.3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/antlr.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/app-client.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/binding-1.0.3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/castor.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/castor_2.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-beanutils.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-collections-3.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-dbcp-1.2.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-digester-1.7.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-digester.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-fileupload.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-io-1.3.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-lang-2.6.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-logging-1.1.3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-logging.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-pool-1.3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/commons-validator.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/forms-1.0.5.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/helpgui-1.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/hsqldb.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/ijtree.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/itext-1.4.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jackcess-2.1.11.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jakarta-oro.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jasperreports-1.3.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/javaee.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jbossall-client.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jdom.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jgraph.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jlfgr-1_1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/js.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/jtds-1.2.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/log4j.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/looks-2.0.1.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/mail.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/mssql-jdbc-6.4.0.jre7.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/myfaces-all.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/mysql-connector-java-5.1.47-bin.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/odbc.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/ojdbc8-11.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/osupgrade.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/postgresql-8.1-405.jdbc3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/resources.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/struts.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/ucanaccess-4.0.4.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/validation-1.0.3.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/xalan.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/xerces.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/xercesImpl.jar:/nix/store/rpbx2gy3f3jy6nh31j1ppjnhqanwj8x7-osrmt-unstable-2020-04-24/opt/xml-apis.jar" com.osrmt.appclient.reqmanager.RequirementManagerContr: