0
  1. I created a model RequisitionDetail.
  2. It has some properties, such as: requisitionId (a foreign key on requisition table), productId (a foreign key on product table), quantity, unitPrice, totalPrice.
  3. When I declare annotation @ManyToOne or @OneToOne and deploy the code, I have this error.
  4. Without declared @ManyToOne or @OneToOne annotation my application is deployed Successfully.

  5. How to solve this problem?

I Attach the Code Bellow : Class Name: RequisitionDetail.java

@Entity
@Table(name = "requisition_details")
public class RequisitionDetail {    
@Id
private Long id;
@ManyToOne(cascade = CascadeType.ALL)
@Column(name = "requisition_id")
private Long requisitionId;
@OneToOne
@Column(name = "product_id")
private Long productId;   
private int quantity;   
@Column(name = "unit_price")
private Double unitPrice;
@Column(name = "total_price")
private Double totalPrice;

}

  • 2
    This error in your title is the result of your web application stopping, it is not the cause. Please provide a [mcve], give your question a better title and check your logs for an earlier error and include its full stacktrace in this question. – Mark Rotteveel Feb 18 '18 at 09:55
  • https://stackoverflow.com/a/8636800/3003337 – surya Feb 19 '18 at 02:52
  • Possible duplicate of [To prevent a memory leak, the JDBC Driver has been forcibly unregistered](https://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered) – surya Feb 19 '18 at 02:53

0 Answers0