Jump to content
Changes to the Jaspersoft community edition download ×

ireport 4.7.0 can't connect to MS SQL 2008 R2 database


joaopcabrita

Recommended Posts

Hi!

I am trying to connect ireport 4.7.0 to an MSSQL db and I am getting the following error:

SQL problems: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

 

jdbc:sqlserver://localhost:1433;databaseName=mydb
 
On SQL side the server is named localhostSAC, the db is named testdb and I created an user: biuser / 12345678.
 
 JasperHelp1.png.c98466b02e8f186ecb7bcd93b8459570.png
JasperHelp2.png.e64d380d4df56207da8792087cd5439e.png
 
 
 
JasperHelp3.png.8b2aa5ae5d103a6fe3b389c06f3cae69.png
 
Exception
 
 
Message:
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
Level:
    SEVERE
Stack Trace:
The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
    com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
    com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
    com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
    com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
    com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
    com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
    com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
    com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
    com.jaspersoft.ireport.designer.connection.JDBCConnection.getConnection(JDBCConnection.java:140)
    com.jaspersoft.ireport.designer.connection.JDBCConnection.test(JDBCConnection.java:447)
    com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog.jButtonTestActionPerformed(ConnectionDialog.java:335)
    com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog.access$300(ConnectionDialog.java:43)
    com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog$4.actionPerformed(ConnectionDialog.java:290)
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    java.awt.Component.processMouseEvent(Component.java:6505)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    java.awt.Component.processEvent(Component.java:6270)
    java.awt.Container.processEvent(Container.java:2229)
    java.awt.Component.dispatchEventImpl(Component.java:4861)
    java.awt.Container.dispatchEventImpl(Container.java:2287)
    java.awt.Component.dispatchEvent(Component.java:4687)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    java.awt.Container.dispatchEventImpl(Container.java:2273)
    java.awt.Window.dispatchEventImpl(Window.java:2719)
    java.awt.Component.dispatchEvent(Component.java:4687)
    java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
    java.awt.EventQueue.access$200(EventQueue.java:103)
    java.awt.EventQueue$3.run(EventQueue.java:682)
    java.awt.EventQueue$3.run(EventQueue.java:680)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    java.awt.EventQueue$4.run(EventQueue.java:696)
    java.awt.EventQueue$4.run(EventQueue.java:694)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
    org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:155)
    java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    java.security.AccessController.doPrivileged(Native Method)
    java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    java.awt.Dialog.show(Dialog.java:1077)
    java.awt.Component.show(Component.java:1651)
    java.awt.Component.setVisible(Component.java:1603)
    java.awt.Window.setVisible(Window.java:1014)
    java.awt.Dialog.setVisible(Dialog.java:1003)
    com.jaspersoft.ireport.designer.welcome.QuickStartPanel.jButton1ActionPerformed(QuickStartPanel.java:295)
    com.jaspersoft.ireport.designer.welcome.QuickStartPanel.access$200(QuickStartPanel.java:50)
    com.jaspersoft.ireport.designer.welcome.QuickStartPanel$2.actionPerformed(QuickStartPanel.java:124)
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    java.awt.Component.processMouseEvent(Component.java:6505)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    java.awt.Component.processEvent(Component.java:6270)
    java.awt.Container.processEvent(Container.java:2229)
    java.awt.Component.dispatchEventImpl(Component.java:4861)
    java.awt.Container.dispatchEventImpl(Container.java:2287)
    java.awt.Component.dispatchEvent(Component.java:4687)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    java.awt.Container.dispatchEventImpl(Container.java:2273)
    java.awt.Window.dispatchEventImpl(Window.java:2719)
    java.awt.Component.dispatchEvent(Component.java:4687)
    java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
    java.awt.EventQueue.access$200(EventQueue.java:103)
    java.awt.EventQueue$3.run(EventQueue.java:682)
    java.awt.EventQueue$3.run(EventQueue.java:680)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    java.awt.EventQueue$4.run(EventQueue.java:696)
    java.awt.EventQueue$4.run(EventQueue.java:694)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:693)
    org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
 
I am running this on Widnows Server 2008 R2 Standard.
 
to ireport classpath.
 
I have added ireport to firewall and created a rule to allow TCP IP connections on firewall.
 
In SQL conf man I have enabled TCP/IP connections and started SQL Server Browser:
 
JasperHelp4.png.24741909a721b0da7050e7abf5df4441.png
 
What else can I do?
 
Can anyone help me out?
 
Thanks in advance,
 
Cheers,
 
JC
 
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 2 months later...

Steps

  • Open the Sql Server Configuration Manager (Start -> Programs ->   Microsoft SQL Server 2008 -> Configuration Tools)
  •  Expand SQL Server Network Configuration -> [Your Server Instance]
  • Double click TCP/IP
  •  Under Protocol:
  •   Ensure Enabled is Yes
  •   Under IP Addresses:
  •   Scroll to the bottom and set the TCP Port under IPAll, (1433 by    default)
  •  Find the IP address you want to connect to and set Enabled and Active    to Yes
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...