12 Replies Latest reply on Oct 2, 2018 2:54 PM by don.krapohl

    Troubleshooting preparser loading

    don.krapohl

      I've followed guidelines from PreParser - Teiid 9.0 (draft) - Project Documentation Editor  to build and deploy a preparser.  In this trivial example I'm just returning "select 1".  I have a working Teiid 9.1.1 server, my maven pom is in line with developer setup, and the jar builds fine with no warnings.  My log on startup indicates the preparser can't be loaded and that's all I get in the log, even at log level TRACE.  Here's the entry:

       

      08:10:40,590 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 55)  WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "teiid")]) - failure description: "TEIID50069 Failed to load module com.rakutenmarketing.brokerproxy"

       

      My code and setup-

      Preparser meta-inf

      The preparser content (trivialized)

       

      Preparser meta-inf

      The META-INF for the preparser

       

      Module deployment list

      Module deployment list (on Windows for dev purposes)

       

      Module.xml content

      Content of module.xml

       

      What have I missed?  Thank you in advance.

        • 1. Re: Troubleshooting preparser loading
          rareddy

          META-INF/services not META-INF.services

          • 2. Re: Troubleshooting preparser loading
            don.krapohl

            That's just how intellij shows it when there are no subpackages within a package.  Structurally it's at the path src/resources/META-INF/services:

             

            When I unpack the jar it's it at /META-INF/services/org.teiid.PreParser

            • 3. Re: Troubleshooting preparser loading
              rareddy

              hmm, everything else seems to be in order, not sure why it is failing to load. I double checked the names you provided. If you want to run in TRACE in need to expose "org.jboss.as" category. If there is a way to debug I would also try that. If those do not reveal then you can attach code here, maybe I can run locally.

              • 4. Re: Troubleshooting preparser loading
                don.krapohl

                Here's the trace portion.  I've clipped at the only odd thing I see against that thread:

                 

                11:47:15,227 TRACE [org.jboss.modules] (ServerService Thread Pool -- 55)  Loaded module com.rakutenmarketing.brokerproxy:main from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: C:\programfiles\eclipse_mars\teiid-9.1.1\modules,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\dv,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\base))

                11:47:15,227 TRACE [org.jboss.modules] (ServerService Thread Pool -- 55)  Locally loading module org.jboss.teiid.teiid-api:main from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: C:\programfiles\eclipse_mars\teiid-9.1.1\modules,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\dv,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\base))

                11:47:15,227 TRACE [org.jboss.modules] (ServerService Thread Pool -- 55)  Module org.jboss.teiid.teiid-api:main not found from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: C:\programfiles\eclipse_mars\teiid-9.1.1\modules,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\dv,C:\programfiles\eclipse_mars\teiid-9.1.1\modules\system\layers\base))

                 

                Per the common Teiid dev setup (linked from the preparser page in your docs and URL at top of this thread) here's my dependency in my pom:

                <dependency>

                   <groupId>org.jboss.teiid</groupId>

                   <artifactId>teiid-api</artifactId>

                   <version>${teiid-version}</version>

                   <scope>provided</scope>

                </dependency>

                 

                I'll add that in my standalone-teiid my teiid subsystem has it referenced as:

                        <subsystem xmlns="urn:jboss:domain:teiid:1.1">

                ...

                            <preparser-module>com.rakutenmarketing.brokerproxy</preparser-module>

                 

                Source attached.

                • 5. Re: Troubleshooting preparser loading
                  rareddy

                  move your module from "teiid9.1.1./modules/system/layers/base/..." into ""teiid9.1.1./modules/system/layers/dv/..."

                   

                  then it will load fine.

                  • 6. Re: Troubleshooting preparser loading
                    don.krapohl

                    Odd.  That still does not work for me.  I tried the same setup with a custom meta parser as a test of my setup and the stack trace indicates the module isn't found still.

                     

                    Caused by: org.jboss.as.controller.OperationFailedException: TEIID50069 Failed to load module com.rakutenmarketing.brokermetadata [ "TEIID50069 Failed to load module com.rakutenmarketing.brokermetadata" ]

                    at org.teiid.jboss.TeiidAdd.buildService(TeiidAdd.java:586)

                    at org.teiid.jboss.VDBService.getMetadataRepository(VDBService.java:496)

                    ... 8 more

                    Caused by: org.jboss.modules.ModuleNotFoundException: org.jboss.teiid.teiid-api:main

                    at org.jboss.modules.Module.addPaths(Module.java:1092) [jboss-modules.jar:1.5.1.Final]

                    at org.jboss.modules.Module.link(Module.java:1448) [jboss-modules.jar:1.5.1.Final]

                    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476) [jboss-modules.jar:1.5.1.Final]

                    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225) [jboss-modules.jar:1.5.1.Final]

                    at org.teiid.jboss.TeiidAdd.buildService(TeiidAdd.java:584)

                    ... 9 more

                     

                    I'll try some different approaches.  I tried a shaded uber jar earlier but that didn't help, as expected.  I'm definitely following Setting up the build environment - Teiid 9.0 (draft) - Project Documentation Editor  .  Going through module specs as well: JBoss Modules: version 1.x

                    • 7. Re: Troubleshooting preparser loading
                      don.krapohl

                      Looking through the trace I see a few module not found entries on core packages.  I may have a corrupt server but it works for everything else so I'll try a fresh unmodified server in the morning.  Thank you for looking at this today.

                      • 8. Re: Troubleshooting preparser loading
                        don.krapohl

                        Same result with a fresh 9.1.5 server with no modifications other than adding my jar and module.xml under (Teiid base directory)\modules\system\layers\dv\com\rakutenmarketing\brokerproxy\main and the section in standalone-teiid.xml:

                         

                        <subsystem xmlns="urn:jboss:domain:teiid:1.1">

                        <preparser-module>com.rakutenmarketing.brokerproxy</preparser-module>

                        ....

                         

                        Trace shows nothing so far except the fact that it can't load the module.  There are no permissions on any directories.  Anyone see what I may have missed?

                        • 9. Re: Troubleshooting preparser loading
                          don.krapohl

                          I've moved to Teiid Embedded as it was a good future state for our work.  The preparser works well there.  Thanks for all the assistance!

                          • 10. Re: Troubleshooting preparser loading
                            rareddy

                            I got run through debugger and found the document is wrong . It should be "org.jboss.teiid.api" for the name of the teiid-api module name 

                            • 11. Re: Troubleshooting preparser loading
                              don.krapohl

                              Excellent.  I'll try it again this weekend.

                              • 12. Re: Troubleshooting preparser loading
                                don.krapohl

                                I rebuilt from the archetype at GitHub - teiid/teiid-tools: This project contains tools to help with Teiid development tasks  and it works that way but still did not work for me otherwise.  I'll have to come back to this task but can point out the maven archetype as a good workaround for anyone else.

                                 

                                Best indication is that the cli script with the explicit depends correctly registered the teiid-api and other dependencies.