我試圖在使用sqljdbc4的SQL SERVER 2008的Intellij中設置數據源,並收到java.lang.NullPointerException的錯誤窗口。在IntelliJ中爲SQL SERVER 2008設置數據源時出現NullPointerException
網址,我想: jdbc:sqlserver://localhost\.:1433;databaseName=mobitrack
jdbc:sqlserver://localhost:1433;databaseName=mobitrack
但相同的結果。
關於什麼可能導致異常的任何想法?
預先感謝您。
這裏是例外的截圖: http://i.imgur.com/idIwYqP.png
idea.log:
2013-03-22 17:13:12,770 [7171087] INFO - ution.rmi.RemoteProcessSupport - "c:\program files\jetbrains\intellij idea 11.0\jre\jre\bin\java" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 11.0\plugins\DatabaseSupport\lib\jdbc-console.jar;C:\Program Files\JetBrains\IntelliJ IDEA 11.0\lib\util.jar;C:\Program Files\JetBrains\IntelliJ IDEA 11.0\lib\annotations.jar;D:\sqljdbc4-4.0.2206.100.jar" com.intellij.persistence.database.console.RemoteJdbcServer com.microsoft.sqlserver.jdbc.SQLServerDriver
2013-03-22 17:13:13,532 [7171849] INFO - ution.rmi.RemoteProcessSupport - Port/ID:30598/RemoteDriverImple39ef7c1
2013-03-22 17:13:14,333 [7172650] ERROR - j.javaee.dataSource.DataSource - null
java.lang.NullPointerException
at com.intellij.javaee.dataSource.DatabaseSchemaLoader.getSchemasToLoad(DatabaseSchemaLoader.java:77)
at com.intellij.javaee.dataSource.DataSource$1.perform(DataSource.java:324)
at com.intellij.javaee.dataSource.DataSource$1.perform(DataSource.java:317)
at com.intellij.javaee.dataSource.DataSource.performJdbcOperation(DataSource.java:257)
at com.intellij.javaee.dataSource.DataSource.refreshMetaData(DataSource.java:317)
at com.intellij.javaee.module.view.dataSource.DataSourceUiUtil$4.run(DataSourceUiUtil.java:138)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:457)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$5.run(ProgressManagerImpl.java:276)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:169)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:617)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:410)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:135)
2013-03-22 17:13:14,334 [7172651] ERROR - j.javaee.dataSource.DataSource - IntelliJ IDEA 11.0 Build #IU-111.69
2013-03-22 17:13:14,334 [7172651] ERROR - j.javaee.dataSource.DataSource - JDK: 1.6.0_29
2013-03-22 17:13:14,334 [7172651] ERROR - j.javaee.dataSource.DataSource - VM: Java HotSpot(TM) Client VM
2013-03-22 17:13:14,334 [7172651] ERROR - j.javaee.dataSource.DataSource - Vendor: Sun Microsystems Inc.
2013-03-22 17:13:14,335 [7172652] ERROR - j.javaee.dataSource.DataSource - OS: Windows 7
2013-03-22 17:13:14,353 [7172670] INFO - ution.rmi.RemoteProcessSupport - Process finished with exit code 1
請[提供idea.log](http://intellij-support.jetbrains.com/entries/23352446)。 – CrazyCoder 2013-03-22 15:55:25
嘗試IDEA [11.1.5](http://devnet.jetbrains.com/docs/DOC-1228)或IDEA [12.1](http://confluence.jetbrains.com/display/IDEADEV/IDEA+12.1+EAP )。你的版本是古老的。另請檢查是否有[最新的JDBC驅動程序](http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774)或嘗試[jTDS驅動程序](http:// jtds.sourceforge.net/)。 – CrazyCoder 2013-03-22 20:11:35
我更新了IDEA,它的工作非常感謝。順便說一下,問題在於舊IDEA無法識別它們之間的關係。 – Miro 2013-03-26 17:47:37