views:

1316

answers:

4

I am trying to track down the Weblogic 10.3 JAR that contains weblogic.rmi.RemoteException in order to solve a build path issue.

Thanks in advance.

A: 

It's in server/lib/weblogic.jar on my version 10.0.

duffymo
That's where I expected it to be but it doesn't appear to be there in 10.3
lucasweb
That's surprising....I don't have 10.3 installed locally, so I can't check. Funny that it's changed between 10.0 and 10.3. When you open the JAR, do you sort by class name? It's easy to miss if you sort by package.
duffymo
I've tried sorting by both. The only class I have under weblogic.rmi is ForceCallByReference
lucasweb
Have just checked a 10.0 weblogic.jar and it is there, it seems to have been moved in 10.3 and I can not find it anywhere.
lucasweb
+1  A: 

I don't have WebLogic installed here, but I keep a shell/cygwin script around to find classes in jars:

#! /bin/sh

target=$1
for jf in `find . -name '*.jar' -type f -print`; do
  jar tvf $jf | awk "/\/$target\.class/ { print \"$jf: \" \$NF }"
done

Just call the script something like jarfind.sh and put it in your path somewhere. Then jarfind.sh RemoteException in your weblogic tree.

CoverosGene
+1  A: 

I finally found it in $BEA-HOME/modules/com.bea.core.weblogic.rmi.client_1.4.0.0.jar

It seems in 10.3 or (10g as Orcale are branding it) they have moved a lot of what was in $BEA-HOME/wlserver_10.x/server/lib/weblogic.jar into a seperate modules directory in the root of the bea install.

I also had to include $BEA-HOME/modules/com.bea.core.weblogic.workmanager_1.4.0.0.jar on my build path to use com.bea.core.weblogic.rmi.client_1.4.0.0.jar

The script above is useful, a slightly simpler version which will recurse through sub-directories searching each jar file it encounters for a specified class is

find -name "*.jar" -exec grep "" {} \;

e.g. find -name "*.jar" -exec grep "weblogic/rmi/RemoteException.class" {} \;

I found the tip courtesy of

http://snipplr.com/view/12702/find-in-which-jar-a-class-is-defined/

lucasweb
+1 - Nice. Thank you for reporting back.
duffymo
A: 

The website jarhoo claims to have searchable indexes of all common JAR files - but I haven't used it in years and you now seem to require a logon:

The scripts given in the other answers will obviously give better results for your CLASSPATH :-)

devstopfix
I find findjar.com works really well and is free. Although it wasn't able to help me this time.
lucasweb