[jboss-as7-dev] AS 7 stacktraces

David M. Lloyd david.lloyd at redhat.com
Mon Apr 18 08:33:28 EDT 2011


On 04/18/2011 05:07 AM, Max Rydahl Andersen wrote:
> Just realized that AS 7 spits out extra context in the error log about java stacktraces (its not in the error pages shown to users):
>
> Every stacktrace line has things like [jbossweb-7.0.0.Beta8.jar:7.0.0.Beta2]
>
> My question is how I go from that information to the *actual* jar.
>
> Doing a
> find . -name jbossweb-7.0.0.Beta8*
>
> gives me /modules/org/jboss/as/web/main/jbossweb-7.0.0.Beta8.jar
>
> but I assume there could actually be multiple jars with that name in separate modules.

There is no particular algorithm; what the logging system is doing is a 
variety of hacks with codeSource and other things.

> What I'm looking for is a way from tooling to be sure I'm going to show the *right* jar's sourcecode and not just
> one random one of many possible ones ;)

It may be possible to write a module-aware handler for these stack traces.

> ...btw. i'm still really interested in understanding how we can provide a classpath based on AS 7 modules to users
> so they don't have to also get Maven and other things to work before they can start building/deploying to AS 7.

> My assumption is that if there is an algorithm to figure out the above, I can use that to also provide a full classpath
> eventually ;)

Sure just remember that with modules, you don't get a flat classpath, 
you get a graph of class loaders.

-- 
- DML



More information about the jboss-as7-dev mailing list