java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ040, SQLERRMC: Impossibile avviare il database 'sample' con il caricatore di classi sun.misc.Launcher$AppClassLoader@1d44bcfa. Per i dettagli, vedere l'eccezione successiva.::SQLSTATE: XBM0W Error Code: 0

  1. 0

    Can I resolve this?

    Stack Overflow | 3 months ago | Raffaele D'Arco
    java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ040, SQLERRMC: Impossibile avviare il database 'sample' con il caricatore di classi sun.misc.Launcher$AppClassLoader@1d44bcfa. Per i dettagli, vedere l'eccezione successiva.::SQLSTATE: XBM0W Error Code: 0
  2. 0

    Troubles running examples in netbeans 8.1

    Stack Overflow | 11 months ago | Fredy Benavides
    java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: No se ha podido crear la base de datos 'sun-appserv-samples', consulte la excepción siguiente para obtener más información.::SQLSTATE: XBM0X Error Code: 0
  3. 0

    XBM0J Directory already exists

    db-derby-user | 7 years ago | Damian Hofmann
    java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'C:\verteilcenter\db\licenses', see the next exception for details.::SQLSTATE: XBM0JDirectory C:\Development\Galileo\SR1\eclipse\C:\verteilcenter\db\licenses already exists.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Emissor de Nota Fiscal Eletrônica - Erro inesperado na execução!

    ubuntuforum-br.org | 8 months ago
    org.hibernate.exception.GenericJDBCException: Cannot open connection
  6. 0

    System Store access rights

    Google Groups | 6 years ago | tfrerk
    java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'C:\Program Files\IBM\TDI\V7.1/ TDISysStore', see the next exception for details.::SQLSTATE: XBM0HDirectory C:\Program Files\IBM\TDI\V7.1\TDISysStore cannot be created.::SQLSTATE: XJ001Java exception: 'Access denied (java.io.FilePermission C:\Program Files\IBM\TDI\V7.1\TDISysStore write): java.security.AccessControlException'.

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.derby.client.am.SqlException

      DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ040, SQLERRMC: Impossibile avviare il database 'sample' con il caricatore di classi sun.misc.Launcher$AppClassLoader@1d44bcfa. Per i dettagli, vedere l'eccezione successiva.::SQLSTATE: XBM0W

      at org.apache.derby.client.am.Connection.completeSqlca()
    2. Apache Derby Client JDBC Driver
      ClientJDBCObjectFactoryImpl40.newNetConnection
      1. org.apache.derby.client.am.Connection.completeSqlca(Unknown Source)
      2. org.apache.derby.client.net.NetConnectionReply.parseRdbAccessFailed(Unknown Source)
      3. org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(Unknown Source)
      4. org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(Unknown Source)
      5. org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source)
      6. org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source)
      7. org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source)
      8. org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source)
      9. org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source)
      10. org.apache.derby.client.net.NetConnection.initialize(Unknown Source)
      11. org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
      12. org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
      13. org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
      13 frames
    3. Derby
      ClientBaseDataSourceRoot.getConnection
      1. org.apache.derby.jdbc.ClientBaseDataSourceRoot.getConnectionX(Unknown Source)
      2. org.apache.derby.jdbc.ClientBaseDataSourceRoot.getConnection(Unknown Source)
      2 frames
    4. Embedded GlassFish Web
      DSManagedConnectionFactory.createManagedConnection
      1. com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:115)
      1 frame
    5. Connectors Runtime
      ConnectionManagerImpl.allocateConnection
      1. com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
      2. com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
      3. com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
      4. com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
      5. com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
      6. com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
      7. com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
      8. com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
      9. com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
      10. com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
      11. com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
      12. com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
      13. com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:360)
      14. com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
      15. com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196)
      16. com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171)
      17. com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166)
      17 frames
    6. Embedded GlassFish Web
      AbstractDataSource.getConnection
      1. com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:114)
      1 frame
    7. EclipseLink (non-OSGi)
      PersistenceProvider.createContainerEntityManagerFactory
      1. org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
      2. org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
      3. org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)
      4. org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:750)
      5. org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)
      6. org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
      7. org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
      8. org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:183)
      9. org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:528)
      10. org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactoryImpl(PersistenceProvider.java:385)
      11. org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:313)
      11 frames
    8. Embedded GlassFish Web
      JPADeployer.prepare
      1. org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:199)
      2. org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:107)
      3. org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
      4. org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
      5. org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
      6. org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
      6 frames
    9. Kernel Classes
      ApplicationLifecycle.deploy
      1. com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:925)
      2. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:434)
      3. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      3 frames
    10. Embedded GlassFish Web
      DeployCommand.execute
      1. org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      1 frame
    11. Kernel Classes
      CommandRunnerImpl$2$1.run
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
      2 frames
    12. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(Native Method)
      2. javax.security.auth.Subject.doAs(Subject.java:360)
      2 frames
    13. Kernel Classes
      CommandRunnerImpl$3.run
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
      3. com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
      3 frames
    14. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(Native Method)
      2. javax.security.auth.Subject.doAs(Subject.java:360)
      2 frames
    15. Kernel Classes
      AdminAdapter.onMissingResource
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
      3. com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
      4. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
      5. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
      6. com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
      7. com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
      7 frames
    16. Grizzly Server
      StaticHttpHandlerBase.service
      1. org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
      1 frame
    17. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
      2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
      2 frames
    18. Grizzly Server
      HttpServerFilter.handleRead
      1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
      2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
      3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
      3 frames
    19. Grizzly
      AbstractThreadPool$Worker.run
      1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
      3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
      4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
      5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
      6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
      8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
      10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
      11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
      12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
      13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
      13 frames
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame