12 Replies Latest reply on Feb 23, 2011 10:42 AM by kkas

    GateIn compile error

    kkas

      Hi. I am new to GateIn, even to Jboss.

      I am having a hard time to compile GateIn3.0.1 from source.

       

      My environment is:

        Centos 5.5 64bit

        Maven2.2.1

        OpenJDK-1.6.0

       

      What is wrong with my doing? I downloaded the source from "Downloads",

      and tried to compile it.

       

      Here are my errors...(Sorry some words are in Japanese because i am.

      but it should not be a big problem reading it)

       

      [INFO] ------------------------------------------------------------------------

      [INFO] Building GateIn Portal Component XML Parser

      [INFO]    task-segment: [install]

      [INFO] ------------------------------------------------------------------------

      [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]

      [INFO] [enforcer:enforce {execution: enforce-java-version}]

      [INFO] [enforcer:enforce {execution: enforce-maven-version}]

      [INFO] [resources:resources {execution: default-resources}]

      [INFO] Using 'UTF-8' encoding to copy filtered resources.

      [INFO] Copying 1 resource

      [INFO] [compiler:compile {execution: default-compile}]

      [INFO] Compiling 65 source files to /root/GateIn-3.1.0-GA/component/xml-parser/target/classes

      [INFO] ------------------------------------------------------------------------

      [ERROR] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Compilation failure

       

      /root/GateIn-3.1.0-GA/component/xml-parser/src/main/java/org/exoplatform/services/xml/parser/XMLParser.java:[48,48] invalid inferred types for E; 推定型引数 org.exoplatform.services.token.TokenParser.Factory<T> は型変数 org.exoplatform.services.token.TokenParser.Factory<org.exoplatform.services.xml.parser.XMLNode> の境界に適合しません。

       

      /root/GateIn-3.1.0-GA/component/xml-parser/src/main/java/org/exoplatform/services/chars/CharsDecoder.java:[70,39] 警告:sun.io.ByteToCharConverter is Sun proprietary API and may be removed in a future release

       

      /root/GateIn-3.1.0-GA/component/xml-parser/src/main/java/org/exoplatform/services/html/tidy/HTMLTidy.java:[53,31] invalid inferred types for E; 推定型引数 org.exoplatform.services.token.TokenParser.Factory<T> は型変数 org.exoplatform.services.token.TokenParser.Factory<org.exoplatform.services.html.parser.NodeImpl> の境界に適合しません。

       

      /root/GateIn-3.1.0-GA/component/xml-parser/src/main/java/org/exoplatform/services/html/parser/HTMLParser.java:[67,48] invalid inferred types for E; 推定型引数 org.exoplatform.services.token.TokenParser.Factory<T> は型変数 org.exoplatform.services.token.TokenParser.Factory<org.exoplatform.services.html.parser.NodeImpl> の境界に適合しません。

       

      [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:516)

              at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)

              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

              ... 17 more

      [INFO] ------------------

       

      Please help me.

      If i havent provided enough info, please let me know.

      Or, it will for sure help me alot what version of compiler and

      JDK you used to compile...

       

      Thanks in advance!

       

      Kenta

        • 1. GateIn compile error
          kkas

          I tried the same procedure on another environment, which is the same os, jdk, mvn version,

          and now it seems the problem didn't occur.

           

          I still don't know what causes the problem...

           

          by the way, here's another problem. I have to re-run "mvn install" everytime it encounters

          "[warning]". is there any way to ignore so that i don't have to keep an eye on the compiling

          process??

           

          please share your knowlege.

           

          ty,

          Kenta

          • 2. GateIn compile error
            mstruk

            You have really strange issues

             

            For no.1 you might have CLASSPATH env variable set.

             

            For no.2 - are you following the build instruction here: http://community.jboss.org/wiki/GateInbuildinstallrunandmore?

             

            [Warning] should not cause build to fail. It should only fail on [Error]. So I think you have an [Error] in there, that's causing it to fail.

            • 3. GateIn compile error
              kkas

              Thank you for the reply, Marco.

               

              For no.1 I will try again after I make sure CLASSPATH is set correctly.

              (I need a few days to try this because I don't have the environment with me now..)

               

              For no.2 I've read the instruction both the one you suggested and README.txt in "GateIn-3.1.0-GA" dir.

              http://community.jboss.org/wiki/GateInbuildinstallrunandmore saids use "mvn clean install", but the README.txt

              saids "mvn install"( use mvn clean when I run "mvn install" twice in a row).

               

              so I used "mvn install" most of the time, then I used "mvn clean install" when I encounter [error] at testing phase.

              (I'm confused actually...)

               

              All I did was

              • downloaded "GateIn-3.1.0-FINAL-src.tar.gz" archive from "Downloads" and tar zxvf to untar it.
              • cd GateIn-3.1.0-GA
              • mvn install
              • mvn install (again when mvn stopped compiling because of [warning]s)
              • mvn clean install (when I encountered error while testing)

               

              I will update when I retry no.1.

               

              Thank you,

              Kenta

              • 4. GateIn compile error
                mstruk

                Actually, forget I ever mentioned CLASSPATH. It can’t have any effect here.

                 

                There are a few important things that build instruction don’t contain, related to maven.

                 

                1) You may need to configure Maven to use the correct JBoss Repository.

                Follow the instruction here: http://community.jboss.org/wiki/MavenGettingStarted-Users

                 

                2) You may need to increase the default memory limits for maven.

                For starters you can set environment variable MAVEN_OPTS=-Xmx512m

                 

                i.e.

                MAVEN_OPTS=-Xmx512m mvn clean install

                 

                If this solves your problem, move setting MAVEN_OPTS into your /etc/profile.


                 

                For a faster build you may also want to skip running the tests by using -DskipTests

                • 5. Re: GateIn compile error
                  kkas

                  Hi, Marco.

                   

                  I did what you suggested but the problem's not been solved yet...

                   

                  The error log contains "deprecation" warnings, but I still don't know

                  how to avoid them...

                   

                  If I run the mvn command without "clean", the compiling process seems

                  to skip those warnings. Should I do this repeatedly instead of running "mvn clean install"

                  only once? are there some deprecated source code used in Gatein3.1.0-"FINAL" version??

                   

                  Here's what i exactly did:

                      * create "settings.xml" in .m2 in my homedir.

                      * put the snippet in "Configuring Maven to use the JBoss Repository" in my settings.xml

                      * put the snippet in "Using JBoss Maven Plugins" as well

                      * run "MAVEN_OPTS="-Xmx512m -Dhttps.proxyHost=<PROXY_HOST> -Dhttps.proxyPort=<PROXY_PORT>" mvn clean install"

                  (I set extra options for my proxy server for https protocol)

                   

                  and the errors i get is:

                  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                   

                  ・・・

                   

                  [INFO] ------------------------------------------------------------------------

                  [INFO] Building GateIn Portal Component JBoss IDM integration

                  [INFO]    task-segment: [clean, install]

                  [INFO] ------------------------------------------------------------------------

                  [INFO] [clean:clean {execution: default-clean}]

                  [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]

                  [INFO] [enforcer:enforce {execution: enforce-java-version}]

                  [INFO] [enforcer:enforce {execution: enforce-maven-version}]

                  [INFO] [resources:resources {execution: default-resources}]

                  [INFO] Using 'UTF-8' encoding to copy filtered resources.

                  [INFO] Copying 1 resource

                  [INFO] [compiler:compile {execution: default-compile}]

                  [INFO] Compiling 13 source files to /root/GateIn-3.1.0-GA/component/identity/target/classes

                  [INFO] ------------------------------------------------------------------------

                  [ERROR] BUILD FAILURE

                  [INFO] ------------------------------------------------------------------------

                  [INFO] Compilation failure

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[285,23] 警告:[deprecation] org.exoplatform.services.organization.UserHandler の findUsers(org.exoplatform.services.organization.Query) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[233,23] 警告:[deprecation] org.exoplatform.services.organization.UserHandler の getUserPageList(int) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[320,23] 警告:[deprecation] org.exoplatform.services.organization.UserHandler の findUsersByGroup(java.lang.String) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[113,15] 警告:[deprecation] org.exoplatform.services.organization.UserHandler の createUserInstance() は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[530,19] 警告:[deprecation] org.exoplatform.services.organization.User の setCreatedDate(java.util.Date) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[537,22] 警告:[deprecation] org.exoplatform.services.organization.User の setCreatedDate(java.util.Date) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[558,19] 警告:[deprecation] org.exoplatform.services.organization.User の setLastLoginTime(java.util.Date) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java:[565,22] 警告:[deprecation] org.exoplatform.services.organization.User の setLastLoginTime(java.util.Date) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java:[77,15] 警告:[deprecation] org.exoplatform.services.organization.GroupHandler の createGroup(org.exoplatform.services.organization.Group,boolean) は推奨さ れません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java:[74,15] 警告:[deprecation] org.exoplatform.services.organization.MembershipHandler の createMembership(org.exoplatform.services.organization.Membership,boolean) は推奨されません。

                   

                  /root/GateIn-3.1.0-GA/component/identity/src/main/java/org/exoplatform/services/organization/idm/MembershipDAOImpl.java:[69,27] 警告:[deprecation] org.exoplatform.services.organization.MembershipHandler の createMembershipInstance() は推奨されません。

                   

                  ・・・

                   

                  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                   

                  Thank you,

                  Kenta

                  • 6. Re: GateIn compile error
                    theute

                    Deprecation is not an error, Maven should show you an error somewhere in the list.

                    • 7. GateIn compile error
                      kkas

                      Hi, Thomas.

                       

                      I understand that i can just re-run "mvn install"(not clean) when I encounter [deprecation] since its not an error.

                      (if this is not true, please let me know. please...)

                       

                      I ran "mvn install" about 6 times to get "BUILD SUCCESSFUL" message. However, my worry is if the compile is

                      really successful or not because of lots of the warnings during compilation.

                       

                      To take my worry away, I will compare the results of running compiled version with ones from ready-to-use version by performing same operations.

                       

                      Thank you,

                      Kenta

                      • 8. GateIn compile error
                        theute

                        What I was saying it that it's not the warning that stops the compilation, among the warning you probably have an error.

                         

                        The only thing that I can think of that would force you to try several times until it completes would be a memory issue and/or network issue. Hard to tell since the latest log you sent us doesn't contain the actual error.

                        • 9. Re: GateIn compile error
                          kkas

                          Hi, Thomas.

                           

                          Thank you for the advice. Unfortunately, I couldn't find any build error (found only warnings).

                          And I did 'free' to see how much memory is used during compiling process, but I couldn't find

                          anything suspicious...

                           

                          Only thing I could make sure is that I only need to run "mvn clean install" once if I set everything right.

                          This helps me a lot to keep working on my issue.

                           

                          I will post all of my logs, which logged output from start till the compiler stops, and the result of

                          'free' command.

                           

                          Thank you,

                          Kenta

                          • 10. Re: GateIn compile error
                            kkas

                            I've been trying to solve this but it is not yet...

                             

                            Could someone correct the following steps which I need with "GateIn-3.1.0-FINAL-src.tar.gz"?

                            (I am totally confused. Maybe it is because I am new to JBoss community and maven.)

                             

                            My environment is:

                              Centos 5.5 64bit

                              Maven2.2.1

                              OpenJDK-1.6.0

                             

                            First of all, the things needed to use Gatein are the following. Is this correct?

                            1. Compilation
                            2. Packaging

                             

                            Next, if the above is correct, I am in the "Compilation" phase, in which I am facing the problem.

                            The steps I made are the following.

                             

                            Please correct my steps for compilation:

                            (assuming only JDK is installed (anything else including maven is not yet installed) and

                            you have never used any of JBoss products and maven before.)

                             

                            • Download "apache-maven-2.2.1-bin.tar.gz" from apache website.
                            • Untar the package in /usr/local/
                            • Copy the example of "settings.xml" from http://community.jboss.org/wiki/MavenSettingsExample-Users  and create my own "settings.xml" file in .m2 directory and paste the copy in the file
                            • Download GateIn-3.1.0-FINAL-src.tar.gz, and untar the package in /usr/local/.
                            • cd /usr/local/GateIn-3.1.0-GA
                            • MAVEN_OPTS=-Xmx512m mvn clean install

                                    (This is where my problem occurs, and where I am stuck)

                             

                             

                            Please someone help... I want to use this product for my company...

                             

                            Thank you,

                            Kenta

                            • 11. Re: GateIn compile error
                              mstruk

                              I managed to reproduce your problem with OpenJDK-1.6.0. It has to do with Japanese locale.

                               

                              Set your shell to english, and it should work:

                               

                              export LANG=en_US.utf8

                               

                               

                              I have no idea what's the exact problem, because javac fails with exception but without an error message:

                               

                              mvn clean install -e

                               

                              gives you a stack trace.

                               

                              To me this looks like a compiler bug - if compilation fails it has to produce an error message as to why it failed.

                              1 of 1 people found this helpful
                              • 12. GateIn compile error
                                kkas

                                Hi, Marko.

                                 

                                You were right. I switched the compiler from openJDK1.6.0 to Java SE Development Kit(jdk-6u24-linux-x64-rpm.bin),

                                and the problem did not occur...

                                 

                                Setting just only "export LANG=en_US.utf8" did not work with openJDK1.6.0... I didn't think that Oracle's JDK acts different from openJDK.

                                (I totally trusted what openJDK developers say, that openJDK is the only one which passed Sun's testing)

                                 

                                Thank you so much, Marko. I can now move onto the next step!

                                 

                                Thanks,

                                Kenta