web-servicesejbjax-ws

"Bean has been deleted" error on response JAX WS webservice


I have a multi-module EJB webapp, using Java 1.6, ejb 3.0, jsf 2.0 and two JAX WS webservices. The .ear package is deployed on Weblogic 11g two-node clustered server.

From the two JAX-WS webservices, only one is troubling, I only can test it on Test Environment which is not a Cluster Environment (on test there are no problems). On the production(cluster) I get "Bean has been deleted" error on response from the webservice (in Server logs or Application logs are no errors) and then the webservice is down.

Response:

[5/22/17 14:45:05:698 EEST] 000034df  E UOW=null source=WLE.wle org=null prod=null component=null thread=[WebContainer : 30]
      CWLLG1405E: Exception javax.xml.ws.soap.SOAPFaultException: Bean has been deleted. occurred while trying to invoke a service: CreateFoccaInteractionPortBindingQSService, ServiceNS: http://createFoccaInteraction.cca.endava.com/, address: https://esblb.bcr.wan:5443/services/Focca/CreateFoccaInteraction, wsdlURL: file:///ibm/BPM/focca_ws/CreateFoccaInteraction.wsdl.
      javax.xml.ws.soap.SOAPFaultException: Bean has been deleted.
            at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1363)
            at org.apache.axis2.jaxws.client.dispatch.BaseDispatch.getFaultResponse(BaseDispatch.java:851)
            at org.apache.axis2.jaxws.client.dispatch.BaseDispatch.invoke(BaseDispatch.java:206)
            at com.ibm.bpm.ws.soap.JAXWSSOAPMessageConnector.callWebService(JAXWSSOAPMessageConnector.java:142)
            at com.ibm.bpm.ws.soap.SOAPMessageConnectorDelegate.callWebService(SOAPMessageConnectorDelegate.java:43)
            at teamworks.SOAPMessageConnector.callWebService(SOAPMessageConnector.java:58)
            at teamworks.SOAPMessageConnector.callWebService(SOAPMessageConnector.java:53)
            at sun.reflect.GeneratedMethodAccessor660.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
            at teamworks.connector.JavaReflectionConnector$1.execute(JavaReflectionConnector.java:81)
            at com.lombardisoftware.server.core.ManagedAssetClassLoaderUtil.executeWithManagedAssetClassLoader(ManagedAssetClassLoaderUtil.java:51)
            at teamworks.connector.JavaReflectionConnector.execute(JavaReflectionConnector.java:49)
            at com.lombardisoftware.component.javaconnector.worker.JavaConnectorWorker.invokeJavaMethod(JavaConnectorWorker.java:146)
            at com.lombardisoftware.component.javaconnector.worker.JavaConnectorWorker.doJob(JavaConnectorWorker.java:79)
            at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:453)
            at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine(EJBWorkflowManagerBean.java:1366
            at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:360)
            at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:324)
            at com.lombardisoftware.server.ejb.workflow.EJSRemoteStatefulEJBWorkflowManager_82478d70.resumeTask(Unknown Source)
            at com.lombardisoftware.server.ejb.workflow._EJBWorkflowManagerInterface_Stub.resumeTask(_EJBWorkflowManagerInterface_Stub.java:287)
            at com.ibm.bpm.rest.impl.coachflow.CallActivityServiceRunner.runService(CallActivityServiceRunner.java:62)
            at com.ibm.bpm.rest.impl.coachflow.ServiceStartActionHandler.handleAction(ServiceStartActionHandler.java:185)
            at com.ibm.bpm.rest.impl.coachflow.ServiceResource.postServiceActions(ServiceResource.java:231)
            at sun.reflect.GeneratedMethodAccessor770.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
            at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
            at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:34)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleSubResourceMethod(FindResourceMethodHandler.java:188)
            at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.OptionsMethodWADLHandler.handleRequest(OptionsMethodWADLHandler.java:51)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
            at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
            at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)
            at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:60)
            at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
            at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
            at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:124)

Webservice:

    @WebService(serviceName = "createFoccaInteraction")
@Stateless()
public class CreateFoccaInteraction {
    @EJB
    private TaskManager taskManager;
    @EJB
    private CampaignImportManager cim;
    @EJB
    private ProspectManager prosManager;
    @EJB
    private ProspectPersistenceManager prosPersisManager;
    @EJB
    private TaskPersistenceManager taskPersisManager;
    @EJB
    private AuditPersistenceManager auditPersisManager;
    @EJB
    private InteractionManager interactionManager;
    @EJB
    private SystemSupportManager systemSupportManager;
    @EJB
    private ReasonCodePersistanceManager reasonCodePersistanceManager;
    private static final Logger GENERAL = LoggingFacade.getLogger(ServiceHandler.class);
    
    
    @WebMethod(operationName = "addInteraction")
    public ServiceReplyType addInteraction(@WebParam(name = "request") ServiceRequestType request) throws DatatypeConfigurationException {
        ServiceHandler sh = new ServiceHandler();
        System.setProperty("com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace", "false");
        ServiceReplyType srt = sh.handleRequest(request, cim, prosManager, prosPersisManager, taskPersisManager, auditPersisManager, taskManager, interactionManager, systemSupportManager, reasonCodePersistanceManager);
        return srt;
    }

Handler:

    @Stateless
public class ServiceHandler {
    
    private CampaignImportManager campaignImportManager;
    private ProspectManager prospectManager;
    private ProspectPersistenceManager persistenceManager;
    private InteractionManager interactionManager;
    private ResourceLoadingManager resourceLoadingManager;
    private TaskPersistenceManager taskPersistenceManager;
    private AuditPersistenceManager auditPersist;
    private TaskManager taskManager;
    private SystemSupportManager systemSupportManager;
    private ReasonCodePersistanceManager reasonCodePersistanceManager;
    
    private ErrorsType err = new ErrorsType();
    private List<MessageType> errorMessages = new ArrayList<MessageType>();
    private ServiceRequestType request;
    private ServiceReplyType reply = new ServiceReplyType();
    private RequestHeaderType header = new RequestHeaderType();
    private Campaign existingCampaign;
    private ReplyHeaderType replyHeaderType= new ReplyHeaderType();
    
    private static final Logger GENERAL = LoggingFacade.getLogger(ServiceHandler.class);
    
    
    
    
    
    public ServiceReplyType handleRequest (ServiceRequestType srt, CampaignImportManager cim, ProspectManager pm,ProspectPersistenceManager persism,
                                           TaskPersistenceManager tpm, AuditPersistenceManager ap, TaskManager tm, InteractionManager im, SystemSupportManager ssm, ReasonCodePersistanceManager rcpm) throws DatatypeConfigurationException{
        this.request = srt;
        this.header = srt.getHeader();
        this.campaignImportManager = cim;
        this.prospectManager = pm;
        this.persistenceManager = persism;
        this.taskPersistenceManager = tpm;
        this.auditPersist = ap;
        this.taskManager = tm;
        this.interactionManager = im;
        this.systemSupportManager = ssm;
        this.reasonCodePersistanceManager = rcpm;
        
        GENERAL.debug("Intrat in handleRequest");
        if(header != null){
            populateReplyHeader(header);
        }else{
            String errr = "Null request header.";
            GENERAL.error(errr);
            return replyFailed(errr);
        }
        
        String appID = header.getSourceAppItem().getSourceAppId();
        String appCode = header.getSourceAppItem().getSourceAppCode();
        
        if(getAppAuthentication(appID, appCode)){
            
            if(header.getClientInfoDetails().getPhones().getMobile().isEmpty()header.getClientInfoDetails().getPhones().getWork().isEmpty()){
                GENERAL.error("Impossible");
                replyFailed("Impossible");
            }
            
            Interaction interaction = null;
            Task task = null;
            Prospect prospect = new Prospect();
            final Date now = DateUtils.getCurrentDate();

            existingCampaign = getExistingCampaign();
            if (existingCampaign == null) {
                String errr = "Nu exista";
                GENERAL.error(errr);
                return replyFailed(errr);
            }

            final List<Group> groupsForCampaign = campaignImportManager.
                                getGroupsForCampaign(existingCampaign.getId());
            final String taskGroup;
            if (groupsForCampaign.isEmpty()) {
                final String errr = "-1Pentru " + existingCampaign.getName();
                GENERAL.error(errr);
                return replyFailed(errr);
            } else {
                taskGroup = groupsForCampaign.get(0).getId();
            }

            if (existingCampaign.getStatus() != null
                && existingCampaign.getStatus().equalsIgnoreCase(CCAConstants.CAMPAIGN_INACTIVE)) {
                final String errr = "Interactiunea"
                GENERAL.error(errr);
                return replyFailed(errr);
            }
        
            prospect = getProspect();
            
            task = getTask(taskGroup, now);
            interaction = getInteraction(now);
            interaction.setCampaignId(existingCampaign.getId());
            String error = "";
            try {
                prospect = prospectManager.addCampaignProspectFromEmail(prospect, header.getUserID());//addCampProspect(prospect);
                GENERAL.debug("Dupa prospectManager.addCampaignProspectFromEmail()");
            } catch (EJBException ex) {
                error = "Eroare" + ex.getMessage();
                ex.printStackTrace();
                GENERAL.error(error);
                return replyFailed(error);
            }
            if (DataUtils.isEmpty(prospect.getId())) {
                error = "Eroare";
                GENERAL.error(error);
                return replyFailed(error);
            }
            interaction.setProspect(prospect);
            try {
                interaction = interactionManager.addCampaignInteractionFromEmail(interaction, header.getUserID());
                GENERAL.debug("Dupa interactionManager.addCampaignInteractionFromEmail)");
                if(header.getInteractionWithTask().equalsIgnoreCase("y")){
                    task.setInteraction(interaction);
                
                    ServiceReply  sr = new ServiceReply();
                    Long taskId = taskManager.addCampaignTaskFromEmail(task, header.getUserID());
                    interaction.setTaskId(taskId.toString());
                    //interactionManager.editInteraction(interaction, getReasonCode(), header.getAgentID());
                    
                    sr.setTaskId(taskId.toString());
                    sr.setInteractionId(interaction.getInteractionId());
                    reply.setServiceReply(sr);
                    GENERAL.debug("Dupa reply.setServiceReply(sr) - sr = " + sr.toString());
                }else{
                    ServiceReply  sr = new ServiceReply();
                    sr.setTaskId("");
                    sr.setInteractionId(interaction.getInteractionId());
                    reply.setServiceReply(sr);
                    GENERAL.debug("Dupa reply.setServiceReply(sr) - sr = " + sr.toString());
                }
                
            } catch (Exception ex) {
                ex.printStackTrace();
                if(ex.getMessage() != null){
                    GENERAL.error(ex.getMessage());
                    return replyFailed(ex.getMessage());
                }else{
                    GENERAL.error("Exception with NULL message.");
                    return replyFailed("Exception with NULL message.");
                }
            }
            err.setErrorMsg(errorMessages);
            reply.setErrors(err);
            reply.getHeader().setDateTimeReply(getXmlDate());
            reply.setServiceExecutionStatus(ExecutionStatusType.OK);
            GENERAL.debug("reply.setServiceExecutionStatus(ExecutionStatusType.OK) - reply = " + reply.toString());

            return reply;
        }
        String errr = "Source application authentication failed!";
        GENERAL.error(errr);
        return replyFailed(errr);
        
    }

    
    
    private List<Campaign> getCampaigns() {
        GENERAL.debug("Intrat in getCampaigns()");
        final SortCriteria defaultSortCriteria = new SortCriteria(CampaignColumns.CAMPAIGN_NAME, Boolean.TRUE);
        return campaignImportManager.getAllCampaignsForEmail(defaultSortCriteria);
    }
    
    
    private Task getTask(final String group, final Date now) throws DatatypeConfigurationException {
        GENERAL.debug("Intrat in getTask - start");
        Task task = new Task();
        List<String> lst = new ArrayList<String>();
        if(!isNullOrEmpty(header.getClientInfoDetails().getPhones().getHome())){
            lst.add(header.getClientInfoDetails().getPhones().getHome());
        }
        if(!isNullOrEmpty(header.getClientInfoDetails().getPhones().getMobile())){
            lst.add(header.getClientInfoDetails().getPhones().getMobile());
        }
        if(!isNullOrEmpty(header.getClientInfoDetails().getPhones().getWork())){
            lst.add(header.getClientInfoDetails().getPhones().getWork());
        }
        
        String phoneNumbersString = "";
        for(String item: lst){
            if(item.length() > 3){
                phoneNumbersString += item + ";";
            }
        }
        phoneNumbersString = phoneNumbersString.substring(0, phoneNumbersString.length()-1);
        final StringBuilder sb = new StringBuilder();
        sb.append("Nume campanie: ").append(existingCampaign.getName()).append("\n");
        sb.append("Nume client: ").append(header.getClientInfoDetails().getFirstName()).append(" ");
        sb.append(header.getClientInfoDetails().getLastName()).append("\n");
        sb.append("Telefon: ").append(phoneNumbersString);

        final GregorianCalendar cal = new GregorianCalendar();
        cal.setTime(now);
        cal.add(GregorianCalendar.DATE, 1);

        
        task.setSubject(header.getProcessItem().getFormName());
        if(!isNullOrEmpty(systemSupportManager.getValue("task.taskType"))){
            GENERAL.debug("Intrat in getTask: systemSupportManager.getValue(\"task.taskType\") !=null value= " + systemSupportManager.getValue("task.taskType"));
            task.setTaskTypeID(systemSupportManager.getValue("task.taskType"));
        }else{
            GENERAL.debug("Intrat in getTask: systemSupportManager.getValue(\"task.taskType\") =null; setting taskTypeId to 001");
            task.setTaskTypeID("001");
        }
        
        String chargebackId = header.getProcessItem().getBpId();
        if(isChargebackIdOk(chargebackId)=="true"
           && (chargebackId != "")){
            task.setChargebackID(chargebackId);
        }else{
            replyFailed("ChargeBackID error");
        }
        return task;
    }
    
    private Interaction getInteraction(final Date now) throws DatatypeConfigurationException {
        GENERAL.debug("Intrat in getInteraction");
        final Direction dir = Direction.IN;

        final Interaction interaction = new Interaction();
        interaction.setSubject(header.getProcessItem().getFormName());
        interaction.setNotes(header.getAppData().getTaskNotes());
        if(!isNullOrEmpty(systemSupportManager.getValue("interaction.interactionChannelId"))){
            interaction.setChannel(systemSupportManager.getValue("interaction.interactionChannelId"));
            GENERAL.debug("Intrat in getInteraction - systemSupportManager.getValue(\"interaction.interactionChannelId\") != null; value= " + systemSupportManager.getValue("interaction.interactionChannelId"));
        }
        return interaction;
    }
}

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">
    <display-name>cca</display-name>
    <context-param>
        <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>
            javax.faces.VALIDATE_EMPTY_FIELDS
        </param-name>
        <param-value>true</param-value>
    </context-param>
    <listener>
        <listener-class>com.endava.cca.web.listeners.CCAHttpSessionListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.endava.cca.web.listeners.RdcServletContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.endava.cca.web.listeners.RdcServletRequestListener</listener-class>
    </listener>    
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
        
    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
        <!-- init-param> <param-name>uploadDirectory</param-name> <param-value>C:/tmp_cca</param-value> 
        </init-param> <init-param> <param-name>thresholdSize</param-name> <param-value>512000</param-value> 
        </init-param -->
    </filter>
    <filter>
        <filter-name>SessionTimeoutCheckFilter</filter-name>
        <filter-class>com.endava.cca.web.filters.SessionTimeoutCheckFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>SessionTimeoutCheckFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter>
        <filter-name>LoggedUserFilter</filter-name>
        <filter-class>com.endava.cca.web.filters.LoggedUserFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>LoggedUserFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <filter>
        <filter-name>NoCacheFilter</filter-name>
        <filter-class>com.endava.cca.web.filters.NoCacheFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>NoCacheFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Unprotected images</web-resource-name>
            <url-pattern>/images/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Unprotected CSS</web-resource-name>
            <url-pattern>/css/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Unprotected JS</web-resource-name>
            <url-pattern>/scripts/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Protected</web-resource-name>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <auth-constraint>
            <role-name>cc_a</role-name>
            <role-name>cc_s</role-name>
            <role-name>cc_ag</role-name>
        </auth-constraint>
    </security-constraint>
    
    
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>createFoccaInteraction</web-resource-name>
            <url-pattern>/createFoccaInteraction/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>getFoccaTaskStatus</web-resource-name>
            <url-pattern>/getFoccaTaskStatus/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    
    
    
    <security-role>
        <role-name>cc_admin</role-name>
    </security-role>
    <security-role>
        <role-name>cc_supervizor</role-name>
    </security-role>
    <security-role>
        <role-name>cc_agent</role-name>
    </security-role> 
    <!--    <login-config>
    <auth-method>CLIENT-CERT</auth-method>
    </login-config>-->
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>myrealm</realm-name>
        <form-login-config>
            <form-login-page>/login/login.jsp</form-login-page>
            <form-error-page>/login/error.jsp</form-error-page>
        </form-login-config>
    </login-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
        <param-value>/WEB-INF/CCAFunctions.taglib.xml</param-value>
    </context-param>
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <!--  <param-value>redmond</param-value>-->
        <param-value>redmond</param-value>
    </context-param>
    <context-param>
        <param-name>servletPath</param-name>
        <param-value>/faces</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.expressionFactory</param-name>
        <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
        <param-value>true</param-value>
    </context-param>
    <!-- Context parameters -->
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
        <param-value>2</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.resourceUpdateCheckPeriod</param-name>
        <param-value>2</param-value>
    </context-param>
    <!-- parameter javax.faces.FACELETS_SKIP_COMMENTS always should be false 
    because iexplorer specific css file should be included in response -->
    <context-param>
        <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.SEPARATOR_CHAR</param-name>
        <param-value>:</param-value>
    </context-param>
    <!-- <context-param> <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name> 
    <param-value>true</param-value> </context-param> -->
    <context-param>
        <param-name>com.sun.faces.allowTextChildren</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.defaultResourceMaxAge</param-name>
        <param-value>1209600000</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.enableMissingResourceLibraryDetection</param-name>
        <param-value>true</param-value>
    </context-param>
    
    <mime-mapping>
        <extension>png</extension>
        <mime-type>image/png</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xhtml</extension>
        <mime-type>application/xhtml+xml</mime-type>
    </mime-mapping>
    
    <listener>
        <listener-class>
            com.sun.xml.ws.transport.http.servlet.WSServletContextListener
        </listener-class>
    </listener>
    
    <servlet>
        <servlet-name>createFoccaInteraction</servlet-name>
        <servlet-class>
            com.sun.xml.ws.transport.http.servlet.WSServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>createFoccaInteraction</servlet-name>
        <url-pattern>/createFoccaInteraction</url-pattern>
    </servlet-mapping>
    
    <servlet>
        <servlet-name>getFoccaTaskStatus</servlet-name>
        <servlet-class>
            com.sun.xml.ws.transport.http.servlet.WSServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>getFoccaTaskStatus</servlet-name>
        <url-pattern>/getFoccaTaskStatus</url-pattern>
    </servlet-mapping>
    
</web-app>

It's my first post here. I hope I gave enough information. Searched all internet but didn't found any answers.


Solution

  • It was from one Bean

    @EJB
    private SystemSupportManager systemSupportManager;
    

    which loaded properties from application.properties file.

    Solved by loading needed properties directly in ServiceHandler.