Hi

It works now. I read this solution on a forum:


It seems that "bookstore1" project (web application), is importing the
"dist/bookstore.jar" from another project (persistence unit?). In this case,
NetBeans will also try to recompile the project's dependencies (other
projects that may also require "TopLink Essential" library in the compiler's
CLASSPATH).

I think you should open the other project (manually or right click the web
project, and select "open required projects" option), and edit its
properties to also add the "TopLink Essentials" library to the compile-time
libraries (in the "libraries" category).

Cheers
Kris

On Fri, Feb 6, 2009 at 8:58 AM, Kerry Randolph <ke...@randolph1.com> wrote:

> I had the same error when using JBoss as server in Netbeans.
> If using Glassfish server I didn't get the error.
>
> On Thu, Feb 5, 2009 at 3:42 PM, Kristanto Oetomo <
> kristanto.oetomo....@gmail.com> wrote:
>
>> Hi
>>
>> I have a problem compiling bookstore1 sample in the j2ee tutorial. Below
>> is the error message:
>>
>> Compiling 11 source files to
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\build\classes
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:13:
>> package javax.persistence does not exist
>> import javax.persistence.Entity;
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:14:
>> package javax.persistence does not exist
>> import javax.persistence.Id;
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:15:
>> package javax.persistence does not exist
>> import javax.persistence.Table;
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:18:
>> cannot find symbol
>> symbol: class Entity
>> @Entity
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:19:
>> cannot find symbol
>> symbol: class Table
>> @Table(name = "WEB_BOOKSTORE_BOOKS")
>> D:\Experiment\JEE\javaeetutorial5\examples\web\bookstore\src\com\sun\bookstore\database\Book.java:55:
>> cannot find symbol
>> symbol  : class Id
>> location: class com.sun.bookstore.database.Book
>>     @Id
>> 6 errors
>> BUILD FAILED (total time: 3 seconds)
>>
>>
>> I have tried to add toplink library, and populate the database, but still
>> fail to build successfully. Any help appreciated.
>>
>> Cheers
>> Kris
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to