11 Replies Latest reply on Jun 7, 2015 4:54 PM by Steven Hawkins

    Building teiid source with Eclipse Luna

    Dale Preston Newbie

      I just imported the source for Teiid as a maven project into Eclipse Luna.  I'm no expert on Maven so I don't understand this error but all 60 projects in Teiid have the error on import:

       

      Non-resolvable parent POM: Could not find artifact org.jboss.teiid:teiid-parent:pom:8.2.0.Alpha1-SNAPSHOT

       

      The POM does identify 8.2.0.Alapha1-SNAPSHOT as the parent but I downloaded 8.10.1 source code.  So why does 8.10.1 point to the alpha 8.2 as parent.  Should I just remove the parent reference from the POMs? (all 60? Yikes).  Or is there documentation on how to build teiid form source using Eclipse and source downloaded from SourceForge?

       

      Thanks,

       

       

      Dale

        • 2. Re: Building teiid source with Eclipse Luna
          Van Halbert Master

          As for 8.2.0.Alpha1-SNAPSHOT, did you clone from a branch or a tag?

          • 3. Re: Building teiid source with Eclipse Luna
            Dale Preston Newbie

            dale2k9 wrote:

             

            I just imported the source for Teiid as a maven project into Eclipse Luna.  I'm no expert on Maven so I don't understand this error but all 60 projects in Teiid have the error on import:

             

            Non-resolvable parent POM: Could not find artifact org.jboss.teiid:teiid-parent:pom:8.2.0.Alpha1-SNAPSHOT

             

            The POM does identify 8.2.0.Alapha1-SNAPSHOT as the parent but I downloaded 8.10.1 source code.  So why does 8.10.1 point to the alpha 8.2 as parent.  Should I just remove the parent reference from the POMs? (all 60? Yikes).  Or is there documentation on how to build teiid form source using Eclipse and source downloaded from SourceForge?

             

            Thanks,

             

             

            Dale

            Ignoring the errors in Eclipse I did a command line build and get this error after this.  Of course it had tried repositories at springsource, jboss, and maven before reporting springsource in the error.

             

            Downloading: https://repository.jboss.org/nexus/content/groups/public-jboss/org/

            jboss/as/jboss-as-parent/7.4.0.Final-redhat-19/jboss-as-parent-7.4.0.Final-redha

            t-19.pom

            [ERROR] The build could not read 1 project -> [Help 1]

            [ERROR]

            [ERROR]   The project org.jboss.teiid:teiid-parent:8.10.1 (P:\Projects\teiid\tei

            id-8.10.1\pom.xml) has 1 error

            [ERROR]     Non-resolvable import POM: Could not find artifact org.jboss.as:jbos

            s-as-parent:pom:7.4.0.Final-redhat-19 in com-springsource-repository-bundles-rel

            ease (http://repository.springsource.com/maven/bundles/release/) @ line 372, col

            umn 16 -> [Help 2]

            Any ideas what might be causing this failure?

            • 4. Re: Building teiid source with Eclipse Luna
              Dale Preston Newbie

              Van Halbert wrote:

               

              As for 8.2.0.Alpha1-SNAPSHOT, did you clone from a branch or a tag?

               

              I got the source from here:

               

              Downloads · Teiid

              • 5. Re: Building teiid source with Eclipse Luna
                Van Halbert Master

                Dale, sorry you're having issues.

                 

                I downloaded from the Teiid downloads, and then ran:

                 

                mvn -s ./settings.xml  clean install

                 

                and was able to build.

                 

                I did a search and found that the documentation pom.xml does reference 8.2.0.Alpha1-SNAPSHOT, but it's not part of normally run builds:

                 

                mvn -s ./settings.xml clean install

                mvn -s ./settings.xml clean install -Prelease

                 

                Regarding using in Eclipse, there are several options for using the teiid settings.xml repository settings:

                -  copy the teiid settings.xml to your local .m2 location

                -  copy the teiid repository settings into your existing settings.xml

                -  change your maven settings in eclipse to point to the teiid settings.xml

                 

                 

                Hope this helps.

                 

                Van

                • 6. Re: Building teiid source with Eclipse Luna
                  Dale Preston Newbie

                  Van, thanks for the help.  I've been in training for a couple weeks and haven't got to fully test this until today.  When I build now I get the following error in the odata tests:

                  <system-err>[Thu Jun 04 17:31:11 CDT 2015] MIME map can't be loaded:java.lang.NullPointerException

                  </system-err>

                  I've attached the surefire report xml file.

                   

                  It's very close to working.  The first odata test suite failed and the second one was skipped but those were the very last two builds in the project so everything else built properly.

                   

                  Do you have any idea why I might be getting that error?

                  • 7. Re: Building teiid source with Eclipse Luna
                    Van Halbert Master

                    Posting the error here, for ease of reference:

                     

                    <testcase name="org.teiid.odata.TestODataIntegration" classname="org.teiid.odata.TestODataIntegration" time="3.105">

                        <error type="java.lang.reflect.InvocationTargetException:"><![CDATA[java.lang.reflect.InvocationTargetException:

                        null

                      at java.net.DualStackPlainSocketImpl.bind0(Native Method)

                        at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)

                        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)

                        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)

                        at java.net.ServerSocket.bind(ServerSocket.java:376)

                        at java.net.ServerSocket.<init>(ServerSocket.java:237)

                        at java.net.ServerSocket.<init>(ServerSocket.java:128)

                        at Acme.Serve.SimpleAcceptor.init(SimpleAcceptor.java:69)

                        at Acme.Serve.Serve.createAcceptor(Serve.java:910)

                        at Acme.Serve.Serve.init(Serve.java:765)

                        at Acme.Serve.Serve.runInBackground(Serve.java:645)

                        at org.jboss.resteasy.plugins.server.tjws.TJWSServletServer.start(TJWSServletServer.java:178)

                        at org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer.start(TJWSEmbeddedJaxrsServer.java:59)

                        at org.jboss.resteasy.test.TJWSServletContainer.start(TJWSServletContainer.java:96)

                        at org.jboss.resteasy.test.TJWSServletContainer.start(TJWSServletContainer.java:84)

                        at org.jboss.resteasy.test.TJWSServletContainer.start(TJWSServletContainer.java:36)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:606)

                        at org.jboss.resteasy.test.EmbeddedContainer.start(EmbeddedContainer.java:83)

                        at org.jboss.resteasy.test.EmbeddedContainer.start(EmbeddedContainer.java:61)

                        at org.teiid.odata.TestODataIntegration.before(TestODataIntegration.java:170)

                    ]]>

                        </error>

                        <system-out>KEEPALIVE!: true

                    [Embedded Container Stop]

                    </system-out>

                        <system-err>[Thu Jun 04 17:31:11 CDT 2015] MIME map can't be loaded:java.lang.NullPointerException

                    </system-err>

                      </testcase>

                    • 8. Re: Building teiid source with Eclipse Luna
                      Steven Hawkins Master

                      Those are not related, as the mime exception always happens and does not cause a test failure.  The failure here is during the start of the test, which means that RestEasy is not able to start the EmbeddedContainer - similar to https://caffeinbean.wordpress.com/2011/01/08/resteasy-and-embedded-container-address-already-in-use/

                       

                      Do you have something already running on 8080?  I'm not sure if the EmbeddedContainer will check for other ports.

                      • 9. Re: Building teiid source with Eclipse Luna
                        Dale Preston Newbie

                        Finally a successful build!  Even with success, there were a lot of java exceptions and warnings in the process.

                         

                        There are a few code/build/maven issues I had to fix to get to success, though.  These are things you'll likely want to check in or I can do it if allowed.

                         

                        First was a missing dependency on com.apache.cfx.endpoint.Retryable causing the build to fail.  There may be more appropriate places to get it but I added this to the pom.xml file and got past the error.

                         

                               <dependency>

                                    <groupId>org.apache.cxf</groupId>

                                    <artifactId>cxf-bundle</artifactId>

                               </dependency>

                         

                        Second issue was in the olingo tests, TestODataIntegration.java.  There were two tests failing because they used "\n" in the expected results string.  I am guessing you're all building on RHEL; I'm building on Windows.  To make it work for all of us, I changed all of the "\n" instances in the file to System.lineSeparator().

                         

                        The third issue didn't really break the build but sure extended the time it takes to build.  There are approximately 12 duplicate module entries in the modules section of the pom.xml file in the teiid\connectors project causing them to build twice - and some of them are slow builds.

                         

                        Anyway, I have it built.  Thanks for the help here.

                         

                        Dale

                        • 10. Re: Building teiid source with Eclipse Luna
                          Ramesh Reddy Master

                          I am surprised about the cx-bundle dependency, we followed to depend on individual projects in cxf than bundle.

                           

                          can you submit a patch of your changes for us to take look, yes we build on RHEL.

                           

                          Thanks.

                          • 11. Re: Building teiid source with Eclipse Luna
                            Steven Hawkins Master

                            > First was a missing dependency on com.apache.cfx.endpoint.Retryable causing the build to fail.

                             

                            Not sure what you are seeing there.  What maven command were you running, for example 'mvn -s settings.xml clean install'?

                             

                            > Second issue was in the olingo tests

                             

                            Yes those were recently added and were likely not vetted for platform independence.  As Ramesh says a patch would be good, or we'll have a look to do safer comparisons.

                             

                            > The third issue didn't really break the build but sure extended the time it takes to build.  There are approximately 12 duplicate module entries in the modules section of the pom.xml file in the teiid\connectors project causing them to build twice - and some of them are slow builds.

                             

                            I don't follow you here, what modules do you see as duplicated?