Please use the google group to ask questions - thanks.

by vannevar 16 Dec 07:22
Ebean agent does not seem to work

I'd like enhancement instead of subclassing, so I try to run my project with -javaagent: enabled, and I get this exception right at the program start:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0

The reason is the following:

Transformer.premain(String, Instrumentation)
gets called and this calls
Transformer t = new Transformer("", agentArgs);
and then Transformer.parseClassPaths() gets called with "" argument, and this eventually leads to calling
with "" as its argument. But then, at classpath.charAt(0) the exception above is thrown.

In fact, I can't even imagine this code working for anyone at any time, so I'm quite surprised at its presence. :)

I didn't know if I may create a bug report for this, as it's so surprising, I suppose I don't see something trivial.

16 Dec 07:27
by vannevar

I forgot to ask:
If it's a bug indeed, is there a quick workaround for it (avoiding the call of premain() somehow)?

16 Dec 09:17
by Rob

Yes it is a bug.

Apologies as I am always using the Eclipse Enhancer plugin these days and unfortunately didn't test the last javaagent.

It is fixed in HEAD, so you could use that if you are building from source.

Alternatively you could use the ANT task or the Eclipse Enhancer plugin (from

I will be trying to put out the next version shortly.

Cheers, Rob.

17 Dec 16:54
by vannevar

Thanks for the quick reply, it works great now! :)
And sorry for not noticing the bug report before.
(Anyway, I don't use Eclipse but JDeveloper, so the Eclipse Enhancer did not seem to be a usable workaround for me.)

20 Dec 09:45
by Rob

No problem :)

Create a New Topic

Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements