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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:41:51+00:00 2026-06-15T23:41:51+00:00

I have some trouble with creating an object in an entity class. I get

  • 0

I have some trouble with creating an object in an entity class. I get following exception:

java.lang.IllegalArgumentException: A: name.A is not a supported
property type

Here is a small code example:

This is my entity B class:

@Entity
public class B {        
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Key key;

    private ArrayList<A> token = new ArrayList<A>();

    public Profile() {
        this.token.add(new Token(1));
        this.token.add(new Token(2));
        this.token.add(new Token(3));
        this.token.add(new Token(4));
    }
}

This is my standard A class:

public class A {
    private Integer id = new Integer(0);

    public A(int id) {
        this.id = id;
    }
}

I save the class B in the datastore. I get the exception at following point:

profile = new Profile();
em.persist(profile);
em.close(); //Exception

If I comment the token object in class B everything is working. How could I use the class A in B?

  • 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-15T23:41:52+00:00Added an answer on June 15, 2026 at 11:41 pm

    I believe the issue is that class A is not being identified as an entity to be managed. Can you use the following annotation at the top of Class A and see.

    @Embeddable
    public class A
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble creating an object in C++. I create a class called
I have some trouble creating my XmlDocument class. This is what I've tried to
I am mlearning javascript and have some trouble creating an onject via prototype. I
I am having some trouble creating a seamless photo grid. I have searched the
I have some trouble when I try to map object to int . My
I'm training with Azure environment and I have some trouble with the object CloudDriver
I'm having some trouble working with dates. I have an object with a date
I'm creating an asteroids game and in my main class I'm having some trouble
I'm having some trouble creating a interface with Qt. i'd like to have a
I'm having some trouble running gnuplot processes from Java. I'm creating a gnuplot script

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.