pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: NoClassDefFoundErrors
Date: Wed, 18 Mar 2009 09:59:47 +0100
Message-ID: <200903180959.48234.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <49C0B4C4.1070708@opencloud.com>
References: <200903180901.41694.robin.rosenberg.lists@dewire.com>
	<49C0B4C4.1070708@opencloud.com>

onsdag 18 mars 2009 09:45:56 skrev Oliver Jowett <oliver@opencloud.com>:
> Robin Rosenberg wrote:
> > Under various error conditions (and possibly otherwise) we get noclassdeffound errors instead of an SQL exception.
> > 
> > Caused by: java.lang.NoClassDefFoundError: org/postgresql/core/Parser
> > 	at org.postgresql.core.v3.QueryExecutorImpl.parseQuery(QueryExecutorImpl.java:77)
> > 	at org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery(QueryExecutorImpl.java:55)
> 
> > We're currently on version 8.3-603 of the driver within glassfish 2.1
> 
> $ jar tvf postgresql-8.3-603.jdbc2.jar  | grep Parser.class
>   2904 Thu Jan 31 03:01:38 NZDT 2008 org/postgresql/core/Parser.class
> 
> The class is there, so either you have a mangled copy of the driver jar,
> or glassfish is breaking something, or you have encountered a JVM bug.
> Parser is an integral part of the driver, used whenever you have a query
> that contains any of these characters: '"-/$
> 
> -O
> 

Indeed it is there. NoClassDefFoundError is ofter confused with ClassNotFoundException. 

NoClassDefFoundError means the class was found, but it couldn't be loaded because
of another class was needed for the base class or interface or an exception was thrown
in a static initializer during class loading. There might be other reasons, but those are
the ones I know about. The problem is that these errors are very hard to debug, so I was
hoping for a clue.

-- robin





view thread (4+ messages)  latest in thread

Message-ID: <200903180959.48234.robin.rosenberg.lists@dewire.com>
Permalink:  ../200903180959.48234.robin.rosenberg.lists@dewire.com/
Also on:    postgresql.org/message-id/200903180959.48234.robin.rosenberg.lists@dewire.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: robin.rosenberg.lists@dewire.com, oliver@opencloud.com
  Subject: Re: NoClassDefFoundErrors
  In-Reply-To: <200903180959.48234.robin.rosenberg.lists@dewire.com>
  References: <200903180901.41694.robin.rosenberg.lists@dewire.com> <49C0B4C4.1070708@opencloud.com> <200903180959.48234.robin.rosenberg.lists@dewire.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox