Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

db access problem

 
zack chancery
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know why if you copy all your java files including the microsoft access db file that supports the program into a different directory and run it from there, you get an access denied error like this one:


access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
java.security.AccessControlException: access denied (java.lang.RuntimePermission
accessClassInPackage.sun.jdbc.odbc)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at java.security.AccessController.checkPermission(AccessController.java:
401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:149
1)
at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:190)

at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at Teller.<init>(Teller.java:101)
at Main.init(Main.java:19)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
java.security.AccessControlException: access denied (java.util.PropertyPermissio
n user.dir read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
at java.security.AccessController.checkPermission(AccessController.java:
401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
76)
at java.lang.System.getProperty(System.java:573)
at java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:272)
at java.io.Win32FileSystem.resolve(Win32FileSystem.java:288)
at java.io.File.getAbsolutePath(File.java:459)
at sun.awt.shell.Win32ShellFolder2.<init>(Win32ShellFolder2.java:191)
at sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:504)

at sun.awt.shell.ShellFolder.listFiles(ShellFolder.java:115)
at sun.awt.shell.Win32ShellFolderManager2.get(Win32ShellFolderManager2.j
ava:189)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:245)
at javax.swing.plaf.metal.MetalFileChooserUI.updateUseShellFolder(MetalF
ileChooserUI.java:414)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFile
ChooserUI.java:304)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserU
I.java:130)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserU
I.java:152)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1701)
at javax.swing.JFileChooser.setup(JFileChooser.java:345)
at javax.swing.JFileChooser.<init>(JFileChooser.java:320)
at javax.swing.JFileChooser.<init>(JFileChooser.java:273)
at Tracer.<init>(Tracer.java:37)
at Main.init(Main.java:22)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you use jdbc.odbc in combination with dsn-service, where the location of the database is hard coded?
Access wasn't developed with portability and accessability in mind - the name is a lie, if you forget to spell the beginning: ms-access.
[ October 22, 2004: Message edited by: Stefan Wagner ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic