First off, boot-time
java.lang.NullPointerExceptions that occur during classloading (see my previous
post), while appearing very very ugly, don't seem to have any impact whatsoever
on anything. They _can_ be eliminated from weblogic altogether by creating
exceptions for the following class packages:
javax/management/
weblogic/xml/
weblogic/utils/
weblogic/apache/xerces/
weblogic/j2ee/
weblogic/application/
weblogic/management/
Of course, if you need to weave with any of those packages,
that's another story. Since my own application didn't require it, I have
no idea what the weaving consequences of the boot-time
java.lang.NullPointerExceptions would be.
Secondly, ClassNotFoundExceptions, despite being ugly in
appearance, are even Uglier in impact. In my case the problem was that I
was including my Aspects in the same jar package with
my ClassPreProcessorAdapter. Since they were "jarred" together, both
the aspects (superfluous to the bootclasspath solution) and the preprocessor
(necessary to the bootclasspath) got thrown into the same bootclasspath
context. Without going into too much more detail, this appeared to cause
my Aspect classes to always be referenced in the same context as
that "meta" bootclasspath, even after boot. Any other classes or
packages which were being included by the Aspect classes, but not
included in the bootclasspath were coming back ClassNotFound. Separating
the two proved the solution.
Thirdly, and along those lines, including extraneous or
superfluous packages in the bootclasspath, for good reasons real or imagined,
WILL cause problems. Don't try it. Put only the absolutely necessary
stuff -- the classpreprocessor, aspectwerkz, aspectj. Nothing
more.
Fourthly, it is absolutely positively necessary that the
Hook.Plug command (shown in the URL as part of an ANT script) be executed
against the EXACT same Sun JDK tools.jar file that will be used at
runtime. It is not possible, apparantly, to hook.plug with an older JDK
version and pray for forward compatibility. It may work with one version
of the JDK, and crash the entire JVM on another. Don't try
it.
Hoping the lessons of my own bruises benefit
others,
- Bo Zimmerman