Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » suse oracle »

[suse-oracle] Fixed SQL Developer Extension Update Bug

Paul Foerster

2006-10-22


Hi all,

... I don't know if it has been announced somewhere but the latest
SQL Developer update (I think it was the Data Mining extension or
something) has a serious bug for Linux users. It's been a few days
since that update appeared and Oracle still was not clever enough to
post an update correcting this. So I will describe a temporary (or
permanent? ;-)) fix.

After the update which installs the extension, the next time you
start SQL Developer you will get an extensions log window with the
following contents (sorry, Apple Mail may have wrapped the lines ;-))):

Extensions - Log:
o /opt/sqldeveloper/jdev/extensions/
oracle.dmt.dm4j.extension.codegenerator.10.1.3.jar
+-! Warning(12,55): Classpath entry /opt/sqldeveloper/kdev/
extensions/..\..\odmr\jlib\odminer.jar not found.
+-! Warning(13,51): Classpath entry /opt/sqldeveloper/kdev/
extensions/..\..\odmr\jlib\xdb.jar not found.
+-! Warning(14,52): Classpath entry /opt/sqldeveloper/kdev/
extensions/..\..\odmr\jlib\jdm.jar not found.
+-! Warning(15,56): Classpath entry /opt/sqldeveloper/kdev/
extensions/..\..\odmr\jlib\ojdm_api.jar not found.
+-! Warning(16,57): Classpath entry /opt/sqldeveloper/kdev/
extensions/..\..\odmr\doc\odminer_codegen_help-jar not found.

What is the problem? Well the problem is that windoze has widespread
far too much and some people think it's a good idea to use
backslashes instead of slashes. You know, the good thing about
standards is that there are so many to choose from...

Anyway, this problem can quickly be addressed by a small shell
script. As the user who owns your SQL Developer installation
directory do the following:

- Quit SQL Developer if it is currently running
- Open a shell window
- cd /tmp
- vi patch.sh
- Copy/paste the file's contents from this mail into vi
- Adjust the $SQLDEV_BASE variable to your SQL Developer's installation
 directory.
- chmod 700 patch.sh
- ./patch.sh
- Launch SQL Developer
- If the messages have disappeared then execute the two "rm" commands
which
 have been output by the script

What the script does is to merely unpack the original .jar archive,
replace all backslashes in the meta-inf/extensions.xml file with
slashes, repack it, make a backup of the original file (original file
name plus ".orig" extension) and copy the new file to its
destination. After that, SQL Developer should work.

Here's the script file's contents:
== File: patch.sh
==================8<--------------------------------------
#!/bin/bash

SQLDEV_BASE=/opt/sqldeveloper
FILE_NAME=oracle.dmt.dm4j.extension.codegenerator.10.1.3.jar
TMPDIR=$(mktemp -d /tmp/sqldev.XXXXX)

cd $TMPDIR
mkdir contents
cd contents
unzip $SQLDEV_BASE/jdev/extensions/$FILE_NAME
sed <meta-inf/extension.xml >tempfile 's.\\./.g'
mv tempfile meta-inf/extension.xml
zip -r ../$FILE_NAME .

cd $SQLDEV_BASE/jdev/extensions/
mv $FILE_NAME $FILE_NAME.orig
cp $TMPDIR/$FILE_NAME .

echo
echo "Please test SQL Developer now!"
echo
echo "If SQL Developer works correctly execute these commands for
cleanup:"
echo
echo "rm -r $TMPDIR"
echo "rm $SQLDEV_BASE/jdev/extensions/$FILE_NAME.orig"
====================================8<----------------------------------
----

Windoze sucks! You may spread this info, all of it. >;) Hope this
helps. 8)
--
cul8er

Paul
paul.foerster@(protected)



--
To unsubscribe, email: suse-oracle-unsubscribe@(protected)
For additional commands, email: suse-oracle-help@(protected)
Please see http://www.suse.com/oracle/ before posting

©2008 dba.5341.com - Jax Systems, LLC, U.S.A.