Почему Target Unreachable, идентификатор разрешен для null на weblogic

Люди отмечают это дубликат, но если вы посмотрите на мой ответ ниже, вы увидите, почему это другое.

Я использую STS, weblogic и primefaces 5.3, и я продолжаю получать ошибку "Target Unreachable, идентификатор" dtObservationsView "разрешен к null".

Это приложение spring, использующее REST.

Приложение отлично работает на tomcat, но не при развертывании в weblogic.

Я прочитал опубликованный ответ dentifying и решение javax.el.PropertyNotFoundException: Target Unreachable, но он не дал никакого решения, которое работает.

Я также попробовал Справочник по WebLogic, но я все еще получаю ту же ошибку.

pom.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>gov.fda</groupId>
    <artifactId>pcocar</artifactId>
    <name>pcocar_car_web</name>
    <packaging>war</packaging>
    <version>1.0.0-BUILD-SNAPSHOT</version>
    <properties>
        <java-version>1.7</java-version>
        <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
        <org.aspectj-version>1.6.10</org.aspectj-version>
        <org.slf4j-version>1.6.6</org.slf4j-version>
    </properties>
    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework-version}</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                 </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>

        <!-- AspectJ -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${org.aspectj-version}</version>
        </dependency>   

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
            </exclusions>
            <scope>runtime</scope>
        </dependency>

        <!-- @Inject -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- Servlet -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <!-- Primefaces -->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>5.3</version>
        </dependency>
        <!-- JSF 2 -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.2.14</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.2.14</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.10.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.json/json -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20170516</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <version>2.2</version>
        </dependency>

<!--        <dependency>
            <groupId>el.api</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2</version>
        </dependency>
        <dependency>
            <groupId>el.impl</groupId>
            <artifactId>el-impl</artifactId>
            <version>2.2</version>
        </dependency> -->
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <additionalProjectnatures>
                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                    </additionalProjectnatures>
                    <additionalBuildcommands>
                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
                    </additionalBuildcommands>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <configuration>
                    <mainClass>org.test.int1.Main</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

web.xml

    <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/root-context.xml</param-value>
    </context-param>

    <!-- Creates the Spring Container shared by all Servlets and Filters -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- Processes application requests -->
    <servlet>
        <servlet-name>appServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>appServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <!-- Change to "Production" when you are ready to deploy -->
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>

    <!-- Welcome page -->
    <!-- 
    <welcome-file-list>
        <welcome-file>faces/test.xhtml</welcome-file>
    </welcome-file-list>
     -->

<!--     <context-param>
       <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
       <param-value>true</param-value>
    </context-param> -->

    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>

    <!-- Facelets pages will use the .xhtml extension -->
    <context-param>
        <param-name>facelets.VIEW_MAPPINGS</param-name>
        <param-value>*.xhtml</param-value>
    </context-param>

    <mime-mapping>
        <extension>xhtml</extension>
        <mime-type>application/xml</mime-type>
    </mime-mapping>

    <!-- JSF mapping -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>

    <context-param>
        <description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    <listener>
        <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>

    <!-- Map these files with JSF -->
<!--     <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping> -->


</web-app>

observations.xhtml:

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<h:head>
    <style>
        .blockLabel { display: block; }
    </style>
</h:head>
<h:body>
<h2>PREVENTIVE CONTROLS</h2>
<h3>Food and Drug Administration Corrective Action Report</h3>

<h:form id="observationform">
    <p:inputText id="feiInput" value="#{dtObservationsView.feiNumber}" />
    <p:commandButton value="FEIN Search" id="fein_search"
            process="@this :#{p:component('feiInput')}"
            action="#{dtObservationsView.getObservationsByFein}"
            update="@form" />

    <p:dataTable id="observationAddressId" var="address" value="#{dtObservationsView.addresses}" style="margin-bottom:40px" scrollable="true" draggableColumns="true" resizableColumns="true">
            <f:facet name="header">
            Address for Observations below.
        </f:facet>
        <p:column headerText="FEI NUM" sortBy="#{address.feiNum}">
            <h:outputText value="#{address.feiNum}" />
        </p:column>
        <p:column headerText="DUNS NUM" sortBy="#{address.dunsNum}">
            <h:outputText value="#{address.dunsNum}" />
        </p:column>         
        <p:column headerText="AdrLine1" sortBy="#{address.adrLine1}">
            <h:outputText value="#{address.adrLine1}" />
        </p:column>
        <p:column headerText="AdrLine2" sortBy="#{address.adrLine2}">
            <h:outputText value="#{address.adrLine2}" />
        </p:column>
        <p:column headerText="City" sortBy="#{address.city}">
            <h:outputText value="#{address.city}" />
        </p:column>
        <p:column headerText="State" sortBy="#{address.stateCd}">
            <h:outputText value="#{address.stateCd}" />
        </p:column>       
        <p:column headerText="Zip" sortBy="#{address.zipCd}">
            <h:outputText value="#{address.zipCd}" />
        </p:column>
        <p:column headerText="Country" sortBy="#{address.isoCntryCd}">
            <h:outputText value="#{address.isoCntryCd}" />
        </p:column>
        <p:column headerText="RefCd" sortBy="#{address.refCd.id}">
            <h:outputText value="#{address.refCd.id}" />
        </p:column>
    </p:dataTable>

    <p:dataTable id="addressrefcdId" var="addressrefcd" value="#{dtObservationsView.addressRefCds}" style="margin-bottom:40px" scrollable="true" draggableColumns="true" resizableColumns="true">
        <f:facet name="header">
            Single Column Sort For RefCd for the above Address
        </f:facet>
        <p:column headerText="RefCd ID" sortBy="#{addressrefcd.id}">
            <h:outputText value="#{addressrefcd.id}">
            </h:outputText>
        </p:column>
         <p:column headerText="IsActv" sortBy="#{addressrefcd.isActv}">
            <h:outputText value="#{addressrefcd.isActv}">
            </h:outputText>
        </p:column>  
        <p:column headerText="ModuleId" sortBy="#{addressrefcd.moduleId}">
            <h:outputText value="#{addressrefcd.moduleId}">
            </h:outputText>
        </p:column>          
        <p:column headerText="RefType" sortBy="#{addressrefcd.refType}">
            <h:outputText value="#{addressrefcd.refType}">
            </h:outputText>
        </p:column>     

        <p:column headerText="RefValue" sortBy="#{addressrefcd.refValue}">
            <h:outputText value="#{addressrefcd.refValue}">
            </h:outputText>
        </p:column>


        <p:column headerText="Description" sortBy="#{addressrefcd.description}">
            <h:outputText value="#{addressrefcd.description}">
            </h:outputText>
        </p:column>

        <p:column headerText="cFRCiteLanguage" sortBy="#{addressrefcd.cFRCiteLanguage}">
            <h:outputText value="#{addressrefcd.cFRCiteLanguage}">
            </h:outputText>
        </p:column>

    </p:dataTable>

    <p:dataTable id="observationtableId" var="observation" value="#{dtObservationsView.observations}" style="margin-bottom:40px" scrollable="true" draggableColumns="true" resizableColumns="true">
        <f:facet name="header">
            Single Column Sort For Observations
        </f:facet>
        <p:column headerText="Id" sortBy="#{observation.id}">
            <h:outputText value="#{observation.id}" />
        </p:column>

        <p:column headerText="Description" sortBy="#{observation.citationShortDescription}">
            <h:outputText value="#{observation.citationShortDescription}" />
        </p:column>

        <p:column headerText="DtCrrctnRcvd" sortBy="#{observation.dateCorrectionReceived}">
            <h:outputText value="#{observation.dateCorrectionReceived}">
                  <f:convertDateTime type="date" pattern="yyyy-MM-dd" />
            </h:outputText>
        </p:column>

        <p:column headerText="InspctnEndDt" sortBy="#{observation.inspectionEndDate}">
            <h:outputText value="#{observation.inspectionEndDate}">
                 <f:convertDateTime type="date" pattern="yyyy-MM-dd" />
            </h:outputText>
        </p:column>

        <p:column headerText="InspctnDt" sortBy="#{observation.inspectionDate}">
            <h:outputText value="#{observation.inspectionDate}">
                 <f:convertDateTime type="date" pattern="yyyy-MM-dd" />
            </h:outputText>
        </p:column>

        <p:column headerText="Assgnmnt ID" sortBy="#{observation.assignment.id}">
            <h:outputText value="#{observation.assignment.id}">
            </h:outputText>
        </p:column> 


        <p:column headerText="RefCd ID" sortBy="#{observation.refCd.id}">
            <h:outputText value="#{observation.refCd.id}">
            </h:outputText>
        </p:column> 

    </p:dataTable>



</h:form>

</h:body>
</html>

ObservationsView.java:

    /**
 * 
 */
package gov.fda.furls.fsma.pcocar.primefaces.managedbean.observations;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;

import gov.fda.furls.fsma.pcocar.primefaces.domain.ActionResponse;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Adr;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Assignment;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Atchmnt;
import gov.fda.furls.fsma.pcocar.primefaces.domain.AtchmntDetail;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Cntct;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Evidence;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Observation;
import gov.fda.furls.fsma.pcocar.primefaces.domain.Prfl;
import gov.fda.furls.fsma.pcocar.primefaces.domain.PrflDetail;
import gov.fda.furls.fsma.pcocar.primefaces.domain.RefCd;
import gov.fda.furls.fsma.pcocar.service.AddressService;
import gov.fda.furls.fsma.pcocar.service.ObservationService;

/**
 * @author Denis.Putnam
 *
 */
@ManagedBean(name="dtObservationsView")
//@ViewScoped
@SessionScoped
public class ObservationsView implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -3273738869247166831L;

    private Set<Observation> observations;

    private Set<Adr> addresses;

    private Set<Assignment> assignments;

    private Set<Prfl> profiles;

    private Set<PrflDetail> profileDetails;

    private Set<Cntct> contacts;

//  private List<Citation> citations;

    private Set<Evidence> evidences;

    private Set<ActionResponse> actionResponses;

    private Set<ActionResponse> evidenceActionResponses;

    private Set<AtchmntDetail> attachmentDetails;

    private Set<Atchmnt> attachments;

    private Set<RefCd> refCds;

    private Set<RefCd> addressRefCds;

    private Set<RefCd> observationRefCds;

    private Set<RefCd> attachmentRefCds;

    @ManagedProperty("#{observationService}")
    private ObservationService observationService;

    @ManagedProperty("#{addressService}")
    private AddressService addressService;

    private String feiNumber;

    public ObservationsView(){
        super();
    }

    @PostConstruct
    public void init() {
        this.observations = new HashSet<Observation>();
        this.feiNumber = new String();
    }

//    @PostConstruct
//    public void init() {
//        try {
//          this.observations = new HashSet<Observation>(this.observationService.getObservations());
//      } catch (Exception e) {
//          // TODO Auto-generated catch block
//          e.printStackTrace();
//      }
//    }

    public Set<RefCd> getRefCds() {
        return refCds;
    }

    public void setRefCds(Set<RefCd> refCds) {
        this.refCds = refCds;
    }

//  public List<Citation> getCitations() {
//      return citations;
//  }
//
//  public void setCitations(List<Citation> citations) {
//      this.citations = citations;
//  }


    public AddressService getAddressService() {
        return addressService;
    }

    public void setAddressService(AddressService addressService) {
        this.addressService = addressService;
    }

    public void setObservationService(ObservationService service) {
        this.observationService = service;
    }

    public ObservationService getObservationService(){
        return this.observationService;
    }

    public Set<Observation> getObservations(){
        return this.observations;
    }

    public void getObservationsByFein(){
        if( this.feiNumber != null ){
            try {
                this.observations = new HashSet<Observation>(this.observationService.getObservationsByFein(new Long(feiNumber)));
                this.addresses = new HashSet<Adr>(this.addressService.getAddressesByFein(new Long(feiNumber)));
                this.assignments = new HashSet<Assignment>();
                this.profiles = new HashSet<Prfl>();
                this.profileDetails = new HashSet<PrflDetail>();
                this.contacts = new HashSet<Cntct>();
                this.refCds = new HashSet<RefCd>();
                this.addressRefCds = new HashSet<RefCd>();
                this.observationRefCds = new HashSet<RefCd>();
                this.attachmentRefCds = new HashSet<RefCd>();
//              this.citations = new HashSet<Citation>();
                this.evidences = new HashSet<Evidence>();
//              this.citationEvidences = new HashSet<Evidence>();
                this.actionResponses = new HashSet<ActionResponse>();
                this.evidenceActionResponses = new HashSet<ActionResponse>();
                this.attachmentDetails = new HashSet<AtchmntDetail>();
                this.attachments = new HashSet<Atchmnt>();
//              Set<Citation> citations = null;
                Set<Evidence> evidences = null;
                Set<ActionResponse> actionResponses = null;
                for( Observation observation: this.observations){
                    Assignment assignment = observation.getAssignment();
                    if( assignment != null && assignment.getId() != null ){
                        this.assignments.add(assignment);
                        Prfl profile = assignment.getProfile();
                        if( profile != null && profile.getId() != null ){
                            this.profiles.add(profile);
                            for( PrflDetail profileDetail: profile.getPrflDetails()){
                                this.profileDetails.add(profileDetail);
                                Cntct contact = profileDetail.getCntct();
                                if( contact != null && contact.getId() != null ){
                                    this.contacts.add(contact);
                                    RefCd refCd = contact.getRefCd();
                                    if( refCd != null ){
                                        this.refCds.add(refCd);
                                    }
                                }
                            }
                        }
                    }
                    this.observationRefCds.add(observation.getRefCd());
//                  citations = observation.getCitations();
//                  this.citations.addAll(citations);
//                  for( Citation citation: this.citations ){
//                      if( citation.getEvidences() != null ){
//                          this.citationEvidences.addAll(citation.getEvidences());
//                      }
//                  }
                    actionResponses = observation.getActionResponses();
                    this.actionResponses.addAll(actionResponses);

                    evidences = observation.getEvidences();
                    Set<ActionResponse> evidenceActionResponses = null;
                    Set<AtchmntDetail> attachmentDetails = null;

                    for( Evidence evidence: evidences){
                        evidenceActionResponses = evidence.getActionResponses();
                        attachmentDetails = evidence.getAtchmtDet();
                        this.evidenceActionResponses.addAll(evidenceActionResponses);
                        this.attachmentDetails.addAll(attachmentDetails);
                        for( AtchmntDetail attachmentDetail: attachmentDetails ){
                            this.attachments.add(attachmentDetail.getAtchmnt());
                        }
                    }
                    for( Atchmnt attachment: this.attachments ){
                        this.attachmentRefCds.add(attachment.getRefCd());
                    }
                    this.evidences.addAll(evidences);
                }
                for( Adr address: this.addresses ){
                    RefCd refCd = address.getRefCd();
                    this.addressRefCds.add(refCd);                  
                }
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
//        return this.observations;     
    }

    public Set<Prfl> getProfiles() {
        return profiles;
    }

    public void setProfiles(Set<Prfl> profiles) {
        this.profiles = profiles;
    }

    public void setObservations(Set<Observation> observations){
        this.observations = observations;
    }

    public String getFeiNumber() {
        return feiNumber;
    }

    public void setFeiNumber(String feiNumber) {
        this.feiNumber = feiNumber;
    }

    public Set<Adr> getAddresses() {
        return addresses;
    }

    public void setAddresses(Set<Adr> addresses) {
        this.addresses = addresses;
    }

    public Set<Assignment> getAssignments() {
        return assignments;
    }

    public void setAssignments(Set<Assignment> assignments) {
        this.assignments = assignments;
    }

    public Set<PrflDetail> getProfileDetails() {
        return profileDetails;
    }

    public void setProfileDetails(Set<PrflDetail> profileDetails) {
        this.profileDetails = profileDetails;
    }

    public Set<Cntct> getContacts() {
        return contacts;
    }

    public void setContacts(Set<Cntct> contacts) {
        this.contacts = contacts;
    }

    public Set<Evidence> getEvidences() {
        return evidences;
    }

    public void setEvidences(Set<Evidence> evidences) {
        this.evidences = evidences;
    }

    public Set<ActionResponse> getActionResponses() {
        return actionResponses;
    }

    public void setActionResponses(Set<ActionResponse> actionResponses) {
        this.actionResponses = actionResponses;
    }

    public Set<ActionResponse> getEvidenceActionResponses() {
        return evidenceActionResponses;
    }

    public void setEvidenceActionResponses(Set<ActionResponse> evidenceActionResponses) {
        this.evidenceActionResponses = evidenceActionResponses;
    }

    public Set<RefCd> getAddressRefCds() {
        return addressRefCds;
    }

    public void setAddressRefCds(Set<RefCd> addressRefCds) {
        this.addressRefCds = addressRefCds;
    }

    public Set<RefCd> getObservationRefCds() {
        return observationRefCds;
    }

    public void setObservationRefCds(Set<RefCd> observationRefCds) {
        this.observationRefCds = observationRefCds;
    }

    public Set<AtchmntDetail> getAttachmentDetails() {
        return attachmentDetails;
    }

    public void setAttachmentDetails(Set<AtchmntDetail> attachmentDetails) {
        this.attachmentDetails = attachmentDetails;
    }

    public Set<Atchmnt> getAttachments() {
        return attachments;
    }

    public void setAttachments(Set<Atchmnt> attachments) {
        this.attachments = attachments;
    }

    public Set<RefCd> getAttachmentRefCds() {
        return attachmentRefCds;
    }

    public void setAttachmentRefCds(Set<RefCd> attachmentRefCds) {
        this.attachmentRefCds = attachmentRefCds;
    }

}

трассировка стека:

    WARNING: JSF1091: No mime type could be found for file images/ui-icons_38667f_256x240.png.  To resolve this, add a mime-type mapping to the applications web.xml.
Jul 31, 2017 2:07:05 PM com.sun.faces.context.PartialViewContextImpl processPartial
INFO: javax.el.PropertyNotFoundException: //C:/Users/Denis.Putnam/Documents/workspace-sts-3.8.4.RELEASE/pcocar_car_web/src/main/webapp/observations.xhtml @20,71 value="#{dtObservationsView.feiNumber}": Target Unreachable, identifier 'dtObservationsView' resolved to null

Ответ 1

СЛЕДУЮЩИЕ ДОКУМЕНТЫ КАК ИСПОЛЬЗОВАТЬ ПРЕМЬЕРЫ НА WEBLOGIC новичком.

ВЕБ-ССЫЛКИ:

https://docs.oracle.com/javaee/7/tutorial/cdi-basic.htm

Идентификация и решение javax.el.PropertyNotFoundException: Целевая задача недоступна

Почему Target Unreachable, идентификатор разрешен для null в weblogic

https://www.primefaces.org/

https://en.wikipedia.org/wiki/Spring_Framework

ВЕРСИИ:

Графики 5.3

Spring 3.1.1

Spring Набор инструментов (STS) Версия: 3.8.4.RELEASE

Java 1.7

Weblogic 11gR1

Pivotal tc Server Developer Edition v3.2, это содержит Tomcat

ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ:

CDI: Это из первой ссылки выше:

Контексты и инжекция зависимостей для Java EE

Контексты и инжекция зависимостей для Java EE (CDI) - одна из нескольких функций Java EE, которые помогают объединить уровень веб-уровня и транзакционный уровень платформы Java EE. CDI - это набор сервисов, которые совместно используются разработчиками для использования корпоративным beans наряду с технологией JavaServer Faces в веб-приложениях. Разработанный для использования с объектами с сохранением состояния, CDI также имеет множество более широких применений, что позволяет разработчикам иметь большую гибкость для интеграции различных компонентов в свободно связанный, но типичный способ.

SPRING: Это из 5-й ссылки выше: Spring Framework - это инфраструктура приложения и инверсия контейнера управления для платформы Java. Основные функции ядра могут использоваться любым Java-приложением, но есть расширения для создания веб-приложений поверх платформы Java EE (Enterprise Edition). Хотя структура не навязывает какую-либо конкретную модель программирования, она стала популярной в сообществе Java в качестве альтернативы, замена или даже дополнение к модели Enterprise JavaBeans (EJB). Структура Spring с открытым исходным кодом.

Примечание:

Я дал приведенные выше определения, чтобы показать, что есть два места, где инъекция зависимостей может возникать, когда вы разворачиваете первичные объекты в Weblogic при разработке с помощью Spring.
Один из них - с CDI, а другой - с Spring. Важно понять это, потому что, по крайней мере, из того, что я прочитал и испытал, вы не должны смешивать аннотации для Spring и CDI.

Tomcat гораздо более прощает, когда речь идет о развертывании интерфейсов, чем Weblogic. Мое приложение отлично работало на tomcat, но с Weblogic у меня были всевозможные проблемы. Первый из них - исключение javax-el-propertynotfoundexception-target-unreachable. Второе звено выше, идет в довольно хорошее определение того, что вам нужно сделать заставляют вещи работать правильно с первичными.

Третья ссылка - это мое сообщение в стеке, где я искал ответ, который я получал с помощью Weblogic. Если я смогу получить этот документ в виде ответа там в читаемом формат, я сделаю это.

АРХИТЕКТУРА:

Таким образом, существует аналогичная архитектура с первичными элементами, которые, по моему мнению, отражают шаблон Spring MVC. В Spring MVC контроллер - это код, который вызывается всякий раз, когда представляет собой HTTP-запрос, сделанный на сервер приложений, то есть Tomcat или Weblogic. Weblogic необходим, если вы хотите использовать EJB для пользователя, поскольку Tomcat является контейнером сервлета, и он не понять EJB. Tomcat отлично работает с Spring, поскольку Spring делает все в сервлетах. Итак, если вы не используете EJB, я считаю, что Tomcat - это путь поскольку он является открытым исходным кодом и не требует никаких лицензионных сборов.

В моем случае, однако, клиент разрешает Weblogic, поэтому проблемы, с которыми я начал работать.

Следующий уровень в шаблоне MVC - это уровень сервиса, а ниже - слой репозитория. Таким образом, это Controller → Service → Repository.

Обычно в Spring MVC контроллер автоматически обрабатывает Serivice с помощью @Autowired, и Служба автоматически создает репозиторий, который сделает пользователя @Entity beans. Entity beans в Hibernate - это просто POJO с аннотацией @Entity. Эти объекты сохраняются в базе данных.

В Primefaces, по крайней мере на основе моих ограниченных знаний, есть ManagedBean и ManagedProperty.

Оба Primefaces и Spring имеют аннотации, которые вводят отношения этих различных объектов в java.

В случае Spring у вас есть @Controller или @RestController, @Service и @Repository. Это не полный список, но это те, которые я обычно использую. В Primefaces у вас есть @ManagedBean и @ManagedProperty. Могут быть и другие, но это то, что я использовал. @ManagedProperty похож на @Autowired в Spring.

Итак, ManagedBean выглядит так:

    @ManagedBean(name="observationsView", eager=true)
public class ObservationsView implements Serializable {

    @ManagedProperty( value = "#{observationService}")
    private ObservationService observationService;

    ...
}

@ManagedBean(name = "observationService")
@ApplicationScoped
public class ObservationServiceImpl implements ObservationService, Serializable {
    @ManagedProperty( value = "#{observationDao}")
    private ObservationDao observationDao;

    ...
}

@ManagedBean(name = "observationDao")
@ApplicationScoped
public class ObservationDaoImpl implements ObservationDao, Serializable{

    @ManagedProperty( value = "#{daoHelper}")
    private DaoHelper daoHelper;

    ...

}

Вы заметите, что ManagedBean "autwires" ManagedProperty, который ему нужен.

ФАЙЛЫ: WEB-INF/weblogic.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
    <wls:container-descriptor>
        <!--<wls:index-directory-enabled>true</wls:index-directory-enabled>  -->
        <wls:prefer-application-packages>
            <wls:package-name>org.slf4j</wls:package-name>
            <wls:package-name>org.springframework.*</wls:package-name>
        </wls:prefer-application-packages>
    </wls:container-descriptor>
    <wls:context-root>pcocar</wls:context-root>
    <wls:weblogic-version>10.3.6</wls:weblogic-version>
</wls:weblogic-web-app>

WEB-INF/faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
    <application>
        <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>     
    </application>
</faces-config>

WEB-INF/beans.xml: Я не думаю, что вам нужен этот. Это должно быть только для CDI, как описано во второй ссылке выше.

    <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
                           http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
       version="1.1" bean-discovery-mode="all">
</beans>

ОШИБКИ ИЗБЕЖАТЬ:

  • Убедитесь, что вы реализуете Serializable для всех ваших управляемых beans.

  • Убедитесь, что вы создаете геттеры и сеттеры для всех ManagedProperty, так что отражение Java может получить и установить их.

    Вот пример:

    @ManagedBean(name = "observationService")
    

    @ApplicationScoped открытый класс ObservationServiceImpl реализует ObservationService, Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -7242896804221503769L;
    
    /**
     * @return the observationDao
     */
    public ObservationDao getObservationDao() {
        return observationDao;
    }
    
    /**
     * @param observationDao the observationDao to set
     */
    public void setObservationDao(ObservationDao observationDao) {
        this.observationDao = observationDao;
    }
    
    @ManagedProperty( value = "#{observationDao}")
    private ObservationDao observationDao;
    
    public List<Observation> getObservationsByFein( Long fein ) throws Exception{
        return this.observationDao.findByFein(fein);
    }
    
    public List<Observation> getObservations() throws Exception{
        return this.observationDao.findAll();
    }
    

    }

Если вы не создаете сеттеры и получатели, то Primefaces не будет работать, по крайней мере, не в Weblogic.

  1. В вашем @ManagedPropery() используйте use 'value = "bean name" ', а не только @ManagedProperty ( "bean name" ).

  2. Назовите все управляемые beans с помощью @ManagedBean (name = "bean name" ). Я не знаком с правилами съемки.

  3. Не смешивайте аннотацию Spring с аннотациями Primefaces.

  4. Убедитесь, что вы используете аннотации javax.faces.bean:

    import javax.faces.bean.ApplicationScoped;
    
    import javax.faces.bean.ManagedBean;
    
    import javax.faces.bean.ManagedProperty;
    

    Не используйте:

    import org.springframework.web.bind.annotation.*
    

В STS убедитесь, что проект Properties → Spring → Project Builders → AOP Reference Model Builder отключен, если вы добавили пространство имен AOP в файле servlet-context.xml.