Обсуждение: jdbc driver compilation under linux

Поиск
Список
Период
Сортировка

jdbc driver compilation under linux

От
Bartlomiej Papierski
Дата:
Hello,

I'm trying to compile JDBC interface for PostgreSQL 6.3 using JDK 1.1.6
under Linux 2.0.34.
I took JDBC sources from PostgreSQL 6.3 distribution.
I also tried with earlier versions of JDK. The problem is that jar
produces 'segmentation fault'.

Here's the whole compilation dump:

javac postgresql/CallableStatement.java
javac postgresql/geometric/PGbox.java
javac postgresql/geometric/PGcircle.java
javac postgresql/geometric/PGlseg.java
javac postgresql/geometric/PGpath.java
javac postgresql/geometric/PGpolygon.java
jar -c0f postgresql.jar $(find postgresql -name "*.class" -print)
SIGSEGV   11*  segmentation violation
        stackbase=0xbffff360, stackpointer=0xbffff264

Full thread dump:
    "Finalizer thread" (TID:0x4049c208, sys_thread_t:0x413a0f04, state:R)
prio=1
    "Async Garbage Collector" (TID:0x4049c250, sys_thread_t:0x4137ff04,
state:R) prio=1
    "Idle thread" (TID:0x4049c298, sys_thread_t:0x4135ef04, state:R)
prio=0
    "Clock" (TID:0x4049c088, sys_thread_t:0x4133df04, state:CW) prio=12
    "main" (TID:0x4049c0b0, sys_thread_t:0x81ad010, state:R) prio=5
*current thread*
        java.lang.Runtime.loadLibrary(Runtime.java)
        java.lang.System.loadLibrary(System.java)
        java.util.zip.CRC32.<clinit>(CRC32.java:40)
        sun.tools.jar.Main.<init>(Main.java:58)
        sun.tools.jar.Main.main(Main.java:523)
Monitor Cache Dump:
    java.lang.Runtime@1078592352/1080789528: owner "main" (0x81ad010, 1
entry)
Registered Monitor Dump:
    Thread queue lock: <unowned>
    Name and type hash table lock: <unowned>
    String intern lock: <unowned>
    JNI pinning lock: <unowned>
    JNI global reference lock: <unowned>
    BinClass lock: <unowned>
    Class loading lock: <unowned>
    Java stack lock: <unowned>
    Code rewrite lock: <unowned>
    Heap lock: <unowned>
    Has finalization queue lock: <unowned>
    Finalize me queue lock: <unowned>
    Monitor IO lock: <unowned>
    Child death monitor: <unowned>
    Event monitor: <unowned>
    I/O monitor: <unowned>
    Alarm monitor: <unowned>
        Waiting to be notified:
            "Clock" (0x4133df04)
    Monitor registry: owner "main" (0x81ad010, 1 entry)
Thread Alarm Q:
/usr/local/java/bin/../bin/i686/green_threads/jar: line 11:   669 IOT
trap/Abort          (core dumped) `dirname $0`/java -ms8m -verbosegc
$RUNTIME_ARGS sun.tools.jar.Main $APP_ARGS
make: *** [postgresql.jar] Error 13


I also tried to compile it on earlier version of JDK (1.1.3) with no
results.

Can you help me with solving this problem? I'd like to start practising
java&jdbc programming, but it's hard to do it without driver installed.

Thanks in advance.

////    Bartlomiej Papierski - AMG:net
////          bartek@amg.net.pl
////        http://www.amg.net.pl


Re: [INTERFACES] jdbc driver compilation under linux

От
Peter T Mount
Дата:
[tip: best to use peter@retep.org.uk rather than my work's address, as I
may not get to read mail sent there - Peter]

On Fri, 21 Aug 1998, Bartlomiej Papierski wrote:

> Hello,
>
> I'm trying to compile JDBC interface for PostgreSQL 6.3 using JDK 1.1.6
> under Linux 2.0.34.
> I took JDBC sources from PostgreSQL 6.3 distribution.
> I also tried with earlier versions of JDK. The problem is that jar
> produces 'segmentation fault'.
>
> Here's the whole compilation dump:

[snip]

> jar -c0f postgresql.jar $(find postgresql -name "*.class" -print)
> SIGSEGV   11*  segmentation violation
>         stackbase=0xbffff360, stackpointer=0xbffff264

jar is broken on some JDK distributions (one of the 1.2 betas is broken
big time). Check to see if there is either:

  * An older version of the JDK affecting this one - usually caused by old
    shared libraries being used before new ones

  * If a more recent version of 1.1.6 is available

I've just tested jar here (Linux JDK 1.1.6v? {not sure what version}) and
it didn't SIGSEGV.

[snip]

> I also tried to compile it on earlier version of JDK (1.1.3) with no
> results.

Hmmm, something is broken there. Until recently I've been using 1.1.3v2
for postgresql work since the 6.2 days.

> Can you help me with solving this problem? I'd like to start practising
> java&jdbc programming, but it's hard to do it without driver installed.

Don't forget to look at the examples... you'd be surprised at what you can
learn from other peoples code.

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf