javax.faces.el.E​​valuationException + java.lang.NoSuchMethodError

时间:2016-10-19 12:13:08

标签: setter nosuchmethoderror

我们正在将Weblogic更新为12c,将java更新为1.7,并将其更新为4.6以解决合规性和安全性问题。代码适用于java6和weblogic 10.3 我尝试运行webapp时遇到错误。我目前正在使用Jsf 2.2和Spring 4.2.6,Primefaces 5.3和weblogic 12c

运行应用程序时记录: -

    110416 15:09:56 | INFO  | IndividualProfileMB | displayProfileDetails RespCountryCode   08001
<Nov 4, 2016 3:09:56 PM IST> <Warning> <javax.enterprise.resource.webcontainer.jsf.lifecycle> <BEA-000000> <#{individualProfileMB.getIndividualProfileDetails}: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
javax.faces.FacesException: #{individualProfileMB.getIndividualProfileDetails}: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:117)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    Truncated. see log file for complete stacktrace
Caused By: javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
    at com.abg.cdh.pageBean.IndividualProfileMB.displayProfileDetails(IndividualProfileMB.java:2092)
    at com.abg.cdh.pageBean.IndividualProfileMB.getIndividualProfileDetails(IndividualProfileMB.java:960)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Truncated. see log file for complete stacktrace
> 
<Nov 4, 2016 3:09:56 PM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@24381056[app:web module:webapp path:null spec-version:3.0], request: weblogic.servlet.internal.ServletRequestImpl@170ea81[
POST /CDH_Portal/pages/customer/searchProfile.jsf HTTP/1.1
Connection: keep-alive
Content-Length: 176
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:7001
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:7001/CDH_Portal/pages/customer/searchProfile.jsf
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8

]] Root cause of ServletException.
javax.faces.el.EvaluationException: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
    at javax.faces.component.UICommand.broadcast(UICommand.java:315)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: com.ccrgservices.common.data.customer.VO.CommunicationInfo.setsConfirmEmailAddress(Ljava/lang/String;)V
    at com.abg.cdh.pageBean.IndividualProfileMB.displayProfileDetails(IndividualProfileMB.java:2092)
    at com.abg.cdh.pageBean.IndividualProfileMB.getIndividualProfileDetails(IndividualProfileMB.java:960)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Truncated. see log file for complete stacktrace
> 

的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>mvn-parent</artifactId>
        <groupId>com.abg.maven</groupId>
        <version>4.0.0-SNAPSHOT</version>
    </parent>


    <artifactId>CDH_Portal</artifactId>
    <packaging>war</packaging>
    <name>CDH_Portal</name>

    <properties>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>      
        <javax.faces.version>2.0.3</javax.faces.version> 
        <org.primefaces.version>5.3</org.primefaces.version>
        <maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>

    </properties>
    <repositories>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <build>
        <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
        <finalName>${project.artifactId}</finalName>
        <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <configuration>
                        <source>1.6</source>
                        <target>1.7</target>
                        <compilerArgument></compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <!--<version>3.3</version> -->
                    <version>2.3.1</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jibx</groupId>
                    <artifactId>jibx-maven-plugin</artifactId>
                    <!-- <version>${jibx.maven.version}</version> -->
                    <version>1.2.2</version>
                    <configuration>
                        <schemaBindingDirectory>src/main/jibx</schemaBindingDirectory>
                        <includeSchemaBindings>
                            <includeSchemaBindings>*.xml</includeSchemaBindings>
                        </includeSchemaBindings>
                        <verbose>true</verbose>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>bind</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <dependencies>

        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.1</version>
            <type>maven-plugin</type>
        </dependency>    

         <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>                
            <version>${javax.faces.version}</version>
        </dependency> 
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>               
            <version>${javax.faces.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
        </dependency>

        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-run</artifactId>
            <version>1.2.2</version>
        </dependency>
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-extras</artifactId>
            <version>1.2.2</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2</version>
        </dependency>

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

        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.1.4</version>
        </dependency>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>             
            <version>${org.primefaces.version}</version>
        </dependency>

        <dependency>
            <groupId>org.owasp.antisamy</groupId>
            <artifactId>antisamy</artifactId>
            <version>1.4.5</version>
        </dependency>

        <dependency>
            <groupId>com.abg.maven</groupId>
            <artifactId>mvn-sfw-pure-data</artifactId>
            <version>4.0.0-SNAPSHOT</version>
        </dependency>           

        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>com.abg.maven</groupId>
            <artifactId>mvn-sfw-core</artifactId>
            <version>4.0.0-SNAPSHOT</version>
        </dependency>

    </dependencies>

</project>

faces-config.xml中

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xi="http://www.w3.org/2001/XInclude" 
    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>           
        <locale-config>
            <default-locale>en</default-locale>
        </locale-config>
        <resource-bundle>
            <base-name>com.abg.cdh.welcome</base-name>
            <var>field</var>
        </resource-bundle>
        <message-bundle>resources.application</message-bundle>
        <el-resolver>
            org.springframework.web.jsf.el.SpringBeanFacesELResolver
        </el-resolver>
    </application>
    <managed-bean>
        <managed-bean-name>individualProfileMB
        </managed-bean-name>
        <managed-bean-class>com.abg.cdh.pageBean.IndividualProfileMB
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>loginActionMB
        </managed-bean-name>
        <managed-bean-class>com.abg.cdh.user.LoginAction
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>languageMB</managed-bean-name>
        <managed-bean-class>com.abg.cdh.pageBean.LanguageMB
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

    <converter>
        <converter-id>timestampConverter</converter-id>
        <converter-class>com.abg.cdh.formatter.DateConverter
        </converter-class>
    </converter>
    <converter>
        <converter-id>yesNoFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.YesNoFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>languageFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.LanguageFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>commonFormatters</converter-id>
        <converter-class>com.abg.cdh.formatter.CommonFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>mraIndFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.MraIndFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>preferredClassFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.PreferredClassFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>paymentCodeFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.PaymentCodeFormatter
        </converter-class>
    </converter>
    <converter>
        <converter-id>returnCodeFormatter</converter-id>
        <converter-class>com.abg.cdh.formatter.ReturnCodeFormatter
        </converter-class>
    </converter>
    <lifecycle>
        <phase-listener>com.abg.cdh.util.AuthorizationListener</phase-listener>
    </lifecycle>
    <navigation-rule>
         <from-view-id>/*</from-view-id>  
        <navigation-case>
            <from-outcome>loginPage</from-outcome>
            <to-view-id>/pages/customer/searchProfile.xhtml</to-view-id>
         </navigation-case>
    </navigation-rule>      
</faces-config>

.classpath文件: -

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
    <classpathentry excluding="**/*.java" kind="src" output="target/test-classes" path="src/test/resources"/>
    <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
    <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
    <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar"/>
    <classpathentry kind="var" path="M2_REPO/javax/el/el-api/2.2/el-api-2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/javax/management/jmxremote/1.0.1.04/jmxremote-1.0.1.04.jar"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="var" path="M2_REPO/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar"/>
    <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/sun/el/el-ri/1.0/el-ri-1.0.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-webmvc/4.2.6.RELEASE/spring-webmvc-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/4.2.6.RELEASE/spring-beans-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/4.2.6.RELEASE/spring-core-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/4.2.6.RELEASE/spring-context-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/4.2.6.RELEASE/spring-aop-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-expression/4.2.6.RELEASE/spring-expression-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/4.2.6.RELEASE/spring-web-4.2.6.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-web/4.2.6.RELEASE/spring-web-4.2.6.RELEASE-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/sun/faces/jsf-api/2.2.2/jsf-api-2.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/sun/faces/jsf-impl/2.2.2/jsf-impl-2.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/el-impl/el-impl/1.0/el-impl-1.0.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/primefaces/primefaces/5.3/primefaces-5.3.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/owasp/antisamy/antisamy/1.4.5/antisamy-1.4.5.jar"/>
    <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-css/1.7/batik-css-1.7.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-ext/1.7/batik-ext-1.7.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/apache/xmlgraphics/batik-util/1.7/batik-util-1.7.jar"/>
    <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04.jar"/>
    <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.12/nekohtml-1.9.12.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-sfw-pure-data/4.0.0-SNAPSHOT/mvn-sfw-pure-data-4.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/com/abg/maven/mvn-sfw-pure-data/4.0.0-SNAPSHOT/mvn-sfw-pure-data-4.0.0-SNAPSHOT-sources.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-encryption/4.0.0-SNAPSHOT/mvn-encryption-4.0.0-SNAPSHOT.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-utility/4.0.0-SNAPSHOT/mvn-utility-4.0.0-SNAPSHOT.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar"/>
    <classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-sfw-core/4.0.0-SNAPSHOT/mvn-sfw-core-4.0.0-SNAPSHOT.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context-support/4.2.6.RELEASE/spring-context-support-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-spring-remoting/4.0.0-SNAPSHOT/mvn-spring-remoting-4.0.0-SNAPSHOT.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/abg/maven/mvn-enterprise-data/4.0.0-SNAPSHOT/mvn-enterprise-data-4.0.0-SNAPSHOT.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.6.1/jackson-annotations-2.6.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.17/log4j-1.2.17.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/coherence/coherence/3.4.2/coherence-3.4.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/coherence/tangosol/3.4.2/tangosol-3.4.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/com/coherence/tangosol-license-dev/3.4.2/tangosol-license-dev-3.4.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-jdbc/4.2.6.RELEASE/spring-jdbc-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-tx/4.2.6.RELEASE/spring-tx-4.2.6.RELEASE.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-validator/commons-validator/1.5.1/commons-validator-1.5.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.6/commons-pool-1.6.jar"/>
    <classpathentry kind="var" path="M2_REPO/mx4j/mx4j-tools/3.0.1/mx4j-tools-3.0.1.jar"/>
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-mock/2.0.8/spring-mock-2.0.8.jar"/>
    <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.1/junit-4.8.1.jar"/>
    <classpathentry kind="src" path=".apt_src">
        <attributes>
            <attribute name="optional" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
</classpath>

Bean CommunicationInfo.java: -

package com.ccrgservices.common.data.customer.VO;

import java.io.Serializable;
import java.util.Date;

public class CommunicationInfo implements Serializable {

    private static final long serialVersionUID = -1027350223475029808L;
    ....
    private String sConfirmEmailAddress5;

    public String getsConfirmEmailAddress5() {
        return sConfirmEmailAddress5;
    }

    public void setsConfirmEmailAddress5(String confirmEmailAddress5) {
        sConfirmEmailAddress5 = confirmEmailAddress5;
    }

    public String getsEmailAddress5() {
        return sEmailAddress5;
    }

...       }

IndividualProfileMB.java

package com.abg.cdh.pageBean;

import org.apache.commons.lang.StringUtils;

import java.io.IOException;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Properties;
import java.util.Map.Entry;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.component.UIOutput;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.model.SelectItem;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.abg.cdh.constants.CDHConstant;
import com.abg.cdh.formatter.SelectItemComparator;
import com.abg.cdh.pageHandler.AddProfileHandler;
import com.abg.cdh.pageHandler.EditProfileHandler;
import com.abg.cdh.pageHandler.ViewProfileHandler;
import com.abg.cdh.user.LoginAction;
import com.abg.cdh.user.ProfileSession;
import com.abg.cdh.user.UserProfileUtility;
import com.abg.cdh.util.ExpressionUtil;
import com.abg.cdh.util.GetCurrentMB;
import com.abg.cdh.validator.CdhValidator;
import com.abg.cdh.validator.ProfileValidation;
import com.ccrgservices.common.data.cdh_portal.SearchRs;
import com.ccrgservices.common.data.customer.CustomerProfileRS;
import com.ccrgservices.common.data.customer.VO.AddressInfo;
import com.ccrgservices.common.data.customer.VO.CommunicationInfo;
import com.ccrgservices.common.data.customer.VO.OptionalProductInfo;
import com.ccrgservices.common.data.customer.VO.PaymentInfo;
import com.ccrgservices.common.data.customer.VO.PersonalInfo;
import com.ccrgservices.common.data.customer.VO.PreferenceInfo;
import com.ccrgservices.common.data.customer.VO.PrestigeInfo;
import com.ccrgservices.common.data.customer.VO.ProfileCardInfo;
import com.ccrgservices.common.data.customer.VO.RentalInfo;
import com.ccrgservices.utility.MaskUtility;

@ManagedBean(name = "individualProfileMB", eager = true)
@SessionScoped
public class IndividualProfileMB implements Serializable {

    private static final long serialVersionUID = 313360291178273233L;

    private static Log log = LogFactory.getLog(IndividualProfileMB.class);
...

    /**
     * Method: getIndividualProfileDetails
     * 
     * Description: Method to display searched profile details
     * 
     * @return String
     * 
     */
    public String getIndividualProfileDetails() {
        goterror = false;
        flag = false;
        String returnPath = "";
        flowWithSearchResult = false;
        bSpecialProfile= false;
        bSerchPanelEdit=false;
        sErrorCode="";
        sErrorMsg2="";
        sErrorMsg3="";
        sErrorMsg4="";
        sErrorMsg5="";
        bPrimary=true;  
        bSecond=false;  
        bThird=false;
        bfouth=false;
        bFifth=false;
        bFifthEmail=false;
        bShowallCards=false;
        bPrimaryEmail=true; 
        bSecondEmail=false; 
        bThirdEmail=false;
        bfouthEmail=false;
        selectccDrop="primary";
        bTranSuccess=false;
        selectemailDrop="primaryemail";
        //signOnCountryDropdown=signOnCountry;
        String temp=signOnCountryMap.get(signOnCountry);
        //System.out.println("temp"+temp);
        if(temp!= null && temp.length()!=0){
            //System.out.println("1");
            signOnCountryDropdown=signOnCountry+"-"+signOnCountryMap.get(signOnCountry);
        }
        else{
            //System.out.println("2");
            signOnCountryDropdown=signOnCountry;

            .....
        }

        return returnPath;

    }
...
    }

1 个答案:

答案 0 :(得分:0)

找到了解决这个问题的方法,我认为这是由于java版本的不兼容性,从Eclipse开始,我在java 7编译器中创建了代码,并且与java6的源代码兼容,确保了pojo的setter。