Jump to content

Install problem: empty table JIJdbcDatasource


leeyuiwah

Recommended Posts

I just installed JasperServer.  I chose to use existing MySQL (but bundled Tomcat).

I noticed that there were no reports shown when I log in (as jasperadmin).  Also, the "Domains" and "Topics" are both empty.

I then debuged the install scripts.  I noticed that in sampledata_init.sh there are two lines that would update the records in the table JIJdbcDataSource (of jasperserver) ( I eclipsed the password parameters below)

/usr/bin/mysql -h 127.0.0.1 -P 3306 -u root --password="..."
  --force jasperserver -e "UPDATE JIJdbcDatasource SET username='jasperdb',
  password='$1',connectionUrl='jdbc:mysql://127.0.0.1:3306/sugarcrm' WHERE id='3';"
...
/usr/bin/mysql -h 127.0.0.1 -P 3306  -u root --password="..." 
  --force jasperserver -e "UPDATE JIJdbcDatasource SET username='jasperdb',
  password='$1',connectionUrl='jdbc:mysql://127.0.0.1:3306/foodmart';"

However, when I look at the table JIJdbcDatasource, it is actually empty.

I am thinking that perhaps because I chose to not install MySQL (but  using an existing one), somehow the steps to populate the table were omit in the install script?

Can I manually populate the table?  What should be the data there.

This is version jasperserver-pro-3.0.1-linux-installer.bin, downloaded on Oct 21, 2008.  I am installing it on a Linux machine.
 

Thanks!

 

Clement

 

Code:
From sampledata_init.sh.../usr/bin/mysql -h 127.0.0.1 -P 3306 -u root --password="..."  --force jasperserver -e "UPDATE JIJdbcDatasource SET username='jasperdb',  password='$1',connectionUrl='jdbc:mysql://127.0.0.1:3306/sugarcrm' WHERE id='3';".../usr/bin/mysql -h 127.0.0.1 -P 3306  -u root --password="..."   --force jasperserver -e "UPDATE JIJdbcDatasource SET username='jasperdb',  password='$1',connectionUrl='jdbc:mysql://127.0.0.1:3306/foodmart';"...mysql> select * from JIJdbcDatasource;Empty set (0.03 sec)
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Okay I installed a second instance of JasperServer.  This time I selected to use both the bundled Tomcat and MySQL (also I am installing it on a Windows XP machine).

The installation went well this time.  As the sample user "joeuser" I could see many reports.

I checked the content of JIJdbcDatasource, indeed the table was populated (while in my last installation, which did not go well, this table is empty). (See code below).

Also, another related table JIResource in this successful installation has many entries (289 to be precise), while in the previous failed installation it has only 1 entry.

Looks like the install script somehow failed to populate at least these two tables.  Not sure if that was due to fact that I elected to not using a bundled MySQL.

Can someone tell me how can I repopulate these tables? Or maybe I should uninstall and reinstall?

Thanks!

Clement

 

Code:
mysql> select * from JIJdbcDatasource;+-----+-----------------------+----------+---------------------------------------------------------------------------------+----------+----------+| id  | driver                | password | connectionUrl                                           | username | timezone |+-----+-----------------------+----------+---------------------------------------------------------------------------------+----------+----------+|   1 | com.mysql.jdbc.Driver | password | jdbc:mysql://127.0.0.1:3306/sugarcrm                                           | root     | NULL     ||   3 | com.mysql.jdbc.Driver | password | jdbc:mysql://localhost/jasperserver?useUnicode=true&characterEncoding=UTF-8 | root     | NULL     ||  19 | com.mysql.jdbc.Driver | password | jdbc:mysql://127.0.0.1:3306/foodmart                                           | root     | NULL     || 143 | com.mysql.jdbc.Driver | password | jdbc:mysql://127.0.0.1:3306/sugarcrm                                           | root     | NULL     |+-----+-----------------------+----------+---------------------------------------------------------------------------------+----------+----------+4 rows in set (0.01 sec)
Link to comment
Share on other sites

It looks like your original installation created the empty schema but didn't manage to import the sample meta data into the repository.  You need to identify why this import failed before attempting to load the data again.

The js-import.sh script is located in the apps/jasperserver/scripts directory (at least on my instance it is).  There is a config/js.jdbc.properties file in which the database connection details are specified.

Execute the js-import.sh script for example, ./js-import.sh --input-dir ./js-catalog

It would probably be easier to try and reinstall first.

Code:
Usage: ./js-import.sh [OPTIONS]Options:  --help          Print this help.  --input-dir     Input folder.  --input-zip     Input zip file.  --prepend-path  String to prepend to a URI path for all imported resources.  --update        Specifies that existing repository resources should be updated by catalog resources.
Link to comment
Share on other sites

Hi,

1. I tried again installing on another Linux machine -- this time without any pre-installed MySQL on it, and the installation went through well and the report site could be setup.  So apparently the install script  may not handle well the case where there is an existing MySQL.  I checked the install log (/tmp/bitrock_installer*.log) of my previous failed installation.  It stopped at the point after this line

Creating Sample Databases - This may take a few minutes.
Executing /opt/jasperserver-pro-3.0/scripts/mysql/sampledata_init.sh
 

Comparing to the install log of the successful installation, the subsequest lines should be:

Script exit code: 0

Script output:


Script stderr:
^G/opt/jasperserver-pro-3.0/mysql/bin/mysqladmin: DROP DATABASE sugarcrm failed;
error: 'Can't drop database 'sugarcrm'; database doesn't exist'
^G/opt/jasperserver-pro-3.0/mysql/bin/mysqladmin: DROP DATABASE foodmart failed;
error: 'Can't drop database 'foodmart'; database doesn't exist'

Generating Metadata Population. This may take a moment.
Executing /opt/jasperserver-pro-3.0/ant/bin/ant
Script exit code: 0

Script output:
Buildfile: build.xml
...

2. As you can see from above, there were error messages about DROP DATABASE sugarcrm and footmart.  There messages should not be there as a new installation naturally would not have that two databases.  I think this message can be suppressed by an IF EXISTS qualifer.

3. My machine does not have a real dns domain name, and the installer choked (see code below). I had to uninstall, add a hostname in /etc/hosts, and then install.  And this time the installation went through.

4. The uninstaller is installed only at the very end of a successful installation.  This means failed installation (like the one that I have) would not have an uninstaller to undo it.

Thanks for all the help!

Clement

 

 

Code:
import-inst-pro:     [java] 16:49:53,338 ERROR Cache:97 - Unable to set localhost. This prevents creation of a GUID. Cause was: clement-vm1.mh.lucent.com: clement-vm1.mh.lucent.com     [java] java.net.UnknownHostException: clement-vm1.mh.lucent.com: clement-vm1.mh.lucent.com     [java]     at java.net.InetAddress.getLocalHost(InetAddress.java:1308)     [java]     at net.sf.ehcache.Cache.<clinit>(Cache.java:95)     [java]     at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:291)     [java]     at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:241)     [java]     at net.sf.ehcache.CacheManager.configure(CacheManager.java:262)     [java]     at net.sf.ehcache.CacheManager.init(CacheManager.java:196)     [java]     at net.sf.ehcache.CacheManager.<init>(CacheManager.java:172)     [java]     at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:103)     [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1118)     [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)     [java]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)     [java]     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)     [java]     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)     [java]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)...
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...