Comment #1 on issue 782 by [email protected]: Guice 4.0b: CreationException hidden by Guava $ComputationException
http://code.google.com/p/google-guice/issues/detail?id=782

I think my error arises of a specific combination of my environment:

- I do use Java 8 EAP
- I do use Guice AOP

The issue is caused by Guice trying to give a hint about the source:

    /*if[AOP]*/
    LineNumbers lineNumbers = lineNumbersCache.get(declaringClass);

This calls com.google.inject.internal.asm.$ClassReader(byte[] bytes, int i, int i1) which throws an InvalidArgumentException:

  at com.google.inject.internal.asm.$ClassReader.<init>(Unknown Source:-1)
          at com.google.inject.internal.asm.$ClassReader.<init>(Unknown 
Source:-1)
          at com.google.inject.internal.asm.$ClassReader.<init>(Unknown 
Source:-1)
at com.google.inject.internal.util.LineNumbers.<init>(LineNumbers.java:65) at com.google.inject.internal.util.StackTraceElements$1.apply(StackTraceElements.java:39) at com.google.inject.internal.util.StackTraceElements$1.apply(StackTraceElements.java:36) at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355) at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184) at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153) at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69) at com.google.inject.internal.guava.collect.$ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393) at com.google.inject.internal.util.StackTraceElements.forMember(StackTraceElements.java:56) at com.google.inject.internal.Errors.formatInjectionPoint(Errors.java:729)
          at com.google.inject.internal.Errors.formatSource(Errors.java:691)
          at com.google.inject.internal.Errors.format(Errors.java:568)
at com.google.inject.CreationException.getMessage(CreationException.java:50)
          at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
          at java.lang.Throwable.toString(Throwable.java:480)

which subsequently causes the $ComputationException completely hiding the original issue.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to