Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27457

deploy is completed however deployed ear(war) doesn't start with a error (SRVE0303E)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Won't Fix
    • Labels:
      None
    • Environment:
      Jenkins 1.604, websphere deployer plugin 1.2, websphere 8.5.5, oracle java sdk 1.8.40
    • Similar Issues:

      Description

      Hello!

      I got a mysterious problem here.

      I made a project from eclipse (STS). Set project as 'Spring MVC project'.

      and when i build it and deploy, the console says like this

      ...
      Generating EAR For New Artifact: wptest-1.0.0-BUILD-SNAPSHOT
      Stopping Old Application 'wptest-1.0.0-BUILD-SNAPSHOT'...
      Uninstalling Old Application 'wptest-1.0.0-BUILD-SNAPSHOT'...
      Deploying New 'wptest-1.0.0-BUILD-SNAPSHOT' to IBM WebSphere Application Server
      Starting New Application 'wptest-1.0.0-BUILD-SNAPSHOT'...
      Finished: SUCCESS

      but websphere's log says like this
      ...
      Caused by: com.ibm.ws.exception.RuntimeWarning: SRVE0303E: Servlet name for the servlet mapping / could not be found.
      ...

      application was not started and could not started manually.

      But when I install ear(war) which was built by jenkins job from my websphere admin console manually, it goes right way. installed and worked without errors.

      is there any suggestions?

      Have a nice day.

        Attachments

          Activity

          Hide
          gpeters Greg Peters added a comment -

          After reviewing this issue, it was resolved by removing the IBM proprietary files from the WAR. 

          1) The attached EAR file will not deploy to WAS successfully because it contains the ibm-*.xml files
          2) I extracted the WAR, removed all the ibm-*.xml files and repacked the WAR
          3) I had to stop the defaultApplication (which conflicts with the "/" context) that is pre-packaged with WAS
          4) In the WDP jenkins configuration, I specified "/" for the "Generated Context"
          5) Deployment timeout (minutes) was set to "1"
          6) Generated EAR Level was "Java EE 7"
          7) Certified working on WAS ND v9.0.0.7

          Show
          gpeters Greg Peters added a comment - After reviewing this issue, it was resolved by removing the IBM proprietary files from the WAR.  1) The attached EAR file will not deploy to WAS successfully because it contains the ibm-*.xml files 2) I extracted the WAR, removed all the ibm-*.xml files and repacked the WAR 3) I had to stop the defaultApplication (which conflicts with the "/" context) that is pre-packaged with WAS 4) In the WDP jenkins configuration, I specified "/" for the "Generated Context" 5) Deployment timeout (minutes) was set to "1" 6) Generated EAR Level was "Java EE 7" 7) Certified working on WAS ND v9.0.0.7
          Hide
          gpeters Greg Peters added a comment -

          This technically isn't a bug in the WDP. It's a project setup issue by using the aforementioned ibm-.xml files in the WAR file. If there are other features needed instead of using the ibm-.xml settings, please create an improvement request.

          Show
          gpeters Greg Peters added a comment - This technically isn't a bug in the WDP. It's a project setup issue by using the aforementioned ibm- .xml files in the WAR file. If there are other features needed instead of using the ibm- .xml settings, please create an improvement request.
          Hide
          asmoljo Antonio Smoljo added a comment - - edited

          Hi Greg,

           

          I have a problem when deploying EAR on WAS server form Jenkins job. Application is installed without any problems , but it won't start. Error from WAS SystemOut.log is below in red text. If I deploy same EAR from WAS admin console everything is OK (application is normaly installed and started). I tried to remove ibm-*.xml files from EAR file and applied other steps as you suggested, and tried deploy, but the problem is still present.

          I also have other EAR file with ibm-*.xml files inside, but deploy and start by Jenkins goes without any problems!

          at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)Caused by: com.ibm.ws.exception.RuntimeWarning: SRVE0303E: Servlet name for the servlet mapping /xyz/abc could not be found. at com.ibm.ws.webcontainer.webapp.WebAppConfigurationHelper.constructServletMappings(WebAppConfigurationHelper.java:838) at com.ibm.ws.webcontainer.webapp.WebAppConfigurationHelper.createConfiguration(WebAppConfigurationHelper.java:267) at com.ibm.ws.webcontainer.metadata.WebMetaDataFactory.createMetaData(WebMetaDataFactory.java:204)

           

          WebSphere version is WAS v9.0.0.9

          WDP version is 1.6.1

          It's worth mentioning that if deploy is done by Jenkins all <servlet> parts from web.xml file are missing.

           For example :

          <servlet>
          <servlet-name> name </servlet-name>
          <servlet-class> com.some.XYZ </servlet-class>
          </servlet>

           

           

          Show
          asmoljo Antonio Smoljo added a comment - - edited Hi Greg,   I have a problem when deploying EAR on WAS server form Jenkins job. Application is installed without any problems , but it won't start. Error from WAS SystemOut.log is below in red text. If I deploy same EAR from WAS admin console everything is OK (application is normaly installed and started). I tried to remove ibm-*.xml files from EAR file and applied other steps as you suggested, and tried deploy, but the problem is still present. I also have other EAR file with ibm-*.xml files inside, but deploy and start by Jenkins goes without any problems! at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909) Caused by: com.ibm.ws.exception.RuntimeWarning: SRVE0303E: Servlet name for the servlet mapping /xyz/abc could not be found . at com.ibm.ws.webcontainer.webapp.WebAppConfigurationHelper.constructServletMappings(WebAppConfigurationHelper.java:838) at com.ibm.ws.webcontainer.webapp.WebAppConfigurationHelper.createConfiguration(WebAppConfigurationHelper.java:267) at com.ibm.ws.webcontainer.metadata.WebMetaDataFactory.createMetaData(WebMetaDataFactory.java:204)   WebSphere version is WAS v9.0.0.9 WDP version is 1.6.1 It's worth mentioning that if deploy is done by Jenkins all <servlet> parts from web.xml file are missing.  For example : <servlet> <servlet-name> name </servlet-name> <servlet-class> com.some.XYZ </servlet-class> </servlet>    
          Hide
          gpeters Greg Peters added a comment -

          Antonio Smoljo Did you resolve the issue you were having?

          Show
          gpeters Greg Peters added a comment - Antonio Smoljo Did you resolve the issue you were having?
          Hide
          asmoljo Antonio Smoljo added a comment -

          Hi Greg,

          I didn't resolve issue and therefore I use the wsadmin scripts for deploy 

          Show
          asmoljo Antonio Smoljo added a comment - Hi Greg, I didn't resolve issue and therefore I use the wsadmin scripts for deploy 

            People

            • Assignee:
              gpeters Greg Peters
              Reporter:
              tjay Taejoon Eom
            • Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: