JDBC Data Source Connection Failed

0

 I am trying to connect to my local database using Jasperserver pro Evalutiona version. But when I click on Test Connection it give "Connection failed". Please see the screenshot attached:

Thanks

 

 

uzair_zaman's picture
Joined: Dec 20 2011 - 5:32am
Last seen: 8 years 1 month ago

24 Answers:

0

Hi!!

 

I think there is something wrong in your string connection!

Are you sure about your number port?

 

Try with:

 

jdbc:sqlserver://PC5\\SQLExpress:1433/EMR

 

Let me know!

norcenmarco's picture
Joined: Oct 6 2011 - 7:23am
Last seen: 2 years 1 month ago
0
Thanks for the suggestion. I have tried it but still "Connection Failed". I have double checked the port and it seems to be fine as well. I will attach a screetshot soon. Any other advise please? Thanks
uzair_zaman's picture
Joined: Dec 20 2011 - 5:32am
Last seen: 8 years 1 month ago
0

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.

mgeise's picture
22717
Joined: Mar 5 2007 - 6:18am
Last seen: 1 month 2 weeks ago
0
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
uzair_zaman's picture
Joined: Dec 20 2011 - 5:32am
Last seen: 8 years 1 month ago
0
Have you try a clear database environment?
I mean a simple jsp/java console app connecting to the database, without any jasper report code/jar/class.
It seemed independent of jasper report.
datakeyword's picture
Joined: Feb 14 2012 - 6:17pm
Last seen: 7 years 11 months ago
0

You must copy the file in ../jasperserver-pro/WEB-INF/lib!!

Cheers!

norcenmarco's picture
Joined: Oct 6 2011 - 7:23am
Last seen: 2 years 1 month ago
0
I have tried it with an empty database and it worked like charm :). Then I tried it with my old database which has data in to and it worked with it as well. Thanks for the help.
uzair_zaman's picture
Joined: Dec 20 2011 - 5:32am
Last seen: 8 years 1 month ago
0
Same problem here with Informix!!
Best Regards, M Guirao
mguirao's picture
Joined: Feb 22 2012 - 11:40am
Last seen: 5 years 3 months ago
0

 Hi  uzair_zaman, I have folow your post in solving this problem but I still having the same problem & it said as normal "Connection fail".Hope you can quide in this.Anyone also can.thanks in advance.Its quite urgent my friends.thank u again.

yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0

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.

mgeise's picture
22717
Joined: Mar 5 2007 - 6:18am
Last seen: 1 month 2 weeks ago
0
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.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0
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.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0
Put this file sqljdbc-1.6.jar in WEB_INF/lib
norcenmarco's picture
Joined: Oct 6 2011 - 7:23am
Last seen: 2 years 1 month ago
0
Thank u norcenmarco, i have put it in WEB_INF/lib. just wanna make clear that can jasperserver support Ms. SQL Server 2008 R2. thank u very much.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0
well, I solved my problem replacing the name of the host with it's Ip address in the datasource definition. Best Regards, M Guirao
mguirao's picture
Joined: Feb 22 2012 - 11:40am
Last seen: 5 years 3 months ago
0
Hi, Everyone.Can anyone give me the steps how to connect to Ms SQL Server 2008 R2.So i can refer which step i might miss out.Later, i will do documentation & share it.so it will benefit so everyone.thank u in advance.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0

 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.

mgeise's picture
22717
Joined: Mar 5 2007 - 6:18am
Last seen: 1 month 2 weeks ago
0
 Thank u very much  Mr.mgeise, I have try your steps & still having same problem.Together i have attach my documents that have printscreen of settings all.Please correct me if i'm wrong in any steps.thank u so much again for your reply.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0

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.

mgeise's picture
22717
Joined: Mar 5 2007 - 6:18am
Last seen: 1 month 2 weeks ago
0
Thank u very much sir for steps all.my IReport connection working fine.For the jasperServer I will go thru & let u know sir.thank u again.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0
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.
yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0

Dear Friends,

As i have promise before that i will upload the documentation regarding the Connection steps.This is the steps that make you easy in do connection.Enjoy with JasperSoft.

yobiwoo's picture
13
Joined: Feb 16 2012 - 8:17pm
Last seen: 7 years 11 months ago
0

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 Files\jasperreports-server-4.5\apache-tomcat\webapps\jasperserver-pro\WEB-INF\lib

and

C:\Program Files\jasperreports-server-4.5\buildomatic\conf_source\db\db2\jdbc

 

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
locatesri's picture
Joined: Feb 7 2012 - 10:50am
Last seen: 7 years 11 months ago
0

thanks

mgeise's picture
mgeise for the posts... copying the libs from buildomatic to WEB-INF lib solved my jdbc driver error for oracle... thanks a lot
abdulvahed11's picture
Joined: Nov 13 2013 - 11:17pm
Last seen: 6 years 2 months ago
Feedback
randomness