please help me with building duke tutorial

hi, i'm new to Java. I have installed sun appserver 9 PE on a windows xp machine. i ran the appserver and then i tried to buildbookstore1 tutorial but i received the following error log:

Buildfile: build.xml

-pre-init:

init:

default-ear:

build-common:

-pre-init:

init:

default-ear:

-pre-compile:

bpp-actual-compilation:

[echo] Compiling bookstore

[javac] Compiling 11 source files to E:\Documents\Studies\Laboratories\Java\

Java EE\javaeetutorial5\examples\web\bookstore\build\classes

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:32: package javax.per

sistence does not exist

[javac] import javax.persistence.Entity;

[javac] ^

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:33: package javax.per

sistence does not exist

[javac] import javax.persistence.Id;

[javac] ^

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:34: package javax.per

sistence does not exist

[javac] import javax.persistence.Table;

[javac] ^

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:37: cannot find symbo

l

[javac] symbol: class Entity

[javac] @Entity

[javac] ^

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:38: cannot find symbo

l

[javac] symbol: class Table

[javac] @Table(name = "WEB_BOOKSTORE_BOOKS")

[javac] ^

[javac] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\web\bookstore\src\com\sun\bookstore\database\Book.java:74: cannot find symbo

l

[javac] symbol : class Id

[javac] location: class com.sun.bookstore.database.Book

[javac]@Id

[javac]^

[javac] Note: E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5

\examples\web\bookstore\src\com\sun\bookstore\cart\ShoppingCart.java uses or ove

rrides a deprecated API.

[javac] Note: Recompile with -Xlint:deprecation for details.

[javac] 6 errors

[subant] Failure for target 'default' of: E:\Documents\Studies\Laboratories\J

ava\Java EE\javaeetutorial5\examples\web\bookstore\build.xml

[subant] The following error occurred while executing this line:

[subant] E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examp

les\bp-project\command-line-ant-tasks.xml:92: Compile failed; see the compiler e

rror output for details.

copy-common-jars:

BUILD FAILED

E:\Documents\Studies\Laboratories\Java\Java EE\javaeetutorial5\examples\web\book

store1\build.xml:36: Warning: Could not find file E:\Documents\Studies\Laborator

ies\Java\Java EE\javaeetutorial5\examples\web\bookstore\dist\bookstore.jar to co

py.

Could you please help me with that? i also started java DB to see if it helps but it didn't.

[3327 byte] By [amir_hossein_monshia] at [2007-11-14]
# 1
thanx to me i fixed it myself;)
amir_hossein_monshia at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 2
Hi,I am having the same problem, and haven't been able to fix it. Please help me?DG
star_siriusa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 3
I am also facing the same problem. Can you help me out.
Rengadossa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 4

Hi,

I spent so much time to solve this question: it made me crazy... However: you have to modify on the application server the Database name of the DerbyPool. The default one is sun-appserv-samples. You have to modify it to sample

Besides this, in Netbeans I added a resource in the resources tab of Bookstore1 web.xml file. The resource is jdbc/BookDB; Resource Type javax.sql.DataSource; Authentification container; Sharing scope Shareable

Hope this help

Kyprys

Kyprysa at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 5
I could not understand your explanation for fixing this problem. Kindly explain me in clear steps and also my sun java Application server is not getting started...what can i do?sincerly,bond
deepahadimania at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...
# 6

Dear All ,

Please excuse me for not answering timely and forgetting about collaborative nature of forums. Anyway, in my case

the solution was so easy. My application server is nstalled in D:\sun\AppServer and my tutorial home is

E:/Documents/Studies/Laboratories/Java/Java EE/javaeetutorial5 and these were the sources of problems because the default configuration values

were different. by changing variable values in ..\javaeetutorial5\examples\bp-project\build.properties to proper values, it started functioning.

.

.

.

javaee.home=d:/Sun/AppServer

javaee.tutorial.home=E:/Documents/Studies/Laboratories/Java/Java EE/javaeetutorial5

.

.

.

I think most of other similar problems occur because of improper configuration default values. For example in another thread I read that some one was trying to

Deploy the tutorials in Linux not noticing that all of these paths in configuration files are for windows.

About deepahadimani's problem , I have to say that I am not very familiar with Sun Application server but I suggest you to explain you problem with some more details e.g.

shell error messages, server logs ,etc so professionals will be able to help you.

Best wishes,

Amir

amir_hossein_monshia at 2007-7-9 > top of java,Application & Integration Servers,Application Servers...