6 Replies Latest reply on Jul 16, 2008 9:04 AM by System Administrator

    build path problems with Seam SVN Wiki

    System Administrator Expert
      I checked out Seam 2.1.0.A1 from anonymous SVN repository to examine the wiki project codebase.

      I am able to successfully compile the classes via the compileclasses ant target.

      Eclipse/compiler is not happy however.  I'm seeing build path errors like the following in my project:

      Severity and Description        Path    Resource        Location        Creation Time   Id
      org.jboss.ejb3 cannot be resolved       wiki/src/test/org/jboss/seam/wiki/test/editing  BasicNodeOperations.java        line 271        1216092109690   47026

      Severity and Description        Path    Resource        Location        Creation Time   Id
      The return type is incompatible with UploadHandler<WU>.createEditor(WU)   wiki/src/main/org/jboss/seam/wiki/core/upload/handler   WikiUploadHandler.java  line 9  1216092108010   46182


      Anybody know which jar the org.jboss.ejb3 package resides in?  I saw the following link:

      http://www.java2s.com/Code/Jar/jboss-5.0.0.Beta2/Downloadjbossejb3jar.htm

      which points to jboss-ejb3.jar but that link refers to jboss 5.  I'm using 4.2.2.GA as per the instructions on this forum.

      And how to go about in general determining which jar a JBoss specific class lives in?

      I tried to use the same jars (inclusions and exclusions) as in the following section of the build.xml that applies to the compileclasses target:

      <fileset id="globallibs" dir="${global.lib.dir}">
              <include name="*.jar"/>
              <!-- The Seam bundled Hibernate is too old to even compile this application! -->
              <exclude name="hibernate*"/>
              <exclude name="ejb3-persistence*"/>
              <exclude name="jboss-seam-gen.jar" />
          </fileset>

          <path id="build.classpath">
              <fileset refid="globallibs" />
              <fileset dir="${local.lib.dir}"/>
          </path>

      to no avail in my build path of the wiki project...
        • 1. Re: build path problems with Seam SVN Wiki
          System Administrator Expert
          so I deployed the wiki.war to jboss 4.2.2.GA

          got deployment exceptions related to EHCache (jar was not in the jboss classpath so I downloaded EHCache 1.5.0 and copied jars to server/default/lib directory.

          now seeing the following on startup/deployment of war:

          21:40:12,762 ERROR [[/wiki]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
          org.jboss.seam.InstantiationException: Could not instantiate Seam component: wikiEntityManagerFactory
               at org.jboss.seam.Component.newInstance(Component.java:2104)
               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
               at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
               at org.jboss.seam.init.Initialization.init(Initialization.java:630)
               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
               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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
               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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
               at org.jboss.web.WebModule.startModule(WebModule.java:83)
               at org.jboss.web.WebModule.startService(WebModule.java:61)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy44.start(Unknown Source)
               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
               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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
               at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy45.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
               at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy9.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               at $Proxy0.start(Unknown Source)
               at org.jboss.system.ServiceController.start(ServiceController.java:417)
               at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy4.start(Unknown Source)
               at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
               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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy5.deploy(Unknown Source)
               at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
               at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
               at org.jboss.Main.boot(Main.java:200)
               at org.jboss.Main$1.run(Main.java:508)
               at java.lang.Thread.run(Thread.java:619)
          Caused by: javax.persistence.PersistenceException: org.hibernate.AnnotationException: Property org.jboss.seam.wiki.core.nestedset.NestedSetNodeInfo.owner has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type
               at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:252)
               at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
               at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
               at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
               at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
               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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
               at org.jboss.seam.Component.callComponentMethod(Component.java:2217)
               at org.jboss.seam.Component.callCreateMethod(Component.java:2132)
               at org.jboss.seam.Component.newInstance(Component.java:2092)
               ... 140 more
          Caused by: org.hibernate.AnnotationException: Property org.jboss.seam.wiki.core.nestedset.NestedSetNodeInfo.owner has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type
               at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:948)
               at org.hibernate.cfg.AnnotationBinder.fillComponent(AnnotationBinder.java:1652)
               at org.hibernate.cfg.AnnotationBinder.bindComponent(AnnotationBinder.java:1608)
               at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1489)
               at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:710)
               at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:452)
               at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:268)
               at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
               at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
               at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
               at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:869)
               at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
               at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
               ... 153 more
          • 2. Re: build path problems with Seam SVN Wiki
            Christian Bauer Master

            Any particular reason why you ignore the /wiki/README.txt?

            • 3. Re: build path problems with Seam SVN Wiki
              System Administrator Expert

              successful deployment of wiki.war complete.  I had to create the test db in mysql (which was not in the instructions).

              • 4. Re: build path problems with Seam SVN Wiki
                System Administrator Expert

                noticed that this version of the wiki i have deployed has the captcha verification when I tried a new reply to an existing thread.


                where (i.e. what package) can i find the email code for the wiki project?  and is the email functionality enabled in the wiki example like it is on this forum?

                • 5. Re: build path problems with Seam SVN Wiki
                  System Administrator Expert

                  looks like it's in:


                  org.jboss.seam.wiki.plugin.forum.ReplyHome class:


                  @Observer(value = "Comment.persisted", create = false)
                      public void sendNotificationMails() {
                          // Triggered by superclass after reply was persisted
                  
                          // Notify forum mailing list
                          String notificationMailingList =
                                  Preferences.instance().get(ForumPreferences.class).getNotificationMailingList();
                          if (notificationMailingList != null) {
                              getLog().debug("sending reply notification e-mail to forum list: " + notificationMailingList);
                              renderer.render(PluginRegistry.instance().getPlugin("forum").getPackageThemePath()+REPLY_NOTIFY_LIST_TEMPLATE);
                          }
                  
                          // Notify original poster
                          if (documentHome.getInstance().macroPresent(TopicHome.TOPIC_NOTIFY_ME_MACRO)
                              && !documentHome.getInstance().getCreatedBy().getUsername().equals(getInstance().getCreatedBy().getUsername())
                             ) {
                              getLog().debug("sending reply notification e-mail to original poster");
                              renderer.render(PluginRegistry.instance().getPlugin("forum").getPackageThemePath()+REPLY_NOTIFY_TEMPLATE);
                          }
                      }



                  the refactoring would involve notifying the original poster and all other repliers/posters for that particular topic as well...

                  • 6. Re: build path problems with Seam SVN Wiki
                    System Administrator Expert

                    when I tried to register, I got the following stack trace:


                    2008-07-16 00:00:43,689 ERROR [org.jboss.seam.exception.Exceptions] handled and logged exception
                    javax.servlet.ServletException: #{userHome.persist}: javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.seam.wiki.core.model.UserProfile]
                         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                         at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
                         at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
                         at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
                         at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
                         at org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.doFilter(WikiUrlRewriteFilter.java:45)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
                         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
                         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
                         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
                         at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.jboss.seam.wiki.core.ui.WikiUrlSessionIdFilter.doFilter(WikiUrlSessionIdFilter.java:86)
                         at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                         at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                         at java.lang.Thread.run(Thread.java:619)
                    Caused by: javax.faces.FacesException: #{userHome.persist}: javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.seam.wiki.core.model.UserProfile]
                         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
                         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
                         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
                         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
                         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
                         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
                         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
                         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
                         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
                         ... 43 more
                    Caused by: javax.faces.el.EvaluationException: javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.seam.wiki.core.model.UserProfile]
                         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
                         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
                         ... 52 more
                    Caused by: javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.seam.wiki.core.model.UserProfile]
                         at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:605)
                         at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:300)
                         at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:90)
                         at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.flush(FullTextEntityManagerImpl.java:102)
                         at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:90)
                         at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:85)
                         at org.jboss.seam.wiki.core.action.UserHome.persist(UserHome.java:202)
                         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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                         at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                         at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
                         at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
                         at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:118)
                         at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                         at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                         at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
                         at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
                         at org.jboss.seam.wiki.core.action.UserHome_$$_javassist_55.persist(UserHome_$$_javassist_55.java)
                         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.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
                         at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342)
                         at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
                         at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
                         at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
                         at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
                         ... 53 more
                    Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [org.jboss.seam.wiki.core.model.UserProfile]
                         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
                         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
                         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2267)
                         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)
                         at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:52)
                         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
                         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
                         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
                         at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
                         at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
                         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
                         at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:297)
                         ... 94 more
                    Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '2' for key 1
                         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
                         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
                         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
                         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
                         at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
                         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
                         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1604)
                         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1519)
                         at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1504)
                         at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
                         at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:23)
                         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2247)
                         ... 103 more