js-ant import-minimal-ce fails

0

I have Googled everywhere and read some weird answers:

http://community.jaspersoft.com/questions/825605/problem-updating-jasper...

I am running as root, so I fail to see how not having write privs to 'tmp' is an issue. I have read of possible missing dependencies, /etc/host not having the right mappings, etc. None of these worked, nor made any sense.

The identical error I am getting is in the first message by OP of the linked article above. I do not know how to reolve this issue and it's frustrating me to no end. Why are the beans throwing exceptions? Is there a missing mapping in the XML files or something???

alex_barylski's picture
Joined: Sep 14 2012 - 8:18am
Last seen: 5 years 4 months ago

6 Answers:

0

Hi, see if you can capture the full output from the execution of the import (something like ./js-ant import-minimal-ce > import-log.out).

 

It is possible to get an error on permissions for a ehcache caching file but this issue was fixed for 5.6 so should not be seen with 5.6. There are one or two  most common errors on an import, but the output log will tell the story. And you can attach it to this post.

tkavanagh's picture
3373
Joined: Jul 7 2006 - 8:54am
Last seen: 5 years 2 months ago
0

What is the exact fail messages. When a script fails, it should output a reason for the failure. Also, what is the exact steps you've taken?

Did you do a "js-install.sh test", "js-ant.sh create-js-db", "js-ant.sh init-js-db-ce"

hozawa's picture
52592
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
0

Thank you both for the reply. I am at my wits end trying to get this reporting system installed on Linux (was so much easier on Windows).

It is possible to get an error on permissions for a ehcache caching file but this issue was fixed for 5.6 so should not be seen with 5.6. There are one or two  most common errors on an import, but the output log will tell the story. And you can attach it to this post.

I believe I am running the latest version of JS. I initially installed JDK 1.8 but after reading a few people had issues I (think) rolled back to 1.7. When I do java -version I get this:

 
root@CADO-WEB:~/jasperreports-server-cp-5.6.0-bin/buildomatic# java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) Server VM (build 24.60-b09, mixed mode)
root@CADO-WEB:~/jasperreports-server-cp-5.6.0-bin/buildomatic#
I have ran a js-install-ce.sh test here is the output:
 
Writing to log file: logs/js-install-ce_2014-07-09_07-52-18572.log
----------------------------------------------------------------------
Running JasperReports Server install script at 2014-07-09_07-52
----------------------------------------------------------------------
----------------------------------------------------------------------
Using ANT_OPTS: -Xms512m -Xmx2048m -XX:PermSize=128m
----------------------------------------------------------------------
[test]
Running pre-install-test-ce Ant task.
----------------------------------------------------------------------
Java HotSpot(TM) Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Buildfile: /root/jasperreports-server-cp-5.6.0-bin/buildomatic/build.xml
[echo] Filtering properties (cleaning out blank spaces)
[echo] chkIfPackageManagedTomcat: check if package managed tomcat
[echo] chkIfPackageManagedTomcat: CATALINA_HOME and CATALINA_BASE are BOTH set
[echo] chkIfPackageManagedTomcat: CATALINA_HOME folder location exists
[echo] chkIfPackageManagedTomcat: CATALINA_BASE folder location exists
[echo] Tomcat DBCP Factory: com.jaspersoft.jasperserver.tomcat.jndi.JSBasicDataSourceFactory
[echo] chkAndSetLocaleDbSettings: parse: scripts.properties for db commands
[echo] chkIfPackageManagedTomcat: check if package managed tomcat
[echo] chkIfPackageManagedTomcat: CATALINA_HOME and CATALINA_BASE are BOTH set
[echo] chkIfPackageManagedTomcat: CATALINA_HOME folder location exists
[echo] chkIfPackageManagedTomcat: CATALINA_BASE folder location exists
[echo] tomcatPackageManaged IS SET
[echo] Overriding fixedAppServerDir with value from CATALINA_BASE
[echo] using settings file: /root/jasperreports-server-cp-5.6.0-bin/buildomatic/build_conf/default/maven_settings.xml
test-ce-all-props:
[echo] Checking properties:
[echo] dbType=mysql
[echo] dbHost=localhost
[echo] dbUsername=root
[echo] dbPassword=**********
[echo] dbPort=3306
[echo] js.dbName=jasperserver
[echo] sugarcrm.dbName=sugarcrm
[echo] foodmart.dbName=foodmart
[echo] webAppNameCE=jasperserver
check-dbtype-ce:
test-appServerType-ce:
do-install-upgrade-test:
[echo] Checking DBMS host and port:
[echo] About to validate host: localhost
[echo] Host localhost is OK
[echo] Done validating host: localhost
[echo] About to validate port: localhost:3306
[echo] Port 3306 is OK
[echo] Done validating port: localhost:3306
[echo] Validating administrative database connection at jdbc:mysql://localhost:3306/mysql. Phase: [test]
[echo] For JDBC driver the artifactId and version properties are set:
[echo] maven.jdbc.artifactId=mariadb-java-client
[echo] maven.jdbc.version=1.1.2
[echo] Specified JDBC driver jar exists
[advanced-sql] Executing commands
[advanced-sql] 1 of 1 SQL statements executed successfully
[echo] Connection OK
[echo] Validating JasperServer database connection at jdbc:mysql://localhost:3306/jasperserver?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&autoReconnectForPools=true. Phase: [test]
[echo] For JDBC driver the artifactId and version properties are set:
[echo] maven.jdbc.artifactId=mariadb-java-client
[echo] maven.jdbc.version=1.1.2
[echo] Specified JDBC driver jar exists
[advanced-sql] Executing commands
[advanced-sql] 1 of 1 SQL statements executed successfully
[echo] Connection OK
do-pre-install-test:
[echo] Validating FoodMart database connection at jdbc:mysql://localhost:3306/foodmart?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&autoReconnectForPools=true. Phase: [test]
[echo] For JDBC driver the artifactId and version properties are set:
[echo] maven.jdbc.artifactId=mariadb-java-client
[echo] maven.jdbc.version=1.1.2
[echo] Specified JDBC driver jar exists
[advanced-sql] Failed to connect: Could not connect: Unknown database 'foodmart'
[echo] Connection failed:
[echo] SQLState: HY0000
[echo] Vendor specific error code: -1
[echo] Message: [Could not connect: Unknown database 'foodmart']
[echo] Database doesn't exist. Treating problem with JDBC connection as noncritical. Proceeding to next step
[echo] Validating SugarCRM database connection at jdbc:mysql://localhost:3306/sugarcrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&autoReconnectForPools=true. Phase: [test]
[echo] For JDBC driver the artifactId and version properties are set:
[echo] maven.jdbc.artifactId=mariadb-java-client
[echo] maven.jdbc.version=1.1.2
[echo] Specified JDBC driver jar exists
[advanced-sql] Failed to connect: Could not connect: Unknown database 'sugarcrm'
[echo] Connection failed:
[echo] SQLState: HY0000
[echo] Vendor specific error code: -1
[echo] Message: [Could not connect: Unknown database 'sugarcrm']
[echo] Database doesn't exist. Treating problem with JDBC connection as noncritical. Proceeding to next step
pre-install-test-ce:
BUILD SUCCESSFUL
Total time: 1 second
Checking Ant return code: OK
----------------------------------------------------------------------
Any way, I have included the full error response when doing either js-ant import-minimal-ce or js-install-ce.sh minimal as an attached error.log
Hopefully I can resolve this soon before I lose any more hair :)
Thanks again
Alex
Attachments: 
AttachmentSize
Binary Data error.log52.58 KB
alex_barylski's picture
Joined: Sep 14 2012 - 8:18am
Last seen: 5 years 4 months ago
0

I think I see the issue...

You need to run:

cd <path>/buildomatic

./js-install-ce.sh  (don't include a "test" option) (when the "test" option is used, JasperReports Server is not actually installed)

(or you can run ./js-install-ce.sh minimal - this will not include the sample data which you don't need)

So, in your environment, you probably don't have a jaserpserver database created yet. (You can look by logging into your database.)

tkavanagh's picture
3373
Joined: Jul 7 2006 - 8:54am
Last seen: 5 years 2 months ago

1. I have ran js-install-ce.sh minimal|test|(empty) -- it still failed -- I tried the import because the install works fine up until it has to import the data into the existing (or non-existing database).

2. The database does exist...I have tried with and without...incase the install script needs to create it.

alex_barylski - 5 years 4 months ago
0

Check if the database user you've specified in default_master.properties has admin priviledges.

dbHost=localhost
dbUsername=root
dbPassword=root

hozawa's picture
52592
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago

I believe the credentials are correct...I am using root to circumvent any issues with permissions. The connection must work as it manages to create and even import the test data but fails when populating the jasperserver database...it's a bean exception which makes me think I am missing some dependency that is not included in the WAR file or something???

alex_barylski - 5 years 4 months ago

"test" doesn't populate the database with data - it just check the jdbc drivers. I think you'll need to create an administrative user with a password in mysql.

hozawa - 5 years 4 months ago

What difference does that make if I am using root already with full privileges?

alex_barylski - 5 years 4 months ago
0

It might be a good idea to step back for a moment and try a different angle. I would suggest installing from the "binary installer" (ie this is the installer named: jasperreports-server-cp-5.6.0-linux-x64-installer.run) which runs and puts all required components to run JRS in place (ie tomcat, postgresql). It also is designed to be independent of any other software you are currently running (so no problem if you already have a tomcat and postgresql already existing).

This installer will run end-to-end and you can choose whether to put sample data in place (the default execution puts sample data in place - which can be useful for seeing how reports and other things work in the server).

tkavanagh's picture
3373
Joined: Jul 7 2006 - 8:54am
Last seen: 5 years 2 months ago
Feedback