OCIEnvNLSCreate using Cygwin and Perl

Hi
I have Cygwin 1.5.25 installed with Oracle 10g Client on Windows XP Professional. I have installed DBD::Oracle (1.21) and Perl 5.8
Here is my environment
ORACLE_HOME C:\oracle\product\10.2.0\client_2
LD_LIBRARY_PATH %ORACLE_HOME%\bin
TNS_ADMIN %ORACLE_HOME%\NETWORK\ADMIN\tnsnames.ora
NLS_LANG AMERICA_AMERICA.WE8DEC
ORACLE_SID CBDEV
TWO_TASK CBDEV (available in tnsnames.ora)
ORA_NLS10 C:\oracle\product\10.2.0\client_2\nls\data
SQLPLUS %ORACLE_HOME%\BIN
Cygwin picks up all the above variables at startup
sqlplus <uname/passwd>@CBDEV also works from the cygwin shell
However below script, which uses Perl DBI to connect to same database to retrieve data fails with error posted below.
I googled for this error and from all posted threads, changed permissions on ORACLE_HOME/BIN and ORACLE_HOME/LIB. Also did the same for entire ORACLE_HOME directory
ANY input would be appreciated. I did not find a separate forum for Perl, hence posted on this forum!!
Thanks
#!/usr/bin/perl
use strict;
use DBI;
print "Getting Data\n";
my $RefHash = &getData();
$ENV{ORACLE_SID} = "CBDEV";
$ENV{ORACLE_HOME} = "/oracle/product/10.2.0/client_2";
$ENV{NLS_LANG} = "AMERICAN_AMERICA.WE8DEC";
$ENV{ORA_NLS} = $ENV{ORACLE_HOME}."/ocommon/nls/admin/data";
$ENV{LD_LIBRARY_PATH} = $ENV{ORACLE_HOME}."/lib";
$ENV{ORA_NLS10} = '/oracle/product/10.2.0/client_2/nls/data';
sub getData() {
my($name, $id, $phylocId);
my %RefHash;
my $dbh = DBI->connect('DBI:Oracle:CBDEV', '<uname>', '<passwd>') || die "Error ".DBI->errstr;
my $sql = qq(SELECT 'name' from DUAL);
my $sth = $dbh->prepare($sql);
$sth->execute();
$sth->bind_columns(\$name);
while($sth->fetch()) {
$name=~s/\s+//g;
$RefHash{$name}='1';
     print "Name : $name ", $RefHash{$name}, "\n";
return \%RefHash;
exit;
Output of Perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int
uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin '
config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld2', ldflags =' -s -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
perllibs=-ldl -lcrypt -lgdbm_compat
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
Locally applied patches:
CYG01 - hints.cygwin.sh ldflags -s
CYG02 - lib-ExtUtils-Embed insensitive against leading \s
CYG03 - lib-Test-Harness-Straps $ENV{PERL5LIB} = ''
CYG04 - major.version.cygwin.sh cygperl-5_8.dll and not cygperl-5_8_x.dll
CYG05 - add Win32CORE to core
CYG07 - File-Spec-Cygwin-TMPDIR.patch
Bug#38628 - allow legacy Cwd->cwd()
Bug#40103 - File-Spec-case_tolerant.patch from 5.9.5
Built under cygwin
Compiled at Jul 8 2007 19:12:08
%ENV:
PERL5LIB=
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8

Thanks for those 2 tips.
I set TNS_ADMIN accordingly and removed calls to set the environment variables in the script.
I still continue to encounter the OCIEnvNlsCreate error as before
Here's the modified script and the output
#!/usr/bin/perl
use strict;
use DBI;
print "Testing DBD::Oracle \n";
my @driver_names = DBI->available_drivers;
foreach my $driver_name (@driver_names) {
print $driver_name,"\n";
foreach (DBI->data_sources($driver_name)) {
print "*****",$_,"\n";
my $cHash = &getCytoband();
sub getCytoband() {
my($name, $id, $phylocId);
my %cytobHash;
my $dbh = DBI->connect('DBI:Oracle:CBDEV', 'dunston', 'rocks') || die "Error ".DBI->errstr;
my $sql = qq(SELECT distinct ID, NAME,PHYSICAL_LOCATION_ID from CYTOBAND where PHYSICAL_LOCATION_ID is NOT NULL);
my $sth = $dbh->prepare($sql);
$sth->execute();
$sth->bind_columns(\$id, \$name, \$phylocId);
while($sth->fetch()) {
$name=~s/\s+//g;
$id=~s/\s+//g;
$phylocId=~s/\s+//g;
$cytobHash{$name}=$id."|".$phylocId;
print "Name : $name ", $cytobHash{$name}, "\n";
return \%cytobHash;
exit;
************ OUTPUT *************
Getting Cytoband
DBM
*****DBI:DBM:f_dir=.cpan
*****DBI:DBM:f_dir=.texmf
*****DBI:DBM:f_dir=acroread
*****DBI:DBM:f_dir=apache-ant-1.6.5
*****DBI:DBM:f_dir=apache-ant-1.7.0-bin
*****DBI:DBM:f_dir=AppName
*****DBI:DBM:f_dir=autorun
*****DBI:DBM:f_dir=caBIO
*****DBI:DBM:f_dir=cabioApp
*****DBI:DBM:f_dir=cygwin
*****DBI:DBM:f_dir=dell
*****DBI:DBM:f_dir=Documents and Settings
*****DBI:DBM:f_dir=Downloads
*****DBI:DBM:f_dir=drivers
*****DBI:DBM:f_dir=httpd-2.2.8
*****DBI:DBM:f_dir=i386
*****DBI:DBM:f_dir=indexes
*****DBI:DBM:f_dir=jboss-4.0.4.GA
*****DBI:DBM:f_dir=jboss-4.0.5.GA
*****DBI:DBM:f_dir=MSOCache
*****DBI:DBM:f_dir=MyApp
*****DBI:DBM:f_dir=NALCache
*****DBI:DBM:f_dir=NOVELL
*****DBI:DBM:f_dir=oracle
*****DBI:DBM:f_dir=Perl
*****DBI:DBM:f_dir=Perl-Critic-1.082
*****DBI:DBM:f_dir=Perl-Tidy-20071205
*****DBI:DBM:f_dir=Program Files
*****DBI:DBM:f_dir=RECYCLER
*****DBI:DBM:f_dir=ruby
*****DBI:DBM:f_dir=System Volume Information
*****DBI:DBM:f_dir=Tcl
*****DBI:DBM:f_dir=Temp
*****DBI:DBM:f_dir=WINDOWS
*****DBI:DBM:f_dir=.
ExampleP
*****dbi:ExampleP:dir=.
File
*****DBI:File:f_dir=.cpan
*****DBI:File:f_dir=.texmf
*****DBI:File:f_dir=acroread
*****DBI:File:f_dir=apache-ant-1.6.5
*****DBI:File:f_dir=apache-ant-1.7.0-bin
*****DBI:File:f_dir=AppName
*****DBI:File:f_dir=autorun
*****DBI:File:f_dir=caBIO
*****DBI:File:f_dir=cabioApp
*****DBI:File:f_dir=cygwin
*****DBI:File:f_dir=dell
*****DBI:File:f_dir=Documents and Settings
*****DBI:File:f_dir=Downloads
*****DBI:File:f_dir=drivers
*****DBI:File:f_dir=httpd-2.2.8
*****DBI:File:f_dir=i386
*****DBI:File:f_dir=indexes
*****DBI:File:f_dir=jboss-4.0.4.GA
*****DBI:File:f_dir=jboss-4.0.5.GA
*****DBI:File:f_dir=MSOCache
*****DBI:File:f_dir=MyApp
*****DBI:File:f_dir=NALCache
*****DBI:File:f_dir=NOVELL
*****DBI:File:f_dir=oracle
*****DBI:File:f_dir=Perl
*****DBI:File:f_dir=Perl-Critic-1.082
*****DBI:File:f_dir=Perl-Tidy-20071205
*****DBI:File:f_dir=Program Files
*****DBI:File:f_dir=RECYCLER
*****DBI:File:f_dir=ruby
*****DBI:File:f_dir=System Volume Information
*****DBI:File:f_dir=Tcl
*****DBI:File:f_dir=Temp
*****DBI:File:f_dir=WINDOWS
*****DBI:File:f_dir=.
Gofer
Oracle
*****dbi:Oracle:BIODEV
*****dbi:Oracle:CADEV
*****dbi:Oracle:CBDEV
*****dbi:Oracle:CBTEST
*****dbi:Oracle:CGPROD
*****dbi:Oracle:EXTPROC_CONNECTION_DATA
*****dbi:Oracle:LPGDEV
*****dbi:Oracle:LPGPROD
*****dbi:Oracle:LPG_DEV
*****dbi:Oracle:LPG_PROD
Proxy
Sponge
DBI connect('CBDEV','dunston',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at tmp.pl line 25
Error ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at tmp.pl line 25.

Similar Messages

  • Can the WLPI be used for a perl web site

    We have a client, which has a perl(Apache/mod_perl) based web site. Cutomers submit orders on the web site and right now there is an order-processing system, but the client is looking for workflow/process product which will ease with all this order processing stuff like acknowledgement, approval, shipping, etc....So my question here is, can they use the WeBLogic Process Integrator for this purpose? The reason I am asking this is, looking at the WLPI docs, it looks like a Java/WebLogic only product and cannot be used for a perl web site.Thanks,Shireesh Thanneru

    Yes.
    However I would not recommend it, at least as your primary connection for the SmartTV.  Relying primarily on VZW data plans is a bad way to view video services such as Netflix at the moment.  It is very easy to chew through your plan with only a few videos depending on the resolution and a few other factors.  Not only that but a smart TV may be periodically checking the internet from time to time to download firmware updates or provide reporting stats to the manufacturer. 
    VZW Jetpacks continue to be a poor choice for home primary internet replacement.  The data plans that come from VZW and all other metered wireless providers are not friendly to this kind of internet traffic.  Letting your guard down for a moment could result in costly overages and once you accumulate them you will be liable to pay them.  A normal cable or DSL line with a high/unlimited cap would be more appropriate.
    If the Jetpack is a backup or temporary internet connection then go for it.  This is what a Jetpack is designed for, you can get by every now and then without too much risk.  Just make sure you are powering your Jetpack down as soon as you are done streaming and keep a close eye on your data plan before and after any major viewing. 

  • Sed and perl not replacing a letter in a file

    I have a file 1.htm. I want to replace a letter ṣ (s with dot below). I tried with both sed and perl and it does not replace.
    sed -i 's/ṣ/s/g' "1.htm"
    perl -i -pe 's/ṣ/s/g' "1.htm"
    can anyone suggest what to do
    1.html

    Perl also has that operator, but it usually goes by its alias tr (for transliteration). y is provided if you want to use that instead, but I don't think it will help; keep reading to find out why.
    \x{0323} is a special Perl-specific syntax for Unicode character U+0323 (COMBINING DOT BELOW). Since 323 is its Unicode code point, not a byte value, that won't tell you what encoding you're using. (In UTF-8, that character becomes the 2-byte sequence cca3, which is what you'll see if you examine the file with a dumb viewer like xxd.) Fortunately, since it comes through correctly, you know Perl is properly set up and isn't trying to use some weird encoding to read your file, or interpreting it as just bytes. This makes your job in principle much easier.
    However, you'll notice that Perl doesn't recognize ṣ as a single character. That's because the way your file is encoded, it isn't one character: it's an s followed by the Unicode character U+0323. This is a valid way to represent the glyph ṣ using Unicode, but it doesn't treat that glyph as a single character (in, for instance, tr/foo/bar/). Since tr can only do one-to-one character transliteration, you can't use it to transform ṣ (2 characters) into s (one character) while doing other similar transformations in one pass.
    One thing you might do is to simply strip out all the U+0323 characters:
    s/\x{0323}//g
    # or as I would write it,
    s/\N{COMBINING DOT BELOW}//g
    which would leave you with just the ASCII remaining for those glyphs that use it. This works for ṛ, ṣ, and ṇ (for instance), but it will not work on ā, and you can't use a similar tactic there because ā in your file is not made by combining the ASCII 'a' with U+0305 COMBINING OVERLINE, but is in fact a single Unicode character, U+0101 (LATIN SMALL LETTER A WITH MACRON).
    To make a long story even longer, there is a Unicode character for ṣ (U+1E63 LATIN SMALL LETTER S WITH DOT BELOW), which does not appear in your 1.htm file, but is the character you will get if you copy and paste from this forum (at least, it works that way for me). So if you typed or pasted "s/ṣ/s/g" into your perl or sed command, whether or not it would have the desired effect depends on which form of the ṣ glyph your input method gives you.
    If this is a one-off, quick script, I'd write something like the following: (incomplete!)
    #!/usr/bin/perl -p -i.bak
    tr/ā/a/; # here add all multibyte characters that you want to transliterate
    s/
    \N{COMBINING DOT BELOW} | # this should take care of ḌḍḤḥḶḷṆṇṚṛṢṣṬṭ
    \N{COMBINING CANDRABINDU} # this should take care of l̐
    # add other combining characters that you want to get rid of here
    //gx;
    I added ā to the tr/// as an example; if you don't actually want to replace ā in the file, you'll want to remove that part. Without seeing the other files or knowing how they were created (different encoders produce the same glyphs in different ways), I couldn't say with certainty which of the glyphs you want to replace are represented by a single Unicode code point and which ones are represented by a letter + a combining diacritic or other mark, so you'll have to examine your files (or the encoder that generated them) to see which ones you have to deal with in which way.
    You can use this tool to look up a UTF-8 byte sequence like "cc a3" to get its Unicode code point and name. Again, you'll have to examine the file with something like xxd to see the bare bytes, since any editor will probably present them as characters.
    You may also wish to investigate the Text::Unidecode module on CPAN; I can't say for sure whether it will do what you want, but maybe it's close enough.

  • Rename files in Terminal using mv and sed

    I want to rename multiple files (in one directory) using mv and sed in Terminal (Mac OS 10.6.8).
    I want to change each and every file name from IMG_nnnn.jpg to HVAC_nnnn.jpg, where nnnn is the camera's sequence number. I want to preserve the sequence number and the jpg extension while changing only the file name prefix (the part before the underscore).
    Here's what I tried:
    macatony-2:HVAC ctossc$ ls -d *.jpg | sed -e 's/.*/mv -f & &/' -e 's/IMG/HVAC/' | sh
    This is the result:
    mv: rename HVAC_0205.jpg to IMG_0205.jpg: No such file or directory
    I wanted "rename IMG_0205.jpg to HVAC_0205.jpg".  The arguments to mv seem to be reversed, so the mv command can't "rename" (or delete) the HVAC* file before it is created.
    Any suggestions?

    I still wonder however, why my original code reversed the order of the mv arguments. Knowing that would make my earlier failed attempts a learning experience.
    1st) nbar's 'for' loop is the best in my opinion
    Why your script got things backwards.  lets break it down
    ls -d *.jpg | sed -e 's/.*/mv -f & &/'
    generates:
    mv -f IMG_1.jpg IMG_1.jpg
    mv -f IMG_2.jpg IMG_2.jpg
    mv -f IMG_3.jpg IMG_3.jpg
    mv -f IMG_4.jpg IMG_4.jpg
    mv -f IMG_5.jpg IMG_5.jpg
    mv -f IMG_6.jpg IMG_6.jpg
    mv -f IMG_7.jpg IMG_7.jpg
    mv -f IMG_8.jpg IMG_8.jpg
    mv -f IMG_9.jpg IMG_9.jpg
    ls -d *.jpg | sed -e 's/.*/mv -f & &/' -e 's/IMG/HVAC/'
    generates:
    mv -f HVAC_1.jpg IMG_1.jpg
    mv -f HVAC_2.jpg IMG_2.jpg
    mv -f HVAC_3.jpg IMG_3.jpg
    mv -f HVAC_4.jpg IMG_4.jpg
    mv -f HVAC_5.jpg IMG_5.jpg
    mv -f HVAC_6.jpg IMG_6.jpg
    mv -f HVAC_7.jpg IMG_7.jpg
    mv -f HVAC_8.jpg IMG_8.jpg
    mv -f HVAC_9.jpg IMG_9.jpg
    because when the -e 's/IMG/HVAC/' executed, it changed the 1st occurance of IMG, which was the IMG following the -f
    I personally do not use 'sed' anymore except for some really trivial stuff.  If I need to general messing with a list or the contents of a file I use 'awk' or 'perl', both of which are a bit easier to work with and for me to read afterwards.  But if you really wanted to fix the 'sed' you could have used:
    ls -d *.jpg | sed -e 's/IMG\(.*\)/mv -f & HVAC\1/' | sh
    HOWEVER, I would not really use either 'awk' nor 'perl' for this task.  I would use something similar to what 'nbar' gave you (although I might have over complicated mine some more where as 'nbar' kept it simple and easy to read
    Message was edited by: BobHarris

  • OpenSSL and Perl

    I've been working on Xyne's feature requests for Pacgraph.  He thought it would be cool if there were some way to quickly explore the dependencies of stuff and how packages fit together.
    Here's an interesting relationship:  OpenSSL and Perl.  If you chase OpenSSL's deps all the way down to glibc, you'll find it needs 135Mb.  The single biggest dep is Perl, at 38Mb.  I would hope Perl is important to its function.
    Searching the net found a Gentoo bug report about this.  It was closed as CantFix because "the stupid build system uses perl".  As a binary distro, it sounds like Perl should be a makedep.  (Assuming the build system is unchanged.  The bug report was from 5 years ago.)
    Searching "pacman -Ql openssl" reveals exactly one Perl script:  /etc/ssl/misc/CA.pl and it's associated manpage.  Also present is a shell script (/etc/ssl/misc/CA.sh) which does the same thing (but does not have a manpage).
    Is there any reason to have a Perl dependency for just this one duplicated script?  Am I missing something?  I know tweaks to OpenSSL  should not be taken lightly, we would not want to end up like Debian.

    They removed a portion of the PRNG to make it debugger friendly.  This broke the keygen for Debian/Ubuntu/friends.  Here is a more detailed summary of the Debian mess: http://www.links.org/?p=328
    From CA.pl's manpage:
    The CA.pl script is a perl script that supplies the relevant command line arguments to the openssl command for some common certificate operations.  It is intended to simplify the process of certificate creation and management by the use of some simple options.
    Personally, I've never used it for creating certs.  I've never seen it referenced in any SSL tutorial or guide.  Beyond the man page, it is mentioned once on OpenSSL's site.
    http://rt.openssl.org/Ticket/Display.ht … pass=guest
    The dev's say the Perl script is only there for systems lacking Bash, mainly just Windows.  Do we need this dependency just for Window's sake?
    Last edited by keenerd (2009-06-01 01:36:06)

  • Standard library not found--cygwin and -mno-cygwin

    Hi,
    I have been working to get a program to compile on windows using cygwin. When I added the -mno-cygwin flag to the compile line things were moving smoothly until it hit a class that #included <list>. At this point it throws several errors about things not being declared. I have seen this same question posted on several forums (including this one) but none of them have an answer. I'm not sure if it's becuase this problem is so simple that I should know the answer, or if no one that knows has seen the question.
    Below is a portion of the errors. I appreciate any help that may be offered.
    In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:67,
    from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/list:67,
    from ../../src/QTree.h:3,
    from ../../src/QTreeRepository.h:6,
    from PSODA.cpp:2:
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:181: error: `::strtold' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:200: error: `__gnu_cxx::strtold' has not been declared
    In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/postypes.h:46,
    from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iosfwd:50,
    from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:70,
    from /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/list:67,
    from ../../src/QTree.h:3,
    from ../../src/QTreeRepository.h:6,
    from PSODA.cpp:2:
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:146: error: `::fgetwc' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:147: error: `::fgetws' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:148: error: `::fputwc' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:149: error: `::fputws' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:150: error: `::fwide' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:151: error: `::fwprintf' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:152: error: `::fwscanf' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:153: error: `::getwc' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:154: error: `::getwchar' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:159: error: `::putwc' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:160: error: `::putwchar' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:161: error: `::swprintf' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:162: error: `::swscanf' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:163: error: `::ungetwc' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:164: error: `::vfwprintf' has not been declared
    /usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:166: error: `::vfwscanf' has not been declared
    Message was edited by:
    mebbert
    Message was edited by:
    mebbert

    Thanks for the suggestion Jim. I finally found the answer last night. As I suspected it was fairly simple, but I had a difficult time finding the solution.
    The answer is here: http://www.mingw.org/mingwfaq.shtml#faq-usingwithcygwin
    Basically, if you're using the wrong g++ or gcc, it includes a bunch of stuff that doesn't work. I don't understand why it had the problems it had since all of the problems were from the stl's own include files but you need to change the path so that the MinGW stuff is before the Cygwin stuff. You might also find that afterwards you will have problems with "make." It looks like make 3.8.1 has some issues with ".deps" folders or something. If you do experience a problem that says "multiple targets" or something like that, you can either download make 3.8.0 or use the mingw-make in MinGW/bin.
    Anyway, thanks again Jim for the help. I hope this posting will help others. There is no direct answer on the web for this. I searched long and hard.

  • R12 on Window Server 2003 with Cygwin and Visual Studio

    Hi,
    We have passed the pre-install checks but RapidWiz fails at 13% completion.
    We checked back on the pre-requisites and found that make and bash files we downloaded from site are of higher version than stated in metalink Note 414992.
    We are unable to get the supported lower version. Can anybody help?
    The files we are looking are make and bash from bin directory of cygwin. The versons supported are :
    Make : versions 3.79.1-7 and 3.80-1
    Bash : versions 3.0-11, 3.1-9, 3.2.9-11, and 3.2.25-16
    Amrish Gaur
    [email protected]

    Hi Amrish ,
    See also: Note 395361.1 - Could not relink at windows using Cygwin ERROR: *** target pattern contains no `%'
    The note is for 11.5.10.2 but can also be used to replace the make version at R12.
    But I don't think your issue has something to do with the make version as wrong version of make will only give issues during the relink.
    KAR

  • OCS9 problems using Cygwin

    Are anybody using Cygwin for working with the X-Window programs of OCS on your PC?
    I have some problems that I don't know if is related to OCS, Linux or Cygwin. When I try to start the X-based Oracle programs oidadmin or owm (wallet manager) on our OCS 9 servers with my PC as display I get the splashscreen (and login screen for oidamin) but then I only get an empty window with no info (just the gray bacground). Oidamin says "loading Schema" and then the empty window comes up.
    I can start other simple X programs like xlogo or xcalc, and they work.
    I can start the Oracle X programs on a new OCS 10 test server with my PC as display and they work.
    The OCS 9 is running on RedHat AS 2.1 and OCS 10 is RedHat ES4.
    Are there any resources that the Oracle programs use that might not be on the old Linux-servers? Are some of you using these programs successfully on a similar installation? Any other ideas?

    I trust oidadmin and owm did work before?
    Whenever I work on windows, I use cygwin as x-window manager for forwarded x-windows. What I did was the following:
    1. installed cygwin (in my case in c:\program files\cygin)
    2. made sure I had x-org-11 and x-startup-scripts installed
    3. edited the path for the x-startup script (because cygwin is in a non-default location I had to)
    4. enabled the remote server to connect to my local x-server by issueing xhost+<IP_OF_SERVER>
    5. connecting from a cygwin x-term by issueing: ssh -Y -l username -z 9 <IP_OF_SERVER>
    6. Check the DISPLAY variable on the remote server (export DISPLAY=<WORKSTATION_IP>:0.0 )
    Now it should work. If windows stay grey, please check lag on your network connection (I had some problems with lag from a solaris machine and OWM). Next check the output you see in the ssh session that has opened (sometime the java messages shown give usefull hints). Also check if the x-libs are installed (You do not need a complete x-server, just the libs. Installing a complete x-server on a production machine is IMHO a waste of resources). Finally check the version of java on your server (see documentation for the proper versions).
    I hope this helps.

  • Spool in Maxl and Perl

    I am trying to use spool in perl/maxl and I am getting a compilation errorthe command I am using is $sts = $dbh->do("spool on to 'load.log'")and the error i am getting is6 - (1) Syntax error near ['spool']50 - MaxL compilation failedHas any body experienced this beforethanks

    In my opinion the fact that the portal uses primarily JAVA, lends itself to quite a bit of expandability. I think it will be quite difficult for a portal written in PHP (Such as PHP Nuke) to share user session and state information accross multiple machines/instances. The iPlanet portal server has been designed to accomodate this, through the use of specialised session services. The threading model in Java also lends itself to greater efficiency when executing multiple tasks, whereas a portal based on PERL, would have to start a new process everytime a service is requested, which can then become VERY resource intensive.
    In terms of expandability, the fact that it is contaned inside a JAVA VM will allow you to develop and deploy alot of custom developed applications for your portal. There is also quite a good portal API for the iPlanet portal server that will allow you to tap into the Logging,Session,Profile and Authentication services provided by the portal.
    Hope this helps!

  • Sql sever 2012 setup crashes when invoked using cygwin

    I'm using CSC agility platform which is hybrid cloud platform, which uses cygwin to run scripts on the VM's it creates.
    I have a windows server 2012 standard, in which I have to install SQL server 2012 express, the setup will get invoked using cygwin.
    When I execute SQL server setup using "cmd" i.e command prompt, it runs fine. But when I use cygwin, the installation crashes. If install any other software using cygwin, it works fine, the installation doesn't crash. It only happens with SQL server,
    but the installation goes fine when done using "cmd".
    Even if I open "cmd" through cygwin, the problem occurs.
    The installer is not corrupt, i have re-downloaded SQL server setup and tried, it still crashes.
    Description:
    Stopped working
    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: scenarioengine.exe
    Problem Signature 02: 11.0.2100.60
    Problem Signature 03: 4f35dbe7
    Problem Signature 04: Microsoft.SqlServer.Chainer.Infrastructure
    Problem Signature 05: 11.0.0.0
    Problem Signature 06: 4f35dbe6
    Problem Signature 07: 200
    Problem Signature 08: 179
    Problem Signature 09: ZAGSF01GRLFWVJMY5S0U0HXSJJE2HDT4
    OS Version: 6.2.9200.2.0.0.272.7
    Locale ID: 1033
    This is the stacktrace of the exception SQL server installer has produced:
    Unhandled Exception: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException: Item has already been added. Key in dictionary: 'tmp' Key being added: 'tmp' ---> S
    ystem.ArgumentException: Item has already been added. Key in dictionary: 'tmp' Key being added: 'tmp'
    at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
    at System.Collections.Specialized.StringDictionary.Add(String key, String value)
    at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputN
    ame, String& errorName, String trueCmdLine)
    at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& e
    rrorName, String trueCmdLine)
    at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeRetu
    rnValue, String trueArgs)
    at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
    at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
    at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
    at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
    at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters par
    ameters, Assembly assembly, Hashtable assemblies)
    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
    at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
    at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
    --- End of inner exception stack trace ---
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
    at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SetCommonFlag(String key, Boolean value)
    at Microsoft.SqlServer.Chainer.Setup.Setup.InitializeLogProviders(ServiceContainer context)
    at Microsoft.SqlServer.Chainer.Setup.Setup.Run()
    at Microsoft.SqlServer.Chainer.Setup.Setup.Start()
    at Microsoft.SqlServer.Chainer.Setup.Setup.Main()

    Hi bmanojkumar24,
    From your description, you install SQL Server 2012 Express successfully via the command prompt, and SQL Server setup only fails when you use Cygwin. I suspect that there are some
    issues existing in Cygwin, I would recommend you report the problem to Cygwin support according to this
    article.
    In addition, we recommend you use the following ways to install SQL Server.
    • Install SQL Server 2012 from the Installation Wizard
    • Install SQL Server 2012 from the Command Prompt as your post
    • Install SQL Server 2012 using a Configuration File
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Using JNI for Perl

    Hi all,
    I am new to the native methods (JNI) thing. The examples I am finding are mostly for C/C++ although they say native calls work with every language. I have the following questions:
    - Are there any tutorials, sample codes that call modules written in Perl?
    - Can I easily avoid touching the Perl code, since it is an already existing API, and I just want to wrap it with Java.
    - Is it very slow? And is it a big learning curve (i.e. native calls) if I already know java and use it regularly? Note that I do not know Perl, and I want to avoid changing any of its code.
    Thanks,

    Not quite sure what you are asking.
    There is only one external interface in Java. That involves C method calls in a shared library.
    - Are there any tutorials, sample codes that call modules written in Perl?Well there are certainly many written in perl. Not that that has anything to do with Java. You can call Perl in C/C++. The documentation is sparse (although better than it use to be.) For information on that you need to try other lists/forums.
    - Can I easily avoid touching the Perl code, since it is an already existing API, and I just want to wrap it with Java.Yes and no. Since Java doesn't talk to perl you don't have to modify anything in perl. And if you had a C interface you wouldn't have to modify the perl either.
    - Is it very slow? And is it a big learning curve (i.e. native calls) if I already know java and use it regularly?Do you use C regularly? If not then it is going to take you a while.
    Slow is relative. Both languages are interpreted so the start up costs are rather heavy.
    Are you sure you can't just call a perl application, using java Runtime.exec()?
    There was a JPerl initiative which would have done everything (Java to Perl and Perl to Java.) Last time I looked it really wasn't going anywhere.

  • R12 install for Windows using cygwin

    I am installing R12 over Windows 2003. I am using Cygwin as pre-requisites.
    But I am facing several difficulties. The rapidwiz is checking the existence for Visual Studio and Mks.
    I do not know the values to be set at rapidwiz for MKS and Visual Studio

    I do not know the values to be set at rapidwiz for MKS and Visual Studios_MSDEVdir=C:\VCPlus\VC --> This is the directory where you have installed MS Visual C++ 8.0
    s_MKSdir=C:\cygwin\bin --> Assuming you have installed 'Cygwin' in 'C:\cygwin'
    You may also refer to the following thread:
    Oracle E-Business Suite R12 Installation on Windows 2003
    Oracle E-Business Suite R12 Installation on Windows 2003

  • Difference between Java and Perl?

    I'm new to Java and was wondering what is the difference between Java and Perl. Other than Java has to be compiled and Perl does not. Is one better than the other? Here is a link to my website. The languaged used is Perl. Can Java be used to write a program like this.
    http://www.i2r2.co.nr

    Perl - interpreted
    Java - compiled (essentially -- there is no eval statement)
    Perl - lots functionality built into the bare language
    Java - more functionality moved into libraries
    (both have huge libraries available though -- and Java's core language seems to get bigger with each new release)
    Perl - loosely typed
    Java - strongly typed
    IMHO:
    Perl - Baroque ornate language good for quick scripts
    Java - Calvinist spartan language good for huge projects
    I can't think of anything else to say that can't be expressed in one-liners.

  • Java, Cygwin, and Windows.... oh my.

    So the problem can be summarized as follows. I have a call out to the operating system from Java to obtain the value of “vmstat” which returns a value from every “x” seconds based on the refresh rate. To do This I use a command similar to this
    Runtime rt = Runtime.getRuntime();
    String[] comm = new String[] {"vmstat","1"};
    Process proc = rt.exec(comm);
    I can then loop around capturing the output and parsing it. Simple.... This approach works on Linux, Mac OS, HP-UX, AIX and Solaris however it fails under Windows. It sits there and simply waits. Now this appears to be a common problem based on the number of postings on it. This article(http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html) suggests a number of approaches to solve the problem. I’ve tried them all and the good news is that they appear to work for a single atomic call that returns all of its output then exits. However commands such as “vmstat/iostat/sar” etc. return output periodically based on their refresh rates and don’t seem to work at all.
    There are plenty of hits in google but no one really seems to suggest a solution. Now Im sure this worked in the past and Im almost certain that I haven’t changed the code.
    I’ve tried calling
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    Which returns the first line of the directory and then exits.
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    simply hangs.... whilst
    java myexec cmd /c dir
    Works fine.... So my believe its the combination of java and cygwin and the way io is redirected. If anyone has a chance to look at it.... I’ll be very grateful. Code for simple testcase below.
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread {
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type) {
    this.is = is;
    this.type = type;
    public void run() {
    try {
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while (true) {
    if (is.available() == 0) {
    try {
    Thread.sleep(10);
    } catch (InterruptedException ie) {
    continue;
    line = br.readLine();
    if (line == null) {
    System.out.println("Error");
    } else {
    System.out.println(line);
    } catch (IOException ioe) {
    ioe.printStackTrace();
    public class myexec {
    public static void main(String[] args) {
    try {
    String osName = System.getProperty("os.name");
    System.out.println(osName);
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(args);
    // any error message?
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t) {
    t.printStackTrace();
    Edited by: dgiles on Apr 3, 2009 6:27 AM

    Apologies for the code tags.... now included below
    +"I’ve tried calling+
    +java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"+
    +Which returns the first line of the directory and then exits.+
    +java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"+
    +simply hangs"+
    should read
    "I’ve tried calling
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    Which returns the first line of the directory and then exits.
    *java myexec cmd /c "c:\\cygwin\\bin\\vmstat.exe*"
    simply hangs"
    I agree with the comments about the quality of the example.... it was a quick and dirty hack. It dosen't take away from the issue that it works on every combination except windows and cygwin....
    Any other thoughts?
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread {
      InputStream is;
      String type;
      StreamGobbler(InputStream is, String type) {
        this.is = is;
        this.type = type;
      public void run() {
        try {
          InputStreamReader isr = new InputStreamReader(is);
          BufferedReader br = new BufferedReader(isr);
          String line = null;
          while (true) {
            if (is.available() == 0) {
              try {
                Thread.sleep(10);
              } catch (InterruptedException ie) {
              continue;
            line = br.readLine();
            if (line == null) {
              System.out.println("Error");
            } else {
              System.out.println(line);
        } catch (IOException ioe) {
          ioe.printStackTrace();
    public class myexec {
      public static void main(String[] args) {
        try {
          String osName = System.getProperty("os.name");
          System.out.println(osName);
          Runtime rt = Runtime.getRuntime();
          Process proc = rt.exec(args);
          // any error message?
          StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
          // any output?
          StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
          // kick them off
          errorGobbler.start();
          outputGobbler.start();
          // any error???
          int exitVal = proc.waitFor();
          System.out.println("ExitValue: " + exitVal);
        } catch (Throwable t) {
          t.printStackTrace();
    }

  • How to execute Java programs using Cygwin?

    Ok, so I've installed Cygwin and Netbeans programs. I wrote my program on Netbeans, then tried to use the command javac with Cygwin to compile the main .java file. What next? How do I run the actual program in the Cygwin window?
    Thanks!

    jverd wrote:
    sharkura wrote:
    I thought there was a "native cygwin" version of java available that would, e.g., accept paths like /mnt/c, handle the colon classpath separator, etc. I could be mistaken though. I know there are versions like that for other tools, like perforce and subversion.I'm not sure about a native cygwin port of java, but I use the reference compiler every day, and it handles / just fine (because the bash shell correctly translates it). Are you talking about the file separator? Because that would work fine anyway. Or are you talking about /mnt/c instead of C:? If the latter, I don't recall about Java specifically, but I know I have had problems in both directions in cygwin. For instance, tar can't handle C:, but some existing Windows tools can't handle /mnt/c.
    Ahh, I misunderstood what you were saying. I was talking about a path separator (\ in windows, / in cygwin). The default mount points for drives is, for the version we are using, /cygdrive/c, and that is handled just fine.
    However, it does not handle a colon as a classpath separator if you specify the classpath in the java command. This typically means that the classpath, it written out of the command line, must be "" wrapped (if more than one classpath element exists ... this prevents the bash shell from attempting to split the command at the ;) and must use ; as the path element separator.
    I suppose you could specify the classpath like so, path/element/dir1\;path/element/dir2\;path/element/jar1.jar, without "".Doesn't really matter to me as I use ant to start all my non-trivial programs.As do I. I still write test drivers, and sometimes use nonstandard (wrt our project) classpaths.
    {?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for