3 Replies Latest reply on Nov 13, 2008 12:43 PM by peterj

    Recipe for a disaster (seam 2.1+jboss 4.2.3=fail)

    mader

      Kitchen:
      Microsoft Windows XP Professional SP2
      Java 1.5

      Ingredents:
      - Freshly scooped Eclipse 3.4.1 (slighty used 3.4 will do too)
      - Fresh JBoss 4.2.3.GA (4.2.2.GA will barf nicely also)
      - Fesh Seam 2.1.0.SP1 (or 2.1.0.GA)

      How to do:
      Download ingredents. Go to seam and run seam setup, answering in sensible way to all questions. Project will be named seamtest.

      Result (build.properties):
      hibernate.connection.password=youwannaknoweh
      workspace.home=D\:/eclipses/eclipse-3.4.1/workspace
      model.package=com.mader.seamtest.entity
      driver.jar=D\:/projects/jdbc/postgresql-8.2-508.jdbc3.jar
      action.package=com.mader.seamtest.ses
      test.package=com.mader.seamtest.test
      database.type=postgres
      richfaces.skin=blueSky
      hibernate.default_catalog.null=
      hibernate.default_schema.null=
      database.drop=n
      project.name=seamtest
      hibernate.connection.username=blah
      hibernate.connection.driver_class=org.postgresql.Driver
      hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
      project.type=ear
      icefaces.home=
      database.exists=y
      jboss.home=C\:/jboss/jboss-4.2.3.GA
      hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
      hibernate.connection.url=jdbc\:postgresql\://192.168.0.1\:5432/seamtest
      icefaces=n

      Run seam create-project. Success. Run eclipse. Go to workbench, File->New->Project... and select General->Project. Project name seamtest. Should load existing project and run somethingy that is ran always when refreshed[1]. This will create in jboss server default/deploy a directory (yes, DIRECTORY) called seamtest.ear.

      Run with ant build.xml. Barf. No, this is not main disaster, only announcement and setup of feeling of inevitable doom. Delete directory seamtest.ear and run build.xml again. A file (yes, FILE) called, guess what, seamtest.ear is something slightly more sane, isnt it?

      Time for main dish. Start jboss server.

      ===============================================================================

      JBoss Bootstrap Environment

      JBOSS_HOME: C:\jboss\jboss-4.2.3.GA

      JAVA: C:\Program Files\Java\jdk1.5.0_13\bin\java

      JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

      CLASSPATH: C:\Program Files\Java\jdk1.5.0_13\lib\tools.jar;C:\jboss\jboss-4.2.3.GA\bin\run.jar

      ===============================================================================

      09:14:17,515 INFO [Server] Starting JBoss (MX MicroKernel)...
      09:14:17,531 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)
      09:14:17,531 INFO [Server] Home Dir: C:\jboss\jboss-4.2.3.GA
      09:14:17,531 INFO [Server] Home URL: file:/C:/jboss/jboss-4.2.3.GA/
      09:14:17,531 INFO [Server] Patch URL: null
      09:14:17,531 INFO [Server] Server Name: default
      09:14:17,531 INFO [Server] Server Home Dir: C:\jboss\jboss-4.2.3.GA\server\default
      09:14:17,531 INFO [Server] Server Home URL: file:/C:/jboss/jboss-4.2.3.GA/server/default/
      09:14:17,531 INFO [Server] Server Log Dir: C:\jboss\jboss-4.2.3.GA\server\default\log
      09:14:17,531 INFO [Server] Server Temp Dir: C:\jboss\jboss-4.2.3.GA\server\default\tmp
      09:14:17,531 INFO [Server] Root Deployment Filename: jboss-service.xml
      09:14:17,718 INFO [ServerInfo] Java version: 1.5.0_13,Sun Microsystems Inc.
      09:14:17,718 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_13-b05,Sun Microsystems Inc.
      09:14:17,718 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      09:14:18,062 INFO [Server] Core system initialized
      ...
      09:14:38,890 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 21s:359ms

      Should even not throw any exceptions. Indercible! Run your favorite browser (in my case old, trusty Firefox 3.0... okay, maybe not so old) and go to http://127.0.0.1:8080/seamtest/ . Yay! Something worked. At upper right corner click on "Login". Username: admin. Click button "Login".

      BARF.

      14:50:14,796 ERROR [SeamLoginModule] Error invoking login method
      javax.el.PropertyNotFoundException: Target Unreachable, identifier 'authenticator' resolved to null
      at org.jboss.el.parser.AstValue.getTarget(AstValue.java:38)
      at org.jboss.el.parser.AstValue.invoke(AstValue.java:95)
      at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
      at org.jboss.seam.security.jaas.SeamLoginModule.login(SeamLoginModule.java:109)
      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:585)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
      at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
      at org.jboss.seam.security.Identity.authenticate(Identity.java:335)
      at org.jboss.seam.security.Identity.authenticate(Identity.java:324)
      at org.jboss.seam.security.Identity.login(Identity.java:253)
      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:585)
      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:88)
      at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      at javax.faces.component.UICommand.broadcast(UICommand.java:387)
      at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
      at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
      at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
      at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      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.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
      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.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:182)
      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:595)

      Oh joy. What now? I tried many combination of versions (mentioned at beginning) and on differnet computer. Strangely, on computer of my colleague recipe works. Works on my computer, if I run jboss copied directly from him. But if I dare to get from him eclipse project created like seamtest, recompile and build, it will barf.

      [1] On one other computer where this recipe was tested, eclipse run and run this thingy in loop for a unknown reason, effectively making impossible to do rest of recipe. Cutting edge gastronomy, indeed.

        • 1. Re: Recipe for a disaster (seam 2.1+jboss 4.2.3=fail)
          peterj

          Based on the error message, somewhere in your app there is an EL phrase that uses an object named 'authenticator', but no objects have been marked with that name. (Or perhaps 'authenticator' is being used as a property of an object, but that object has no such property.) If you could locate and post the EL phrase that contains this name, it would help.

          Also, you might get more help from the Seam forum - that's where the Seam experts hang out (I only know enough Seam to be dangerous).

          http://www.seamframework.org/Community/Forums

          • 2. Re: Recipe for a disaster (seam 2.1+jboss 4.2.3=fail)
            mader

            Thanks for answer. Problem: I use fresh install and I did not modified anything. This is NOT my application. This is demonstration application present in every fresh installation of seam. It was not modified in any way. I presented exact steps that reproduce this error.

            Anyway, thanks for directions.

            • 3. Re: Recipe for a disaster (seam 2.1+jboss 4.2.3=fail)
              peterj

               

              This is demonstration application present in every fresh installation of seam.


              Which application? It appears you are using an application named seamtest, yet I cannot find such an application under the seam_home/examples directory. I have used several of the application from the examples directory, making the most use of seambay.

              OK, it looks like you are generating a new application using seamgen. Let's see if I can duplicate this.

              This will create in jboss server default/deploy a directory (yes, DIRECTORY) called seamtest.ear.


              Not a problem, this is an exploded deployment. You can read about them at http://www.jboss.org/community/docs/DOC-9719. In fact, I prefer exploded deployments, makes mucking with configuration files so much easier.

              OK, I followed your instructions. Logged in as admin, no errors, instead got the home page refreshed with "signed in as: admin" and a logout link in the right side of the page header.

              Wait a second. I didn't exactly follow your instructions - I didn't to the Eclipse thing. So I did that. Now I am getting the same error. Looks like Eclipse once again has screwed things up. Is it any wonder that I never build with Eclipse (when I install a new version of Eclipse the first conf change I make is to turn off automatic build) and always rely on running Ant or Maven from the command line instead?

              My suggestion: wipe our your project directory and run "seam create-project" again. Then do not let Eclipse see that project until you have turned off automatic builds, and do all builds from the command line.