I use java.util.Properties class to read property data including jdbc oracle driver, and then use Class.forName(driver) to connect to database. However, if I do this in jdk1.1 it works fine; when I use the same code in jdk1.3, I got error like: **** ... .. java.net.URLClassLoader. java.lang.ClassLoader.loadClass() java.lang.Class.forName0(Native method) java.lang.Class.forName() ***** Does somebody know the reason and how to fix it ? Thanks, mike
Hi Mike, I'm not totally sure about this one, but it appears to be a security issue. It looks like you're trying to load a class over a network connection. You may try creating a policy file that grants universal permission just to test this. Hope this helps Michael Morris SCJP2
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
may be this is elementary. You have the driver in the classpath? Yeah i understand that you would probably get no class def found error or some stuff like that if it's not so. Anyway you w'd want to check if classes12.zip (or the ora driver you are using) in the classpath
Joined: Feb 26, 2002
The classpath does include the driver. The situation is: using the same code, same driver, it works in jdk1.1 but not in jdk1.3. If it is a security reason, why doesn't it happen in jdk1.1 ? where should this security policy file be put ? thanks, mike
Originally posted by mike zhang: **** ... .. java.net.URLClassLoader. java.lang.ClassLoader.loadClass() java.lang.Class.forName0(Native method) java.lang.Class.forName() ***** [/QB]
What are the dots standing for? What Error/Exception are you getting???
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Please post the relevant code and complete error message/stack trace. If you are running an application, I don't think you will get any security exceptions. Also, I don't think that the presence of URLClassLoader in the stack trace necessarily indicates network class loading.