Results 1 to 4 of 4

Thread: jetty-maven-plugin and loadTimeWeaver

  1. #1
    Join Date
    Oct 2009
    Location
    Milano
    Posts
    49

    Default 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+2=5

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,626

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Oct 2009
    Location
    Milano
    Posts
    49

    Default

    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
    2+2=5

  4. #4

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •