Home > GLASSFISH / J2EE / JAVA PERFORMANCE, JASPER REPORTS, Main > IReport / Jasper Reports – Adding Glassfish Jasper Server Oracle Datasource

IReport / Jasper Reports – Adding Glassfish Jasper Server Oracle Datasource


It is not that hard as it looks, really now :)

When adding a new datasource, Jasper Server always defaults to it’s preconfigured MySql driver and connection. Therefore, don’t be afraid when you see :

  • Driver – com.mysql.jdbc.Driver
  • URL – jdbc:mysql://localhost:3306/mydb

It does not mean it’s only meant to work with mysql, it’s just a default setting trying to give you a hint.

So, for adding an Oracle Datasource in Jasper Server, you would need to follow this simple steps:

  1. download the latest jdbc driver for Oracle – ojdbc6.jar
  2. Copy the file you just downloaded in your Glassfish domain , under /glassfish/domain/yourdomain/lib/ext folder
  3. Restart your Glassfish Server
  4. Now you are ready to add the datasource:
    1. Right click on datasources in the left menu – Add datasource
    2. Choose JDBC Resource
    3. Fill in the information to connect to your Oracle Server: Servername, SID, username and password
    4. Test your connection
    5. There you go!

This is how it should pretty much look like:

Adding a Jasper Server Oracle Datasource

Jasper Server Oracle Datasource

And by the way, Jasper Server 3.7.0 works just perfect with Glassfish 3. Just make sure that if you choose to create a new domain for your reporting server, you’d have to modify the name of the domain in install.xml file, and copy the mysql jdbc connector file in the same location as the one i have discussed above: /opt/glassfish/domains/yournewdomain/lib/ext

Cheers, time to go, it’s football time

Alex

About these ads
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: