Could not determine recommended JdbcType for <class>

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Could not determine recommended JdbcType for `fr.mind.mind.models.item.ItemCosmetic
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Could not determine recommended JdbcType for `fr.mind.mind.models.item.ItemCosmetic
@Entity
@Table
@Getter
@Setter
@NoArgsConstructor
public class ItemCosmetic {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column(nullable = true)
private Integer series;
@Column(nullable = true)
private String phoneNumber;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "buyerId", nullable = true)
@JsonProperty("buyerId")
@Getter(AccessLevel.NONE)
private Player buyer;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "itemId", nullable = true)
private Item item;
@Column(nullable = true)
private String renamed;
@Column(nullable = false)
private int quantity = 1;
@Column(nullable = false)
private boolean isDrop = false;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "inventoryId", nullable = true, unique = false)
private Inventory inventory;

public int getBuyerId() {
return buyer.getId();
}

public ItemCosmetic(
Player buyer,
Item item,
Inventory inventory) {
this.buyer = buyer;
this.item = item;
this.inventory = inventory;
}

public ItemCosmetic(
Player buyer,
Item item,
int quantity,
Inventory inventory) {
this.buyer = buyer;
this.item = item;
this.quantity = quantity;
this.inventory = inventory;
}
}
@Entity
@Table
@Getter
@Setter
@NoArgsConstructor
public class ItemCosmetic {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column(nullable = true)
private Integer series;
@Column(nullable = true)
private String phoneNumber;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "buyerId", nullable = true)
@JsonProperty("buyerId")
@Getter(AccessLevel.NONE)
private Player buyer;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "itemId", nullable = true)
private Item item;
@Column(nullable = true)
private String renamed;
@Column(nullable = false)
private int quantity = 1;
@Column(nullable = false)
private boolean isDrop = false;
@ManyToOne(cascade = CascadeType.DETACH)
@JoinColumn(name = "inventoryId", nullable = true, unique = false)
private Inventory inventory;

public int getBuyerId() {
return buyer.getId();
}

public ItemCosmetic(
Player buyer,
Item item,
Inventory inventory) {
this.buyer = buyer;
this.item = item;
this.inventory = inventory;
}

public ItemCosmetic(
Player buyer,
Item item,
int quantity,
Inventory inventory) {
this.buyer = buyer;
this.item = item;
this.quantity = quantity;
this.inventory = inventory;
}
}
53 Replies
JavaBot
JavaBot12mo ago
This post has been reserved for your question.
Hey @Max! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Max
MaxOP12mo ago
hey, i've problem but idk what is it.. Someone can help me ?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
i've this
spring.datasource.url=jdbc:mariadb://db:3306/mind.fr?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=uwu
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update

server.port=8087

spring.security.user.name=mindapibot
spring.security.user.password=xoDcxm7&Dxio3Hj@sT!TGRY5MzfEDH$qX3pXJ8Q3
security.jwt.token.secret-key=UwULeMotDePasseLePlusKawaiiDeFrance83Baka

# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui
# /api-docs endpoint custom path
springdoc.api-docs.path=/api-docs

# Cookie
cookie.secure=false

# Mind
mind.config.player.inventory.weight=8000
mind.config.player.spawn.item.cash=1500
spring.datasource.url=jdbc:mariadb://db:3306/mind.fr?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=uwu
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update

server.port=8087

spring.security.user.name=mindapibot
spring.security.user.password=xoDcxm7&Dxio3Hj@sT!TGRY5MzfEDH$qX3pXJ8Q3
security.jwt.token.secret-key=UwULeMotDePasseLePlusKawaiiDeFrance83Baka

# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui
# /api-docs endpoint custom path
springdoc.api-docs.path=/api-docs

# Cookie
cookie.secure=false

# Mind
mind.config.player.inventory.weight=8000
mind.config.player.spawn.item.cash=1500
i've try to restart docker but isn't good
Max
MaxOP12mo ago
and more hide
No description
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
yes I have been using the same url since the start of the project
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
No description
Max
MaxOP12mo ago
@! - ʙᴇɴᴊᴀ you find the pbm ?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
I just commented on all the relationships but I still have the pbm...
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
howw ????
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
hmm
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
No description
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
i go do it wait plz
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
https://github.com/C1ach0/Mind/invitations it's project for client, then i private it
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
x) :needhelp: :iara_shy_blush:
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
😭 Well I will see the problem tomorrow, it annoys me... good night ^^ :Hi:
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
Okk thanks :iloveyou:
JavaBot
JavaBot12mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Max
MaxOP12mo ago
don't touch my channel little bot
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
ohhh explain me plz
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
:cry_3:
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
But is it because I put int and not Integer that it posed pbm?
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
I put Integer because it's useless so I put Long. 4Billion items is a lot in reality already hm
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
Weird because in other tables I put int and it works. Finally I put Integer when I intend to put perhaps a null value
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
hhmmm Ok, i see Hm I put private Integer id; but I still have the error ;-; need to change other things?
Max
MaxOP12mo ago
No description
No description
Max
MaxOP12mo ago
send me your ItemCosmetic please
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
hm ok
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
^^ Thanks
JavaBot
JavaBot12mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Max
MaxOP12mo ago
Now I just have an error because I'm making a loop in my services but I should get out of it
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Max
MaxOP12mo ago
:iloveyou:
JavaBot
JavaBot12mo ago
Post Closed
This post has been closed by <@358629612584173568>.

Did you find this page helpful?