3 Replies Latest reply on Aug 18, 2015 11:16 AM by jaikiran

    JBOSS EAP 6.4 deployment interface.

    shruaror

      Hi,

       

      I want to deploy a war file in the JBOSS 6.4 from the java code.

      Till now I have tried :

       

      CallbackHandler callback = new PasswordClientCallbackHandler("abc",

        "ManagementRealm", "abc1.".toCharArray());

        ServerDeploymentManager sdm = ServerDeploymentManager.Factory.create(

        address, port, callback);

        DeploymentPlanBuilder dpb = sdm.newDeploymentPlan();

        AddDeploymentPlanBuilder add = dpb.add("xyz", new File(

        "C:\\temp\\xyz.war"));

        dpb = add.andDeploy();

        List<DeploymentAction> deploymentActions = dpb.getDeploymentActions();

        for (DeploymentAction deploymentAction : deploymentActions) {

        System.out.println(deploymentAction.getDeploymentUnitUniqueName());

        }

         Future<ServerDeploymentPlanResult> result = sdm.execute(dpb.build());

        while (!result.isDone()) {

        Thread.sleep(1000);

        }

        ServerDeploymentPlanResult planresult = result.get();

        ServerDeploymentActionResult actionresult = planresult

        .getDeploymentActionResult(planresult.getDeploymentPlanId());

       

      But it is not working. The connection is successful but the deployment is not happening.

      Is there some other interface or methods I should use?

       

      Please provide some inputs or pointer.

       

      Thanks

        • 1. Re: JBOSS EAP 6.4 deployment interface.
          jaikiran

          I'm not too familiar with that API. What exactly happens when you say "the deployment isn't happening"? On the server side do you see any exceptions in the logs or any kind of logs at all? Are you using standalone JBoss EAP or in domain mode? Finally, is there a reason why you are writing your own deployment code instead of using available tools like the Command Line Interface (CLI) or the admin console?

          • 2. Re: JBOSS EAP 6.4 deployment interface.
            shruaror

            Hi Jaikiran,

             

            Thanks for your reply. When I mean the deployment isn't happening I meant that when I deploy the app the application login page doesn't come and I see HTTP 404. I can see java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider in logs but the application is deployed as per logs. I am using standalone Jboss EAP 6.4. I tried deploying the application using admin console and get the same result.

             

            Thanks,

            Shruti

            • 3. Re: JBOSS EAP 6.4 deployment interface.
              jaikiran

              Please attach the complete server.log file which shows the logs during the application deployment.