db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadav Hoze <Nadav.H...@dbMotion.com>
Subject RE: database in a an inconsistent stat, after a communications error has been detected: Connection reset by peer: socket write error
Date Mon, 14 Jun 2010 05:46:45 GMT
My problem occurred after the database was created and successfully worked for quite some time.
So I guess the possibility of sudden deletion of service.properties is quite far fetched :).

I want to know maybe something in my configuration is not OK.
I use hibernate with derby in embedded server mode.
Here is my configuration:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
        <persistence-unit name="CTS_SYNCH" transaction-type="RESOURCE_LOCAL">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <class>com.dbmotion.cts.synchtool.history.SynchronizationTaskData</class>
                <class>com.dbmotion.cts.synchtool.history.DataEntity</class>
                <class>com.dbmotion.cts.synchtool.history.FailedCTSObject</class>
                <class>com.dbmotion.cts.synchtool.history.FailedCodeSystem</class>
                <class>com.dbmotion.cts.synchtool.history.FailedConcept</class>
                <properties>
                        <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"
/>
                        <property name="hibernate.hbm2ddl.auto" value="update" />
                        <property name="hibernate.show_sql" value="false" />
                        <property name="hibernate.format_sql" value="false" />
                        <property name="hibernate.connection.url"
                                value="jdbc:derby://localhost:8011/CTS_SYNCH;create=true"
/>
                        <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"
/>
                </properties>
        </persistence-unit>
</persistence>

Also I have all the required derby jars (i.e. derby, derbynet and derby-client).

Do you know maybe me what is the best practice of using hibernate and derby in embedded server
mode.


Thanks,

Nadav Hoze
Java Programmer
dbMotion Ltd.
Direct: +972-8-6206802
Extension number: 6802
Mobile: 972-54-4821606
E-mail: nadav.hoze@dbMotion.com


dbMotion's SOA-based health interoperability and intelligence solution enables healthcare
organizations and health information exchanges (HIEs) to meaningfully integrate and leverage
their information assets, driving improvements in the quality and efficiency of patient care.
Visit dbMotion at www.dbmotion.com.

-----Original Message-----
From: Knut.Hatlen@Sun.COM [mailto:Knut.Hatlen@Sun.COM]
Sent: Sunday, June 13, 2010 7:30 PM
To: derby-user@db.apache.org
Subject: Re: database in a an inconsistent stat, after a communications error has been detected:
Connection reset by peer: socket write error

On 06/13/10 03:49 PM, Nadav Hoze wrote:
> I think I found the problem.
> I launch couple of jvms with the same code that insert new data to the DB.
>
> I had the following exception:
> DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'CTS_SYNCH',
see the next exception for details.::SQLSTATE: XBM0JDirectory C:\Program Files\eclipses\Galileo\eclipse\ws\ExecuteSynchronization\CTS_SYNCH
already exists.
>
> And I saw that the service.properties which is created inside the CTS_SYNCH folder was
missing, can it suddenly be deleted ?
>

I don't know of anything that could delete it once it has been created,
but there have been reports of similar problems if database creation was
aborted before service.properties had been created:

https://issues.apache.org/jira/browse/DERBY-4589
https://issues.apache.org/jira/browse/DERBY-4098

--
Knut Anders


This email and any files transmitted with it are confidential and intended solely for the
use of the individual or entity to whom they are addressed. Please note that any disclosure,
copying or distribution of the content of this information is strictly forbidden. If you have
received this email message in error please notify its sender and then delete it from your
files.

Mime
View raw message