Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ISO: help resolving thorny unicode/oracle/oratcl/tcl issue
I'm trying to help a developer who has ran into a roadblock with a
production application.

The production environment is such that upgrading the tcl or oratcl in
production is prohibitive... too many systems would need too much
testing time to ensure all the systems were not impacted.

So, this is a sparc solaris system, running tcl 8.4.7 and oratcl 4.2,
linked against Oracle 9.2 . The software sets a series of shell
environment variables that tell Oracle that they are going to be
accessing kanji data, then they invoke the tcl script which logs into
oracle and does its job.

A couple of ws ago, the DBAs upgraded the oracle instance to Oracle
10.
When this happened, the software was no longer able to log into
oracle.

The developers narrowed things down to this - if they ceased setting
the NLS_LANG variable to japanese_japan.utf8 , they were able to log
into oracle, but could not access the data as needed.  If they
continue to set the NLS_LANG variable, the oratcl login fails.

So, it was suggested to me that I set up a test for the developers,
where I build oratcl 4.4 against oracle 10, and have them just see if
things work appropriately.

I did so. Now a new, weird thing is occuring.  The test script being
used is:

$ cat testoratcl.tcl
#!/usr/tcl84/bin/tclsh8.4

set auto_path [list /vol/tclsrcsol/tcl84/oratcl4.4/unix $auto_path]

package require Oratcl 4.4

proc oracle_logon {} {
global lda env

set username [exec $env(PDPS_BIN)/getDB name]
set password [exec $env(PDPS_BIN)/getDB passwd]
set orapasswd "$username/$password"

if {[catch {set lda [oralogon $orapasswd]} error]} {
puts "Oracle Logon Error"
puts "$error."
exit 1
}
}

oracle_logon
puts "logon to oracle succeeded"

exit 0
$ ls /vol/tclsrcsol/tcl84/oratcl4.4/unix
Makefile         config.log       oralob.o         pkgIndex.tcl
Makefile-gen     config.status    oralong.o
casrun.lwv       libOratcl4.4.so  oratcl.o

When the above script is executed, the following error is generated:
srv19:/home/mhh26$ ./go2.ksh
invalid command name "tclPkgUnknown"
while executing
"tclPkgUnknown Oratcl 4.4"
("package unknown" script)
invoked from within
"package require Oratcl 4.4"
(file "./go.tcl" line 5)


That's a new one on me. Anyone have an idea what might be going on
here?


Report this thread to moderator Post Follow-up to this message
Old Post
Larry W. Virden
08-24-07 03:17 AM


Re: ISO: help resolving thorny unicode/oracle/oratcl/tcl issue
Larry W. Virden wrote:

> $ cat testoratcl.tcl
> #!/usr/tcl84/bin/tclsh8.4
>
> set auto_path [list /vol/tclsrcsol/tcl84/oratcl4.4/unix $auto_path]

That's your mistake.  The original $auto_path is a list, and here
you've dropped it in a list depth level.  If you started with
$auto_path == foo bar

You now have $auto_path == /vol/tclsrcsol/tcl84/oratcl4.4/unix {foo bar}

and neither "foo" nor "bar" is still on the path.

In this case, "foo" ought to be [info library], and without
[info library] on the auto_path, Tcl cannot auto-load the portions
of its script library that are auto-loaded, such as the [tclPkgUnknown]
command.

You want:

set auto_path [linsert $auto_path 0 /vol/tclsrcsol/tcl84/oratcl4.4/unix]

DGP

Report this thread to moderator Post Follow-up to this message
Old Post
Donald G Porter
08-24-07 09:27 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:02 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.