Jump to content
Changes to the Jaspersoft community edition download ×

JDBC Data Source Connection Failed


uzair_zaman

Recommended Posts

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

What error do you see in the WEB_INF/logs/jasperserver.log file?  My guess is that maybe you failed to copy the database driver into the application.  You will need to put the JDBC driver into the WEB_INF/lib folder.  You will find the sqljdbc-1.6.jar file int the buildomatic/conf_source/db/sqlserver/jdbc folder.

Link to comment
Share on other sites

Thanks for the suggestions. I have tried copying the sqljdbc-1.6.jar file at this location; please correct me if I am wrong. C:\Program Files\jasperreports-server-4.5\apache-tomcat\webapps\jasperserver-pro\WEB-INF\. I have also copied sqljdbc4.jar as well as I am assuming that this is the file we need to connect jaspersoft to sql server. But the result is same "Connection failed". I have checked the log file and it says this for this specific event:

 

------------------------------------------------------------------------------

2012-02-16 13:31:13,858 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.name]. Using default validation on input=[MyConn2].

2012-02-16 13:31:13,859 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.label]. Using default validation on input=[MyConn2].

2012-02-16 13:31:13,860 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.parentFolder]. Using default validation on input=[/datasources].

2012-02-16 13:31:13,860 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [_eventId_testDataSource]. Using default validation on input=[].

2012-02-16 13:31:13,860 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.username]. Using default validation on input=[emr].

2012-02-16 13:31:13,861 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.driverClass]. Using default validation on input=[com.microsoft.sqlserver.jdbc.SQLServerDriver].

2012-02-16 13:31:13,861 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.description]. Using default validation on input=[MyConn2 Des].

2012-02-16 13:31:13,861 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.password]. Using default validation on input=[emr].

2012-02-16 13:31:13,862 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.timezone]. Using default validation on input=[Europe/London].

2012-02-16 13:31:13,863 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.connectionUrl]. Using default validation on input=[jdbc:sqlserver://PC5\SQLEXPRESS:1433;databaseName=EMR].

------------------------------------------------------------------------------

 

Kindly suggest. Thanks

 

Link to comment
Share on other sites

Did you put your JDBC driver for Informix into ../jasperserver-pro/WEB-INF/lib and restart the server?  What error is in your logs?

Answering the questions asked to previous people will help you to get your answers much faster.  We need to know what you tried, what your settings are, etc. before we can even guess at what your problem is.

Link to comment
Share on other sites

Hi mgeise,

This is my Logs;

 

 

2012-02-23 17:26:49,234 WARN LoggerListener,http-8080-2:60 - Authentication event AuthenticationSuccessEvent: superuser; details: com.jaspersoft.jasperserver.multipleTenancy.MTWebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 127.0.0.1; SessionId: 9F92FC28AD4CD296B279AA47BD7FEA7C

2012-02-23 17:26:49,234 WARN LoggerListener,http-8080-2:60 - Authentication event InteractiveAuthenticationSuccessEvent: superuser; details: com.jaspersoft.jasperserver.multipleTenancy.MTWebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 127.0.0.1; SessionId: 9F92FC28AD4CD296B279AA47BD7FEA7C

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.name]. Using default validation on input=[success_connection].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.label]. Using default validation on input=[success connection].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.parentFolder]. Using default validation on input=[/organizations/organization_1/datasources].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [_eventId_testDataSource]. Using default validation on input=[].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.username]. Using default validation on input=[sa].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.driverClass]. Using default validation on input=[com.microsoft.sqlserver.jdbc.SQLServerDriver].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.description]. Using default validation on input=[].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.password]. Using default validation on input=[rma2012].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.timezone]. Using default validation on input=[].

2012-02-23 17:27:57,250 WARN ValidatorImpl,http-8080-6:259 - No rule for parameter [reportDataSource.connectionUrl]. Using default validation on input=[jdbc:sqlserver://CHAM-NB\SQL2008R2:1433;databaseName=cards].

 

Hope u can help me.

Link to comment
Share on other sites

I have put the JDBC driver into the WEB_INF/lib folder and I have put sqljdbc-1.6.jar file int the buildomatic/conf_source/db/sqlserver/jdbc folder.

 

I still didn't manage to connect to jasperserver but able to coonect to IReport using Ms. SQL server 2008 R2. Thank u in advance.

Link to comment
Share on other sites

 It should go something like this:

1) Copy the JDBC drive for your specific database, and in MS SQL's case the version of Java your app server is running with (MS SQL Server has different drivers for Java 1.5 vs. Java 1.6) into the .../webapps/Jasperserver/WEB-INF/lib directory

2) Restart your application server

3) Log in to Jasper Report Server and create a JDBC datasource

       a) Set the driver name to the appropriate drive, consistent with what is included in the driver that you installed

       b) Set the DB URL, etc.

4) Check the connection

 

All should be fine.

Link to comment
Share on other sites

Does your iReport connection work?  I assume that is why you provided those settings.

Everything looks ok, except for the fact that you copied all of the JDBC drivers in and they may be conflicting with each other.  You may be getting the 1.5 driver when you are actually running Java 1.6.  You will only want to copy in the driver you intend to use.

You may also want to try referencing the server by IP address instead of domain name, as was done by mguirao, to see if your server is just not resolving the domain name. 

Your log only shows the warnings that it is using the default validator.  There was no error that followed that such as ClassNotFound or Domain not found?  If all else fails, you may want to try enabling more logging on the database driver class, etc. by modifying the log4j properties found in WEB-INF/classes.

Link to comment
Share on other sites

Thank u very much Mr.mgeise.It work wonderful.The problem is conflicting between 1.5 & 1.6. Mine using java 1.6 but when i put both in same folder, it taking java 1.5 as default.thank u million sir.U really save my day.I will do full documentation with PrintScreen, so it will benefit everyone.thanks again.
Link to comment
Share on other sites

  • 3 weeks later...

I am also having the same problem with DB2 connection. Did anyone find a solution for this?

I am trying to connect to DB2 7. 

For This version of DB2 we have to use db2java.zip instead of Jar file.

By including this file in class path in ireport I am able to connect from ireport.

I copied this db2java.zip into

C:Program Filesjasperreports-server-4.5apache-tomcatwebappsjasperserver-proWEB-INFlib

and

C:Program Filesjasperreports-server-4.5buildomaticconf_sourcedbdb2jdbc

 

My ireport Jdbc url is as follows

jdbc:db2:DSNA

 

In server Iam not sure on what to try.

I tried various options like with ip etc but nothing worked.

Please help let me know if any of you have connected to DB2 before.



Post Edited by locatesri at 03/12/2012 05:54
Link to comment
Share on other sites

  • 1 year later...

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