Posted by
Steve Racanovic
|
Posted in
JDBC
,
OC4J
|
Posted on
4:04 PM
If you have followed doc 420303.1 to upgrade your JDBC driver and found this driver has issues where you need to apply a patch for it. You may want to follow this example to apply the one off patch.
[oracle@beast JDBC_UPGRADE]$ pwd
/home/u01/app/oracle/product/1013AS_blue/j2ee/JDBC_UPGRADE
[oracle@beast JDBC_UPGRADE]$ ll
total 104
drwxr-xr-x 2 oracle oinstall 4096 Feb 21 11:25 applib
drwxr-x--- 9 oracle oinstall 4096 Feb 21 11:26 application-deployments
drwxr-xr-x 2 oracle oinstall 4096 Feb 21 11:25 applications
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 11:31 config
drwxr-xr-x 4 oracle oinstall 4096 Feb 21 11:25 connectors
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 11:26 log
-rw-r--r-- 1 oracle oinstall 26445 Feb 21 2012 p13403295_10205_Generic.zip
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 11:26 persistence
drwxr-x--- 3 oracle oinstall 4096 Feb 21 11:31 shared-lib
drwxr-x--- 3 oracle oinstall 4096 Feb 21 11:26 tldcache
[oracle@beast JDBC_UPGRADE]$ unzip -d patches p13403295_10205_Generic.zip > /dev/null
[oracle@beast JDBC_UPGRADE]$ ll
total 112
drwxr-xr-x 2 oracle oinstall 4096 Feb 21 11:25 applib
drwxr-x--- 9 oracle oinstall 4096 Feb 21 11:26 application-deployments
drwxr-xr-x 2 oracle oinstall 4096 Feb 21 11:25 applications
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 12:07 config
drwxr-xr-x 4 oracle oinstall 4096 Feb 21 11:25 connectors
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 11:26 log
-rw-r--r-- 1 oracle oinstall 26445 Feb 21 2012 p13403295_10205_Generic.zip
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 12:12 patches
drwxr-xr-x 3 oracle oinstall 4096 Feb 21 11:26 persistence
drwxr-x--- 3 oracle oinstall 4096 Feb 21 11:31 shared-lib
drwxr-x--- 3 oracle oinstall 4096 Feb 21 11:26 tldcache
[oracle@beast JDBC_UPGRADE]$
[oracle@beast JDBC_UPGRADE]$ cd shared-lib/oracle.jdbc/10.2.0.5.0/
[oracle@beast 10.2.0.5.0]$ ll
total 1544
-rw-r----- 1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
[oracle@beast 10.2.0.5.0]$ cp ojdbc14.jar ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ ll
total 3088
-rw-r----- 1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
-rw-r----- 1 oracle oinstall 1569316 Feb 21 11:35 ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ jar uvf ojdbc14.p13403295.jar ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/*
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/(in = 0) (out= 0)(stored 0%)
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/(in = 0) (out= 0)(stored 0%)
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/ns/(in = 0) (out= 0)(stored 0%)
adding:
../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/ns/NetException.class(in
= 4557) (out= 1969)(deflated 56%)
[oracle@beast 10.2.0.5.0]$ ll
total 3088
-rw-r----- 1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
-rw-r--r-- 1 oracle oinstall 1572093 Feb 21 11:39 ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ cd ../../../config
[oracle@beast config]$ cp server.xml server.xml.old.1
[oracle@beast config]$ opmnctl stopproc process-type=JDBC_UPGRADE
opmnctl: stopping opmn managed processes...
[oracle@beast config]$ grep -l ojdbc14.jar server.xml | xargs sed -i 's/ojdbc14.jar/ojdbc14.p13403295.jar/g'
[oracle@beast config]$ opmnctl startproc process-type=JDBC_UPGRADE
opmnctl: starting opmn managed processes...
[oracle@beast config]$ cd ..
[oracle@beast JDBC_UPGRADE]$ rm p13403295_10205_Generic.zip
[oracle@beast JDBC_UPGRADE]$
Note:
1. The jar command will update the driver jar with the patches. If your using another driver i.e. ojdbc5.jar, then ensure you grab the classes from the ojdbc5.jar directory i.e. ../../../patches/13403295/files/jdbc/lib/ojdbc5.jar/*
2. In server.xml we simply make the following change:
[oracle@beast config]$ diff server.xml server.xml.old.1
125c125
< <code-source path="ojdbc14.p13403295.jar"/>
---
> <code-source path="ojdbc14.jar"/>
[oracle@beast config]$
Once the oc4j instance has started up again, it will use the patched jar - ojdbc14.p13403295.jar. We can simply switch back to original if needed.
Posted by
Steve Racanovic
|
Posted in
Solaris
|
Posted on
2:20 PM
I needed to build sudo today and when I started building it, I received this fatal error:
-bash-3.00# echo $PATH
/usr/sbin:/usr/bin:/sbin:/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin
-bash-3.00# make
for d in compat common plugins/sudoers src include doc plugins/sample plugins/sample_group; \
do (cd $d && exec make all) && continue; \
exit $?; \
done
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/compat'
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/common'
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/plugins/sudoers'
/bin/bash ../../libtool --mode=link gcc -o visudo visudo.o goodpath.o find_path.o error.o libparsesudoers.la ../../common/libcommon.la ../../compat/libreplace.la -lsocket -lnsl
libtool: link: gcc -o visudo visudo.o goodpath.o find_path.o error.o ./.libs/libparsesudoers.a ../../common/.libs/libcommon.a ../../compat/.libs/libreplace.a -lsocket -lnsl
Undefined first referenced
symbol in file
libintl_textdomain visudo.o
libintl_bindtextdomain visudo.o
libintl_dgettext visudo.o
ld: fatal: Symbol referencing errors. No output written to visudo
collect2: ld returned 1 exit status
make[1]: *** [visudo] Error 1
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/plugins/sudoers'
make: *** [all] Error 2
-bash-3.00# pwd
/export/home/oracle/sudo-1.8.4
After changing the path as follows, it worked:
-bash-3.00# export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/include:/usr/sfw/bin:/usr/local/sbin:/usr/local/bin
-bash-3.00# make
for d in compat common plugins/sudoers src include doc plugins/sample plugins/sample_group; \
do (cd $d && exec make all) && continue; \
exit $?; \
done
-bash-3.00# make install
for d in compat common plugins/sudoers src include doc; \
do (cd $d && exec make pre-install) && continue; \
exit $?; \
done
for d in compat common plugins/sudoers src include doc; \
do (cd $d && exec make install) && continue; \
exit $?; \
done
/bin/bash ../../mkinstalldirs /usr/local/libexec \
/usr/local/sbin /usr/local/bin \
/etc /usr/local/share/doc/sudo \
`echo /var/lib/sudo|sed 's,/[^/]*$,,'`
/bin/bash ../../install-sh -c -d -O 0 -G 0 -m 0700 /var/lib/sudo
if [ X".so" != X"" ]; then \
/bin/bash ../../install-sh -c -b~ -O 0 -G 0 -m 0755 .libs/sudoers.so /usr/local/libexec; \
fi
/bin/bash ../../install-sh -c -b~ -O 0 -G 0 -M 0111 sudoreplay /usr/local/bin/sudoreplay
/bin/bash ../../install-sh -c -b~ -O 0 -G 0 -M 0111 visudo /usr/local/sbin/visudo
/bin/bash ../../install-sh -c -d -O 0 -G 0 -m 0750 \
/etc/sudoers.d
test -r /etc/sudoers || \
/bin/bash ../../install-sh -c -O 0 -G 0 -m 0440 \
sudoers /etc/sudoers
#/bin/bash ../../install-sh -c -O 0 -G 0 -m 0555 ./sudoers2ldif /usr/local/share/doc/sudo
/bin/bash ../mkinstalldirs /usr/local/bin \
/usr/local/libexec
/bin/bash ../install-sh -c -b~ -O 0 -G 0 -M 04111 sudo /usr/local/bin/sudo
rm -f /usr/local/bin/sudoedit
ln /usr/local/bin/sudo /usr/local/bin/sudoedit
if [ -f sesh ]; then /bin/bash ../install-sh -c -b~ -O 0 -G 0 -M 0111 sesh /usr/local/libexec/sesh; fi
if [ -f .libs/libsudo_noexec.so ]; then /bin/bash ../install-sh -c -b~ -O 0 -G 0 -m 0755 .libs/libsudo_noexec.so /usr/local/libexec/sudo_noexec.so; fi
/bin/bash ../mkinstalldirs /usr/local/include
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo_plugin.h /usr/local/include
/bin/bash ../mkinstalldirs /usr/local/share/doc/sudo \
/usr/local/man/man1m /usr/local/man/man4
mkdir /usr/local/man
mkdir /usr/local/man/man1m
mkdir /usr/local/man/man4
for f in ../ChangeLog ../README ../NEWS ./HISTORY ./CONTRIBUTORS ./LICENSE ./TROUBLESHOOTING ./UPGRADE ./sample.*; do /bin/bash ../install-sh -c -O 0 -G 0 -m 0444 $f /usr/local/share/doc/sudo; done
#for f in ../README.LDAP ./schema.*; do /bin/bash ../install-sh -c -O 0 -G 0 -m 0444 $f /usr/local/share/doc/sudo; done
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo.man /usr/local/man/man1m/sudo.1m
ln /usr/local/man/man1m/sudo.1m /usr/local/man/man1m/sudoedit.1m
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo_plugin.man /usr/local/man/man1m/sudo_plugin.1m
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoreplay.man /usr/local/man/man1m/sudoreplay.1m
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./visudo.man /usr/local/man/man1m/visudo.1m
/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoers.man /usr/local/man/man4/sudoers.4
#/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoers.ldap.man /usr/local/man/man4/sudoers.ldap.4
-bash-3.00# which sudo
/usr/local/bin/sudo
-bash-3.00# which visudo
/usr/local/sbin/visudo
-bash-3.00#