Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1047093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:14:56+00:00 2026-05-16T16:14:56+00:00

I am using JPA and Java Embedded DB in my application. I try to

  • 0

I am using JPA and Java Embedded DB in my application. I try to write some data to the database and when i try to read it back I am able to do it. But the application is closed and when I open it again none of the data exists.

Here is my persistence.xml file

    <?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="myMoneyPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>mymoney.Money</class>
    <properties>
      <property name="eclipselink.jdbc.password" value="adminadmin"/>
      <property name="eclipselink.jdbc.user" value="admin"/>
      <property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
      <property name="eclipselink.jdbc.url" value="jdbc:derby:pocketmoney;create=true"/>
      <property name="eclipselink.ddl-generation" value="create-tables"/>
    </properties>
  </persistence-unit>
</persistence>

Is there any problem in my database URL.

jdbc:derby:pocketmoney

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:14:57+00:00Added an answer on May 16, 2026 at 4:14 pm

    Is there any problem in my database URL.

    No, it is correct and should create a database in the current working directory.

    Some ideas to debug your issue:

    • Use an absolute path for full control jdbc:derby:/path/to/pocketmoney;create=true.
    • Check that the data get written (i.e. that the files change).
    • Activate EcliseLink logging to see what is happening exactly using the following properties:

      <properties>
        ...
        <property name="eclipselink.debug" value="ALL"/>          
        <property name="eclipselink.logging.level" value="FINEST" />
        <property name="eclipselink.logging.level.sql" value="FINEST" />
        <property name="eclipselink.logging.level.cache" value="FINEST" />
      </properties>
      
    • Double check that you do commit transactions appropriately (you are saying your code is doing things but you’re not showing it so there is still a doubt).

    References

    • Derby JDBC database connection URL
    • EclipseLink/Examples/JPA/Logging
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I write an application based on an already existing database (postgreSQL) using JPA and
I am facing some issues when I write images to the database using JPA.
I'm creating a Java EE application that's using JPA for data access. Initially I
I am creating a Java EE application using jpa. I am getting the following
My application uses JPA to access the backend database. I have a Java class
I'm working on a database backup engine using JPA. Everything is working fine but
I'm looking for a Java EE 6 application using JPA to build JUnit test
I am using JPA to persist data. I am new to whole of Java-ee
I'm have a lot of time using hibernate (JPA) in java, but i recently
I am using JPA 2.0 and hibernate to save some data in a data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.