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 8066771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:06:16+00:00 2026-06-05T12:06:16+00:00

I’m feeling really stupid having to ask this. But I’ve been looking at my

  • 0

I’m feeling really stupid having to ask this. But I’ve been looking at my code for 4 hours and can’t figure it out. I have rebuild my database several times and can’t get it to work.
One of my tables isn’t being created for some reason. I have 4 tables game, developer, gameimage and user. User isn’t being created but the other are being created perfectly and working. I’m sure it’s a stupid mistake but I just don’t see it.
If someone could just tell me why this might be happening that would be great.
I’m using toplink

Here is my code:

persistence xml:

<?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="GameDatabasePU" transaction-type="RESOURCE_LOCAL">
<provider>oracle.toplink.essentials.PersistenceProvider</provider>
<class>domainmodel.Game</class>
<class>domainmodel.GameImage</class>
<class>domainmodel.Developer</class>
<class>domainmodel.User</class>
<properties>
  <property name="toplink.jdbc.user" value="app"/>
  <property name="toplink.jdbc.password" value="app"/>
  <property name="toplink.jdbc.url" value="jdbc:derby://localhost:1527/Gamedatabase;create=true"/>
  <property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
  <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
</properties>
</persistence-unit>
</persistence>

User:

@Entity
public class User {
    @Id
    private String username;
    private String password;
    private String firstName;
    private String surname;

    public User() {
    }

    public User(String naam, String pas){
        setUsername(naam);
        setPassword(pas);
    }

    public User(String naam, String pas, String firstName, String surname){
        setUsername(naam);
        setPassword(pas);
        setFirstName(firstName);
        setSurname(surname);
    }

    public void setUsername(String naam){
        this.username=naam;
    }
    //methods
}
  • 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-06-05T12:06:18+00:00Added an answer on June 5, 2026 at 12:06 pm

    Not realy an answer but more some tips to narrow the problem down.

    1) Try removing all other classes from your persistence.xml (comment out annotations on other classes)

    Maybe the problem is in another class and the output is misleading.

    2) Try setting the debug/output level to another level (DEBUG, FINE, FINEST) and get the JPA provider to expose queries.

    For TopLink I think adding this to your prersistence properties section will do the trick:

    <property name="toplink.logging.level" value="FINEST" />
    

    3) Which database are you using? MySql, PostgreSQL, HSQL, SQL-server?

    Some databases don’t (fully) support some things.

    4) Shouldn’t matter, but anyway;

    Annotate your User class with @Table(name = "user") or @Table(name = "usera") this will make certain the table name isn’t the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.