nvanwyen / libphonenumber-oracle

PL/SQL Wrapper for Google libphonenumber library
MIT License
3 stars 1 forks source link

Unable to install the components using install_phonenumber.sql #1

Open amitsaluja1984 opened 7 years ago

amitsaluja1984 commented 7 years ago

Steps followed Logged into oracle Linux 12 c machine ran the command as per installation using sqlplus as sysdba below is the error I get @/amit/libphonenumber-oracle-master/source/install_phonenumber.sql ... running install_phonenumber.sql ... running libphonenumber.sch.sql Schema GOOGLE already exists

PL/SQL procedure successfully completed.

... running libphonenumber.prv.sql

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

... running compile.sh /bin/bash: ./compile.sh: No such file or directory O/S Message: No child processes

step 2: I tried to execute by providing the path for compile.sh and below error I got [oracle@oraclesvr libphonenumber-oracle-master]$ /amit/libphonenumber-oracle-master/source/./compile.sh Compiling PhoneNumberImpl.java ... error: error reading libphonenumber.jar; error in opening zip file 1 error

Please help

nvanwyen commented 7 years ago

I'll be happy to help. The OS Message is a Bug in the Oracle 12c Client,. You need to apply the patch 19033356 first (make sure to do a conflict check first). After the patch, I recommend doing a remove off LibPhoneNumber first (use remove_phonenumber.sql) before attempting another install.

If you have further issues, please let me know.

Respectfully, Nicholas Van Wyen, MTI 703-593-9420 c | 571-468-2883 o

On 07/07/2017 07:14 AM, amitsaluja1984 wrote:

Steps followed Logged into oracle Linux 12 c machine ran the command as per installation using sqlplus as sysdba below is the error I get @/amit/libphonenumber-oracle-master/source/install_phonenumber.sql ... running install_phonenumber.sql ... running libphonenumber.sch.sql Schema GOOGLE already exists

PL/SQL procedure successfully completed.

... running libphonenumber.prv.sql

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

/... running compile.sh /bin/bash: ./compile.sh: No such file or directory O/S Message: No child processes/

step 2: I tried to execute by providing the path for compile.sh and below error I got [oracle@oraclesvr libphonenumber-oracle-master]$ /amit/libphonenumber-oracle-master/source/./compile.sh Compiling PhoneNumberImpl.java ... error: error reading libphonenumber.jar; error in opening zip file 1 error

Please help

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nvanwyen/libphonenumber-oracle/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AEN05gXAQFv1pxoGScvV_DMMBgweUMrDks5sLhMugaJpZM4OQ0A1.

amitsaluja1984 commented 7 years ago

Thanks I will check. I was able to install the components 1 by 1 by going to the path. Also, there are few more things i found which i want to bring to your notice. 1) Valid UK no but probable returns null Select google.phonenumber.probable( '07860859448' ) from dual; 2) do you plan to extend this utility to show geocoder too for instance This api has that funcitonality https://libphonenumber.appspot.com/phonenumberparser?number=7337768833&country=IN I guess java code for same is also available https://github.com/nyaruka/libphonenumber/blob/master/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java

nvanwyen commented 7 years ago

I think the patch will help you out. I've run into that issue with multiple projects, so I've taken to simply making sure it's there before starting :-). I'll make sure it is denoted in what little documentation I have or at least in the release notes.

1) The original requirement was to return NULL on error. You can turn on Java tracing to see the stack trace using dbms_java.set_output( 1000000 ). There may be a valid reason for the NULL or it could be a Bug, If you believe it's a bug, then please send both the input and output and I'll see hat I can do

2) I had not planned on exposing geocoder, because it has never been a requirement. However, I can look into it or if you wanted to give it a shot I'd be happy to merge it in

Respectfully,

Nicholas Van Wyen, MTI 703-593-9420 c | 571-468-2883 o

On 07/07/2017 09:16 AM, amitsaluja1984 wrote:

Thanks I will check. I was able to install the components 1 by 1 by going to the path. Also, there are few more things i found which i want to bring to your notice.

  1. Valid UK no but probable returns null Select google.phonenumber.probable( '07860859448' ) from dual;
  2. do you plan to extend this utility to show geocoder too for instance This api has that funcitonality https://libphonenumber.appspot.com/phonenumberparser?number=7337768833&country=IN I guess java code for same is also available https://github.com/nyaruka/libphonenumber/blob/master/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nvanwyen/libphonenumber-oracle/issues/1#issuecomment-313677850, or mute the thread https://github.com/notifications/unsubscribe-auth/AEN05nQskzRjz12AvigFEo2jhU4O4y4Fks5sLi-xgaJpZM4OQ0A1.

amitsaluja1984 commented 7 years ago

Thanks Nicholas . we have a requirement to validate geocode in one of our project. So it would be great if you can add this functionality. Also, I have a follow up question on the same, how do you think we can keep the are code list up to date with any latest changes which might occur to them.

gent99 commented 5 years ago

I'm getting a lot of error like this:

ORA-29548: Java-Systemklasse hat Fehler berichtet: release of classes.bin in the database does not match that of the oracle executable

I'm on 12.1.0.2 what could cause this?

Kind regards

nvanwyen commented 5 years ago

You most likely upgraded or patched your DB and the JVM has reverted from Java 7 back to Java 6. This is a common issue (we run into this all the time). Once you get up to 12.2, 18c or 19c you're using Java 8 exclusively so this issue goes away.

Check and update update the JVM binaries as needed using ...

    #!/bin/bash
    #
    # update the JDK to 1.7 for the $ORACLE_HOME ...
    # This needs to be run on each node in the cluster for the 12c home only
    perl $ORACLE_HOME/javavm/install/update_javavm_binaries.pl 7

    # relink the $ORACLE_HOME libraries
    # This needs to be run on each node in the cluster for the 12c home only
    # once *ALL* 12c databases have been shutdown (not before)
    ( cd $ORACLE_HOME/rdbms/lib && make -f ins_rdbms.mk ioracle )

    # once the database is backup, update the javajvm ...
    # this can be run on any node in the cluster
    sqlplus -S "/ as sysdba" << !
        --
        @?/javavm/install/update_javavm_db.sql
    !

    # check the JDK version ...
    # this can be run on any node in the cluster
    sqlplus -S "/ as sysdba" << !
        --
        col ver for a12 head "jdk version"
        select dbms_java.get_jdk_version ver from dual;
    !

If you are already at the correct version of the binaries, I found that in some rare cases, you have to reinitialize the JVM. You can run the following (you want lose any Java JVM installed, unless you put them under SYS) ...

    --
    alter system set "_ash_enable" = false scope=memory;
    alter system set statistics_level=basic scope=memory;

    -- if the remove hangs, it most likely the Workload History
    -- so truncate those tables first (this of course is optional)
    --
    -- truncate table wrh$_sql_plan;
    -- truncate table wrh$_active_session_history;
    -- truncate table wri$_optstat_tab_history;
    -- truncate table wri$_optstat_ind_history;
    -- truncate table wri$_optstat_histhead_history;
    -- truncate table wri$_optstat_histgrm_history;
    -- truncate table wri$_optstat_aux_history;

    --
    @?/javavm/install/rmjvm.sql
    @?/javavm/install/initjvm.sql

    --
    alter system set "_ash_enable" = true  scope=memory;
    alter system set statistics_level=typical scope=memory;