Results 1 to 2 of 2
- 05-01-2012, 02:24 PM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
Servlets + JPA problem - error in annotation's "@Table"
Hello,
I have problem with entity file. Eclipse shows the error in the annotation @Table about "Table "component" cannot be resolved".
What I may doing?
My entity file:
File persistance.xmlJava Code:@Entity @Table(name="component") // Here is error: "Table "component" cannot be resolved" public class ComponentEntity implements Serializable { @Id private int id; private String symbol; private String type; private static final long serialVersionUID = 1L; public int getId() { return this.id; } public void setId(int id) { this.id = id; } public String getSymbol() { return this.symbol; } public void setSymbol(String symbol) { this.symbol = symbol; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } }
Help friends.XML Code:<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> <persistence-unit name="MyProject1"> <class>sj.entities.ComponentEntity</class> </persistence-unit> </persistence>
- 05-01-2012, 05:24 PM #2
Re: Servlets + JPA problem - error in annotation's "@Table"
Why do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Exception in thread "main" java.lang.Error: Unresolved compilation problem
By shaminder in forum New To JavaReplies: 1Last Post: 11-06-2011, 04:41 PM -
Exception in thread "main" java.lang.Error: Unresolved compilation problem
By jcen in forum New To JavaReplies: 2Last Post: 11-06-2011, 04:40 PM -
request.getParameter("Login") returns null in servlets
By pink123 in forum Java ServletReplies: 1Last Post: 10-22-2011, 05:50 AM -
Simple "if" statement problem....compiling error.
By CYANiDE in forum New To JavaReplies: 4Last Post: 10-14-2009, 09:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks