0 Replies Latest reply on Aug 26, 2015 4:13 PM by jeffgaer

    unable to access WebServletContext on wildfly 9.01 Final using resource injection.

    jeffgaer

      I am attempting to deploy a soap webservice on wildfly 9.0.1-Final. I try to access the WebServletContext by resource injection but it is always null. I do have a beans.xml file in WEB-INF. Following is the class definition.

      loadProperties is called from the contstructor.

      http://www.coderanch.com/t/654235/JBoss/unable-access-WebServletContext-wildfly-Final

       

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

       

      @WebService(endpointInterface =  "com.ticomgeo.interfaces._2010.geonet.healthandstatus.v2.HealthAndStatusPortType",

       

      portName = "HealthAndStatusPort",

      wsdlLocation = "WEB-INF/classes/HealthAndStatusServiceV2.wsdl", serviceName = "HealthAndStatusService",

      targetNamespace = "http://interfaces.ticomgeo.com/2010/geonet/HealthAndStatus/v2")

      @HandlerChain(file="/HandlerChain.xml")

      @XmlSeeAlso({

          com.ticomgeo.schemas._2010.geonet.classificationtypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.designatortypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.basictypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.healthandstatusspecialtypes.v2.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.platformandsystemtypes.v2.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.common.signaltypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.platformantennatypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.platformandsystemresourcetypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.common.servicemessagetypes.v0.ObjectFactory.class,

          com.ticomgeo.schemas._2010.geonet.healthandstatusspecialgeoservicetypes.v2.ObjectFactory.class })

      public class HealthAndStatusPortImpl extends EimWebService implements HealthAndStatusPortType {

       

      private final static Logger log = Logger.getLogger(new Exception().getStackTrace()[0]

              .getClassName());

      private final static Logger LOGGER=log;

      private HSProperties props;

      private ServiceState serviceState;

      private AggregatorConnectionThread aggregatorConnectionThread;

      public  String configHome=null;

       

        @Resource(name="wscontext")

      private WebServiceContext wscontext;

       

      public void loadProperties() {

          if (wscontext==null){

               throw new RuntimeException("wscontext = "+wscontext);

          }


      The deployment always fails with the exception from the null test on the WebServletContext

       

      ?

       

      1

      2

      3

      4

      5

       

      [standalone@localhost:9990 /] deploy /tmp/HealthAndStatusServiceV2.war

       

      {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"HealthAndStatusServiceV2.war\"

          Caused by: java.lang.RuntimeException: java.lang.RuntimeException: wscontext = null

          Caused by: java.lang.RuntimeException: wscontext = null"},"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".beanmanager]","jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".batch.environment is missing [jboss.deployment.unit.\"HealthAndStatusServiceV2.war\".beanmanager]"]}}}

      [standalone@localhost:9990 /]