Announcement Announcement Module
Collapse
No announcement yet.
jetty-maven-plugin and loadTimeWeaver Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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

    Code:
    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
    -javaagent:/Users/blabla/.m2/repository/org/springframework/spring-instrument/3.1.3.RELEASE/spring-instrument-3.1.3.RELEASE.jar
    - 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.

    Comment


    • #3
      mmm.
      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

      Comment


      • #4
        For reference, mfirry has posted this question at StackOverflow: http://stackoverflow.com/q/13799393/923560 . I'd be happy if anyone could post a solution.

        Comment

        Working...
        X