2 Replies Latest reply on Jan 14, 2009 8:52 PM by deanhiller2000

    lots of LIE exceptions after port tomcat to JBoss

    deanhiller2000

      I ported our seam application to JBoss(as the higher powers that be want it).  I am getting lots of LIE exceptions now.  It is like the transaction is ending earlier?????  It worked great before in tomcat!!!!.  Here is my components.xml file.  Would this be a configuration issue?  or do I really need to preload all my objects so when the page has somehting like #{sa.liveScript.name} from a list of sa's, then I have to make sure I prefetch liveScript as well?


      Here is my components.xml file....



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:persistence="http://jboss.com/products/seam/persistence"
                  xmlns:transaction="http://jboss.com/products/seam/transaction"
                  xmlns:security="http://jboss.com/products/seam/security"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:mail="http://jboss.com/products/seam/mail"
                     xmlns:navigation="http://jboss.com/products/seam/navigation"
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd 
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd 
                       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd 
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd
                       http://jboss.com/products/seam/navigation http://jboss.com/products/seam/navigation-2.0.xsd">
      
           <core:init jndi-pattern="agent/#{ejbName}/local" debug="true"/>
          <core:manager conversation-timeout="900000" 
                        concurrent-request-timeout="30000"
                        conversation-id-parameter="cid"/>
                    
          <transaction:ejb-transaction />
                          
          <security:identity authenticate-method="#{login.authenticate}"/>  
          
          <event type="org.jboss.seam.security.notLoggedIn">
                <action execute="#{redirect.captureCurrentView}"/>
           </event>
           <event type="org.jboss.seam.security.postAuthenticate">
                <action execute="#{redirect.returnToCapturedView}"/>
           </event>
           
           <navigation:pages>
               <navigation:resources>
                   <value>/WEB-INF/pages.global.xml</value>
                   <value>/WEB-INF/pages.admin.xml</value>
                   <value>/WEB-INF/pages.agent.xml</value>
               </navigation:resources>
           </navigation:pages>     
      </components>
      
      



      Ideas?  I am not sure if I should paste the java code in here since that WORKED in tomcat and has not changed!!!


      Here is the loading the sa's code.....



      @Name("listLiveScripts")
      @Scope(ScopeType.SESSION)
      @Stateful
      public class ListLiveScriptsAction implements ListLiveScriptsBean {
           @PersistenceContext
           private EntityManager entityManager;
           
           @DataModel
           protected List<SubAccount> subaccounts;
           
          /* (non-Javadoc)
            * @see net.voicelog.agent.designer.live.ListLiveScriptsBean#fillInScripts()
            */
          public void fillInScripts() {
               subaccounts = SubAccount.getSubAccountsWithScript(entityManager);
          }
      
           @Remove
           public void remove() {}
          
      }
      



      finally, my web page and I get a LIE on loading the liveScript??????????? which I don't get in tomcat!!!!



           <h:dataTable id="scriptTable" border="1" value="#{subaccounts}"
                     var="sa" rendered="#{subaccounts.size>0}">
                <h:column>
                     <f:facet name="header">Script Name</f:facet>
                     #{sa.liveScript.name}                                             
                </h:column>
                <h:column>
                    <f:facet name="header">Account No.</f:facet>
                    #{sa.account.accountNo}
                </h:column>
                <h:column>
                     <f:facet name="header">Subaccount No.</f:facet>
                     #{sa.subAccountNo}
                </h:column>
                <h:column>
                     <f:facet name="header">Actions</f:facet>
                     <s:link id="undeploy" value="Undeploy" action="#{undeployScript.undeployScript(sa)}" />
                </h:column>
           </h:dataTable>     
      



        • 1. Re: lots of LIE exceptions after port tomcat to JBoss

          A lot of configurations change between a project that will be deployed in tomcat and one that will be deployed in JBoss (one of those is the transaction configuration), please take a look at the example project in the folder \examples\jpa in you seam copy. That example project deploys the same project in to jboss, tomcat, weblogic, websphere, etc, etc.


          Here is a list of files that may change (it may not be complete): components.xml, persistence.xml, the datasource definition files (int Tomcat you use context.xml, in JBoss you use a datasource file: (like projectname-ds.xml). And maybe others that I do not remember right now.


          Regards,

          • 2. Re: lots of LIE exceptions after port tomcat to JBoss
            deanhiller2000

            thanks, I was using the booking example in the seam directory.  The JPA seems to be different than that example.  I will give it a shot.
            thanks,
            Dean