2 Replies Latest reply on Feb 8, 2013 9:49 AM by maelstrom3

    JBAS018040: Failed to start context

    maelstrom3

      I'm unable to deploy my application to the JBoss server.

       

      It was working before, so it's most likely to do with a new jar I'm referencing: sqljdbc4-4.0.jar (driver for sql server). I installed this jar to my local machine and updated the POM file to reference it. I do see it in the war deploy artifact.

       

      Deploy process:

      1. maven install my project.
      2. standalone.xml contains auto-deploy-zipped="true" auto-deploy-exploded="false"
      3. Start the JBoss AS 7 server from Eclipse
      4. Manually copy my war artifact into standalone/deployments folder.

       

      Result:

      1. The .isdeploying file comes up within 5 seconds
      2. The .failed file comes up ultimately and contains the following: (TeamProjServer below is my war artifact's name)
      {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./TeamProjServer" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./TeamProjServer: JBAS018040: Failed to start context"}}}}
      
        • 1. Re: JBAS018040: Failed to start context
          nickarls

          Are you saying that there is nothing more in the log and if you take the broken war and just take out the sqljdbc.jar it works? PS. Why do you need the driver jar in the war?

          • 2. Re: JBAS018040: Failed to start context
            maelstrom3

            You are right, Nicklas. It turns out I didn't need the driver jar in the war file. I'm new to JBoss, so sometimes I feel I'm not sure about many things.

             

            I had to manually configure an SQL server data source on the machine to get things to work.

             

            To test the data source connection was working, I ran cli.bat from the bin folder:

            [standalone@localhost:9999 /] connect

            [standalone@localhost:9999 /] /subsystem=datasources/data-source=<pool-name>:test-connection-in-pool

            {

                "outcome" => "success",

                "result" => [true]

            }

             

            See this link for more information.

             

            Previously, things were working because the application was using an Oracle data source which was configured by the original developer on the machine. Yes, there were logs which I should have put up there. But, now things are resolved. Thanks!