Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B9FEE9F93E4 for ; Fri, 27 Oct 2006 00:09:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 10021-02 for ; Fri, 27 Oct 2006 00:09:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from shell6.bayarea.net (shell6.BAYAREA.NET [209.128.113.1]) by postgresql.org (Postfix) with ESMTP id 01CB69FA5FE for ; Fri, 27 Oct 2006 00:04:38 -0300 (ADT) Received: (qmail 982 invoked from network); 27 Oct 2006 03:04:37 +0000 Received: from adsl-71-144-55-249.dsl.pltn13.sbcglobal.net (HELO 192.168.1.168) (71.144.55.249) by shell6.bayarea.net with SMTP; 27 Oct 2006 03:04:37 +0000 Subject: Applet problems From: Morgan Kita Reply-To: mkita@verseon.com To: pgsql-jdbc@postgresql.org Content-Type: text/plain Organization: Verseon Date: Thu, 26 Oct 2006 20:04:36 -0700 Message-Id: <1161918276.30127.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27) Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.235 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/118 X-Sequence-Number: 16001 Hi, I am trying to use the jdbc drivers in a fairly simple applet in java 1.5.0_03-b07 under linux. However, I am having problems with both running from appletviewer and firefox. I can howerver run an application and connect and retireve information. My init function looks like this: public void init() { String url = "jdbc:postgresql://server/dbase"; try { Class.forName("org.postgresql.Driver"); Properties props = new Properties(); props.setProperty("user","myname"); props.setProperty("password","secret"); Connection conn = DriverManager.getConnection(url, props); Statement st = conn.createStatement(); ResultSet rs = st.executeQuery(...some sql); ..... and so on As you can see this follows the info doc for JDBC pretty closely. As I said it works fine in an application. However, when I try to load it in appletviewer it throws the following exception: "Method CalledCaught SQL Exception: Something unusual has occured to cause the driver to fail. Please report this exception." It seems like some non-sql related function barfed up an exception. Anyways, no idea there. When I tried to run this within a page generated by CherryPy in firefox 2.0, it loads the applet in the background but then fails when it tries to perform Class.forName. Looking in my CherryPy log file I saw the following errors: "The path '/java/org/postgresql/driverconfig.properties' was not found." "The path '/java/org/postgresql/translation/messages.class' was not found." "The path '/java/org/postgresql/translation/messages.properties' was not found." "The path '/java/org/postgresql/translation/messages.properties_en.class' was not found." "The path '/java/org/postgresql/translation/messages.properties_en.properties' was not found." "The path '/java/org/postgresql/translation/messages.properties_en_US.class' was not found." "The path '/java/org/postgresql/translation/messages.properties_en_US.properties' was not found." What the heck? Its right none of those files do exist in the jar archive. I see a reference to driverconfig.properties when trying load default parameters... but I don't even see references to those other files anywhere in the source. I also tried putting everything in jar archive and loading that in the html with no effect. Please .... any ideas? I have no idea how to proceed. Thanks, Morgan Please