Announcement Announcement Module
No announcement yet.
jetty-maven-plugin and loadTimeWeaver Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • jetty-maven-plugin and loadTimeWeaver

    i can't seem to have my spring webapp working with jetty-maven pluging

    i always get

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.eclipse.jetty.webapp.WebAppClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
    though i have:
    - set MAVEN_OPTS to
    - set JAVA_OPTIONS to the same thing
    - added dep to <artifactId>spring-instrument</artifactId> and org.springframework.aspects

  • #2
    There seem to be a lot of problems running Jetty and trying to get it to run with any javaagent. The plugin seems to make this hard .

    Apparently there are some who have various degrees of success by not including the spring-instrument jar in their application (only a provided dependency). It also appears that the newer versions of the plugin have a run-forked mode which allows for customizing the vm parameters, you could try that.


    • #3
      i thought i could use jetty to have a quick way for our front-end developers have the webapp up and running locally.
      we're using eclipselink in production and so i had to use persistence.xml and inject the entitymanagerfactory and so on.

      i wonder if i could do that some other way


      • #4
        For reference, mfirry has posted this question at StackOverflow: . I'd be happy if anyone could post a solution.