Announcement Announcement Module
Collapse
No announcement yet.
The current version of Spring Social Showcase build fails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The current version of Spring Social Showcase build fails

    The following line breaks the build
    Code:
    @EnableLinkedIn(appId="${linkedin.consumerKey}", appSecret="${linkedin.consumerSecret}")
    due to the undefined @EnableLinkedIn

  • #2
    Thanks for letting me know. The @EnabledLinkedIn element was added in a snapshot build of Spring Social LinkedIn and I thought I had confirmed it working. But I'll take a look and see what I can find. I'll let you know.

    Comment


    • #3
      Followup: I just confirmed that I can build Spring Social Showcase with no problems. The @EnableLinkedIn element is in spring-social-linkedin-1.0.0.BUILD-SNAPSHOT and that's the version that the showcase build depends on. So, I'm not sure why it doesn't work for you, unless your snapshot build of Spring Social LinkedIn is out of date. Or, perhaps, your showcase version is out of date. I can't say for sure.

      Comment


      • #4
        Thanks for your reply, Craig. I don't make any changes and after running "mvn -e install", I get the following message:
        Code:
        + Error stacktraces are turned on.
        [INFO] Scanning for projects...
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Spring Social Showcase
        [INFO]    task-segment: [install]
        [INFO] ------------------------------------------------------------------------
        [INFO] [resources:resources {execution: default-resources}]
        [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
        [INFO] Copying 36 resources
        [INFO] [compiler:compile {execution: default-compile}]
        [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
        [INFO] Compiling 1 source file to c:\Users\smith\myProjects\spring-social-samples\spring-social-showcase\target\classes
        [INFO] -------------------------------------------------------------
        [ERROR] COMPILATION ERROR :
        [INFO] -------------------------------------------------------------
        [ERROR] \Users\smith\myProjects\spring-social-samples\spring-social-showcase\src\main\java\org\springframework\social\showcase\config\SocialConfig.java:[35,60] package org.springframework.soc
        ial.linkedin.config.annotation does not exist
        [ERROR] \Users\smith\myProjects\spring-social-samples\spring-social-showcase\src\main\java\org\springframework\social\showcase\config\SocialConfig.java:[55,1] cannot find symbol
        symbol: class EnableLinkedIn
        @EnableLinkedIn(appId="${linkedin.consumerKey}", appSecret="${linkedin.consumerSecret}")
        [INFO] 2 errors
        [INFO] -------------------------------------------------------------
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Compilation failure
        
        \Users\smith\myProjects\spring-social-samples\spring-social-showcase\src\main\java\org\springframework\social\showcase\config\SocialConfig.java:[35,60] package org.springframework.social.link
        edin.config.annotation does not exist
        \Users\smith\myProjects\spring-social-samples\spring-social-showcase\src\main\java\org\springframework\social\showcase\config\SocialConfig.java:[55,1] cannot find symbol
        symbol: class EnableLinkedIn
        @EnableLinkedIn(appId="${linkedin.consumerKey}", appSecret="${linkedin.consumerSecret}")
        
        [INFO] ------------------------------------------------------------------------
        [INFO] Trace
        org.apache.maven.BuildFailureException: Compilation failure
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
                at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
                at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
                at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
                ... 17 more
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 3 seconds
        [INFO] Finished at: Sat Oct 20 11:43:47 PDT 2012
        [INFO] Final Memory: 18M/43M
        [INFO] ------------------------------------------------------------------------
        I don't know whether it is caused by file retrieval with git or not if there isn't any problem in the project.

        Comment


        • #5
          Well, I'm puzzled as to why it wouldn't work. Could you dig into a few things for me?

          - Confirm that the pom.xml file references version 1.0.0.BUILD-SNAPSHOT of the Spring Social LinkedIn dependency.
          - Go to your Maven repo folder (mine is at ~/.m2/repository; so I cd ~/.m2/repository/org/springframework/social/spring-social-linkedin/1.0.0.BUILD-SNAPSHOT/). Then check the date/time on the spring-social-linkedin-1.0.0.BUILD-SNAPSHOT.jar file to ensure that it's relatively current and then dig into it (I use "unzip -l spring-social-linkedin-1.0.0.BUILD-SNAPSHOT.jar") and ensure that the file contains and EnableLinkedIn class.
          - Extreme measures: Delete the .m2/repository/org/springframework/social/spring-social-linkedin folder and try to build again.

          Comment


          • #6
            I've got the same problem today, the `spring-social-linkedin-1.0.0.BUILD-SNAPSHOT.jar` simply doesn't contain any config package!
            And the download came fresh from `http://repo.springsource.org/snapshot/`:
            [INFO] snapshot org.springframework.social:spring-social-linkedin:1.0.0.BUILD-SNAPSHOT: checking for updates from org.springframework.maven.snapshot
            Downloading: http://repo.springsource.org/snapsho...081557-453.pom
            1K downloaded (spring-social-linkedin-1.0.0.BUILD-20120412.081557-453.pom)
            Downloading: http://repo.springsource.org/snapsho...081557-453.jar
            240K downloaded (spring-social-linkedin-1.0.0.BUILD-20120412.081557-453.jar)
            `jar tvf spring-social-linkedin-1.0.0.BUILD-SNAPSHOT.jar | grep config` yields nothing and 'mvn compile' in spring-social-showcase gives me:
            ...
            INFO] Compilation failure
            /Users/robin/dev/3rd-party/spring-social-samples/spring-social-showcase/src/main/java/org/springframework/social/showcase/config/SocialConfig.java:[35,60] error: package org.springframework.social.linkedin.config.annotat ion does not exist
            /Users/robin/dev/3rd-party/spring-social-samples/spring-social-showcase/src/main/java/org/springframework/social/showcase/config/SocialConfig.java:[55,1] error: cannot find symbol
            Maybe your version of spring-social-linkedin-1.0.0.BUILD-SNAPSHOT is from a local build you made yourself using the latest sources? (that's one of the reasons using snapshots isn't recommended, you can't reproduce a build reliably)

            BTW: is there a policy regarding the creation of new issues in githup's issue tracker vs. using jira.springsource.org?

            Comment


            • #7
              You're right. Although the config stuff *is* in the latest code in GitHub, the latest stuff in the snapshot repo goes back to April. Odd.

              Actually, upon further review, it looks like the build *has* pushed the latest stuff (as recently as early this morning), but the maven-metadata.xml file hasn't been updated since April and so it keeps giving you the old stuff.

              I've seen this happen before and I'll need to contact someone to help me resolve it. Given that tomorrow is a holiday here in the U.S. (and Friday a pseudo-holiday that goes with it), I may not be able to resolve this until next week. But I'll let you know when it looks like it has been fixed.

              Comment


              • #8
                Give it another shot. The maven-metadata.xml file is now pointing at the actual latest snapshot (as mentioned before, it was somehow stuck at a build from April).

                Try it again and let me know. If it still doesn't work, try removing the spring-social-linkedin folder from your local Maven repo and then try again.

                Comment


                • #9
                  Thanks Craig, all the sample are compiling fine now!

                  Another thing is deploying them, at least spring-social-showcase and spring-social-showcase-xml are not deployable in Tomcat 7. There's a TilesIOException but I think this is just a consequence of a flawed configuration, for example, both web.xml seem to have errors.

                  But I could figure out everything I wanted to know from looking at the code so, for me I'm currently more interested in getting a new official release, especially to have a social-linkedin release which compiles with Spring 3.0. (the latest, 1.0.0.RC1, doesn't)
                  Please let me know if I could do something to help, I need linkedin-integration for a commercial project I'm working on right now and hence I could offer some modest manpower here.

                  Could you please tell me if I should create a JIRA issues or use Githup's issue tracker if I think I've found a bug in spring-social or one of its sub-modules?

                  Thanks again and Happy Thanksgiving! :-)

                  Robin.

                  Comment


                  • #10
                    Oooh my bad!
                    Please ignore my comments about spring-social-showcase and spring-social-showcase-xml not being deployable! It was my fault clearly. I've tried to exchange the EL implementation of Tomcat 7 yesterday and forgot about that fact so Tomcat's jasper-el.jar was missing today. And since I'm not familiar with Spring's Java-based configuration I blamed the config in web.xml.
                    My apology! Everything works fine now and in addition, the showcase shows exactly what I want to achieve: combining existing local accounts with linkedin accounts so both, local login and oauth login, are possible. In addition it seems to show the integration with spring-security which was a point I didn't really get from the documentation yet.
                    So, many thanks!

                    Comment

                    Working...
                    X