TIBCOSoftware / js-docker

Container deployment of TIBCO JasperReports® Server
144 stars 146 forks source link

docker-compose can't read classes/jasperreports.properties #5

Closed ddiebel closed 7 years ago

ddiebel commented 7 years ago

docker-compose up stops with the message "s_ed: can't read classes/jasperreports.properties: No such file or directory". What I'm doing wrong?

Docker-Version: 1.12.5 Docker-Compose: 1.9.0 Windows 7

Starting jasperreportsdocker_js_database_1 Starting jasperreportsdocker_jasperserver_1 Attaching to jasperreportsdocker_js_database_1, jasperreportsdocker_jasperserver_1 [0m LOG: database system was shut down at 2017-03-29 11:17:52 UTC [0m PostgreSQL accepting connections [0m Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar [0m Buildfile: /usr/src/jasperreports-server/buildomatic/build.xml [0m [echo] Filtering properties (cleaning out blank spaces) [0m [echo] chkIfPackageManagedTomcat: check if package managed tomcat [0m [echo] Tomcat DBCP Factory: com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory [0m [echo] creating /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [delete] Deleting directory /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [mkdir] Created dir: /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [echo] chkAndSetLocaleDbSettings: dbType is postgresql [0m [echo] chkAndSetLocaleDbSettings: db.set.lc_collate and db.set.lc_ctype are NOT both set [0m [echo] chkAndSetLocaleDbSettings: parse: scripts.properties for db commands [0m [copy] Copying 35 files to /usr/src/jasperreports-server/buildomatic/build_conf/default [0m [copy] Copying 1 file to /usr/src/jasperreportsserver/buildomatic/build_conf/default/webapp/WEB-INF [0m [echo] chkIfPackageManagedTomcat: check if package managed tomcat [0m [echo] using settings file: /usr/src/jasperreportsserver/buildomatic/build_conf/default/maven_settings.xml [0m [0m deploy-jdbc-jar: [0m [echo] Copy JDBC drivers to the app-server [0m [echo] First copy jars [0m [echo] FROM the conf_source/db/app-srv-jdbc-drivers folder [0m [echo] TO the folder /usr/local/tomcat/lib [0m [echo] About to copy JS repository JDBC driver (if it exists): [0m [echo] Copy jdbc driver from: /usr/src/jasperreportsserver/buildomatic/conf_source/db/postgresql/jdbc/postgresql-9.2-1002.jdbc4.jar [0m [echo] Copy jdbc driver to: /usr/local/tomcat/lib [0m [copy] Copying 1 file to /usr/local/tomcat/lib [0m [copy] Copying /usr/src/jasperreportsserver/buildomatic/conf_source/db/postgresql/jdbc/postgresql-9.2-1002.jdbc4.jar to /usr/local/tomcat/lib/postgresql-9.2-1002.jdbc4.jar [0m [0m BUILD SUCCESSFUL [0m Total time: 1 second [0m sed: can't read classes/jasperreports.properties: No such file or directory [33mjasperreportsdocker_jasperserver_1 exited with code 2

ernestoongaro commented 7 years ago

Question @ddiebel - what file did you place into the resources folder? Was it the WAR file or the source archive?

ddiebel commented 7 years ago

@ernestoongaro the source archive jasperreports-server-6.3.0-bin.zip

ernestoongaro commented 7 years ago

@ddiebel - ok seems like you're using the correct war file

What if you removed this section from scripts/entrypoint.sh? Just trying to isolate the problem..

config_phantomjs() {
  # if phantomjs binary is present, update JaseperReports Server config.
  if [[ -x "/usr/local/bin/phantomjs" ]]; then
    PATH_PHANTOM='\/usr\/local\/bin\/phantomjs'
    PATTERN1='com.jaspersoft.jasperreports'
    PATTERN2='phantomjs.executable.path'
    cd $CATALINA_HOME/webapps/jasperserver-pro/WEB-INF
    sed -i -r "s/(.*)($PATTERN1.highcharts.$PATTERN2=)(.*)/\2$PATH_PHANTOM/" \
      classes/jasperreports.properties
    sed -i -r "s/(.*)($PATTERN1.fusion.$PATTERN2=)(.*)/\2$PATH_PHANTOM/" \
      classes/jasperreports.properties
    sed -i -r "s/(.*)(phantomjs.binary=)(.*)/\2$PATH_PHANTOM/" \
      js.config.properties
  elif [[ "$(ls -A /usr/local/share/phantomjs)" ]]; then
    echo "Warning: /usr/local/bin/phantomjs is not executable, \
but /usr/local/share/phantomjs exists. PhantomJS \
is not correctly configured."
  fi
}
ddiebel commented 7 years ago

@ernestoongaro thanks for helping me.

after removing the function-call, docker compose up starts the container and i see normal tomcat output. But if i try to access 192.168.99.100:8080/jasperserver-pro, i got a "not found". 192.168.99.100:8080 shows me the tomcat startpage. Don't know if it's the same reason?

ddiebel commented 7 years ago

after removing the all images and rerun the whole process, the tomcat cones up with login-page. Even with the config_phantomjs() enabled.

Don't know what yesterdays problem was.

@ernestoongaro Thanks for your helping

ernestoongaro commented 7 years ago

Thanks @ddiebel - will monitor for similar issues in the future. Glad it's working - do get in contact if you want to chat more in depth about the project