8 Replies Latest reply on Jan 15, 2013 9:12 PM by Vu Viet Phuong

    Creating my own extension shows error

    maran selva Newbie

      Hi everyone,

       

                         i am tryin to create my own gateinUXP site with login page so i checkout the sample extension project from

      http://anonsvn.jboss.org/repos/gatein/portal/trunk/examples/extension/

       

      if i try to compile it shows the following error in the package

       

      org.exoplatform.sample.ext.web.SampleContextDestroyedListener.java

       

      Multiple markers at this line

      - The type org.exoplatform.container.component.BaseComponentPlugin cannot be resolved. It is

      indirectly referenced from required .class files

       

      - The hierarchy of the type SampleContextDestroyedListener is inconsistent

       

      see the below screen shots for reference

       

      inconsistent.png

       

      can any one help me please ASAP. i need to deliver today the login page.

      please

        • 1. Re: Creating my own extension shows error
          Vu Viet Phuong Novice

          org.exoplatform.container.component.BaseComponentPlugin --> this class is in exo.kernel.container-2.3.0-CR2.jar. And I don't see it's in your classpath, i'm not sure if your eclipse maven plugin is configured properly. Can you use "mvn clean install" in the console to build that project, and see if there is any exception ?

          • 2. Re: Creating my own extension shows error
            maran selva Newbie

            thanks for the reply, i tried in my console as well

            i got the following error,could you please help me more.

            if my maven is not configured properly tell me how to configure and alos tell me ho to add it to class path.

             

            consolemvn clean.png

             

            i already configured eclipse maven plugin and class path for maven see the ref

             

            config mvn.png

             

            classpath.png

            • 3. Re: Creating my own extension shows error
              maran selva Newbie

              can any one help the next issue

               

              the above classpath issue resolved by adding the required jars in to class path in build path

               

              now sample extension project is error free but when i try to package the exo.portal.sample.extension.jar it shows the following error

               

              [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project exo.portal.sample.extension.jar: Compilation failure: Compilation failure:

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleContextInitializedListener.java:[34,62] error: cannot access DefaultPicoContainer

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleContextInitializedListener.java:[38,29] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleContextDestroyedListener.java:[33,61] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleContextDestroyedListener.java:[37,29] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleHttpSessionDestroyedListener.java:[34,65] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleHttpSessionDestroyedListener.java:[38,29] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleHttpSessionCreatedListener.java:[34,63] error: type argument PortalContainer is not within bounds of type-variable S

              [ERROR] \softwares\gatein_trunk\examples\extension\jar\src\main\java\org\exoplatform\sample\ext\web\SampleHttpSessionCreatedListener.java:[38,29] error: type argument PortalContainer is not within bounds of type-variable S

              extensionwith no error.png

              • 4. Re: Creating my own extension shows error
                maran selva Newbie

                The above error has been resolved by placing correct dependency

                 

                 

                 

                 

                 

                <dependency>

                 

                <groupId>org.exoplatform.kernel</groupId>

                 

                <artifactId>exo.kernel.container</artifactId>

                 

                <version>2.3.8-GA</version>

                </

                dependency>

                 

                now next issue is able to package the jar and war i frun the GateIn-UXP-preview-tomcat6 server it shows following

                can any on help me

                 

                servernotfoundthe listner.png

                 

                • 5. Re: Creating my own extension shows error
                  Vu Viet Phuong Novice

                  IMO, You should build by using maven command in the console, please read this doc http://docs.exoplatform.com/PLF35/index.jsp?topic=%2Forg.exoplatform.doc.35%2FDEV.SetupMavenSettings.html

                  Note that you have to setup maven properties that point to "exo-dependencies" that contain AS (tomcat) and please config maven repo point here http://repository.exoplatform.org/public

                   

                  To build and run gatein 3.2.0-M01 with tomcat6, please take a look at README.txt https://github.com/gatein/gatein-portal/blob/3.2.0-M01/README.txt

                  • 6. Re: Creating my own extension shows error
                    maran selva Newbie

                    if dont mine can u tell me where is the local-properties file available ,

                     

                    i thing i have done the all the step whis is mentioned in  http://docs.exoplatform.com/PLF35/index.jsp?topic=%2Forg.exoplatform.doc.35%2FDEV.SetupMavenSettings.html

                     

                    except local-properties setup.

                     

                     

                    • 7. Re: Creating my own extension shows error
                      maran selva Newbie

                      if dont mine can u tell me where is the local-properties file available ,

                       

                      i thing i have done the all the step whis is mentioned in  http://docs.exoplatform.com/PLF35/index.jsp?topic=%2Forg.exoplatform.doc.35%2FDEV.SetupMavenSettings.html

                       

                      except local-properties setup.

                       

                       

                      • 8. Re: Creating my own extension shows error
                        Vu Viet Phuong Novice

                        local-properties is a setting profile of maven, here is an example:

                         

                        <profiles>

                           <profile>

                              <id>local-properties</id>

                              <properties>

                                <exo.projects.directory.dependencies>path/to/tomcat</exo.projects.directory.dependencies>

                                <exo.projects.app.tomcat.version>apache-tomcat-6.0.33</exo.projects.app.tomcat.version>

                              </properties>

                            </profile> 

                             ....

                        </profiles>

                        <activeProfiles>

                            <!-- make local-properties profile active all the time -->

                            <activeProfile>local-properties</activeProfile>

                        </activeProfiles>