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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:43:15+00:00 2026-06-02T17:43:15+00:00

I have problem in a JPA entity class. This entity was working perfectly as

  • 0

I have problem in a JPA entity class. This entity was working perfectly as it should but today
i added another field (a simple string, varchar(255) NOT NULL in the database). When I try to persist a new entity i get an

java.sql.SQLException: Field 'companyLogoUrl' doesn't have a default value

Well, this is true. The column does not have a default value. but in my code i set the value for it. When I have a look at the generated insert statement the field is not present.

INSERT INTO COMPANY (ACCOUNTNUMBER, ACCOUNTOWNER, BANK, BANKCODE, CHANGEDAT, 
COMPANYNAME, CREATEDAT, addressId)

The name of the variable matches the the column-name so there are no annotations which could cause the error. It is treated just like the other fields/columns which work fine.

Thanks in advance for any help!

EDIT:

Here is the class (a groovy-class):

@Entity
class Company extends KupiumEntity
{

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
final int companyId

String companyName
String bank
String bankCode
String accountNumber
String accountOwner

String companyLogoUrl


@ManyToOne(cascade=CascadeType.PERSIST)
@JoinColumn(name="addressId")
Address address = new Address()


@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="companyId")
List<Invoice> invoices = new ArrayList<Invoice>()


@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="companyId")
List<Kupon> kupons = new ArrayList<Kupon>()


@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="mandatorId")
List<Mandator> mandators = new ArrayList<Mandator>()


@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name="companyAppId")
List<CompanyApp> companyApps = new ArrayList<CompanyApp>()
}

EDIT 2:
Sorry for the confusion. The field and the column in the table are named ‘companyLogoUrl’

  • 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-02T17:43:16+00:00Added an answer on June 2, 2026 at 5:43 pm

    Well, I solved this issue today, though i am still not aware what the cause is.

    I tried to run my unitTests and these told me that they could not find the pom.xml in this project. This was somehow surprising since it is no Maven-Project so I do not understand why he was even looking for it. Anyway, I created a new Project, copied the source from the old to the new one and… it works.

    I still find it hard to figure out why eclipse would even think about it as a maven project (why else would he look for a pom.xml?)

    And again I apologize for the confusion about the names of fields/columns. Thanks for your help, guys!

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

Sidebar

Related Questions

I have a problem with JPA 1.0 (OpenJPA) Following situation @Entity public class A{
I have an JPA entity like this: @Entity @Table(name = category) public class Category
I'm using hibernate JPA (without Spring) and it's working well, but I have come
I have a JPA entity class (one of many) and I can run JPQL
I have a JPA object: @Entity @Table(name=WF_GROUP) public class Group { @Id @GeneratedValue(strategy =
I have a problem with JPA (EclipseLink). I am not able to delete a
I have a complex JPA/Hibernate problem. I have two entities A and B. A
I'm having a problem modelling the following problem in JPA. I have a JPA
I have a problem with JPA I will explain in detail: I created a
I´m new on the JPA world and i´m having the following problem. I have

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.