Looks like the move to Felix 3.0.6 will not be harmless :)
Anyway, thank you for your complete description, that will help.
I suspect that all theses XML classes may be required by the aspects
themselves, usually JOnAS do not require so much ugly adaptations to
start :)
We'll definitely move forward to Felix 3.0.6 and Gogo in the newt few weeks.
Thanks again
--G
Le 08/12/2010 18:20, Richard S. Hall a écrit :
Guillaume,
Ok, that reproduced the issue.
I updated your felix-launcher.jar to use Felix framework 3.0.6 since
we've made changes to implicit boot delegation, so it makes more sense
to work from 3.0.6 as a starting point.
I started getting errors for jlp.* classes. I added the jlp.* class to
boot delegation, but this wasn't sufficient because for R4.2 the
default class loader used for boot delegation has changed from the
framework class loader (which was framework implementation specific)
to the boot class loader. So, I also had the add
"org.osgi.framework.bundle.parent app" to your gateway.properties to
configure the framework to use the application class loader for boot
delegation (I just guessed that this would be the correct class loader).
That got me past the jlp.* errors, but then I got errors because the
org.apache.xerces.jaxp.SAXParserFactoryImpl provider could not be
found. As a guess, I added this to the boot delegation property too,
which got the server starting.
However, this still didn't solve the original issue, so I also added
org.aspectj.* to the boot delegation property. This led me to another
error, where the org.apache.xpath.jaxp.XPathFactoryImpl provider could
not be found, so I added that to the boot delegation property too.
This got the admin console loading, but when I logged in I got an
error because the org.apache.xalan.processor.TransformerFactoryImpl
could not be found, so I added that to the boot delegation property.
Now everything appears to be working, since I was able to access the
admin console and login. I'm not sure if you intended to get all of
this stuff working via boot delegation or not. If not maybe this at
least gives you enough hints about where to go next.
I'd definitely recommend moving to Felix framework 3.0.6 and to Gogo! :-)
-> richard
-> richard
On 12/8/10 8:34, Guillaume Sauthier wrote:
Sorry for the delay Richard
Can you try with export JAVA_OPTS=... instead of exporting JONAS_OPTS
(my latest try was with JAVA_OPTS and there was the failure) ?
Make sure that the -javaagent parameter was really used (ps aux |
grep weaver)
It's possible that you may need some more PermGenSpace to run theses
aspects:
export JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=256m"
Thanks
--G
Le 06/12/2010 18:36, Richard S. Hall a écrit :
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