[問題] win10 apache連結不到資料庫

作者: shurou015 (Nerissa)   2016-12-18 09:57:49
大家好 小女研究一段時間
版本是win10 想要用apache連結到資料庫
已經做了以下方法:
(1)去IIS把32位元應用程式改成允許
(2)去測試哪裡出錯
發現最終的點停在class錯誤
我學校的電腦是32位元
在學校程式都可以正常執行
一直不明白為何跑到家裡就無法執行
在家裡我也是開32位元的ODBC去系統資料庫連結
想請問大家哪裡出錯或缺少什麼組件謝謝
以下附上永遠連不上去的程式碼
type Exception report
message An exception occurred processing JSP page /Ex109.jsp at line 14
description The server encoutered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /Ex109.jsp at line 14
11: <%
12: String JDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
13: String connectDB="jdbc:odbc:myDB";
14: Class.forName(JDriver);
15: Connection con = DriverManager.getConnection(connectDB);
16: Statement stmt = con.createStatement();
作者: maxsho (沉默的熊)   2016-12-18 18:36:00
妳電腦有一樣的資料庫嗎 從外部要連到架在學校電腦的資料連法不一樣吧資料庫的驅動有抓且有放到對的位置嗎
作者: shurou015 (Nerissa)   2016-12-18 20:59:00
資料庫是一樣的 電腦驅動程式我也在想這個問題連結方法在學校也是下載apache 然後直接用ODBC去連資料庫位置跟名字我都確認國沒問題 目前也比較朝電腦本身設定及缺少驅動程式方向跑 謝謝你~
作者: kigohcy (風櫃店庄小孩念國中)   2016-12-21 18:54:00
你家Jdk是8.0?
作者: shurou015 (Nerissa)   2016-12-29 23:50:00
對喔不能用8.0跑嗎 ?

Links booklink

Contact Us: admin [ a t ] ucptt.com