Menu

problems installing pljava

ffs12
2005-05-28
2013-05-02
  • ffs12

    ffs12 - 2005-05-28

    Hi,

    I can't get pljava to work with postgres.
    My system is Slackware10.1 with kernel 2.6.11.9 using java 1.4.2_08.

    I installed postgres 8.0.3 without any problems, I can start it up.
    I added the following to my /usr/local/pgsql/data/postgresql.conf:
    custom_variable_classes = 'pljava'
    pljava.classpath = '/opt/compiere2/pljava/pljava.jar'
    #pljava.statement_cache_size = 10
    pljava.release_lingering_savepoints = true
    pljava.vmoptions = '-Xmx64M -Dbackchannel.port=48'
    pljava.debug = false

    When I was trying to run the pljava deployer, it first complained about not findin
    g some java libraries.
    I was able to fix that, by copying libpljava.so and libjvm.so to my /usr/local/pgs
    ql/lib/ directory.
    Now I could run the deployer using "java -cp /opt/compiere2/pljava/deploy.jar:/opt
    /compiere2/pljava/postgresql-8.0-310.jdbc3.jar org.postgresql.pljava.deploy.Deploy
    er -install -user postgres -database cmpcs".
    I restarted the database, and connected to it via psql -U compiere cmpcs.
    I followed the instructions from e-evolution.com:
    cmpcs=#CREATE SCHEMA compiere;
    cmpcs=# SET search_path TO compiere,sqlj;
    cmpcs=# SELECT sqlj.install_jar('file:///app/compiere/e-evolution/cpgsql/sqlj/sqlj
    .jar', 'sqlj', true);
    cmpcs=# SELECT sqlj.set_classpath('compiere', 'sqlj');
    cmpcs=# \q

    But when I try to run "SELECT sqlj.install_jar('file:///opt/compiere2/Compiere2/li
    b/sqlj.jar', 'sqlj', true);" I get this error message: "ERROR:  Failed to create J
    ava VM".

    Any ideas, what I could do?
    Thx alot.

     
    • ffs12

      ffs12 - 2005-05-28

      This is the error message from the logfiles:
      LOG:  database system was shut down at 2005-05-28 14:32:41 CEST
      LOG:  checkpoint record is at 0/BE20A4
      LOG:  redo record is at 0/BE20A4; undo record is at 0/0; shutdown TRUE
      LOG:  next transaction ID: 762; next OID: 17355
      LOG:  database system is ready
      LOG:  There was an error trying to initialize the HPI library.
      LOG:  Please check your installation, HotSpot does not work correctly
      LOG:  when installed in the JDK 1.2 Linux Production Release, or
      LOG:  with any JDK 1.1.x release.
      ERROR:  Failed to create Java VM
      LOG:  received smart shutdown request
      LOG:  shutting down
      LOG:  database system is shut down

       
    • bulls

      bulls - 2005-05-30

      try use java 1.4.2_07

       
      • ffs12

        ffs12 - 2005-05-30

        thx for the advice, but that didn't help, still the same error messages.
        I also tried out jdk1.5, same error with that.

        Is pljava looking for the vm in some special place (I have it at /usr/lib/java )

         
    • bulls

      bulls - 2005-06-01

      try link j2sdk1.4.2_07/jre/lib/libverify.so and libzip.so to pgsql/lib

       
    • bulls

      bulls - 2005-06-01

      try link j2sdk1.4.2_07/jre/lib/i386/libverify.so and libzip.so to pgsql/lib

       
    • ffs12

      ffs12 - 2005-06-01

      thanks a lot, this didn't do it yet, but it brought me on the right track.
      I also linked jvmlib.so (had a hard copy of it in pgsl/lib/ so far) and libjava.so to the lib directory, now it works.

       
    • twahch

      twahch - 2005-06-03

      hi

      i have the same problem but my system is Windows XP .

      thx for help

       
    • Andrejs Veliks

      Andrejs Veliks - 2005-06-15

      if You get message that can`t start Java VM -> siply comment line pljava.vmoptions = '-Xmx64M -Dbackchannel.port=48' in postgres.conf, and in line
      pljava.classpath = '/c:/compiere2/pljava/pljava.jar'
      separator MUST be unix-like, not windows / !!!!!

       

Log in to post a comment.