db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendleton.de...@gmail.com>
Subject Re: Derby: SQL ERROR -> Encountered "CASCADE" at line xyz
Date Sat, 04 Dec 2010 20:04:33 GMT

Derby hasn't implemented ON UPDATE CASCADE. Here's what Derby provides:

> ps: In another thread I've a pending message. I've done all I could
> (followed the instructions) but it is still pending... what can I do? thanks

I'm not sure. That problem is really odd. I think that Kristian's theory
about classloaders is the most likely, as application servers and RMI runtimes
tend to provide really finicky class loading behaviors. Since you've demonstrated
that the simple "java -classpath ..." command can successfully load and run
Derby, you've obviously got a valid copy of the Derby jar files, and you've
obviously set the classpath correctly to point at those jars, which normally
is all you need to do.

So something in your server code must be interfering with the Class.forName()
behavior, which as I noted above is not uncommon with complex server runtimes.

For example, some application servers have security constraints in their
class loading behaviors, and won't allow application code to load arbitrary
libraries without configuring the server's security system to allow the library loading.

Class.forName() is a base JDK call, not a Derby call, so I'm afraid
that you're going to need to seek help from your server provider. Did you
write this server code yourself, or is it a well-known server of some type?

The only other things I can think to try are:
1) see if your JDK has any additional diagnostic flags you can run; for
example I think the Sun JDK provides a "java -verbose:class" flag that
might give you more clues about the class-loading activity.
2) see if you can find a powerful Java debugger, and run your server under
the Java debugger, and break at the point where you're about to do the
Class.forName call, and see if your debugger has any tools to diagnose the
ClassNotFoundException; for example I think you can load the Sun JDK source.zip
for the Sun Java runtime sources, and possibly your debugger will then allow
you to step through the Class.forName call and see if you can spot why it's failing.



View raw message