Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: EclipseLink Derby database problem

  1. #1
    Junior Member
    Join Date
    Aug 2014
    Posts
    10
    My Mood
    Confused
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default EclipseLink Derby database problem

    Hi all,
    I need some guidance please as I'm new to the subject of data binding.

    I'm building a Java SE application (using Embedded Apache Derby and EclipseLink 2.1) of a catalogue of music albums. However, when I try to bind data from the embedded Derby database table to a Swing JTable and Run the project, I don't see any of the data from the database table. Also, the SE application is only for viewing - it is not a CRUD.

    Here is the code in the '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="MyGUIApp_forTesting_1PU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceP rovider</provider>
    <class>org.me.myimageapp.Catalogue</class>
    <properties>
    <property name="eclipselink.target-database" value="Derby"/>
    <property name="javax.persistence.jdbc.url" value="jdbc:derby:sitw;create=true"/>
    <property name="javax.persistence.jdbc.password" value="DCproject"/>
    <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
    <property name="javax.persistence.jdbc.user" value="DCproject"/>
    <property name="eclipselink.logging.level" value="ALL"/>
    <property name="eclipselink.ddl-generation" value="create-tables"/>
    <property name="eclipselink.ddl-generation.output-mode" value="database"/>
    <property name="javax.persistence.schema-generation.database.action" value="create"/>
    </properties>
    </persistence-unit>
    </persistence>

    What am I doing wrong?
    Last edited by Chaotic; August 3rd, 2014 at 01:54 PM. Reason: 'smiley' in code!


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,845
    My Mood
    Mellow
    Thanks
    239
    Thanked 721 Times in 707 Posts

    Default Re: EclipseLink Derby database problem

    Thread moved.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,343
    Thanks
    182
    Thanked 831 Times in 774 Posts
    Blog Entries
    5

    Default Re: EclipseLink Derby database problem

    What am I doing wrong?
    Could be any number number of things, from connecting to the database, to querying, to displaying the data. Perhaps someone else can come along and somehow guide you, but from where I sit the lack of code, exceptions stack traces (if any), and context on what might be the cause doesn't leave us much to help you with. Your best bet: post an SSCCE that demonstrates the problem.

Similar Threads

  1. Replies: 1
    Last Post: March 29th, 2014, 10:37 AM
  2. problem in Derby embedded database connection
    By brother in forum JDBC & Databases
    Replies: 6
    Last Post: December 24th, 2012, 01:17 PM
  3. Replies: 1
    Last Post: December 21st, 2012, 09:35 AM
  4. Deploy derby database application
    By Jenny.Palmy in forum JDBC & Databases
    Replies: 0
    Last Post: May 13th, 2012, 12:06 AM
  5. How to deploy derby database?
    By Muaz_Sh in forum JDBC & Databases
    Replies: 8
    Last Post: March 17th, 2011, 09:23 AM

Tags for this Thread