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

Issues connecting Postgresql to jasperserver 3.7


evalentine

Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I did not uninstall 3.5. I loaded 3.7 in a separate directory. I am not seeing any errors, the data source just fails.

1. Is there an uninstall for 3.5?

2. Is there a log showing the connect attempt and why it failed?

3. Do I need to copy the Postgresql driver to an additional location?

Thanks for your help.

Link to comment
Share on other sites

I just finished installing from the .bin file on a different machine without prior jasperserver. I move the included driver and it did not work. I downloaded the current driver and put it into the directory you specified.

The log says it can not find. 'java.lang.ClassNotFoundExecption: org.postgresql.Driver at org.apache.catalina.loader.WebappClassLoader.loadClass

Is there a PATH issue?

 

Suggestions??

Thanks.

 

 

Link to comment
Share on other sites

 

I am running Centos 5.4

postgresql 8.3.9

JVM 1.6

I installed the postgresql driver

  8.4-701 JDBC 4

and received this in the log;

java.lang.UnsupportedClassVersionError: Bad version number in .class file	java.lang.ClassLoader.defineClass1(Native Method)Installed:8.3-605 JDBC 4

and received this in the log;org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:924)	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)

Any suggestions?

Link to comment
Share on other sites

It sounds like you installed from the linux installer (.bin). If so, the installer installs a bundled mysql (or connects to an existing mysql). So, you database configuration would be for mysql.

 

If you want to change your tomcat to point to postgresql then you will need to make sure and change your <tomcat>/webapps/jasperserver/META-INF/context.xml.

 

Also, it is possible that tomcat copied an older context.xml to your tomcat/conf directory. The filename would end up being jasperserver.xml so you can search for this (this is a tomcat "feature" that causes a lot of confusion for users) - the point is that once the jasperserver.xml is in the tomcat/conf dir, tomcat no longer uses the META-INF/context.xml that you have in your jasperserver war file.

You can get more info in the install guide troubleshooting section: sec A.2.3 "Special Configuration Case under Tomcat".

 

And the postgresql driver will go in <tomcat>/common/lib (for 5.5) or <tomcat>/lib (for 6.0)

Link to comment
Share on other sites

I am using MySQL as the database for jasperserver itself and that works OK. I am trying to connect to the Postgresql as the data source. The application uses Postgresql and that is where the data is that I am using for the actual reporting. I can connect from iReport, create the reports and preview with data.

This works with Jasperserver 3.5 but I am having trouble with 3.7.

The logs seem to indicate that there is some confusion with the Driver and Class Version Numbers.

Any Suggestions.

Thanks.

Link to comment
Share on other sites

Oh, i see that makes sense.

Given that you are getting this error "java.lang.UnsupportedClassVersionError" it seems a variation of the same error when you are running Java 1.5 in your environment and you try to use a jar that has been compiled with Java 1.6.

So, if you are running Java 1.5 in your environment you might try Java 1.6.

 

If this doesn't apply, perhaps there are other binary versions of the postgres drivers that might help (I haven't looked on thier site recently).

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