Hi, help please.
I'm trying to use in-memory derby, but get "database 'login' not found"
error (java.sql.SQLException: Error in allocating a connection. Cause:
Connection could not be allocated because: База данных 'login' не найдена.)
I've included derby,jar to classpath, specified connection URL
"jdbc:derby:memory:login;create=true", can't understand what am i doing
wrong.
create=true, so i suggest it should create and find it, but it doesn't.
Did not find anything useful in google.
Here is the configuration:
domain.xml
=======================
<jdbc-connection-pool
datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource"
res-type="javax.sql.DataSource" name="TestPool">
<property name="URL" value="jdbc:derby:memory:login;create=true" />
<property name="driverClass" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="DatabaseName" value="login" />
<property name="User" value="" />
<property name="Password" value="" />
</jdbc-connection-pool>
<jdbc-resource pool-name="TestPool" jndi-name="jdbc/loginService" />
=========================
persistence.xml
=================================
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="LoginServicePU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/loginService</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence>
===================================
I'm a newbie, please don't blame me, any help is very appreciated. Thank
you.
--
С уважением,
Сергей Пономарев.
mailto: [email protected]