facebook

jdbc connection doesn’t work with Oracle 10g Express Edition

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #250270 Reply

    Edward Tsai
    Member

    Hi everyone,

    I’m Edward and I’m new to Eclipse+MyEclipse. I tried to set up a connection profile in MyEclipse using Oracle 10g Express Edition, but got the following error message:

    Error while trying to login to database
    ORA-00604: error occured at recursive SQL level 1
    ORA-12705:Cannot access NLS data files or invalid environment specified

    I used Oracle Thin Driver and the database URL is: jdbc:oracle:thin:@127.0.0.1:1521:XE

    Could you specify where I did wrong? Thanks.

    Best,
    Edward Tsai

    #250291 Reply

    Haris Peco
    Member

    Edward,

    Please send us what is your oracle version (universal multi-byte or single byte latin1) and your encoding.
    I supposte taht you have to set compatible NLS_LANG parameter
    send us your os and eclipse/myeclipse version

    #250343 Reply

    Edward Tsai
    Member

    Dear Sir,

    Thanks for your quick response. The information you requested is as follows:

    oracle version: (universal multi-byte)
    Encoding: unicode
    OS:Windows XP SP2
    Eclipse: Eclipse SDK Version: 3.1.2
    MyEclipse: Version: 4.1.1

    Best,
    Edward Tsai

    #250346 Reply

    Haris Peco
    Member

    Edward,

    You have to change your NLS_LANG parameter in windows environment to AMERICAN_AMERICA.AL32UTF8

    Control Panel – system – Advanced – Environment variables

    change NLS_LANG if exists or add new variable

    You can choose your language or territory, but have to set AL32UTF8 part

    Best

    #250393 Reply

    Haris Peco
    Member

    Edward,

    I forgot – you have to add NLS classes for other languages (NLS classes) – it is orai18n.jar – this jar is on same place like odjbc14.jar

    Best regards

    #250394 Reply

    Edward Tsai
    Member

    Dir Sir,

    I’ve done the things according to your suggestion:
    1. add a environment variable : NLS_LANG
    2. add the jar file in Edit Driver screen’s Driver JARs – orai18n.jar

    but I had the same error message when I tried again

    Is there anything I should do? My local language is Simplied Chinese

    Best,
    Edward Tsai

    #250395 Reply

    Haris Peco
    Member

    Edward,

    Please send us

    1) what is NLS_LANG which you set ?
    2) do you have both jars in connection profile (ojdbc14.jar and orai18n.jar) from db2 express distributtion
    3) Can you send us your database settings ?

    Database settings :

    from dos prompt type C:\

    sqlplus system/<YOUR_PASSWORDFOR_SYSTEM>

    from SQL> prompt

    spool param
    show parameter
    spool off
    exit

    Parameters will be in param.lst

    Thanks

    #250515 Reply

    Edward Tsai
    Member

    Dear Sir,

    Sorry for late reply. I’m in a business trip these days.

    1) what is NLS_LANG which you set ?
    ans: AMERICAN_AMERICA.AL32UTF8

    2) do you have both jars in connection profile (ojdbc14.jar and orai18n.jar) from db2 express distributtion
    yes, I set both of them in the Driver JARs tab

    3) Can you send us your database settings ?
    SQL> show parameter

    NAME TYPE VALUE
    ———————————— ———– ——————————
    O7_DICTIONARY_ACCESSIBILITY boolean FALSE
    active_instance_count integer
    aq_tm_processes integer 0
    archive_lag_target integer 0
    asm_diskgroups string
    asm_diskstring string
    asm_power_limit integer 1
    audit_file_dest string F:\ORACLEXE\APP\ORACLE\ADMIN\X
    E\ADUMP
    audit_sys_operations boolean FALSE
    audit_trail string NONE

    NAME TYPE VALUE
    ———————————— ———– ——————————
    background_core_dump string partial
    background_dump_dest string F:\ORACLEXE\APP\ORACLE\ADMIN\X
    E\BDUMP
    backup_tape_io_slaves boolean FALSE
    bitmap_merge_area_size integer 1048576
    blank_trimming boolean FALSE
    buffer_pool_keep string
    buffer_pool_recycle string
    circuits integer
    cluster_database boolean FALSE
    cluster_database_instances integer 1

    NAME TYPE VALUE
    ———————————— ———– ——————————
    cluster_interconnects string
    commit_point_strength integer 1
    commit_write string
    compatible string 10.2.0.1.0
    control_file_record_keep_time integer 7
    control_files string F:\ORACLEXE\ORADATA\XE\CONTROL
    .DBF
    core_dump_dest string F:\ORACLEXE\APP\ORACLE\ADMIN\X
    E\CDUMP
    cpu_count integer 1
    create_bitmap_area_size integer 8388608

    NAME TYPE VALUE
    ———————————— ———– ——————————
    create_stored_outlines string
    cursor_sharing string EXACT
    cursor_space_for_time boolean FALSE
    db_16k_cache_size big integer 0
    db_2k_cache_size big integer 0
    db_32k_cache_size big integer 0
    db_4k_cache_size big integer 0
    db_8k_cache_size big integer 0
    db_block_buffers integer 0
    db_block_checking string FALSE
    db_block_checksum string TRUE

    NAME TYPE VALUE
    ———————————— ———– ——————————
    db_block_size integer 8192
    db_cache_advice string ON
    db_cache_size big integer 0
    db_create_file_dest string
    db_create_online_log_dest_1 string
    db_create_online_log_dest_2 string
    db_create_online_log_dest_3 string
    db_create_online_log_dest_4 string
    db_create_online_log_dest_5 string
    db_domain string
    db_file_multiblock_read_count integer 128

    NAME TYPE VALUE
    ———————————— ———– ——————————
    db_file_name_convert string
    db_files integer 200
    db_flashback_retention_target integer 1440
    db_keep_cache_size big integer 0
    db_name string XE
    db_recovery_file_dest string F:\oraclexe\app\oracle\flash_r
    ecovery_area
    db_recovery_file_dest_size big integer 10G
    db_recycle_cache_size big integer 0
    db_unique_name string XE
    db_writer_processes integer 1

    NAME TYPE VALUE
    ———————————— ———– ——————————
    dbwr_io_slaves integer 0
    ddl_wait_for_locks boolean FALSE
    dg_broker_config_file1 string F:\ORACLEXE\APP\ORACLE\PRODUCT
    \10.2.0\SERVER\DATABASE\DR1XE.
    DAT
    dg_broker_config_file2 string F:\ORACLEXE\APP\ORACLE\PRODUCT
    \10.2.0\SERVER\DATABASE\DR2XE.
    DAT
    dg_broker_start boolean FALSE
    disk_asynch_io boolean TRUE
    dispatchers string (PROTOCOL=TCP) (SERVICE=XEXDB)

    NAME TYPE VALUE
    ———————————— ———– ——————————
    distributed_lock_timeout integer 60
    dml_locks integer 212
    drs_start boolean FALSE
    event string
    fal_client string
    fal_server string
    fast_start_io_target integer 0
    fast_start_mttr_target integer 0
    fast_start_parallel_rollback string LOW
    file_mapping boolean FALSE
    fileio_network_adapters string

    NAME TYPE VALUE
    ———————————— ———– ——————————
    filesystemio_options string
    fixed_date string
    gc_files_to_locks string
    gcs_server_processes integer 0
    global_context_pool_size string
    global_names boolean FALSE
    hash_area_size integer 131072
    hi_shared_memory_address integer 0
    hs_autoregister boolean TRUE
    ifile file
    instance_groups string

    NAME TYPE VALUE
    ———————————— ———– ——————————
    instance_name string xe
    instance_number integer 0
    instance_type string RDBMS
    java_max_sessionspace_size integer 0
    java_pool_size big integer 0
    java_soft_sessionspace_limit integer 0
    job_queue_processes integer 4
    large_pool_size big integer 0
    ldap_directory_access string NONE
    license_max_sessions integer 0
    license_max_users integer 0

    NAME TYPE VALUE
    ———————————— ———– ——————————
    license_sessions_warning integer 0
    local_listener string
    lock_name_space string
    lock_sga boolean FALSE
    log_archive_config string
    log_archive_dest string
    log_archive_dest_1 string
    log_archive_dest_10 string
    log_archive_dest_2 string
    log_archive_dest_3 string
    log_archive_dest_4 string

    NAME TYPE VALUE
    ———————————— ———– ——————————
    log_archive_dest_5 string
    log_archive_dest_6 string
    log_archive_dest_7 string
    log_archive_dest_8 string
    log_archive_dest_9 string
    log_archive_dest_state_1 string enable
    log_archive_dest_state_10 string enable
    log_archive_dest_state_2 string enable
    log_archive_dest_state_3 string enable
    log_archive_dest_state_4 string enable
    log_archive_dest_state_5 string enable

    NAME TYPE VALUE
    ———————————— ———– ——————————
    log_archive_dest_state_6 string enable
    log_archive_dest_state_7 string enable
    log_archive_dest_state_8 string enable
    log_archive_dest_state_9 string enable
    log_archive_duplex_dest string
    log_archive_format string ARC%S_%R.%T
    log_archive_local_first boolean TRUE
    log_archive_max_processes integer 2
    log_archive_min_succeed_dest integer 1
    log_archive_start boolean FALSE
    log_archive_trace integer 0

    NAME TYPE VALUE
    ———————————— ———– ——————————
    log_buffer integer 2859008
    log_checkpoint_interval integer 0
    log_checkpoint_timeout integer 1800
    log_checkpoints_to_alert boolean FALSE
    log_file_name_convert string
    logmnr_max_persistent_sessions integer 1
    max_commit_propagation_delay integer 0
    max_dispatchers integer
    max_dump_file_size string UNLIMITED
    max_enabled_roles integer 150
    max_shared_servers integer

    NAME TYPE VALUE
    ———————————— ———– ——————————
    nls_calendar string
    nls_comp string
    nls_currency string
    nls_date_format string
    nls_date_language string
    nls_dual_currency string
    nls_iso_currency string
    nls_language string AMERICAN
    nls_length_semantics string BYTE
    nls_nchar_conv_excp string FALSE
    nls_numeric_characters string

    NAME TYPE VALUE
    ———————————— ———– ——————————
    nls_sort string
    nls_territory string AMERICA
    nls_time_format string
    nls_time_tz_format string
    nls_timestamp_format string
    nls_timestamp_tz_format string
    object_cache_max_size_percent integer 10
    object_cache_optimal_size integer 102400
    olap_page_pool_size big integer 0
    open_cursors integer 300
    open_links integer 4

    NAME TYPE VALUE
    ———————————— ———– ——————————
    open_links_per_instance integer 4
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 10.2.0.1
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    os_authent_prefix string
    os_roles boolean FALSE
    parallel_adaptive_multi_user boolean TRUE
    parallel_automatic_tuning boolean FALSE

    NAME TYPE VALUE
    ———————————— ———– ——————————
    parallel_execution_message_size integer 2148
    parallel_instance_group string
    parallel_max_servers integer 0
    parallel_min_percent integer 0
    parallel_min_servers integer 0
    parallel_server boolean FALSE
    parallel_server_instances integer 1
    parallel_threads_per_cpu integer 2
    pga_aggregate_target big integer 70M
    plsql_ccflags string
    plsql_code_type string INTERPRETED

    NAME TYPE VALUE
    ———————————— ———– ——————————
    plsql_compiler_flags string INTERPRETED, NON_DEBUG
    plsql_debug boolean FALSE
    plsql_native_library_dir string
    plsql_native_library_subdir_count integer 0
    plsql_optimize_level integer 2
    plsql_v2_compatibility boolean FALSE
    plsql_warnings string DISABLE:ALL
    pre_page_sga boolean FALSE
    processes integer 40
    query_rewrite_enabled string TRUE
    query_rewrite_integrity string enforced

    NAME TYPE VALUE
    ———————————— ———– ——————————
    rdbms_server_dn string
    read_only_open_delayed boolean FALSE
    recovery_parallelism integer 0
    recyclebin string on
    remote_archive_enable string true
    remote_dependencies_mode string TIMESTAMP
    remote_listener string
    remote_login_passwordfile string EXCLUSIVE
    remote_os_authent boolean FALSE
    remote_os_roles boolean FALSE
    replication_dependency_tracking boolean TRUE

    NAME TYPE VALUE
    ———————————— ———– ——————————
    resource_limit boolean FALSE
    resource_manager_plan string
    resumable_timeout integer 0
    rollback_segments string
    serial_reuse string disable
    service_names string XE
    session_cached_cursors integer 20
    session_max_open_files integer 10
    sessions integer 49
    sga_max_size big integer 212M
    sga_target big integer 212M

    NAME TYPE VALUE
    ———————————— ———– ——————————
    shadow_core_dump string partial
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 3565158
    shared_pool_size big integer 0
    shared_server_sessions integer
    shared_servers integer 4
    skip_unusable_indexes boolean TRUE
    smtp_out_server string
    sort_area_retained_size integer 0
    sort_area_size integer 65536
    spfile string F:\ORACLEXE\APP\ORACLE\PRODUCT

    NAME TYPE VALUE
    ———————————— ———– ——————————
    \10.2.0\SERVER\DBS\SPFILEXE.OR
    A
    sql92_security boolean FALSE
    sql_trace boolean FALSE
    sql_version string NATIVE
    sqltune_category string DEFAULT
    standby_archive_dest string %ORACLE_HOME%\RDBMS
    standby_file_management string MANUAL
    star_transformation_enabled string FALSE
    statistics_level string TYPICAL
    streams_pool_size big integer 0

    NAME TYPE VALUE
    ———————————— ———– ——————————
    tape_asynch_io boolean TRUE
    thread integer 0
    timed_os_statistics integer 0
    timed_statistics boolean TRUE
    trace_enabled boolean TRUE
    tracefile_identifier string
    transactions integer 53
    transactions_per_rollback_segment integer 5
    undo_management string AUTO
    undo_retention integer 900
    undo_tablespace string UNDO

    NAME TYPE VALUE
    ———————————— ———– ——————————
    use_indirect_data_buffers boolean FALSE
    user_dump_dest string F:\ORACLEXE\APP\ORACLE\ADMIN\X
    E\UDUMP
    utl_file_dir string
    workarea_size_policy string AUTO
    SQL> spool off

    Thanks for your help again.

    Best,
    Edward Tsai

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: jdbc connection doesn’t work with Oracle 10g Express Edition

You must be logged in to post in the forum log in