-
Re: erro de permissão
Translations by babel.altavista.com:
"I made this code but it java returned I this error from permission, does
not have the lesser idea of that he is, if alguem will be able to help me,
will be grateful"
This code is from an applet, so the classpath is not used. The applet will
use the database on the server where the applet came from. Also, you can
not use sun.jdbc.odbc.JdbcOdbcDriver in an applet because it is not a pure
Java JDBC driver. (Este código é de um applet, assim que o classpath não é
usado. O applet usará a base de dados no server de onde o applet veio.
Também, você não pode usar sun.jdbc.odbc.JdbcOdbcDriver em um applet porque
não é um excitador puro de Java JDBC.)
PC2
"Mozart G. S. Junior" <mozart@atp.com.br> wrote in message
news:3b24d23a@news.devx.com...
> Fiz este código mas o java me retornou este erro de permissão, não tenho a
> menor
> idéia do que seja, se alguem puder me ajudar, ficarei grato
>
> ''
>
> try
> {
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> System.out.println("Conectando ao Oracle..." );
> GlobalConexao=DriverManager.getConnection(url,us,se);
> GlobalStmt=GlobalConexao.createStatement();
> System.out.println("Conexao realizada com sucesso !!" );
> }
>
>
> ''
>
> Class Path -
>
..;C:\kawa321\kawaclasses.zip;c:\jdk1.3.0_02\lib\tools.jar;c:\jdk1.3.0_02\jre
> \lib\rt.jar
> Excecao de principal 1
>
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
>
> at
>
java.security.AccessControlContext.checkPermission(AccessControlContext.java
> :272)
>
> at
> java.security.AccessController.checkPermission(AccessController.java:399)
>
> at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
>
> at
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
>
> at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
>
> at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:105)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
> at java.lang.Class.forName0(Native Method)
>
> at java.lang.Class.forName(Class.java:120)
>
> at AtpEstatisticaRva.<init>(AtpEstatisticaRva.java:64)
>
> at AtpEstatisticaApplet.init(AtpEstatisticaApplet.java:13)
>
> at sun.applet.AppletPanel.run(AppletPanel.java:344)
>
> at java.lang.Thread.run(Thread.java:484)
>
> Excecao de criacao do Statement
>
> java.lang.NullPointerException
>
> at EtapaSaque.<init>(EtapaSaque.java:47)
>
>
> at AtpEstatisticaRva.<init>(AtpEstatisticaRva.java:77)
>
>
>
>
> at AtpEstatisticaApplet.init(AtpEstatisticaApplet.java:13)
>
> at sun.applet.AppletPanel.run(AppletPanel.java:344)
>
> at java.lang.Thread.run(Thread.java:484)
>
>
>
> --
> Grato,
> Mozart
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks