﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Java之路-文章分类-eclipse</title><link>http://www.blogjava.net/sxt0823/category/18384.html</link><description /><language>zh-cn</language><lastBuildDate>Thu, 05 Apr 2007 02:37:15 GMT</lastBuildDate><pubDate>Thu, 05 Apr 2007 02:37:15 GMT</pubDate><ttl>60</ttl><item><title>eclipse中应用Hibernate常见错误汇总（更新中）</title><link>http://www.blogjava.net/sxt0823/articles/87420.html</link><dc:creator>sxt</dc:creator><author>sxt</author><pubDate>Wed, 13 Dec 2006 03:01:00 GMT</pubDate><guid>http://www.blogjava.net/sxt0823/articles/87420.html</guid><wfw:comment>http://www.blogjava.net/sxt0823/comments/87420.html</wfw:comment><comments>http://www.blogjava.net/sxt0823/articles/87420.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/sxt0823/comments/commentRss/87420.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/sxt0823/services/trackbacks/87420.html</trackback:ping><description><![CDATA[<font color=#0000ff size=6>错误1</font>、出现<font color=#ff0000>对象名 '&#215;&#215;&#215;（表名）' 无效</font><font color=#000000>错误</font>。<br>原因：可能是由于你在配置文件中写数据库连接url时没有写明所要连接的数据库。<br>现在将各种驱动连接总结如下：<br><br>
<p class=MsoNormal style="BACKGROUND: #c3fdb5; MARGIN: 0cm 0cm 0pt"><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">1. MySQL(http://www.mysql.com)mm.mysql-2.0.2-bin.jar<br>Class.forName( "org.gjt.mm.mysql.Driver" );<br>cn = DriverManager.getConnection( "jdbc:mysql://MyDbComputerNameOrIP:3306/myDatabaseName", sUsr, sPwd );<br><br>2. PostgreSQL(http://www.de.postgresql.org)pgjdbc2.jar<br>Class.forName( "org.postgresql.Driver" );<br>cn = DriverManager.getConnection( "jdbc:postgresql://MyDbComputerNameOrIP/myDatabaseName", sUsr, sPwd );<br><br>3. Oracle(http://www.oracle.com/ip/deploy/database/oracle9i/)classes12.zip<br>Class.forName( "oracle.jdbc.driver.OracleDriver" );<br>cn = DriverManager.getConnection( "jdbc:oracle:thin:@MyDbComputerNameOrIP:1521:ORCL", sUsr, sPwd );<br><br>4. Sybase(http://jtds.sourceforge.net)jconn2.jar<br>Class.forName( "com.sybase.jdbc2.jdbc.SybDriver" );<br>cn = DriverManager.getConnection( "jdbc:sybase:Tds:MyDbComputerNameOrIP:2638", sUsr, sPwd );<br>//(Default-Username/Password: "dba"/"sql")<br><br>5. Microsoft SQLServer(http://jtds.sourceforge.net)<br>Class.forName( "net.sourceforge.jtds.jdbc.Driver" );<br>cn = DriverManager.getConnection( "jdbc:jtds:sqlserver://MyDbComputerNameOrIP:1433/master", sUsr, sPwd );<br><br>6. Microsoft SQLServer(http://www.microsoft.com)<br>Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver" );<br>cn = DriverManager.getConnection( "jdbc:microsoft:sqlserver://MyDbComputerNameOrIP:1433;databaseName=master", sUsr, sPwd );<br><br>7. ODBC<br>Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );<br>Connection cn = DriverManager.getConnection( "jdbc:odbc:" + sDsn, sUsr, sPwd );<br><br>8.DB2(</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">新添加</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">)<br>Class.forName("com.ibm.db2.jdbc.net.DB2Driver");<br>String url="jdbc:db2://192.9.200.108:6789/SAMPLE"<br>cn = DriverManager.getConnection( url, sUsr, sPwd );<br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">补充</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"><br>Microsoft SQL Server series (6.5, 7.x and 2000) and Sybase 10<br><br>JDBC Name: jTDS<br>URL: http://jtds.sourceforge.net/<br>Version: 0.5.1<br>Download URL: http://sourceforge.net/project/showfiles.php?group_id=33291<br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">语法</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">:<br><br>Class.forName("net.sourceforge.jtds.jdbc.Driver ");<br>Connection con = DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/database","user","password");<br>or<br>Connection con = DriverManager.getConnection("jdbc:jtds:sybase://host:port/database","user","password");<br>Postgresql<br><br>JDBC Name: PostgreSQL JDBC<br>URL: http://jdbc.postgresql.org/<br>Version: 7.3.3 build 110<br>Download URL: http://jdbc.postgresql.org/download.html<br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">语法</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">:<br><br>Class.forName("org.postgresql.Driver"); <br>Connection con=DriverManager.getConnection("jdbc:postgresql://host:port/database","user","password");<br><br><br>IBM AS400</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">主机在用的</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">JDBC</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">语法</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"><br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">有装</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">V4R4</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">以上版本的</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">Client Access Express<br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">可以在</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">C:\Program Files\IBM\Client Access\jt400\lib<br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">找到</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"> driver </span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">档案</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"> jt400.zip</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，并更改扩展名成为</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"> jt400.jar<br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">语法</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"><br><br>java.sql.DriverManager.registerDriver (new com.ibm.as400.access.AS400JDBCDriver ());<br>Class.forName("com.ibm.as400.access.AS400JDBCConnection");<br>con = DriverManager.getConnection("jdbc:as400://IP","user","password");<br><br>informix<br><br>Class.forName("com.informix.jdbc.IfxDriver").newInstance(); <br><br>String url = <br><br>"jdbc:informix-sqli://123.45.67.89:1533/testDB:INFORMIXSERVER=myserver; <br><br>user=testuser;password=testpassword";<br><br><br>Lib</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">：</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">jdbcdrv.zip&lt;br&gt;&lt;br&gt;Class.forName( "com.sybase.jdbc.SybDriver" )&lt;br&gt;url="jdbc:sybase:Tds:127.0.0.1:2638/asademo";&lt;br&gt;SybConnection connection= (SybConnection)DriverManager.getConnection(url,"dba","sql");&lt;br&gt;<br><br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">补充两个</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"><br>SAP DB<br>Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");<br>java.sql.Connection connection = java.sql.DriverManager.getConnection ( "jdbc:sapdb://" + host + "/" + database_name,user_name, password)<br><br>InterBase<br>String url = "jdbc:interbase://localhost/e:/testbed/database/employee.gdb";<br>Class.forName("interbase.interclient.Driver");<br>//Driver d = new interbase.interclient.Driver (); /* this will also work if you do not want the line above */<br>Connection conn = DriverManager.getConnection( url, "sysdba", "masterkey" );<br><br><br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">我也来补一个吧：</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">HSqlDB<br><br>url:&nbsp;&nbsp;&nbsp;&nbsp; http://hsqldb.sourceforge.net/<br>driver:&nbsp; org.hsqldb.jdbcDriver<br><br></span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">连接方式有</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">4</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">种，分别为：</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial"><br>con-str</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">（内存）</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">: jdbc:hsqldb.<br>con-str</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">（本地）</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">: jdbc:hsqldb:/path/to/the/db/dir<br>con-str</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">（</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">http</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">）</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">: jdbc:hsqldb:http://dbsrv<br>con-str</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">（</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">hsql</span><span style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">）</span><span lang=EN-US style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: Arial">: jdbc:hsqldb:hsql://dbsrv<br><br><br></span></p>
<font color=#0000ff size=6><font style="BACKGROUND-COLOR: #ffffff">错误2、</font><font color=#000000 size=2><font style="BACKGROUND-COLOR: #ffffff">Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.&nbsp;&nbsp;<br>原因：</font><font style="BACKGROUND-COLOR: #ffffff"><font size=3>你在尝试打开一个克隆连接，<br>有两种解决办法： 每个数据库的连接在执行完毕后，关闭，<br>第二，在连接时，判断是否已经有连接存在，有则使用现成的连接。<br><br>也可以在连接字符串中加入SelectMethod=cursor，即写成这样：&#8220;jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=bugzero_db&#8221;<br><br>或者改用</font><br></font><font style="BACKGROUND-COLOR: #ffffff"><font color=#333333>Microsoft SQLServer(http://jtds.sourceforge.net)<br>Class.forName( "net.sourceforge.jtds.jdbc.Driver" );<br>cn = DriverManager.getConnection( "jdbc:jtds:sqlserver://MyDbComputerNameOrIP:1433/master", sUsr, sPwd );</font><br></font></font></font>
<img src ="http://www.blogjava.net/sxt0823/aggbug/87420.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/sxt0823/" target="_blank">sxt</a> 2006-12-13 11:01 <a href="http://www.blogjava.net/sxt0823/articles/87420.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>★ Eclipse 3.0 RC2 熱鍵表 (中英對照版，Default) ★ </title><link>http://www.blogjava.net/sxt0823/articles/81259.html</link><dc:creator>sxt</dc:creator><author>sxt</author><pubDate>Wed, 15 Nov 2006 06:48:00 GMT</pubDate><guid>http://www.blogjava.net/sxt0823/articles/81259.html</guid><wfw:comment>http://www.blogjava.net/sxt0823/comments/81259.html</wfw:comment><comments>http://www.blogjava.net/sxt0823/articles/81259.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/sxt0823/comments/commentRss/81259.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/sxt0823/services/trackbacks/81259.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: □				Alt+/				：代码提示。								□				Ctrl+/				：注释矛取消注释。								□				Ctrl +D				：侧除光标所在行。								□				Ctrl+K				：将光标停留在变				A				上，按				Ctrl +K				键可查找下一个同样的变		...&nbsp;&nbsp;<a href='http://www.blogjava.net/sxt0823/articles/81259.html'>阅读全文</a><img src ="http://www.blogjava.net/sxt0823/aggbug/81259.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/sxt0823/" target="_blank">sxt</a> 2006-11-15 14:48 <a href="http://www.blogjava.net/sxt0823/articles/81259.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>