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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:21:02+00:00 2026-05-16T20:21:02+00:00

My application throws this Exception. I am using Java DB as the back end

  • 0

My application throws this Exception.
I am using Java DB as the back end and i am using JPA

Internal Exception:
java.sql.SQLException: Table/View
‘POCKETMONEY’ already exists in Schema
‘APP’. Error Code: 30000 Call: CREATE
TABLE APP.POCKETMONEY (ID INTEGER NOT
NULL, DateofSpending DATE, DESCRIPTION
VARCHAR(255), AMOUNT INTEGER, PRIMARY
KEY (ID)) Query: DataModifyQuery()

Internal Exception:
java.sql.SQLException: Table/View
‘SEQUENCE’ already exists in Schema
‘ADMIN’. Error Code: 30000 Call:
CREATE TABLE SEQUENCE (SEQ_NAME
VARCHAR(50) NOT NULL, SEQ_COUNT
DECIMAL, PRIMARY KEY (SEQ_NAME))
Query: DataModifyQuery()

Here is my JPA code

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mymoney;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author sugan
 */
@Entity
@Table(schema = "APP")
public class pocketMoney implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.TABLE)
    private int id;
    @Temporal(TemporalType.DATE)
    @Column(name = "DateofSpending")
    private Date dos;
    private String description;
    private int amount;

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getDos() {
        return dos;
    }

    public void setDos(Date dos) {
        this.dos = dos;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof pocketMoney)) {
            return false;
        }
        pocketMoney other = (pocketMoney) object;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mymoney.pocketMoney[id=" + id + "]";
    }
}

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="myMoneyPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>mymoney.pocketMoney</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="drop-and-create-tables"/>
    </properties>
  </persistence-unit>
</persistence>
  • 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-16T20:21:02+00:00Added an answer on May 16, 2026 at 8:21 pm

    Whatever JPA provider you’re using, I suspect that it is configured to generate and export the database objects corresponding to your mappings… and those already exist.

    Depending on your configuration, on the JPA provider, on the exact message (EclipseLink logs such messages as warning AFAIK), this might be just normal or a “configuration mistake”.

    If you want more details, please tell us what provider you’re using and show your persistence.xml.

    Update: As suspected, you are using EclipseLink and these message are “normal” (they are logged as warning if you look closely at the message IIRC)

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

Sidebar

Related Questions

Did anyone encountered this exception while using Jena in Java Web Application... Please Kindly
For an java web application, I got this error when using JRE 1.6.0_22 java.lang.SecurityException:
I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some
I am building a client server application using Java Sockets (in Windows XP). For
I have a java application on Websphere that is using Apache Commons FTPClient to
I need do start the derby server from my java application using org.apache.derby.drda.NetworkServerControl class.
We have a (non-web app) Spring application that throws a NoSuchBeanDefinitionException when running tests
I am developing a Compact Framework 3.5 application for Windows CE 6.0. Help.ShowHelp() throws
If I need to throw an exception from within my application which of the
How can I detect when an Exception has been thrown anywhere in my application?

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.