Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple EntityManager injections via @PersistenceContext in one SFSB

user9175643Dec 19 2007 — edited Dec 19 2007
I have two methods in a Seam app conversation-scoped SFSB which access data from two different SQL server databases. I am getting the stack trace below when the getPeers() method in the PeerAction SFSB is executed.

Is it "legal" to inject the EntityManager more than once in the case of multiple persistence units for multiple DB's? If not, what is the best way of handling this situation? I'm thinking I could create another POJO or SFSB (of the same conversation context) for the 2nd database query and call that method via local interface from the original SFSB.

I'm just wondering if the JPA spec allows having more than one EntityManager injection in a SFSB...

persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Persistence deployment descriptor for dev profile -->
<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
             version="1.0">
             
   <persistence-unit name="boIcomsSecurityAudit">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/boIcomsSecurityAuditDatasource</jta-data-source>
      
       <!-- 
      <properties>
         <property name="hibernate.hbm2ddl.auto" value="validate"/>
         <property name="hibernate.cache.use_query_cache" value="true"/>
         <property name="hibernate.show_sql" value="true"/>
         <property name="jboss.entity.manager.factory.jndi.name" value="java:/securityAuditEntityManagerFactory"/>
         <property name="hibernate.default_catalog" value="boSHIMS"/>
         <property name="hibernate.default_schema" value=""/>
      </properties>
      -->
   </persistence-unit>
      
   <persistence-unit name="coxDSSDatasource">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/coxDSSDatasource</jta-data-source> 
   </persistence-unit>
   
   <persistence-unit name="coxIMDatasource">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/coxIMDatasource</jta-data-source> 
   </persistence-unit>
    
</persistence>
xyz-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE datasources
    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
    
<datasources>
   
   <local-tx-datasource>
      <jndi-name>boIcomsSecurityAuditDatasource</jndi-name>
      <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=boIcomsSecurityAudit</connection-url>
      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
      <user-name>_AppUser_JavaTestAcct</user-name>
      <password>JavaTestAcct</password>
   </local-tx-datasource>
   
   <local-tx-datasource>
      <jndi-name>coxDSSDatasource</jndi-name>
      <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=coxDSS</connection-url>
      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
      <user-name>_AppUser_JavaTestAcct</user-name>
      <password>JavaTestAcct</password>
   </local-tx-datasource>
   
   <local-tx-datasource>
      <jndi-name>coxIMDatasource</jndi-name>
      <connection-url>jdbc:sqlserver://CORG0DV01:1433;databaseName=coxIM</connection-url>
      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
      <user-name>_AppUser_JavaTestAcct</user-name>
      <password>JavaTestAcct</password>
   </local-tx-datasource>
    
</datasources>
XHTML:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.ajax4jsf.org/rich"
                xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" 
				xmlns:c="http://java.sun.com/jstl/core"          
                template="layout/template.xhtml">
                


<ui:define name="mainContent">

	<script type="text/javascript" 
	  src="seam/resource/remoting/resource/remote.js">
	</script>
	
	<script type="text/javascript" 
	  src="seam/resource/remoting/interface.js?noteAction">
	</script>
	
	<script type="text/javascript" 
	  src="seam/resource/remoting/interface.js?securityAuditAction">
	</script>
	
	<script type="text/javascript" 
	  src="js/securityAudit.js">
	</script>
	
	<h:messages styleClass="message"/>
	    
	<rich:panel>
		<h:form id="peerForm">
   			<h:selectOneMenu id="selectPeer" value="#{peerAction.peer}">
			  <f:selectItems value="#{peerAction.peers}" />
			</h:selectOneMenu> 
   		</h:form>    
	</rich:panel>
   		
    <rich:panel>
        <h:form id="mainForm">
	    		     	    		 
	    		<h:outputText value="No Direct Reports" rendered="#{myAuditList != null and myAuditList.rowCount==0}"/>
			 	<h:dataTable id="dataTable1" value="#{myAuditList}" var="myRow" rendered="#{myAuditList != null and myAuditList.rowCount > 0}"
			 				 styleClass="dataTable" rowClasses="oddRow, evenRow" frame="hsides">
			 		<h:column>
			 			<f:facet name="header">Status</f:facet>
			 			
			 			<h:graphicImage id="statusImage" value="#{securityAuditAction.processGraphicImage(myRow[1].auditProgress)}"/>		    							
			 		</h:column>
		    		<h:column>
			    		<f:facet name="header">Employee Name</f:facet>	    		
			    		
			    		<!-- siteId and employeeNumber hidden fields are used for all radio buttons -->
			    		<h:outputText id="employeeName" value="#{myRow[0].id.employeeName}"/>		 
			    		<h:inputHidden id="employeeNameHidden" value="#{myRow[0].id.employeeName}"/>  		    		
			    		<h:inputHidden id="siteId" value="#{myRow[0].id.siteId}"/> 		
			    		<h:inputHidden id="employeeNumber" value="#{myRow[0].id.employeeNumber}"/>
		    		</h:column>
		    		
		    		<h:column>
			    		<f:facet name="header">SiteId</f:facet>	    		
			    		
			    		<h:outputText value="#{myRow[0].id.siteId}"/>		   		    		
		    		</h:column>
		    		
		    		<h:column>
			    		<f:facet name="header">EmployeeNumber</f:facet>	    		
			    		
			    		<h:outputText value="#{myRow[0].id.employeeNumber}"/>		   		    		
		    		</h:column>
		    		
		    		<h:column>
			    		<f:facet name="header">Adjustment Limit</f:facet>	    		
			    		
			    		<h:outputText value="#{myRow[0].id.employeeNumber}"/>		   		    		
		    		</h:column>
		    				    
		    		 		
	    		    	<h:column>
			    			<f:facet name="header">Account Approved?</f:facet>		    					    	
		    					
		    					<h:panelGrid columns="2">
					    			<h:selectOneRadio id="accountApprovedRB" value="#{myRow[1].icomsAccountApproved}">		
					    			     							  
					    				<a4j:support event="onclick" 
					    						     oncomplete="processNote(#{myAuditList.getRowIndex()}, 'accountApproved')"
					    						     action="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'accountApproved', myAuditList)}"
					    						     ajaxSingle="true"
					    						     reRender="mainForm"/>
					    			      
										<f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
									</h:selectOneRadio>
									
									<h:graphicImage  id="acctGraphic" value="/img/icon_edit.gif"
					    							 rendered="#{noteAction.getRenderNoteGraphic(myAuditList.getRowIndex(), 'accountApproved') || 
					    						     			securityAuditAction.getLoadedNote(myAuditList.getRowIndex(), 'accountApproved')}">
					    				<a4j:support event="onclick"
					    							 onclick="editNote(#{myAuditList.getRowIndex()}, 'accountApproved')"  
					    							 actionListener="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'accountApproved', myAuditList)}"/>
					    			</h:graphicImage>  
					    		</h:panelGrid>
			    		</h:column>
			    		
			    		
			    		<h:column>
			    			<f:facet name="header">Security Level Approved?</f:facet>
			    			
			    			<h:panelGrid columns="2">
				    			<h:selectOneRadio id="securityLevelApprovedRB" value="#{myRow[1].securityLevelApproved}"			    							  	    							  
				    							  rendered="#{noteAction.getRenderRadioButtons(myAuditList.getRowIndex())}">
				    					<a4j:support event="onclick" 
					    						     oncomplete="processNote(#{myAuditList.getRowIndex()}, 'secLevelApproved')"
					    						     action="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'secLevelApproved', myAuditList)}"/>     		    						
									<f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
								</h:selectOneRadio>									 
								<h:graphicImage id="securityLevelGraphic" value="/img/icon_edit.gif"												
												rendered="#{noteAction.getRenderNoteGraphic(myAuditList.getRowIndex(), 'secLevelApproved') || 
				    						     			securityAuditAction.getLoadedNote(myAuditList.getRowIndex(), 'secLevelApproved')}"> 
				    				<a4j:support event="onclick"		
				    							 onclick="editNote(#{myAuditList.getRowIndex()}, 'secLevelApproved')"	
				    							 action="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'secLevelApproved', myAuditList)}"				    							
				    							 reRender="out3"
				    							 />
				    			</h:graphicImage>								    	
							</h:panelGrid>   			
			    		</h:column>
			    		
			    		
			    		<h:column>
			    			<f:facet name="header">Adjustment Limit Approved?</f:facet>
			    			
			    			<!-- <h:panelGrid columns="2">  -->
			    			<h:panelGrid columns="3">
				    			<h:selectOneRadio id="adjustmentLimitApprovedRB" value="#{myRow[1].adjustmentLimitApproved}"
				    							  rendered="#{noteAction.getRenderRadioButtons(myAuditList.getRowIndex())}">  
										<a4j:support event="onclick" 
					    						     oncomplete="processNote(#{myAuditList.getRowIndex()}, 'adjLimitApproved')"
					    						     action="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'adjLimitApproved', myAuditList)}"/>        
									<f:selectItems value="#{securityAuditAction.securityAuditRadioButtons}" />
								</h:selectOneRadio>	  
								<h:graphicImage id="adjLimitGraphic" value="/img/icon_edit.gif"
												rendered="#{noteAction.getRenderNoteGraphic(myAuditList.getRowIndex(), 'adjLimitApproved') || 
					    						     			securityAuditAction.getLoadedNote(myAuditList.getRowIndex(), 'adjLimitApproved')}">
					    						<a4j:support event="onclick"		
					    							 oncomplete="editNote(#{myAuditList.getRowIndex()}, 'adjLimitApproved')"	
					    							 actionListener="#{noteAction.setCurrentData(myAuditList.getRowIndex(), 'adjLimitApproved', myAuditList)}"
					    							 reRender="mpNoteAndEmployeeSubmit"/>
					    		</h:graphicImage>     			  	
					    		<h:commandButton id="submitEmployee" value="Submit" actionListener="#{securityAuditAction.submit}" style="visibility:hidden"/>
							</h:panelGrid>
			    		</h:column>
		    					    
		    	</h:dataTable>
		    			    		    	
		</h:form>
	</rich:panel>
	
	<center>
		<a4j:status>
	        <f:facet name="start">
	           <h:graphicImage value="/img/spinner.gif" height="50" width="50"/>
	       </f:facet>
	    </a4j:status>
	</center>
	
	<!-- note only -->
    <rich:modalPanel  id="mpNote" minHeight="200" minWidth="450" 
            height="500" width="500" zindex="2000">
                        
            <f:facet name="header">
                <a4j:form id="a4jHeaderForm1">
                	<h:outputText id="headerText1" value=""/>
                </a4j:form>
            </f:facet>
            
            
            <h:form id="noteLogList1">
	            <h:dataTable value="#{noteAction.getNoteLogList()}" var="myRow" rendered="noteAction.getNoteLogList() != null">
			        <h:column width="400">
				   		<f:facet name="header">NoteText</f:facet>	   
				   		<h:outputText value="#{myRow.noteText}"/>		   		    		
			  		</h:column>
			  	
			  		<h:column>
				   		<f:facet name="header">TimeStamp</f:facet>
				   		<h:outputText value="#{myRow.timeStamp}">		   		    		
				   			<s:convertDateTime dateStyle="short" timeStyle="medium" type="both"/>
				   		</h:outputText>
			  		</h:column>
				</h:dataTable>
			</h:form>   
                  
                    
           	<a4j:form id="a4jMainForm1"> 
           		<h:panelGrid columns="2" style="vertical-align:middle">		
           			<h:outputText id="description1" 			value=""/>
           			<BR/>
					<h:inputTextarea id="noteText1" 			value="#{noteAction.noteText}" rows="6" cols="50">		
						 <a4j:support event="onkeyup" reRender="out1" />
					</h:inputTextarea>	
														
   					<h:inputHidden id="modalPanelName" value="mpNote"/>	
										
					<h:panelGroup id="out1">					
						<a4j:commandButton id="submit1" value="submit" action="#{noteAction.submit}" 
									   onclick="Richfaces.hideModalPanel('mpNote')"
									   oncomplete="selectFalseCurrentRadioButton()"
									   rendered="#{not empty noteAction.noteText2}"
									   reRender="mainForm"/>									   	
					</h:panelGroup>
					<BR/>
					<a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mpNote');unselectCurrentRadioButton()"/>				
				</h:panelGrid>
			</a4j:form>
    </rich:modalPanel>
    
    <!-- no note, row data submit only -->
    <rich:modalPanel  id="mpEmployeeSubmit" minHeight="200" minWidth="450" 
            height="500" width="500" zindex="2000">
                        
            <f:facet name="header">
                <a4j:form id="a4jHeaderForm2">
                	<h:outputText id="headerText2" value=""/>
                </a4j:form>
            </f:facet>
            
           	<a4j:form id="a4jMainForm2"> 
           		<h:panelGrid columns="2" style="vertical-align:middle">		
           			<h:outputText id="description2" 			value=""/>
           			<BR/>
           			
           			<h:inputHidden id="modalPanelName" value="mpEmployeeSubmit"/>	
           								
					<a4j:commandButton value="submit" oncomplete="clickDataTableSubmit();Richfaces.hideModalPanel('mpEmployeeSubmit')"/>						
					<BR/>
					<a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mpEmployeeSubmit');unselectCurrentRadioButton()"/>	
								
				</h:panelGrid>
			</a4j:form>
    </rich:modalPanel>
    
    <!-- note and row data submit -->
    
    <rich:modalPanel  id="mpNoteAndEmployeeSubmit" minHeight="200" minWidth="450" 
            height="500" width="500" zindex="2000">    
                          
	            <f:facet name="header">
	                <a4j:form id="a4jHeaderForm3">
	                	<h:outputText id="headerText3" value=""/>
	                </a4j:form>
	            </f:facet>
	     <a4j:outputPanel id="out3" ajaxRendered="true">         
	            <h:form id="noteLogList2">	            
					<rich:datascroller align="left"  for="myList" maxPages="20" rendered="#{noteAction.getNoteLogList() ne null}"/>
		            <rich:spacer height="30" rendered="#{noteAction.getNoteLogList() ne null}"/>
		            <rich:dataTable width="483" id="myList" rows="10" 
		                value="#{noteAction.getNoteLogList()}" var="myRow" 
		                rendered="#{noteAction.getNoteLogList() ne null}">
		                <f:facet name="header">
		                    <rich:columnGroup>
		                        <h:column>
		                            <h:outputText styleClass="headerText" value="NoteText" />
		                        </h:column>
		                        <h:column>
		                            <h:outputText styleClass="headerText" value="TimeStamp" />
		                        </h:column>		                        
		                    </rich:columnGroup>
		                </f:facet>
		
		                <h:column>
		                    <h:outputText value="#{myRow.noteText}"/>	
		                </h:column>
		                <h:column>
		                    <h:outputText value="#{myRow.timeStamp}">		   		    		
				   				<s:convertDateTime dateStyle="short" timeStyle="medium" type="both"/>
				   			</h:outputText>
		                </h:column>
	            	</rich:dataTable>
				</h:form>   
	     </a4j:outputPanel>       
	           	<a4j:form id="a4jMainForm3"> 
	           		<h:panelGrid columns="2" style="vertical-align:middle">		
	           			<h:outputText id="description3" 			value=""/>
	           			<BR/>
											
						<h:inputTextarea id="noteText3" 			value="#{noteAction.noteText}" rows="6" cols="50">		
							 <a4j:support event="onkeyup" reRender="out3" />
						</h:inputTextarea>
						
						<h:inputHidden id="modalPanelName" value="mpNoteAndEmployeeSubmit"/>	
											
						<h:panelGroup id="out3">					
							<a4j:commandButton id="submit3" value="submit" action="#{noteAction.submit}" oncomplete="clickDataTableSubmit();Richfaces.hideModalPanel('mpNoteAndEmployeeSubmit')" 
										   rendered="#{not empty noteAction.noteText2}">
			    			</a4j:commandButton>			   	
						</h:panelGroup>
						
						<BR/>
						
						<a4j:commandButton value="cancel" onclick="Richfaces.hideModalPanel('mpNoteAndEmployeeSubmit');unselectCurrentRadioButton()"/>				
					</h:panelGrid>
				</a4j:form>
		
    </rich:modalPanel>

 	    
</ui:define> 
</ui:composition>
SFSB:
package com.cox.beans.session;

import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.TreeMap;

import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;

import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;

import com.cox.beans.entity.User;

@Stateful
@Name("peerAction")
public class PeerAction implements PeerLocal {

	@PersistenceContext(unitName="coxIMDatasource", type=PersistenceContextType.EXTENDED)
	private EntityManager emCoxIM;
	
	@PersistenceContext(unitName="boIcomsSecurityAudit", type=PersistenceContextType.EXTENDED)
	private EntityManager emICOMS;
	
	@Logger
	private Log log;
	
	@In
	private Identity identity;
	
	private String networkId = "";
	
	private String peer = "";
	
	@Out
	private List peerList;
	
	@Remove @Destroy
	public void destroy() {
		
	}
	public String getPeer() {
		return "test";
	}
	
	public void setPeer(String peer) {
		this.peer = peer;
	}
	
	public Map<String, Integer> getPeers() {
	
		int employeeId = getEmployeeId();
		//long employeeId = 900050881;
		
		Map<String,Integer> map = new TreeMap<String,Integer>();
		
		peerList = emCoxIM.createQuery("SELECT user1 "+
				"FROM User user1 "+					
				"WHERE user1.hierarchyPath in "+
				"(SELECT user2.hierarchyPath "+
				"FROM User user2 "+
				"WHERE user2.employeeId = :employeeId) "+
				"ORDER BY user1.firstName ASC")
				.setParameter("employeeId", employeeId)
				.getResultList();
		
		log.info("in getPeerList(): peerList.size() = " + peerList.size());
		
		ListIterator it = peerList.listIterator();
		while(it.hasNext()) {
			User user = (User)it.next();			
			map.put(user.getFirstName()+ " " + user.getLastName(), user.getEmployeeId().intValue());
		}
				
		return map;
	}
		
		
	
	
	private Integer getEmployeeId() {
    	String networkId = getNetworkId()==null?"":getNetworkId();
		
		List myList = emICOMS.createQuery("from User u where u.networkId = :networkId").setParameter("networkId", networkId).getResultList(); 
		User newUser = (User)myList.get(0);
		
		Integer employeeId = newUser.getEmployeeId().intValue();
		
		return employeeId; 
    }
	
	private String getNetworkId() {
    	if (networkId.equals("")) 
    		return identity.getUsername();    	
    	else 
    		return networkId;
    }
stack trace:
javax.faces.FacesException: javax.el.ELException: /adminSecurityAudit.xhtml @38,51 value="#{peerAction.peers}": Error reading 'peers' on type org.javassist.tmp.java.lang.Object_$$_javassist_1
	at javax.faces.component.UISelectItems.getValue(UISelectItems.java:133)
	at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:323)
	at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:675)
	at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:793)
	at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:335)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
	at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
	at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
	at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199)
	at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194)
	at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
	at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:117)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	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:68)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	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.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
	at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
	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: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(Unknown Source)
Caused by: javax.el.ELException: /adminSecurityAudit.xhtml @38,51 value="#{peerAction.peers}": Error reading 'peers' on type org.javassist.tmp.java.lang.Object_$$_javassist_1
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
	at javax.faces.component.UISelectItems.getValue(UISelectItems.java:130)
	... 69 more
Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection
	at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
	at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
	at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
	at $Proxy110.getPeers(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
	at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
	at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
	at org.javassist.tmp.java.lang.Object_$$_javassist_1.getPeers(Object_$$_javassist_1.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
	at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
	at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
	at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
	... 70 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.Ge                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2008
Added on Dec 19 2007
2 comments
959 views