Skip to main content

Configure Oracle Connection Pool in Glassfish V3 for Jasper Reports Integration

Typically, after you have installed your  version of the JasperReportsIntegration toolkit on your Apache Tomcat J2EE server, the configuration files will be located in the directory
 $CATALINA_HOME/conf/Catalina/localhost/JasperReportsIntegration.xml, for example version 4.7.0 of JasperReports, where $CATALINA_HOME represents the path to your installation of Tomcat where all the dataSource configuration are. 

Similarly, after installation of your glassfish sever,  you would have to upload the .war file located in the toolkit version you download Eg.webapp\JasperReportsIntegration.war


Locate  lib/ojdbc14 and lib/orai18n in the  JasperReportsIntegration toolkit copy and  put them in {glassfish_installation}/glassfish/lib directory and restart glassfish (from {glassfish_installation}/glassfish/bin directory):

asadmin stop-domain domain1
asadmin start-domain domain1

or If it was set as a service, just restart it.


Navigate to the administrator application on the default 4848:
http://localhost:4848/
Open the 'Applications >Deploy>




Select New> upload the JasperReportsIntegration.war then OK.



 Please NB:
In the Context Root Located under [name of Domain]\applications\JasperReportsIntegration\META-INF\context.xml . modify it to your DataSource Eg.






 

Open the Applications>Edit the JasperReports and Change the path to the New Context path minus the .xml


Open the 'Resources' -> 'JDBC' -> 'Connection Pools' and select 'New'.
Fill in the Connection Pool 'Name' with a suitable name like Oracle.
Select 'Resource Type' : 'javax.sql.DataSource'.
Select 'Database Vendor' : 'Oracle'.
Select 'Next'.


At the next page go down at the additional Properties.
Find and edit the following properties :
Fill in property 'User' with the 'Value' : {db_user}
Fill in property 'Password' with the 'Value' : {db_user_pass}
Fill in property 'URL' with the 'Value' :
jdbc:mysql://[host]:[port]/[database name]
Select 'Finish'.






Open the 'Resources' -> 'JDBC' -> 'JDBC Resources' and select 'New.
Fill the JNDI Name like 'jdbc/myconnnection'.
Select from 'Pool Name' combo box the pool we just created.
And select 'OK'.



Click Ping to test that it is working. If it is not, it is probably because you have mistyped the connection credentials. Go to 'Additional Properties' tab of the connection pool detail page and correct any errors. Try ping again.


The Connection Pool is ready!Launch the JasperIntegration on the port specificed in your http Listener Port.
If you had any problems creating the pool, send me a message and I'll reply as soon as possible. 
Thanks.

Comments

  1. Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. natural pool builder spicewood tx

    ReplyDelete
  2. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. custom pool builder spicewood tx

    ReplyDelete

Post a Comment

Popular posts from this blog

Expose your Local Development Environment to the outside world with Ngrok

When we develop on localhost, we usually use some kind of simple HTTP server like node, our Oracle database,APIs, webhooks, Callback Urls or whatever. This is all good and we are all pretty happy about that. We have access to our app using our fancy  http://localhost  url. We are happy, but  alone . What if you would like to share your app to a colleague that is not on the same network as yours ? What if you need to check your app on an SSL connection? What if you wanted an external system to pass you a process invoked by a method ? ngrok to the rescue Ngrok   is a simple “free” service that can help you with that. Here’s some of the features that it provides: Expose your locally hosted app/website to the outside world by providing you a  http(s)://{something}.ngrok.io  url. Allows you to have an SSL connection to your localhost environment. Inspect/replay the requests made to your local environment Custom subdomain (required a premium accou...

Disabling of Password Expiration in Oracle Apex(Internal Workspace Admin)

This post was inspired by a  question  on the OTN APEX forum, which contains how to  reset set the password of the  Oracle Internal Workspace Admin    and  Set the account never to expire  The first bullet has so many blogs  talk about how to reset the password of the Internal Workspace. However, i am more intrigued with the second . To start of with It is not advisable to never expire accounts since its rudimental for user to always renew their accounts  prior to expiration. The default expiration of an account is mostly 180 days so hey whats the point going to do this again after 180 days?? . There are two methods that can be used to achieve this  Generic Never expiration of all User accounts (This should never be practiced in a production Environment All database users are assigned to something called a PROFILE . The profile controls two aspects of the users database acce...

How does one add a day/hour/minute/second to a date value?

DATE is the datatype that we are all familiar  with when we think about representing date and time values. It has the ability to store the month, day, year, century, hours, minutes, and seconds. It is typically good for representing data for when something has happened or should happen in the future.  The problem with the DATE datatype is its' granularity  when trying to determine a time interval between two events when the events happen within a second of each other. This issue is solved with the TIMESTAMP datatype. In order to represent the date stored in a more readable format, the TO_CHAR function has traditionally been wrapped around the date: SQL> SELECT  TO_CHAR(hiredate,'DD.MM.YYYY:HH24:MI:SS')  "hiredate"   FROM employees; hiredate ------------------- 17.12.1980:00:00:00 20.02.1981:00:00:00 The SYSDATE pseudo-column shows the current system date and time. Adding 1 to SYSDATE will advance the date by 1 day. Use fractions to add hours...