Re: PostgreSQL

1999-08-06 Thread Marcos Seoane

i'm very sorry, the language is portuguese, BRASIL.  I sent message to various lists 
here in Brasil, and I forgot to make an English version with the portuguese version, 
i'm not a good English speaker/writer, so here my doubt on your language. :-)))

port > alguem tem algum programa de exemplo ou pode fazer um pra mim de sistema JAVA 
conectando um banco de dados PostgreSQL...eu seria muitissimo grato...
eng > anybody has an example how to make an application in JAVA using a PostgreSQL 
database...thanks in advance...

[]'s
Marcos Seoane


*** Separador de Resposta  ***

Em 06/08/99 as 13:46 Pepijn Schmitz escreveu:

>What language is that?! And how many people do you think are on the list that speak 
>it, versus the number of people who speak English?
>
>/Pepijn
>
>Marcos Seoane wrote:
>
>> alguem tem algum programa de exemplo ou pode fazer um pra mim de sistema JAVA 
>conectando um banco de dados PostgreSQL...eu seria muitissimo grato...
>>
>> []'s
>> Marcos Seoane
>>
>> --
>> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Bad sync problem??

1999-08-06 Thread Chris Abbey

Everytime I hear someone say that adding thread yeilds or sleeps
or changing priorities "fixed" the threading problems in a green
threads implementation I immediately think they're depending on
non-spec thread behavior. So far I haven't been wrong on the cases
that have been dug into. Your imperical evidence of ok behavior on
platforms other than Linux is also imperical evidence of ok behavior
on threading models other than green. I've never seen a green thread
windows jvm, and haven't seen green threads solaris since 112 time
frame. Try -native with your original code, I suspect it will work
much better.


  cabbey at home dot net <*> http://members.home.net/cabbey
   I want a binary interface to the brain!
Today's opto-mechanical digital interfaces are just too slow!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RE: Bad sync problem??

1999-08-06 Thread R.W. Shore

Thanks. I agree that there's a non-zero probability of a bug
in my code, but being a lazy programmer I thought I'd ask
the question first.

Bob

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
Behalf Of Matt Welsh
Sent: Thursday, August 05, 1999 15:55
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Bad sync problem??



With an application of this complexity it seems a lot more
likely that
there is a deadlock or other synchronization bug in your own
code, rather
than something wrong with the (relatively straightforward)
implementation
of thread synchronization in the JDK. If you can come up
with a simple
example program which

The fact that you haven't seen this problem under Solaris or
WinNT isn't
a good argument for a bug in the Linux JDK; these things may
be cropping
up due to race conditions, or else differing (but correct!)
implementations
of the threading system.

Matt Welsh

"R.W. Shore" <[EMAIL PROTECTED]> writes:
> I suspect that there's a bad problem with thread
> synchronization. Has anybody else seen similar symptoms??
>
> Platform: Cyrix M-II running RedHat 6.0
> JDK: 1.1.7 from Blackdown
>  Green threads, default JIT setting (on?)
> Classes compiled with JDK 1.1.6 on a WinNT platform
> (VisualCafe)
>
> Problem: I've got an application that, among other things,
> maintains an "event log". Since the log entries can go to
> several places, including but not limited to a local file,
> and since I didn't want the logging threads to have to
wait,
> I put the logging into a separate thread. The interface
> between the log-maintenance thread and the rest of the app
> is a "bucket" object, which is a limited-size FIFO queue.
A
> thread can put a log request into the bucket; the
> log-maintenance thread extracts the request from the
bucket,
> processes it, and loops back to get the next request. The
> bucket uses synchronized blocks with wait() and
notifyAll()
> calls to coordinate the maintenance thread with the other
> threads. This approach has worked fine on WinNT and
Solaris
> 2.7.
>
> The first thing I noticed when running the app on the
> Blackdown JDK was mysterious hangs. To fix this, I first
> inserted some yield() calls outside the synchronized
blocks,
> after each bucket put and get. This helped but didn't
> completely solve the problem. I then modified the
> maintenance thread so that it runs at a thread priority of
> 1+whatever the default is -- no more hangs. Hmmm...
>
> Now, the actual environment involves three separate
> platforms. Call 'em A, L, and C, where L is the Linux
> platform. Platform A sends a request to L via CORBA, which
> processes it and sends the result to C. All three
platforms
> maintain logs of requests. What I'm seeing now is an
> occasional double logging on L. That is, A logs requests
1,
> 2, and 3; C logs results 1, 2, and 3; but L logs
processing
> 1, 2, 2, and 3. Keep in mind that I don't see any such
> behavior on either WinNT or Solaris. Hmmm...
>
> I'm concluding that there's something seriously wrong with
> thread synchronization, at least on this platform. Proper
> synchronization of threads is critical to this
application,
> and I'm starting to wonder if there are other processing
> anomalies on the Linux box that I'm simply not seeing.
> Although I haven't made extensive tests, the problem
doesn't
> appear to be JIT related -- at least, the original app
hangs
> persisted when I turned the JIT off (java.compiler=NONE).
>
> My questions include:
>
> o Has anybody seen similar synchronization behavior?
>
> o Anybody want to venture an opinion on the likelihood of
a
> chip-related problem vs a JDK-related one?
>
>
> --

> To UNSUBSCRIBE, email to
[EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]
>



--
To UNSUBSCRIBE, email to
[EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



UnsatisfiedLinkError: no awt in shared library path?!

1999-08-06 Thread Pepijn Schmitz

Hi,

When trying to run the weblogic 4.02 console on RH 5.2 (i386, kernel
2.2.6, java 1.1.7v3, swing 1.0.3, commandline: java -ms32m -mx32m
weblogic.Console) it dies with the following message:

/usr/local/java/lib/i686/green_threads/libawt.so: undefined symbol:
XtShellStrings (libawt.so)
no awt in shared library path
java.lang.UnsatisfiedLinkError: no awt in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:394)
at java.awt.Font.initializeFont(Font.java:106)
at java.awt.Font.(Font.java:121)
at
com.sun.java.swing.plaf.FontUIResource.(FontUIResource.java:47)
at
com.sun.java.swing.plaf.metal.DefaultMetalTheme.(DefaultMetalTheme.java:50)

at
com.sun.java.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:598)

at
com.sun.java.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:602)

at
com.sun.java.swing.UIManager.setLookAndFeel(UIManager.java:318)
at
com.sun.java.swing.UIManager.setLookAndFeel(UIManager.java:341)
at
com.sun.java.swing.UIManager.initializeDefaultLAF(UIManager.java:587)
at com.sun.java.swing.UIManager.initialize(UIManager.java:664)
at
com.sun.java.swing.UIManager.maybeInitialize(UIManager.java:672)
at com.sun.java.swing.UIManager.getDefaults(UIManager.java:391)
at com.sun.java.swing.UIManager.getColor(UIManager.java:400)
at com.sun.java.swing.JPanel.(JPanel.java:68)
at com.sun.java.swing.JPanel.(JPanel.java:109)
at
com.sun.java.swing.JRootPane.createGlassPane(JRootPane.java:225)
at com.sun.java.swing.JRootPane.(JRootPane.java:181)
at com.sun.java.swing.JApplet.createRootPane(JApplet.java:122)
at com.sun.java.swing.JApplet.(JApplet.java:115)
at weblogic.admin.T3Cnsl.(T3Cnsl.java:360)
at weblogic.admin.T3Cnsl.doMain(T3Cnsl.java:182)
at weblogic.admin.T3Cnsl.main(T3Cnsl.java:133)
at weblogic.admin.ConsoleStarter.startup(ConsoleStarter.java:16)

at weblogic.Console.main(Console.java:41)

Various small home made aps that use the AWT work fine, so does the
swing example application. What could be wrong?

/Pepijn


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: silly question

1999-08-06 Thread Hendrik Schreiber

Well, it's not as silly as one might think. I don't know of any other "official"
way than calling ResultSet.next() until it returns false. You can of course send
a SQL-COUNT-statement, too - but that's not officially supported and might not
be portable.

If there's a better way I'd be interested, too.

-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
  The WebApp Frameworkhttp://www.webapp.de/
  jo! small&smart 2.1 servletengine
  Persistence  objectrelational mapping
  Java Server & ServletsThe German servlet book


Yohans Mendoza wrote:

> I'm new to the JDBC, so this is a silly question for most of you.
>
> How do you count the number of rows returned in a ResultSet?
>
> TIA
>
> --Yohans
>
> ~
> Yohans Mendoza  Unix Administrator
> Sirius Images Inc.  [EMAIL PROTECTED]
> http://www2.utep.edu/~yohanshttp://www.sirius-images.net
> ~
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Newbie question

1999-08-06 Thread Bern Rewel L. Mutia



Hi,
 
I'm new to Java so please bear with me.
 
I am resizing the length of the array of String 
elements in a JList inside a JScrollPane, but repaint() does not 
update my UI.
 
Help please...
 
Burn
 
 


1.2-prev2 : jdb not working

1999-08-06 Thread Peter Tillemans

Hello,

I am using the 1.2-prev2 release on a RedHat 6.0 system.

When I try to debug something I always get

[peter@frodo projects]$ jdb -dbgtrace App1_1
Initializing jdb...
[debugger: starting child: /usr/local/jdk1.2/jre/bin/java -Xdebug
-Djava.compiler=NONE  -Xbootclasspath/a:/usr/local/java/lib/tools.jar
sun.tools.agent.EmptyApp]
[Internal debugger error: Failed to exec a child java interpreter with
this command line: /usr/local/jdk1.2/jre/bin/java -Xdebug
-Djava.compiler=NONE  -Xbootclasspath/a:/usr/local/java/lib/tools.jar
sun.tools.agent.EmptyApp]
Exception in thread "main" java.lang.InternalError
 at sun.tools.debug.RemoteAgent.error(RemoteAgent.java:1409)
 at sun.tools.debug.RemoteAgent.(RemoteAgent.java:243)
 at sun.tools.debug.RemoteDebugger.(RemoteDebugger.java:63)
 at sun.tools.ttydebug.TTY.(TTY.java:1633)
 at sun.tools.ttydebug.TTY.main(TTY.java:1809)

I have disabled the JIT commpiler and enabled green threads in the
environment.


Can anybody indicate where I should look to get the debugger working?

TIA,

Peter Tillemans




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Help with JDK 1.2 library problems

1999-08-06 Thread Timothy Stewart

Hi all,

I'm not an expert on the Linux libraries .. far from it... so if there is a simple 
solution to this, please forgive my 
ignorance.  I appreciate any assistance.

A while ago, I went to install JDK 1.2 pre 1 and realized I needed glibc 2.  Rather 
than mess with installing this on an old 
system, I waited until I had the time to upgrade the whole thing.

Yesterday, I downloaded Slackware 4.0, which I figured would have the latest 
libraries, wiped my system clean, and installed 
it.  The installation went very smoothly, and I was up and running again within the 
hour.  I installed jdk1.2-pre2 for the 
glibc 2.0.

I am able to run SimpleExample from the jdk examples using a command such as:
java -green -jar SimpleExample.jar

However, if I extract the jar files and try to run it, or if I try to run one of my 
own applications outside of a jar file, it 
will not work.  It will come back with a message like:  
Exception in thread "main" java.lang.NoClassDefFoundError: SimpleExample/class

The class obviously is present, the classpath is set to include "." using the -cp 
command, and the same programs (including my 
own) run fine from within a jar.  Another catch is that the jdk1.2 for linux can't 
seem to create the executable jar files.. it 
works fine.. but comes back with the same error.  If I create the jar on another 
machine and transfer it, it works.

The other problem, I'm sure is something in my libraries.  Running without the -green 
option, attempting native threads (its 
very slow with just green threads) I get the following:

./jdk1.2/bin/i386/native_threads/java: error in loading shared libraries
/lib/libpthread.so.0: undefined symbol: __libc_rewinddir

I don't know whether I should download and install the latest linuxthreads library, or 
the libc library, or where to begin 
here.

When I do a dump of ldconfig -D, there are many warnings similar to the following 
which I'm not sure apply:
ldconfig: warning: /lib/libc-2.0.7.so has inconsistent soname (libc.so.6)
ldconfig: warning: /lib/libpthread-0.7.so has inconsistent soname (libpthread.so.0)

Thanks for any assistance offered.

- Tim Stewart.


Here is a dump of the ldconfig -D:

ldconfig: version 1.9.9
/usr/local/lib:
/usr/X11R6/lib:
libMagick.so.4 => libMagick.so.4.0.22
libXpm.so.4 => libXpm.so.4.11
libXtst.so.6 => libXtst.so.6.1
libXt.so.6 => libXt.so.6.0
libXp.so.6 => libXp.so.6.2
libXmu.so.6 => libXmu.so.6.0
libXi.so.6 => libXi.so.6.0
libXext.so.6 => libXext.so.6.3
libXaw.so.6 => libXaw.so.6.1
libXIE.so.6 => libXIE.so.6.0
libX11.so.6 => libX11.so.6.1
libSM.so.6 => libSM.so.6.0
libPEX5.so.6 => libPEX5.so.6.0
libICE.so.6 => libICE.so.6.3
libXaw3d.so.6 => libXaw3d.so.6.1
libXm.so.1 => libXm.so.1.2.0
libMrm.so.1 => libMrm.so.1.2.0
/usr/lib:
libqt.so.1 => libqt.so.1.44
libpng.so.2 => libpng.so.2.1.0.3
libjpeg.so.62 => libjpeg.so.62.0.0
libtiff.so.3 => libtiff.so.3.4
libfbm.so.1 => libfbm.so.1.0.0
librle.so.1 => librle.so.1.0.0
libpbm.so.1 => libpbm.so.1.0.0
libppm.so.1 => libppm.so.1.0.0
libpnm.so.1 => libpnm.so.1.0.0
libpgm.so.1 => libpgm.so.1.0.0
libgtk-1.2.so.0 => libgtk-1.2.so.0.2.0
libgthread-1.2.so.0 => libgthread-1.2.so.0.0.2
libgmodule-1.2.so.0 => libgmodule-1.2.so.0.0.2
libglib-1.2.so.0 => libglib-1.2.so.0.0.2
libgimpui.so.1 => libgimpui.so.1.0.4
libgimp.so.1 => libgimp.so.1.0.4
libgdk-1.2.so.0 => libgdk-1.2.so.0.2.0
libgck.so.1 => libgck.so.1.0.0
libaa.so.1 => libaa.so.1.0.3
libtk8.0.so => libtk8.0.so
libtixsam4.1.8.0.so => libtixsam4.1.8.0.so
libtix4.1.8.0.so => libtix4.1.8.0.so
libtkx8.0.4.so => libtkx8.0.4.so
libtclx8.0.4.so => libtclx8.0.4.so
libtcl8.0.so => libtcl8.0.so
libexpect5.28.so => libexpect5.28.so
libpanel.so.3.4 => libpanel.so.1.9.9g
libmenu.so.3.4 => libmenu.so.1.9.9g
libform.so.3.4 => libform.so.1.9.9g
libltdl.so.0 => libltdl.so.0.1.1
libbfd-2.9.1.0.19.so.0 => libbfd-2.9.1.0.19.so.0.0.0
libopcodes-2.9.1.0.19.so.0 => libopcodes-2.9.1.0.19.so.0.0.0
libgpm.so.1 => libgpm.so.1.14
libintl.so.1 => libintl.so.1.0.0
libz.so.1 => libz.so.1.1.3
libstdc++.so.27 => libstdc++.so.27.1.4
libg++.so.27 => libg++.so.27.1.4
libstdc++.so.2.9 => libstdc++.so.2.9.0
libstdc++.so.2.8 => libstdc++.so.2.8.0
libdb.so.1 => libdb.so.1.85.4
/usr/ix86-linux/lib:
/usr/ix86-linuxaout/lib:
libPEX5.so.6 => libPEX5.so.6.0
libXpm.so.4 => libXpm.so.4.3
libXt.so.6 => libXt.so.6.0
libXaw.so.6 => libXaw.so.6.0
libXIE.so.6 => libXIE.so.6.0
libX11.so.6 => libX11.so.6.0
libXt.so.3 => libXt.so.3.1.0
libXaw.so.3 => libXaw.so.3.1.0
li

Re: Help with JDK 1.2 library problems

1999-08-06 Thread Pere Serra

Hi !

I'll answer the easier question:

To run SimpleExample.class you must type 

java SimpleExample

because the point "." has the same efect than "/" to
separate packages and directories.

I think that you typed
java SimpleExample.class
and you get:
Exception in thread "main" java.lang.NoClassDefFoundError:
SimpleExample/class
because java searched the file class.class in the folder SimpleExample

Bye

--
-
(,   http://www.geocities.com/Hollywood/Set/8660
/|__--__
|\ '__
`.' / `.,_ _
/  ||``._.'
  .'   /|Pere Joan Serra Caldentey
.'/\ \
` `,/ /`,\  [EMAIL PROTECTED]
   .'.'  /|
,' /   / |
- `- -- `-'- ---


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



[ANNOUNCE]: Press Releases

1999-08-06 Thread Karl Asha


A new section has been placed on the www.blackdown.org web site for
Linux Java related press releases. If your company would like to add one
to the page, please let me know. 

Thanks, 
Karl Asha
[EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Help with JDK 1.2 library problems

1999-08-06 Thread Timothy Stewart

> To run SimpleExample.class you must type 
> 
> java SimpleExample
> 
> because the point "." has the same efect than "/" to
> separate packages and directories

I did get SimpleExample to run:

java -green -cp "." SimpleExample

and was able to run a more complex program using -cp to point to the JAI libraries... 
so that part is working.  I must have 
done something stupid.. thanks for the reply.

Now if i can get these libraries sorted out and get native threads going I might be on 
the way to getting some production level 
code going.

- Tim Stewart.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: 1.2-prev2 : jdb not working

1999-08-06 Thread Peter Tillemans

Peter Tillemans wrote:

> Hello,
>
> I am using the 1.2-prev2 release on a RedHat 6.0 system.
>
> When I try to debug something I always get
> ...
> Can anybody indicate where I should look to get the debugger working?

Never mind : my fault, I apparently mixed up glibc2.0 and 2.1. I reinstalled
and everything works fine now (well at least the debugger starts anyway ;-).


>
>
> TIA,
>
> Peter Tillemans
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

--
Peter Tillemans




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Dead lock in Graphics setFont

1999-08-06 Thread Michael Emmel

Hi I'm dead locking in Graphics on a call to setFont

It enters g.setFont and never ruturns theu funny thing is it succeeds
many times and this is
the only thread in the setFont call ?? I synchronized on the graphics
but no luck.

java version "1.1.7B"

Good call

0 SET FONT CALLED
java.awt.Font[family=Dialog,name=Dialog,style=bold,size=12]
g=SwingGraphics(0x80ce783) [subGraphics sun.awt.motif.X11Graphics
   translate [x=0,y=0] clip [x=0,y=0,w=498,h=30]
   color [r=128,g=128,b=128] font
[family=Dialog,name=Dialog,style=plain,size=12]]
ENDk FONT CALLED

bad CALL
0 SET FONT CALLED
java.awt.Font[family=Dialog,name=Dialog,style=plain,size=12]
g=SwingGraphics(0x80cd79e) [subGraphics sun.awt.motif.X11Graphics
   translate [x=0,y=0] clip [x=0,y=0,w=498,h=30]
   color [r=0,g=0,b=0] font
[family=Dialog,name=Dialog,style=plain,size=12]]




Nothing ???

SwingGraphics just sets the Font and a  instance var I looked.


Mike



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Newbie question

1999-08-06 Thread Jeff Galyan

Try calling update().

--Jeff


> "Bern Rewel L. Mutia" wrote:
> 
> Hi,
> 
> I'm new to Java so please bear with me.
> 
> I am resizing the length of the array of String elements in a JList
> inside a JScrollPane, but repaint() does not update my UI.
> 
> Help please...
> 
> Burn
> 
> 

-- 
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
==
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"

The views expressed herein do not necessarily reflect those of my
employer.

Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



RPMS and Native threads on RH 6.0

1999-08-06 Thread Michael Holst

Hello,

I have a couple of questions concerning the JDK ports from Blackdown and
IBM:

1- Is the Blackdown port Native threads? If so, how do I invoke them?

2- Where can I download the RPM for the Blackdown JDK that actually
*works* right after installing on RH 6.0?

3- Is the IBM JDK good at Swing, etc.?

Thanks,
Michael


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Jav - Oracle Connection

1999-08-06 Thread David Crooke

Looks like your JDBC_URL may be malformed...have you tried @zuriqui
without the dot in between?

Also beware that if your Oracle is on Windoze you can't use a netBIOS
name, it has to be a DNS type name.
"ping zuriqui" from the shell will verify that the name is recognized.


-- 
David Crooke, Austin TX, USA. +1 (512) 656 6102
"Open source software - with no walls and fences, who needs Windows
and Gates?"


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]