pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Applet problems
3+ messages / 2 participants
[nested] [flat]

* Applet problems
@ 2006-10-27 03:04 Morgan Kita <mkita@verseon.com>
  2006-10-27 11:33 ` Re: Applet problems Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Morgan Kita @ 2006-10-27 03:04 UTC (permalink / raw)
  To: pgsql-jdbc

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Applet problems
  2006-10-27 03:04 Applet problems Morgan Kita <mkita@verseon.com>
@ 2006-10-27 11:33 ` Dave Cramer <pg@fastcrypt.com>
  2006-10-27 17:54   ` Re: Applet problems Morgan Kita <mkita@verseon.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Dave Cramer @ 2006-10-27 11:33 UTC (permalink / raw)
  To: mkita@verseon.com; +Cc: pgsql-jdbc


On 26-Oct-06, at 11:04 PM, Morgan Kita wrote:

> 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."
The classpath shouldn't include /java in front of /org....


>
> 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
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Applet problems
  2006-10-27 03:04 Applet problems Morgan Kita <mkita@verseon.com>
  2006-10-27 11:33 ` Re: Applet problems Dave Cramer <pg@fastcrypt.com>
@ 2006-10-27 17:54   ` Morgan Kita <mkita@verseon.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Morgan Kita @ 2006-10-27 17:54 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

java is my codebase directory in relation to my directory structure.
When I attempt to run the applet in firefox, the pages are being served
by cherrypy. So my html looks like:

<applet code=MyClass.class codebase=java
archive="myjar.jar"
width=460 height=160>
</applet>

Therefore it searches java/org/...

On Fri, 2006-10-27 at 07:33 -0400, Dave Cramer wrote:
> On 26-Oct-06, at 11:04 PM, Morgan Kita wrote:
> 
> > 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."
> The classpath shouldn't include /java in front of /org....
> 
> 
> >
> > 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
> >
> >
> > ---------------------------(end of  
> > broadcast)---------------------------
> > TIP 4: Have you searched our list archives?
> >
> >                http://archives.postgresql.org
> >
> 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-10-27 17:54 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 03:04 Applet problems Morgan Kita <mkita@verseon.com>
2006-10-27 11:33 ` Dave Cramer <pg@fastcrypt.com>
2006-10-27 17:54   ` Morgan Kita <mkita@verseon.com>

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