Announcement Announcement Module
Collapse
No announcement yet.
Can not compile the last version of greenhouse Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can not compile the last version of greenhouse

    Just downloaded sources from https://github.com/SpringSource/greenhouse.git and can not compile.

    1. @EnableTransactionManagement(mode=AdviceMode.ASPEC TJ)
    Why EnableTransactionManagement takes org.springframework.context.annotation.AdviceMode but used org.springframework.context.config.AdviceMode

    2. Missing dependence for org.springframework.context.config.AdviceMode in pom.xml

    Error while compilation:

    D:\project\greenhouse>mvn install
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building greenhouse
    [INFO] task-segment: [install]
    [INFO] ------------------------------------------------------------------------
    [INFO] [properties:write-active-profile-properties {execution: default}]
    [INFO] [resources:resources {execution: default-resources}]
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
    i.e. build is platform dependent!
    [INFO] Copying 212 resources
    [INFO] [compiler:compile {execution: default-compile}]
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
    uild is platform dependent!
    [INFO] Compiling 189 source files to D:\project\greenhouse\target\classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\TaskConfig.java:[22,41] cannot find symbol
    symbol : class AdviceMode
    location: package org.springframework.context.config
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\DataConfig.java:[25,41] cannot find symbol
    symbol : class AdviceMode
    location: package org.springframework.context.config
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\TaskConfig.java:[36,18] cannot find symbol
    symbol: variable AdviceMode
    @EnableAsync(mode=AdviceMode.ASPECTJ)
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\TaskConfig.java:[36,28] an enum annotation value must be an enum constant
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\DataConfig.java:[52,34] cannot find symbol
    symbol: variable AdviceMode
    @EnableTransactionManagement(mode=AdviceMode.ASPEC TJ)
    [ERROR] \project\greenhouse\src\main\java\com\springsource \greenhouse\config\DataConfig.java:[52,44] an enum annotation value must be an enum constant
    [INFO] 6 errors
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Compilation failure

  • #2
    I ran into the same problem this week. One of the recent snapshot builds of Spring-Context 3.1.0 (i think it was 10/10) refactored the AdviceMode class into the org.springframework.context.annotations package....

    Comment


    • #3
      fixed by changing import org.springframework.context.config.AdviceMode to import org.springframework.context.annotation.AdviceMode;

      Comment


      • #4
        But still version is not stable and does not work
        Always get different errors like:
        HTTP ERROR 500

        Problem accessing /greenhouse/settings. Reason:

        argument type mismatch
        HandlerMethod details:
        Controller [com.springsource.greenhouse.settings.SettingsContr oller]
        Method [public void com.springsource.greenhouse.settings.SettingsContr oller.settingsPage(com.springsource.greenhouse.acc ount.Account,org.springframework.ui.Model)]
        Resolved arguments:
        [0] [type=org.springframework.security.authentication.U sernamePasswordAuthenticationToken] [value=org.springframework.security.authentication. UsernamePasswordAuthenticationToken@fe6e24af: Principal: com.springsource.greenhouse.account.Account@190f19 7; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.We bAuthenticationDetails@12afc: RemoteIpAddress: 127.0.0.1; SessionId: 5jm5lo20ysao14uks3btnlpbu; Not granted any authorities]
        [1] [type=org.springframework.validation.support.Bindin gAwareModelMap] [value={}]
        Caused by:

        java.lang.IllegalArgumentException: argument type mismatch
        HandlerMethod details:
        Controller [com.springsource.greenhouse.settings.SettingsContr oller]
        Method [public void com.springsource.greenhouse.settings.SettingsContr oller.settingsPage(com.springsource.greenhouse.acc ount.Account,org.springframework.ui.Model)]
        Resolved arguments:
        [0] [type=org.springframework.security.authentication.U sernamePasswordAuthenticationToken] [value=org.springframework.security.authentication. UsernamePasswordAuthenticationToken@fe6e24af: Principal: com.springsource.greenhouse.account.Account@190f19 7; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.We bAuthenticationDetails@12afc: RemoteIpAddress: 127.0.0.1; SessionId: 5jm5lo20ysao14uks3btnlpbu; Not granted any authorities]
        [1] [type=org.springframework.validation.support.Bindin gAwareModelMap] [value={}]

        at org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:216 )

        Comment


        • #5
          Good catch. Several recent changes in Spring Framework leading up to the 3.1.0.RC1 release broke Greenhouse. The first was the class rename, which you caught. The second was a bug related to how Controller method arguments are resolved. I've reported the issue and have worked around that bug for now. It's fairly minor and should be fixed in the upcoming RC2.

          Pull down the latest and let me know if you run into any more issues. The prod instance at greenhouse.springsource.org is now running the latest and seems to be doing OK so far.

          Keith

          Comment

          Working...
          X