3 Replies Latest reply on Aug 28, 2009 12:28 AM by Arbi Sookazian

    seam application issue on AIX

    Sunil Subrahmanyam Newbie

      Hello,


      We are currently trying to run our seam app in an AIX environment and facing a very strange issue. I am hoping somebody on the forum can help me out.


      Seam 2.2.0.GA, JBoss 5.1.0.GA, Java 1.6 64 bit(IBM SDK) and AIX 6


      1) On AIX, We noticed that the page rendering is slow on Java 1.6 (compiled in 1.6) compared to the same app running on Java 1.5 (compiled in 1.5).


      2) In particular, one page takes over 15 seconds in Java 1.6 compared to 2 seconds on Java 1.5 (on AIX).


      3) The same page renders in 2 seconds on Windows (both Java 1.5 and Java 1.6).


      4) From the server log, I see many lines like this which is taking up most of the 15 seconds -


      [org.ajax4jsf.renderkit.AjaxChildrenRenderer] (http-192.168.10.50-8080-1) AjaxView encodeChild component for AJAX request with
      at path :elmForm:planDecoration: ID j_id220


      5) IBM support analyzed the kernel trace and said there was a lot of  failed file lookups for jndi.properties. It looks for jndi.properties in the ear folder, war folder, jar folder and many other places. It does get the file from server/default/conf once in a while. The trace file is too big and complicated to make sense. Some lines from the trace....




      lookuppn: /app/jboss-5.1.0.GA/server/default/deployers/jbossweb.deployer/jndi.properties
      lookuppn exit: file not found
      
      lookuppn: /app/jboss-5.1.0.GA/server/default/tmp/5c4oa1e-59ey7n-fyt1m1pu-1-fyt1mhy3-w/elm.ear/elm.war/WEB-INF/classe/jndi.properties
      lookuppn exit: file not found
      
      lookuppn: /app/jboss-5.1.0.GA/server/default/tmp/5c4oa1e-59ey7n-fyt1m1pu-1-fyt1mhy3-w/elm.ear/jndi.properties
      lookuppn exit: file not found
      
      lookuppn: /app/jboss-5.1.0.GA/server/default/tmp/5c4oa1e-59ey7n-fyt1m1pu-1-fyt1mhy3-w/elm.ear/elm.jar/jndi.properties.vfslink.properties
      lookuppn exit: file not found









      What is causing so many lookups to jndi.properties?


      Why does it come up only in a Java 1.6 deploy on AIX?


      Is this related to AjaxView encodeChild which shows large time intervals in the logs?






      Thanks.





        • 1. Re: seam application issue on AIX
          Arbi Sookazian Master

          Interesting problem.


          Here's the contents of my jndi.properties (which is likely the first time I've looked at this file):


          # DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
          #
          java.naming.factory.initial=org.jboss.naming.JBossRemotingContextFactory
          java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces



          Have you tried installing the JDK 1.6 and JBoss AS on Windows or Linux to see if you can reproduce the problem?


          Have a look at this class: org.jboss.seam.init.Initialization


          public Initialization create()
             {
                standardDeploymentStrategy = new StandardDeploymentStrategy(Thread.currentThread().getContextClassLoader());
                standardDeploymentStrategy.scan();
                addNamespaces();
                initComponentsFromXmlDocument("/WEB-INF/components.xml");
                initComponentsFromXmlDocument("/WEB-INF/events.xml"); //deprecated
                initComponentsFromXmlDocuments();
                initPropertiesFromServletContext();
                initPropertiesFromResource();
                initJndiProperties();
                initPropertiesFromSystem();
                return this;
             }
          
          private void initJndiProperties()
             {
                Properties jndiProperties = new Properties();
                jndiProperties.putAll(loadFromResource("/jndi.properties"));
                jndiProperties.putAll(loadFromResource("/seam-jndi.properties"));
                Naming.setInitialContextProperties(jndiProperties);
             }
          
             private Properties loadFromResource(String resource)
             {
                Properties props = new Properties();
                InputStream stream = Resources.getResourceAsStream(resource, servletContext);
                if (stream != null)
                {
                   try
                   {
                      log.info("reading properties from: " + resource);
                      try
                      {
                         props.load(stream);
                      }
                      catch (IOException ioe)
                      {
                         log.error("could not read " + resource, ioe);
                      }
                   }
                   finally 
                   {
                      Resources.closeStream(stream);
                   }
                }
                else
                {
                   log.debug("not found: " + resource);
                }
                return props;
             }



          I do not see a jndi.properties in this location:


          C:\java\jboss-5.1.0.GA\server\default\deployers\jbossweb.deployer


          Is it possible that Seam/Jboss is not finding that file??

          • 2. Re: seam application issue on AIX
            Sunil Subrahmanyam Newbie

            Thanks for the reponse, Arbi.


            I left out another piece of information,


            The time(15 sec) is spent rendering the menu (rich:menuItem) on that page.


            Yes, We have installed JDK 1.6 and JBoss 5.1.0.GA on Windows, but we do not have this issue on Windows.I also tried to pass the contents of the jndi.properties file as a system property with -D option. It did not make a difference.


            I dont see the not found: jndi.properties in the server logs (from org.jboss.seam.init.Initialization). The jndi.properties issue became evident only from the kernel trace.


            I do not understand why its looking for this file in so many places...and only in java 1.6 and AIX...



            • 3. Re: seam application issue on AIX
              Arbi Sookazian Master

              If you can't reproduce in Windows environment with same build, JDK and JBoss, then it seems like a bug to me or a configuration issue.


              If you purchase a JBoss developer subscription for EAP then you could open a case with the support techs to trouble-shoot this...  $3500 per person, unlimited incidents.