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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:32:11+00:00 2026-06-14T11:32:11+00:00

I am using JBoss AS 7 and IDEA 11. While I am trying to

  • 0

I am using JBoss AS 7 and IDEA 11. While I am trying to deploy my app I have this trouble:

There are two entities in my app:

First:

@Entity
@Table(name="users")
public class User extends AbstractEntity {

    private static final long serialVersionUID = -3839809902040717567L;

    @Column(name="email") private String email;
    @Column(name="first_name") private String firstName;
    @Column(name="last_name") private String lastName;
    @Column(name="middle_name") private String middleName;
    @Column(name="password") private String password;
    @Column(name="client_id") private int clientId;
    @Column(name="user_name") private String userName;
    private List<Role> roles;

    public User() {
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getMiddleName() {
        return middleName;
    }

    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getClientId() {
        return clientId;
    }

    public void setClientId(int clientId) {
        this.clientId = clientId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @ManyToMany(cascade = {CascadeType.ALL})
    @JoinTable(name = "users_roles",
            joinColumns = {@JoinColumn(name = "user_id")},
            inverseJoinColumns = @JoinColumn(name = "role_id"))
    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }
}

Second:

@Entity
@Table(name="roles")
public class Role extends AbstractEntity {

    private static final long serialVersionUID = -192049947690313026L;

    @Column(name="ad_name") private String  adName;
    @Column(name="description") private String description;
    @Column(name="name") private String name;
    @OneToMany(mappedBy = "roles") private List<RolesPermissions> rolesPermissions;
    @ManyToMany(mappedBy = "roles") List<User> users;


    public String getAdName() {
        return adName;
    }

    public void setAdName(String adName) {
        this.adName = adName;
    }

    public String getDescription() {
        return description;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public List<RolesPermissions> getRolesPermissions() {
        return rolesPermissions;
    }

    public void setRolesPermissions(List<RolesPermissions> rolesPermissions) {
        this.rolesPermissions = rolesPermissions;
    }

}

They have ManyToMany relations.

While deploying I have this exception:

Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: users, for columns: [org.hibernate.mapping.Column(roles)]
    at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:304)
    at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:288)
    at org.hibernate.mapping.Property.isValid(Property.java:216)

What could be the reason?

P.S. AbstractEntity is mappedsuperclass and have field with @Id annotation.

  • 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-14T11:32:12+00:00Added an answer on June 14, 2026 at 11:32 am

    Your User entity does not have the roles relation annotated. A @ManyToMany annotation should do the trick.

    As @Perception pointed out, you might also want to spacify the join table on the roles, e.g:

    @JoinTable(name="USER_ROLE", joinColumns= @JoinColumn(name="EMP_ID"), inverseJoinColums = @JoinColumn(name="ROLE_ID"))
    

    EDIT: This annotation is only relevant if you are working with an existing schema or if the default table and column names don’t suit you. If you let Hibernate generate the table, you can safely omit the @JoinTable annotation.

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

Sidebar

Related Questions

I'm trying to deploy a Rails 3.2 app on JBOSS AS 7.1, using JRuby
I have app with several entity. During deploying on JBoss AS7 I occur exception
I am using JBoss 4.2.2.GA app server in a development environment. I have a
I am using IntelliJ IDEA and JBOSS AS 7 . When I am trying
I am using JBoss 4.2 GA and deploy my application there using JNDI naming
I'm using JBoss 7.1.1 and I have to pass an argument between two session
Is using JBoss Cache as distributed state repository a good idea? Can JBoss Cache
I'm using Jboss 7.1.1.final and i have an application with heavy use of JMS.
I'm using Jboss 7.1.1 and I have the following log definition: <subsystem xmlns=urn:jboss:domain:logging:1.1> <console-handler
I am using intellij idea and jboss server . When I run it it

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.