This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

class.forName() and java.sql


Erik Poupaert writes:
 > 
 > I've natively compiled hSql into libhsql.a in order to embed an rdb in a
 > test application I'm creating on minGW.
 > 
 > The first snag is the fact that java.sql.DriverManager.getConnection()
 > doesn't work, because class.forName() doesn't work. I circumvented the
 > problem by using directly the jdbcDriver class. But then I ran into another
 > snag:
 > 
 > """java.sql.SQLException: java.util.MissingResourceException: Bundle
 > gnu.java.locale.Calendar not found."""
 > 
 > I guess it's related to the same problem, i.e., the fact that
 > class.forName() doesn't work; since the java.util.date and
 > java.util.Calendar related methods seem to use class.forName(). But on top
 > of that, it's very hard to locate the problem and work around it, because I
 > can't get a stacktrace on minGW in this version of GCJ.

What exactly do you mean by class.forName() "doesn't work"?  In the
absence of a proper example I have no way to know hat you're talking
about.

I know of two problems:

1.  class.forName() doesn't work reliably on any system if an object
    is statically linked.

2.  Without the DWARF 2 unwinder, class.forName() doesn't work
    correctly with multiple class loaders.  minGW doesn't use the
    DWARF 2 unwinder by default.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]