I'm on a Mac. I did this:
1. export JONAS_ROOT=/Users/rsh/Projects/tmp/jonas-full-5.2.0-M3/
2. export
JONAS_OPTS="-javaagent:/Users/rsh/Downloads/myaspectjweaver.jar"
3. ./bin/jonas start -clean -tui -debug -p 4142
4. goto http://localhost:9000/jonasAdmin and login
I don't see any exception. This is the console output snippet after the
server starts up and when I login to the admin console:
2010-12-06 12:31:47,218 : J2EEServer.__info : JOnAS AS v5.2.0-M3 named
'jonas' RUNNING
2010-12-06 12:33:07,324 : WebappLoader.start : Dual registration of jndi
stream handler: factory already defined
log4j:WARN No appenders could be found for logger
(org.granite.config.GraniteConfigListener).
log4j:WARN Please initialize the log4j system properly.
2010-12-06 12:33:11,493 : BaseWebContainerService.registerWar : War
jonas-admin-5.2.0-M3.war available at the context /jonasAdmin.
When I login the admin console app comes up fine.
So, I must be missing a step.
-> richard
On 12/6/10 11:24, Guillaume Sauthier wrote:
Yeah, the Exception is not thrown by the Felix framework, this is
normal because the searched class is not in the webapp.
I was expecting the framework to actually find something.
The problem is not the Exception, it's more why the framework didn't
find the libs of the agent.
To reproduce (I'm using JDK6):
1. Download JOnAS 5.2M3
(http://wiki.jonas.ow2.org/xwiki/bin/view/Main/Downloads)
2. Unzip
3. export JONAS_ROOT=<path-where-you-unziped-jonas>
4. export
JONAS_OPTS="-javaagent:<path-where-you-placed>/myaspectjweaver.jar"
(this jar is attached to the JOnAS Bug)
5. jonas start -clean -tui (Add "-debug -p 4142" if you want to launch
in debug mode)
6. Goto http://localhost:9000/jonasAdmin (the application server start
the webcontainer + the webapp)
7. Try to login (jonas/jonas)
8. You should see a stack trace (in both the webapp and the console)
Hope this helps
--Guillaume
Le 06/12/2010 17:09, Richard S. Hall a écrit :
The exception isn't being thrown by the Felix framework, so I'd have
to assume if it is involved, it must be the parent of the
WebappClassLoader?
The information is not enough for me to reproduce the issue. If you
want to give me detailed steps to reproduce, I can take a look.
-> richard
On 12/6/10 10:36, Guillaume Sauthier wrote:
Hi all
One of the JOnAS users has an issue with bootdelegation and an
AspectJ Java agent.
All the details are here: http://jira.ow2.org/browse/JONAS-293
In short, we start JOnAS with
-javaagent:<path-to>/weaver-and-aspects.jar
We also changed the bootdelegation package list to include
"org.aspectj.*" and the aspect class packages ("jlp.*").
So I expect the classes from the agent to be available from any
bundle on the system.
And when the aspectized class is instanciated, we have this error:
http://jonas.pastebin.com/ni8rcpvx (ClassNotFoundException:
org.aspectj.runtime.reflect.Factory)
I tried the 3 different policies for bootdelegation
(org.osgi.frameword.bundle.parent=app/boot/ext) and there is no
changes with any of them.
Any ideas ?
--G
PS: It works with JOnAS 5.1.5, that means with a Felix 1.8.1.
JOnAS 5.2 M4-SNAPSHOT using Felix 3.0.4