On Apr 9, 2008, at 3:44 PM, Charles Bacon wrote:
3)  Remove the errant typemappings (time consuming)

Wow. Past me already fixed the "time consuming" part of this problem in comment 8 in bug 3774:

cd $GLOBUS_LOCATION/lib

# Create the list of all classes contained in $GL jar files.
# unzip -l outputs filenames in columns 29-
# Classes are listed as org/globus/.../foo.class
# In the typemappings, though, the / are replaced by .
for f in *.jar; do
   unzip -l $f | cut -c29- | grep class | tr / . >> ../jarlist
done

cd ..

# Type mappings in client-config.wsdd start with <typeMapping
# They have a number of quote-delimited fields.  The classname appears
# in the 10th field, and are listed as java:org.globus..., so strip off the
java:
# There's one java.lang.String entry that comes from native java classes, not
our
# jar files, so exclude it.
grep typeMapping client-config.wsdd | cut -d\" -f10 | cut -d: -f2 | grep -v
java.lang.String > typemappinglist

# Iterate over the classes listed in the typemappings and search for them
# in the list of classes we own.  Output offending classes.
while read typemap; do
   grep $typemap jarlist > /dev/null;
   if [ $? -ne 0 ]; then
     echo $typemap >> missingtypes
   fi
done < typemappinglist

#make a backup
cp client-config.wsdd client-config.wsdd.orig
cp client-config.wsdd client-config.temp

#remove all lines that reference uninstalled classes
while read badmap; do
   grep -v $badmap client-config.temp > client2
   mv client2 client-config.temp
done < badmap;

mv client-config.temp client-config.wsdd

Reply via email to