dreampeppers99 6 de jul. de 2011
Sim, post a mensagem que recebe e a string de conexao que tentou (omitindo a senha) e os jars usados.
celia_fernandes 6 de jul. de 2011
certo…
Primeiro baixei o sqljdbc_1.0.jar e testei (não funcionou).
Depois baixei o sqljdbc_1.1.jar (não funcionou) e por último o jtds.jar e não deu certo tbm, aí no desespero testei os 3 juntos e nada.
Aí no jdbc driver para configurar a conexão eu to colocando este: MS SQLServer (2005) (com.microsoft.sqlserver.jdbc.SQLServerDriver).
No campo da url que já traz preenchido, informo apenas o nome do servidor e depois o nome do meu banco: jdbc:sqlserver://CELIA-NOTE\SQLEXPRESS:1433;databaseName=P11.
Depois o usuario e senha do banco normal, mas aí dá a mensagem a seguir:
SQL problems : The TCP / IP connection to the host has failed . java . net . ConnectException : Connection refused : connect
jdbc : sqlserver :// celia-note \ sqlexpress : 1433 ; databaseName = P11
pedruhenrik 6 de jul. de 2011
o sql server esta liberado p/ conexões externas via tcp/ip ?
por exemplo vc consegue conectar com uma aplicação java?
att,
celia_fernandes 6 de jul. de 2011
Já liberei o TCP/IP, coloquei como Sim.
Eu nem testei com o sistema ainda, porque nem com o banco eu consegui conectar o ireport rss…
celia_fernandes 6 de jul. de 2011
Quando clico em detalhes do erro aparece:
The TCP / IP connection to the host has failed . java .net .ConnectException : Connection refused : connect
com .microsoft .sqlserver .jdbc .SQLServerException .makeFromDriverError ( Unknown Source )
com .microsoft .sqlserver .jdbc .SQLServerConnection .connect ( Unknown Source )
com .microsoft .sqlserver .jdbc .SQLServerDriver .connect ( Unknown Source )
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 ( Unknown Source )
javax .swing .AbstractButton $Handler .actionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .fireActionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .setPressed ( Unknown Source )
javax .swing .plaf .basic .BasicButtonListener .mouseReleased ( Unknown Source )
java .awt .Component .processMouseEvent ( Unknown Source )
javax .swing .JComponent .processMouseEvent ( Unknown Source )
java .awt .Component .processEvent ( Unknown Source )
java .awt .Container .processEvent ( Unknown Source )
java .awt .Component .dispatchEventImpl ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .LightweightDispatcher .retargetMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .processMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .dispatchEvent ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Window .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .EventQueue .dispatchEventImpl ( Unknown Source )
java .awt .EventQueue .access $000 ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue .dispatchEvent ( Unknown Source )
java .awt .EventDispatchThread .pumpOneEventForFilters ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForFilter ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForFilter ( Unknown Source )
java .awt .Dialog $1 .run ( Unknown Source )
java .awt .Dialog $3 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .awt .Dialog .show ( Unknown Source )
java .awt .Component .show ( Unknown Source )
java .awt .Component .setVisible ( Unknown Source )
java .awt .Window .setVisible ( Unknown Source )
java .awt .Dialog .setVisible ( Unknown Source )
com .jaspersoft .ireport .designer .connection .gui .ConnectionsDialog .jButtonNewParameterActionPerformed ( ConnectionsDialog .java :563 )
com .jaspersoft .ireport .designer .connection .gui .ConnectionsDialog .access $400 ( ConnectionsDialog .java :46 )
com .jaspersoft .ireport .designer .connection .gui .ConnectionsDialog $7 .actionPerformed ( ConnectionsDialog .java :219 )
javax .swing .AbstractButton .fireActionPerformed ( Unknown Source )
javax .swing .AbstractButton $Handler .actionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .fireActionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .setPressed ( Unknown Source )
javax .swing .plaf .basic .BasicButtonListener .mouseReleased ( Unknown Source )
java .awt .Component .processMouseEvent ( Unknown Source )
javax .swing .JComponent .processMouseEvent ( Unknown Source )
java .awt .Component .processEvent ( Unknown Source )
java .awt .Container .processEvent ( Unknown Source )
java .awt .Component .dispatchEventImpl ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .LightweightDispatcher .retargetMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .processMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .dispatchEvent ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Window .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .EventQueue .dispatchEventImpl ( Unknown Source )
java .awt .EventQueue .access $000 ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue .dispatchEvent ( Unknown Source )
java .awt .EventDispatchThread .pumpOneEventForFilters ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForFilter ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForFilter ( Unknown Source )
java .awt .Dialog $1 .run ( Unknown Source )
java .awt .Dialog $3 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .awt .Dialog .show ( Unknown Source )
java .awt .Component .show ( Unknown Source )
java .awt .Component .setVisible ( Unknown Source )
java .awt .Window .setVisible ( Unknown Source )
java .awt .Dialog .setVisible ( Unknown Source )
com .jaspersoft .ireport .designer .connection .gui .ConnectionsDialog .setVisible ( ConnectionsDialog .java :631 )
com .jaspersoft .ireport .designer .menu .DatasourcesAction .performAction ( DatasourcesAction .java :46 )
org .openide .util .actions .CallableSystemAction $1 .run ( CallableSystemAction .java :118 )
org .netbeans .modules .openide .util .ActionsBridge .doPerformAction ( ActionsBridge .java :77 )
org .openide .util .actions .CallableSystemAction .actionPerformed ( CallableSystemAction .java :114 )
javax .swing .AbstractButton .fireActionPerformed ( Unknown Source )
javax .swing .AbstractButton $Handler .actionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .fireActionPerformed ( Unknown Source )
javax .swing .DefaultButtonModel .setPressed ( Unknown Source )
javax .swing .plaf .basic .BasicButtonListener .mouseReleased ( Unknown Source )
java .awt .AWTEventMulticaster .mouseReleased ( Unknown Source )
java .awt .AWTEventMulticaster .mouseReleased ( Unknown Source )
java .awt .Component .processMouseEvent ( Unknown Source )
javax .swing .JComponent .processMouseEvent ( Unknown Source )
org .openide .awt .ToolbarButton .processMouseEvent ( ToolbarButton .java :61 )
java .awt .Component .processEvent ( Unknown Source )
java .awt .Container .processEvent ( Unknown Source )
java .awt .Component .dispatchEventImpl ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .LightweightDispatcher .retargetMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .processMouseEvent ( Unknown Source )
java .awt .LightweightDispatcher .dispatchEvent ( Unknown Source )
java .awt .Container .dispatchEventImpl ( Unknown Source )
java .awt .Window .dispatchEventImpl ( Unknown Source )
java .awt .Component .dispatchEvent ( Unknown Source )
java .awt .EventQueue .dispatchEventImpl ( Unknown Source )
java .awt .EventQueue .access $000 ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .awt .EventQueue $1 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .awt .EventQueue $2 .run ( Unknown Source )
java .security .AccessController .doPrivileged ( Native Method )
java .security .AccessControlContext $1 .doIntersectionPrivilege ( Unknown Source )
java .awt .EventQueue .dispatchEvent ( Unknown Source )
java .awt .EventDispatchThread .pumpOneEventForFilters ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForFilter ( Unknown Source )
java .awt .EventDispatchThread .pumpEventsForHierarchy ( Unknown Source )
java .awt .EventDispatchThread .pumpEvents ( Unknown Source )
java .awt .EventDispatchThread .pumpEvents ( Unknown Source )
java .awt .EventDispatchThread .run ( Unknown Source )
pedruhenrik 6 de jul. de 2011
adiciona o driver do jtds ao classpath do ireport e configura uma conexão igual ao print em anexo.
eu testei e deu certo.
Se ocorrer a exception abaixo novamente:
The TCP / IP connection to the host has failed . java .net .ConnectException : Connection refused : connect
…até onde eu me lembro tem uma série de itens para liberar no sql server, caso contrário não é possivel conectar.
att,
celia_fernandes 6 de jul. de 2011
Conseguiii :lol: :lol:
Mas tive que desinstalar meu SQL Server 2005, coloquei o SQL Server 2008 e usei o jar jtds.jar.
Meu amigo tentou fazer a conexão e no dele funcionou na primeira e a minha configuração estava igual, mas não funcionava, daí reinstalei o SQL.
Obrigada pela ajuda pessoal!!