Jump to content
We've recently updated our Privacy Statement, available here ×

How do I get multiple JRS to run under one instance of an app server (Tomcat 7 64bit)?


ronb_3

Recommended Posts

Good Day.  I am a new user to JasperReports, Tomcat and Java.  My system installation uses Apace Tomcat 7 64-bit and Java 6  to run numerous web applications both independently and from within a Student Information System.   Jasper Reports has been selected by the vendor as the new reporting system for my system.   A bit of background on my student system:

> Three separate databases, each requiring their own Jasper Reports database and connecting userids

> One web server, running Tomcat and Java, that hosts and serves all the web applications for my student system - each web app has its own webapps folder and Catalina xml file

I set up Jasper Reports for the first database and have it working.  However, when I set up the second database (creating a webapps folder and xml file), the application won't start in Tomcat, I get a Severe error message (but the logs don't give me much information).   I have read in several Jasperreports manuals that if I have more than one JRS instance running on the same app server, I have to change the js.diagnostics properties files "diagnostic.name" field.  I did that and put that new connection name in my corresponding xml file, to no avail.

I am basically stuck here.  My questions are:

> Can I actually run these three JRS instances under one Tomcat instance?

> If so, what do I have to do to fix this?

Here is some details on my files.

JS.Diagnostics PROPERTIES files

for the first JRS instance:

diagnostic.port = 10990
diagnostic.name = jasperserver
diagnostic.rmiHost = localhost

for the second instance:

diagnostic.port = 10990
diagnostic.name = jasperserveronig
diagnostic.rmiHost = localhost
 
My xml file for the second instance:
?xml version="1.0" encoding="UTF-8"?>
<Context path="/trilliumReports_onig" reloadable="false">
            
    <!-- maxActive: Maximum number of dB connections in pool. Make sure you
         configure your mysqld max_connections large enough to handle
         all of your db connections. Set to 0 for no limit.
    -->
    <!-- maxIdle: Maximum number of idle dB connections to retain in pool.
         Set to -1 for no limit.  See also the DBCP documentation on this
         and the minEvictableIdleTimeMillis configuration parameter.
     -->
    <!-- maxWait: Maximum time to wait for a dB connection to become available
         in ms, in this example 10 seconds. An Exception is thrown if
         this timeout is exceeded.  Set to -1 to wait indefinitely.
    -->
        
    <!-- Additional properties to consider. Settings for specifying a      -->
    <!-- validation query to help with reconnect/timeout errors.           -->
    <!-- Exact syntax may vary with database type (this tested on mysql.   -->
    <!--                                                                   -->
    <!--   validationQuery="select 1"                                      -->
    <!--   testOnBorrow="true"                                             -->
    <!--   (and add this to url property): &autoReconnectForPools=true -->
        
        
 
    <Resource auth="Container" 
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
factory="com.jaspersoft.jasperserver.tomcat.jndi.JSBasicDataSourceFactory" maxActive="100" maxIdle="30" maxWait="10000" initialSize="1"
name="jdbc/jasperserveronig" password="xxxx" testOnBorrow="true" type="javax.sql.DataSource" 
url="jdbc:sqlserver://trilliumhost:1433;databaseName=TrilliumReports_onig;SelectMethod=cursor" 
username="jasper_user_onig" validationQuery="SELECT 1"/>
 
  <Resource auth="Container" defaultAutoCommit="false" defaultReadOnly="false" 
description="Trillium Datasource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
initialSize="1" jmxEnabled="true"
logAbandoned="true" maxActive="20" maxIdle="1" maxWait="10000" minEvictableIdleTimeMillis="60000" 
name="jdbc/trillium" password="xxx" removeAbandoned="true" removeAbandonedTimeout="60" 
testOnBorrow="true" testOnReturn="false" testWhileIdle="true" 
timeBetweenEvictionRunsMillis="30000" type="javax.sql.DataSource" 
url="jdbc:sqlserver://trilliumhost:1433;DatabaseName=trillium_onig;SelectMethod=cursor;sendStringParametersAsUnicode=false; applicationName=trilliumReports_onig" 
username="web_reports_user_onig" validationInterval="30000" validationQuery="select GETDATE()"/>
  
<Resource name="cas" 
         auth="Container"
        type="srb.frame.cas.config.CasConfigBean"
        factory="srb.frame.cas.config.CasConfigFactory"
        casServerURL="http://webhost/twebcas_onig"
timeDifferTolerance="60000"
casEnabledServiceURL="http://webhost/trilliumReports_onig/j_spring_security_check"
casEnabledRestServiceURL="http://webhost//trilliumReports_onig/rest/login"
casEnabledSoapServiceURL="http://webhost//trilliumReports_onig/services"
trilliumDriverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
trilliumDBUrl="jdbc:sqlserver://trilliumhost:1433;DatabaseName=trillium_onig;SelectMethod=cursor;sendStringParametersAsUnicode=false; applicationName=trilliumReports_onig"
trilliumDBUser="web_reports_user_onig"
trilliumDBPassword="xxx"
 
mailSenderHost="mailserver"
mailSenderUsername="username"
mailSenderPassword="xxxxx"
mailSenderProtocol="SMTP"
mailSenderPort="25"
mailSenderFrom="Trillium Reporting Server"
deploymentURIRoot="http://webhost/trilliumReports_onig"
/>
    
 
    <!-- Comment this line to enable session persistence across Tomcat restarts -->
    <Manager pathname=""/>

In the above file, I have put in dummy passwords and server names where applicable.  

I changed the jasper jdbc name from "jasper" to "jasperonig" (see highlighted text above) in order to reflect the change in the js.diagnostics name for the second JRS instance.  Not sure if I should be doing that or not?

I hope I have given enough information and explained my issue well enough that someone can review this issue and provide some assistance.

All suggestions and ideas are greatly appreciated.

Thanks,

Ron.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Hozawa,

Thank you for your reply.  I am installing Jasper Reports as a package from my Student Information System vendor.  So no war file, I just created an SQL Reporting database, then installed a webapps folder in Tomcat and configured an xml file supplied by the vendor. 

I have since found out that I CANNOT have three Jasper Reports servers running under one instance of Tomcat.  I have to use another file server, install three instances of Tomcat 7, and put the Jasper Reports server for each database in those Tomcat instances (1 Jasper per Tomcat instance).

So my question has been answered - I can't do what I was trying to do as described above.  I now have to take a different approach to the install.

Thank you again for taking the time to both read my post and reply, it is much appreciated.

Regards,

Ron.

 

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...