EclipseLink -Derby Embedded not start with the application

124 views Asked by At

When I start my application the embedded database won't start with it and I get an exception. But when I start the database server in Netbeans services tab, it runs fine.

[EL Info]: 2015-06-08 20:56:46.05--ServerSession(1877045812)--EclipseLink, version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
[EL Severe]: ejb: 2015-06-08 20:56:48.215--ServerSession(1877045812)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Hiba történt a(z) localhost kiszolgálóhoz való csatlakozás során a(z) 1 527 porton Connection refused: connect üzenettel.
Error Code: 40000

My persistence.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
  <persistence-unit name="SuperVisorServer_PU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>com.eszik.supervisorserver.entities.Clients</class>
    <class>com.eszik.supervisorserver.entities.Logs</class>
    <class>com.eszik.supervisorserver.entities.Messages</class>
    <class>com.eszik.supervisorserver.entities.Exceptions</class>
    <class>com.eszik.supervisorserver.entities.Sessions</class>
    <validation-mode>NONE</validation-mode>
    <properties>
      <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/SuperVisor;create=true"/>
      <property name="javax.persistence.jdbc.user" value="root"/>
      <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
      <property name="javax.persistence.jdbc.password" value="root"/>
      <property name="eclipselink.target-database" value="Derby"/>
      <property name="eclipselink.ddl-generation" value="create-tables"/>
    </properties>
  </persistence-unit>
</persistence>
0

There are 0 answers