sun.reflect.annotation.TypeNotPresentExceptionProxy error when deploy web-ear

后端 未结 7 547
说谎
说谎 2020-12-17 07:20

When I try to deploy ejd-ear, web-ear on to glassfish server. I added an ejb client dependency in web project. The ejb-ear deploys successfully. But when I try to deploy web

7条回答
  •  遥遥无期
    2020-12-17 08:21

    TypeNotPresentExceptionProxy error is not specific to a particular dependency and depends on each project's classpath. So verify your maven dependencies tree. For example, I fell into this error one time when I had two dependencies of JUnit so there were two versions of JUnit annotations in the classpath.

    You can put a breakpoint in some of the methods of class "java.lang.Class":

    For example:

    java.lang.Class.getAnnotation 
    java.lang.Class.getAnnotations 
    

    After that, you will be able to discover which class cause the problem... search inside the class for annotations and check your classpath for ambiguities.

提交回复
热议问题