hi there, i am a new bee and i am trying to connect oracle database. i can make the connection and run some query and display the result from a java console application. but when i want to connect from my service imlementation class, i always get an access denied error. i have been trying to find a solution, serching on google but nothing.
here is the code i use to connect: final String queryString = "select * from SBS_MUHATAP WHERE NO=357"; Connection con = null; Statement stmt = null; ResultSet rset = null; try { Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); con = DriverManager.getConnection ("jdbc:oracle:thin:@192.168.0.12:1521:db_name", "userID", "userPassword"); stmt = con.createStatement(); rset = stmt.executeQuery(queryString); while (rset.next()) { sonuc = rset.getString(5) + " " + rset.getString(6); } rset.close(); stmt.close(); } as soon a the line con= DriverManager.getConnection runs, i get the exception saying: ...... at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run (SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run (BoundedThreadPool.java:442) Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission 192.168.0.12:1521 connect,resolve) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) ...... what am i doing wrong, please help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---