Announcement Announcement Module
Collapse
No announcement yet.
can't get mongodb, jsf to run mvn tomcat:run or jetty:run Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • can't get mongodb, jsf to run mvn tomcat:run or jetty:run

    java.lang.ClassNotFoundException: org.springframework.orm.jpa.support.OpenEntityMana gerInViewFilter
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1645)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1491)
    at org.apache.catalina.core.ApplicationFilterConfig.g etFilter(ApplicationFilterConfig.java:269)
    at org.apache.catalina.core.ApplicationFilterConfig.s etFilterDef(ApplicationFilterConfig.java:422)
    at org.apache.catalina.core.ApplicationFilterConfig.< init>(ApplicationFilterConfig.java:115)
    at org.apache.catalina.core.StandardContext.filterSta rt(StandardContext.java:4001)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4651)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:785)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:445)
    at org.apache.catalina.startup.Embedded.start(Embedde d.java:825)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.startCont ainer(AbstractRunMojo.java:558)
    at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(A bstractRunMojo.java:255)
    at org.apache.maven.plugin.DefaultBuildPluginManager. executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.e xecute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModul eBuilder.buildProject(LifecycleModuleBuilder.java: 84)
    at org.apache.maven.lifecycle.internal.LifecycleModul eBuilder.buildProject(LifecycleModuleBuilder.java: 59)
    at org.apache.maven.lifecycle.internal.LifecycleStart er.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStart er.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.jav a:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java :196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:1 41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher. launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher. launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher. mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher. main(Launcher.java:352)

  • #2
    my roo steps:

    mongo setup --databaseName mymongo --host localhost --port 27017
    entity mongo --class ~.domain.Book --testAutomatically
    entity mongo --class ~.domain.Library --testAutomatically
    focus --class ~.domain.Book
    field string --fieldName bookname --notNull
    field date --fieldName created --type java.util.Date --notNull
    field set --fieldName library --type ~.domain.Library
    focus --class ~.domain.Book
    field date --fieldName created --type java.util.Date --notNull
    field string --fieldName name --notNull
    field string --fieldName title --sizeMax 16 --notNull
    web jsf setup --implementation APACHE_MYFACES --theme EGGPLANT
    web jsf all --package ~.jsf

    Comment


    • #3
      Hi,

      You need to delete from your web.xml the tags OpenEntityManagerInViewFilter.
      Since you're using mongodb, you don't use the jpa entity manager.

      Hope this helps.

      Bonty

      Comment


      • #4
        I already did that. Still doesn't work...same error message.

        Comment


        • #5
          stack trace when i tried to access the root website. i ran mvn tomcat:run from within STS

          type Exception report

          message

          description The server encountered an internal error () that prevented it from fulfilling this request.

          exception

          javax.servlet.ServletException: /templates/layout.xhtml at line 8 and column 63 locale="#{localeBean.locale}" Attribute did not evaluate to a String or Locale: null
          javax.faces.webapp.FacesServlet.service(FacesServl et.java:213)
          org.primefaces.webapp.filter.FileUploadFilter.doFi lter(FileUploadFilter.java:79)

          root cause

          javax.faces.view.facelets.TagAttributeException: /templates/layout.xhtml at line 8 and column 63 locale="#{localeBean.locale}" Attribute did not evaluate to a String or Locale: null
          org.apache.myfaces.view.facelets.tag.jsf.Component Support.getLocale(ComponentSupport.java:231)
          org.apache.myfaces.view.facelets.tag.jsf.core.View Handler.apply(ViewHandler.java:100)
          javax.faces.view.facelets.CompositeFaceletHandler. apply(CompositeFaceletHandler.java:49)
          org.apache.myfaces.view.facelets.compiler.Namespac eHandler.apply(NamespaceHandler.java:57)
          javax.faces.view.facelets.CompositeFaceletHandler. apply(CompositeFaceletHandler.java:49)
          org.apache.myfaces.view.facelets.compiler.Encoding Handler.apply(EncodingHandler.java:48)
          org.apache.myfaces.view.facelets.impl.DefaultFacel et.include(DefaultFacelet.java:394)
          org.apache.myfaces.view.facelets.impl.DefaultFacel et.include(DefaultFacelet.java:448)
          org.apache.myfaces.view.facelets.impl.DefaultFacel et.include(DefaultFacelet.java:426)
          org.apache.myfaces.view.facelets.impl.DefaultFacel etContext.includeFacelet(DefaultFaceletContext.jav a:244)
          org.apache.myfaces.view.facelets.tag.ui.Compositio nHandler.apply(CompositionHandler.java:148)
          org.apache.myfaces.view.facelets.compiler.Namespac eHandler.apply(NamespaceHandler.java:57)
          org.apache.myfaces.view.facelets.compiler.Encoding Handler.apply(EncodingHandler.java:48)
          org.apache.myfaces.view.facelets.impl.DefaultFacel et.apply(DefaultFacelet.java:179)
          org.apache.myfaces.view.facelets.FaceletViewDeclar ationLanguage.buildView(FaceletViewDeclarationLang uage.java:441)
          org.apache.myfaces.lifecycle.RenderResponseExecuto r.execute(RenderResponseExecutor.java:78)
          org.apache.myfaces.lifecycle.LifecycleImpl.render( LifecycleImpl.java:241)
          javax.faces.webapp.FacesServlet.service(FacesServl et.java:199)
          org.primefaces.webapp.filter.FileUploadFilter.doFi lter(FileUploadFilter.java:79)

          Comment


          • #6
            This is another error, the 1st one was resolved.

            You need to add locale support of your country in faces-config.xml and add a file in folder i18n.

            Comment


            • #7
              had to create a managed bean entry for this in faces-config.xml. do i have to do that for all beans b/c now the website comes up (under jetty:run not tomcat) but if i click on an entity i get an error as what's shown further below...

              <managed-bean>
              <managed-bean-name>localeBean</managed-bean-name>
              <managed-bean-class>com.myapp.jsf.util.LocaleBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
              </managed-bean>

              --error when clicking on an entity (e.g., create new entity) on the main webpage:

              Problem accessing /myapp/pages/main.jsf. Reason:

              Target Unreachable, identifier 'bookBean' resolved to null

              does this mean i have to create a <managed-bean> entry for each of my entities?

              Comment


              • #9
                my Book bean class definition:

                package com.myapp.jsf;

                import com.myapp.domain.Book;
                import org.springframework.roo.addon.jsf.managedbean.RooJ sfManagedBean;
                import org.springframework.roo.addon.serializable.RooSeri alizable;

                @RooSerializable
                @RooJsfManagedBean(entity = Book.class, beanName = "bookBean")
                public class BookBean {
                }

                Comment


                • #10
                  I'll pay anyone $100 an hour to help get this working today via paypal. Any takers?

                  Comment


                  • #11
                    You just have to do this :
                    You need to add locale support of your country in faces-config.xml and add a file in folder i18n.

                    you don't need to add a bean for that.

                    Comment


                    • #12
                      that was already done but it still doesn't work...

                      http://forum.springsource.org/showth...831#post432831

                      Comment


                      • #13
                        Could you send faces-config.xml and the list of files you have under i18n?

                        Comment


                        • #14
                          the app is in skunk-works so i'll send you the files separately via IM.

                          Comment


                          • #15
                            Is your desktop english Locale?

                            Comment

                            Working...
                            X