CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]

 



MonkeyPerl
New User

Mar 18, 2015, 10:32 AM

Post #1 of 4 (26852 views)
DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] Can't Post

Hello PerlGuru,

I am getting below error while executing the perl script to access Solid LDAP database using JDBC.

The script connects to the database but gives below error while running sql prepare command :



try.pl
connecting
preparing................
DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] at ./try.pl line 40, <DATA> line 225.

dumping java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]

$VAR1 = 'jdbc:solid://scs.company.net:1313/user/user';
$VAR1 = bless( {}, 'DBI::db' );
$VAR1 = undef;


Help will be appreciated to resolve this error.

Thanks in advance.


FYI, When I added data dumper it gave below traces :

./try.pl
DBI 1.633-ithread default trace level set to 0x0/5 (pid 8927 pi 330b010) at try.pl line 31

connecting

-> DBI->connect(dbi:JDBC:hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII, , ****)
-> DBI->install_driver(JDBC) for linux perl=5.008008 pid=8927 ruid=9176 euid=9176
install_driver: DBD::JDBC version 0.71 loaded from /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm
New 'DBI::dr' (for DBD::JDBC::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0x3c26c10)=>DBI::dr=HASH(0x3c26c50), DBD::JDBC::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::JDBC::dr, 196, 0) thr#330b010
dbih_setup_attrib(DBI::dr=HASH(0x3c26c50), Err, Null!) SCALAR(0x34a0e90) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x3c26c50), State, Null!) SCALAR(0x34a0e70) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x3c26c50), Errstr, Null!) SCALAR(0x34a0eb0) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x3c26c50), TraceLevel, Null!) 0 (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x3c26c50), FetchHashKeyName, Null!) 'NAME' (already defined)
<- install_driver= DBI::dr=HASH(0x3c26c10)
-> default_user in DBD::_::dr for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c10)~0x3c26c50 undef undef HASH(0x3447240)) thr#330b010
<- default_user= ( undef undef ) [2 items] at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 669 via at ./try.pl line 35
-> connect for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c10)~0x3c26c50 'hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII' undef **** HASH(0x3447240)) thr#330b010
1 -> trace in DBD::_::common for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER) thr#330b010
1 <- trace= 5 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 106
Encoding [CONNECT_REQ | ARRAY(0x3c599b0)]
Sending request to server
Listening for response
Received response from server
Decoding [CONNECT_RESP | SCALAR(0x368a180)]
New 'DBI::db' (for DBD::JDBC::db, parent=DBI::dr=HASH(0x3c26c50), id=undef)
dbih_setup_handle(DBI::db=HASH(0x3c599d0)=>DBI::db=HASH(0x3c59950), DBD::JDBC::db, 34a1110, Null!)
dbih_make_com(DBI::dr=HASH(0x3c26c50), 3c55af0, DBD::JDBC::db, 196, 0) thr#330b010
dbih_setup_attrib(DBI::db=HASH(0x3c59950), Err, DBI::dr=HASH(0x3c26c50)) SCALAR(0x34a1320) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), State, DBI::dr=HASH(0x3c26c50)) SCALAR(0x34a13a0) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), Errstr, DBI::dr=HASH(0x3c26c50)) SCALAR(0x34a1360) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), TraceLevel, DBI::dr=HASH(0x3c26c50)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), FetchHashKeyName, DBI::dr=HASH(0x3c26c50)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), HandleSetErr, DBI::dr=HASH(0x3c26c50)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), HandleError, DBI::dr=HASH(0x3c26c50)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), ReadOnly, DBI::dr=HASH(0x3c26c50)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x3c59950), Profile, DBI::dr=HASH(0x3c26c50)) undef (not defined)
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'Active' 1) thr#330b010
STORE DBI::db=HASH(0x3c59950) 'Active' => 1
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 322 via at ./try.pl line 35
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'jdbc_socket' IO::Socket::INET=GLOB(0x3c597f0)) thr#330b010
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 323 via at ./try.pl line 35
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'jdbc_ber' DBD::JDBC::BER=ARRAY(0x3c59740)) thr#330b010
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 324 via at ./try.pl line 35
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'jdbc_character_set' 'ASCII') thr#330b010
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 325 via at ./try.pl line 35
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'jdbc_url' 'jdbc:solid://scs.company.net:1313/user/user') thr#330b010
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 326 via at ./try.pl line 35
1 -> FETCH for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER 'jdbc_connections') thr#330b010
1 <- FETCH= undef at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 328 via at ./try.pl line 35
1 -> STORE for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER 'jdbc_connections' ARRAY(0x3c61010)) thr#330b010
1 <- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 330 via at ./try.pl line 35
1 -> FETCH for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER 'jdbc_longreadall') thr#330b010
1 <- FETCH= undef at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 331 via at ./try.pl line 35
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'jdbc_longreadall' 1) thr#330b010
<- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 332 via at ./try.pl line 35
<- connect= DBI::db=HASH(0x3c599d0) at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 681
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'PrintError' 1) thr#330b010
STORE DBI::db=HASH(0x3c59950) 'PrintError' => 1
<- STORE= 1 at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 733
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'AutoCommit' 1) thr#330b010
1 <> FETCH= ( IO::Socket::INET=GLOB(0x3c597f0) ) [1 items] ('jdbc_socket' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 779
1 <> FETCH= ( [ '' 0 ARRAY(0x3c60fe0) ] ) [1 items] ('jdbc_ber' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 779
1 -> trace in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
1 <- trace= 5 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 106
Encoding [SET_CONNECTION_PROPERTY_REQ | ARRAY(0x3c61140)]
Sending request to server
Listening for response
Received response from server
Decoding [SET_CONNECTION_PROPERTY_RESP | SCALAR(0x36d3e20)]
<- STORE= 1 at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 733
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'Username' undef) thr#330b010
STORE DBI::db=HASH(0x3c59950) 'Username' => undef
<- STORE= 1 at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 736 via at ./try.pl line 35
-> connected in DBD::_::db for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'dbi:JDBC:hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII') thr#330b010
<- connected= undef at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 743
<- connect= DBI::db=HASH(0x3c599d0)
-> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'dbi_connect_closure' CODE(0x3c26e40)) thr#330b010
STORE DBI::db=HASH(0x3c59950) 'dbi_connect_closure' => CODE(0x3c26e40)
<- STORE= 1 at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 752 via at ./try.pl line 35

preparing................

-> prepare for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950 'select area.area_id,area.area_name,server.ip_address from area,server where area.server_id = server.server_id') thr#330b010
1 -> trace in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
1 <- trace= ( 5 ) [1 items] at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 417 via at ./try.pl line 40
1 <> FETCH= ( IO::Socket::INET=GLOB(0x3c597f0) ) [1 items] ('jdbc_socket' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 432 via at ./try.pl line 40
1 <> FETCH= ( [ '' 0 ARRAY(0x3c59c00) ] ) [1 items] ('jdbc_ber' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 432 via at ./try.pl line 40
1 -> trace in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
1 <- trace= 5 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 106 via at ./try.pl line 40
Encoding [PREPARE_REQ | ARRAY(0x3c611e0)]
Sending request to server
Listening for response
Received response from server
Error: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]
1 -> set_err in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER '8' 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]' 'IJDBC' (magic-sg:x) undef) thr#330b010
!! ERROR: '8' 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]' (err#1)
1 <- set_err= undef at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 148 via at ./try.pl line 40
!! ERROR: '8' 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]' (err#1)
<- prepare= undef at ./try.pl line 40 via at ./try.pl line 40
DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] at ./try.pl line 40, <DATA> line 225.
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::JDBC::db::errstr
<- $DBI::errstr= 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]'
dumping java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]
$VAR1 = 'jdbc:solid://scs.company.net:1313/user/user';
-> FIRSTKEY in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
ERROR: '8' 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]' (err#1)
<- FIRSTKEY= undef at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Data/Dumper.pm line 179 via at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Data/Dumper.pm line 511
$VAR1 = bless( {}, 'DBI::db' );
$VAR1 = undef;
-- DBI::END ($@: , $!: )
-> disconnect_all for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c10)~0x3c26c50) thr#330b010
1 <> FETCH= ( [ DBI::db=HASH(0x3c599d0) ] ) [1 items] ('jdbc_connections' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 364 via at ./try.pl line 0
Found 1 connections to close
ERROR: '8' 'java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed]' (err#1)
<> FETCH= 'hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII' ('Name' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 371 via at ./try.pl line 0
Disconnecting hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII
!! The ERROR ''8'' was CLEARED by call to disconnect method
-> disconnect for DBD::JDBC::db (DBI::db=HASH(0x3c599d0)~0x3c59950) thr#330b010
1 -> trace in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
1 <- trace= ( 5 ) [1 items] at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 516 via at ./try.pl line 0
1 -> FETCH for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'Active') thr#330b010
.. FETCH DBI::db=HASH(0x3c59950) 'Active' = 1
1 <- FETCH= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 519 via at ./try.pl line 0
1 -> STORE for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'Active' 0) thr#330b010
STORE DBI::db=HASH(0x3c59950) 'Active' => 0
1 <- STORE= 1 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 521 via at ./try.pl line 0
1 <> FETCH= ( IO::Socket::INET=GLOB(0x3c597f0) ) [1 items] ('jdbc_socket' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 523 via at ./try.pl line 0
1 <> FETCH= ( [ '' 0 ARRAY(0x3c614a0) ] ) [1 items] ('jdbc_ber' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 523 via at ./try.pl line 0
1 -> trace in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
1 <- trace= 5 at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 106 via at ./try.pl line 0
Encoding [DISCONNECT_REQ | 0]
Sending request to server
Listening for response
1 -> set_err in DBD::_::common for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 101 'I/O Error Connection reset by peer ' 'IJDBC') thr#330b010
!! ERROR: 101 'I/O Error Connection reset by peer ' (err#2)
1 <- set_err= ( undef ) [1 items] at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 126 via at ./try.pl line 0
ERROR: 101 'I/O Error Connection reset by peer ' (err#2)
1 <> FETCH= IO::Socket::INET=GLOB(0x3c597f0) ('jdbc_socket' from cache) at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 529 via at ./try.pl line 0
!! ERROR: 101 'I/O Error Connection reset by peer ' (err#2)
<- disconnect= undef at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 373 via at ./try.pl line 0
1 -> errstr in DBD::_::common for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER) thr#330b010
1 <- errstr= undef at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 373 via at ./try.pl line 0
Failed to disconnect hostname=localhost;port=9001;url=jdbc:solid://scs.company.net:1313/user/user;jdbc_character_set=ASCII:
<- disconnect_all= undef at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 761 via at ./try.pl line 0
! <> DESTROY(DBI::db=HASH(0x3c599d0)) ignored for outer handle (inner DBI::db=HASH(0x3c59950) has ref cnt 1)
! -> DESTROY for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER) thr#330b010
! -> FETCH for DBD::JDBC::db (DBI::db=HASH(0x3c59950)~INNER 'Active') thr#330b010
.. FETCH DBI::db=HASH(0x3c59950) 'Active' = ''
ERROR: 101 'I/O Error Connection reset by peer ' (err#2)
! <- FETCH= '' at /usr/lib/perl5/site_perl/5.8.8/DBD/JDBC.pm line 730 via at ./try.pl line 0 during global destruction
ERROR: 101 'I/O Error Connection reset by peer ' (err#2)
! <- DESTROY= undef during global destruction
dbih_clearcom 0x3c59950 (com 0x3c63110, type 2) done.
! -> DESTROY in DBD::_::common for DBD::JDBC::dr (DBI::dr=HASH(0x3c26c50)~INNER) thr#330b010
! <- DESTROY= undef during global destruction
dbih_clearcom 0x3c26c10 (com 0x3c55af0, type 1) done.
! <> DESTROY for DBI::dr=HASH(0x3c26c10) ignored (inner handle gone)


FishMonger
Veteran / Moderator

Mar 18, 2015, 12:37 PM

Post #2 of 4 (26835 views)
Re: [MonkeyPerl] DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] [In reply to] Can't Post

Try using DBD::LDAP instead of DBD::JDBC which hasn't been updated/maintained for the last 6 years.

http://search.cpan.org/~turnerjw/DBD-LDAP-0.22/lib/DBD/LDAP.pm


MonkeyPerl
New User

Mar 18, 2015, 2:08 PM

Post #3 of 4 (26822 views)
Re: [FishMonger] DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] [In reply to] Can't Post

Thanks FishMonger,

We already have scripts available using JDBC and were working. But due to some server issues we are now moving these scripts to new solaris server and observing this issue after connecting to the Solid database. I have loaded Convert::BER module but wondering if its not the correct version or anything else is missing on this new server.


(This post was edited by MonkeyPerl on Mar 18, 2015, 2:09 PM)


FishMonger
Veteran / Moderator

Mar 18, 2015, 2:32 PM

Post #4 of 4 (26813 views)
Re: [MonkeyPerl] DBD::JDBC::db prepare failed: java.io.IOException: Unrecognized BER object identifier: [APPLICATION 15 constructed] [In reply to] Can't Post

I have not used the DBD::JDBC or Convert::BER modules so I can't be of much help with them, but the first thing to do would be to make sure you have the latest versions of each of the DB related modules.

perl v5.8.8 is very old. I would highly recommend upgrading to at least v5.16. The best way to do that would be to install Perlbrew under /opt or similar location. The main advantage of perlbrew is that you can easily install multiple versions without interfering with the system perl.
http://perlbrew.pl/

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives