title: java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'
body: <p>I'm developing and deploying a RESTful service in JBOSS EAP 6.2. For this task I'm using CXF, Spring and Embedded Derby for the data storage.
  I spent a couple of hours trying to debug this error but can't achieve it. I already checked many times that the database is completely empty and there isn't any table. But I always receive the same stack trace.
  I also read similar questions but that did'nt helped either.
  So, here is the code:</p>
  
  <p>Resource class</p>
  
  <pre><code>package rest_3;
  
  import java.sql.SQLException;
  import javax.ws.rs.*;
  import javax.ws.rs.core.Response;
  import javax.ws.rs.core.Response.ResponseBuilder;
  import javax.ws.rs.core.Response.Status;
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  @Path("/dataservice")
  @Produces({"application/xml", "application/json"})
  @Consumes({"application/xml", "application/json"})
  public class DataService {
  
      private ApplicationContext context = new ClassPathXmlApplicationContext("rest_3/servicebean.xml");
      private DAO dao = (DAO) context.getBean("daoBean");
  
      public DataService(DAO dao) {
  
      }
  
      @GET
      @Path("/location/{id}")
      public Location getLocation(@PathParam("id") int id) throws SQLException {
          Location loc = dao.getLocation(id);
          if (loc == null) {
              ResponseBuilder builder = Response.status(Status.BAD_REQUEST);
              builder.type("application/xml");
              builder.entity("&lt;error&gt;Location Not Found&lt;/error&gt;");
              throw new WebApplicationException(builder.build());
          } 
          return loc;
      }
  
      @POST
      @Path("/location")
      public Response addLocation(Location loc) throws SQLException {
          if(loc == null)
              return Response.status(Status.BAD_REQUEST).build();
          dao.addLocation(loc);
          return Response.ok().build();
      }
  
      @DELETE
      @Path("/location/{id}")
      public Response deleteLocation(@PathParam("id") int id) throws SQLException {
          Location loc = dao.getLocation(id);
          if(loc == null) 
              return Response.status(Status.BAD_REQUEST).build();
          dao.deleteLocation(id);
          return Response.ok().build();
  
      }
  
      @PUT
      @Path("/location")
      public Response updateLocation(Location loc) throws SQLException {
          if(dao.getLocation(loc.getId()) == null)
              return Response.status(Status.BAD_REQUEST).build();
          dao.updateLocation(loc);
          return Response.ok().build();
      }
  
      @DELETE
      @Path("/location")
      public void dropTable() throws SQLException {
          dao.dropTable();
      }
  
  
  }
  </code></pre>
  
  <p>DAO Class</p>
  
  <pre><code>package rest_3;
  
  
  import java.sql.*;
  
  import org.apache.derby.jdbc.EmbeddedDataSource;
  
  public class DAO {
  
      private static Connection conn;
      private static Statement statement;
      private static PreparedStatement prep;
  
      public DAO() throws SQLException {
          this.load();
      }
  
      public void load() throws SQLException {
  
          EmbeddedDataSource ds = new EmbeddedDataSource(); 
          ds.setDatabaseName("derbyDB");
          ds.setCreateDatabase("create");
          conn = ds.getConnection();
          statement = conn.createStatement();
          statement.execute("create table location(id int, country varchar(40))");
          statement.execute("insert into location values(1, 'MEXICO')");
          statement.execute("insert into location values(2, 'SPAIN')");
          statement.execute("insert into location values(3, 'UK')");
          statement.execute("insert into location values(4, 'ITALY')");
          statement.execute("insert into location values(5, 'JAPAN')");
  
      }
  
  
      public Location getLocation(int id) throws SQLException {
          ResultSet rs = statement.executeQuery("select from location where id = "  + id);
          rs.next();
          return new Location(rs.getInt("id"), rs.getString("country"));
      }
  
      public void addLocation(Location loc) throws SQLException{
          int id = loc.getId();
          String country = loc.getCountry();
          prep = conn.prepareStatement("insert into location values(?,?)");
          prep.setInt(1, id);
          prep.setString(2, country);
          prep.execute();
      }
  
      public void deleteLocation(int id) throws SQLException{
          statement = conn.createStatement();
          statement.executeUpdate("delete from location where id = " + id);
  
      }
  
      public void updateLocation(Location loc) throws SQLException {
          int id = loc.getId();
          String country = loc.getCountry();
          statement = conn.createStatement();
          statement.execute("update location set country = " + country + " where id = " + id);
      }
  
      public void dropTable() throws SQLException {
          statement = conn.createStatement();
          statement.execute("drop table location");
      }
  
  }
  </code></pre>
  
  <p>Service and DAO beans.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"&gt;
  
  &lt;bean id="dataService" class="rest_3.DataService"&gt;
      &lt;constructor-arg ref ="daoBean"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="daoBean" class="rest_3.DAO"&gt;
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Service bean config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxrs="http://cxf.apache.org/jaxrs"
    xmlns:cxf="http://cxf.apache.org/core"
    xsi:schemaLocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://cxf.apache.org/jaxrs
  http://cxf.apache.org/schemas/jaxrs.xsd
  http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"&gt;
    &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;
    &lt;import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /&gt;
    &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml" /&gt;
   &lt;jaxrs:server id="DataService" address="/"&gt;
      &lt;jaxrs:features&gt;
       &lt;cxf:logging/&gt;
  &lt;/jaxrs:features&gt;
  &lt;jaxrs:serviceBeans&gt;
        &lt;ref bean="dataService" /&gt;
      &lt;/jaxrs:serviceBeans&gt;
    &lt;/jaxrs:server&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          WEB-INF/beans.xml
          classpath:rest_3/servicebean.xml
          &lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;
              org.springframework.web.context.ContextLoaderListener
          &lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
              org.apache.cxf.transport.servlet.CXFServlet
          &lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>16:28:05,892 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/rest_3]] (ServerService Thread Pool -- 47) JBWEB000287: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DataService': Cannot resolve reference to bean 'dataService' while setting bean property 'serviceBeans' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataService' defined in class path resource [rest_3/servicebean.xml]: Cannot resolve reference to bean 'daoBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoBean' defined in class path resource [rest_3/servicebean.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [rest_3.DAO]: Constructor threw exception; nested exception is java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.5.jar:2.5.5]
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_79]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) [spring-context-2.5.5.jar:2.5.5]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) [spring-context-2.5.5.jar:2.5.5]
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) [spring-web-2.5.5.jar:2.5.5]
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) [spring-web-2.5.5.jar:2.5.5]
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-web-2.5.5.jar:2.5.5]
      at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
      at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
      at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
      at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_79]
      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122)
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataService' defined in class path resource [rest_3/servicebean.xml]: Cannot resolve reference to bean 'daoBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoBean' defined in class path resource [rest_3/servicebean.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [rest_3.DAO]: Constructor threw exception; nested exception is java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.5.jar:2.5.5]
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_79]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) [spring-beans-2.5.5.jar:2.5.5]
      ... 31 more
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoBean' defined in class path resource [rest_3/servicebean.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [rest_3.DAO]: Constructor threw exception; nested exception is java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-beans-2.5.5.jar:2.5.5]
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_79]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) [spring-beans-2.5.5.jar:2.5.5]
      ... 46 more
  Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [rest_3.DAO]: Constructor threw exception; nested exception is java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) [spring-beans-2.5.5.jar:2.5.5]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) [spring-beans-2.5.5.jar:2.5.5]
      ... 57 more
  Caused by: java.sql.SQLException: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) [derby-10.12.1.1.jar:]
      at rest_3.DAO.load(DAO.java:25) [classes:]
      at rest_3.DAO.&lt;init&gt;(DAO.java:15) [classes:]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_79]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_79]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_79]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_79]
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) [spring-beans-2.5.5.jar:2.5.5]
      ... 59 more
  Caused by: ERROR X0Y32: Table/View 'LOCATION' already exists in Schema 'APP'.
      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source) [derby-10.12.1.1.jar:]
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) [derby-10.12.1.1.jar:]
      ... 69 more
  
  16:28:05,938 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 47) JBWEB001103: Error detected during context /rest_3 start, will stop it
  16:28:05,938 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/rest_3]] (ServerService Thread Pool -- 47) Closing Spring root WebApplicationContext
  16:28:05,938 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 47) MSC000001: Failed to start service jboss.web.deployment.default-host./rest_3: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./rest_3: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Falló iniciar contexto
      at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_79]
      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122)
  Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Falló iniciar contexto
      at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)
      at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
      at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
      ... 6 more
  </code></pre>