Duke's Bookstore

I have deployed the war file for bookstore6 provided by tutorial.i can see the map on the screen by typing http://localhost:1091/bookstore6. But, when i click on a link from map it gives me error
javax.servlet.ServletException
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:261)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
     sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     java.lang.reflect.Method.invoke(Method.java:324)
     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
     java.security.AccessController.doPrivileged(Native Method)
     javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
     java.security.AccessController.doPrivileged(Native Method)
     java.security.AccessController.doPrivileged(Native Method)
     org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:717)
     org.apache.jasper.runtime.PageContextImpl.access$1000(PageContextImpl.java:114)
     org.apache.jasper.runtime.PageContextImpl$11.run(PageContextImpl.java:674)
     java.security.AccessController.doPrivileged(Native Method)
......more
I don't understand what this error is all about.
I think when any app try to talk to database this error comes and if so how to solve so that at least example given byu sun i can run.
I would appreciate for ur +ve reply.
Thanx.

Hi
You probably did not set up the database resources as described in step 4 of the packaging and deploying instructions on this page:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFPage2.html#wp122076
Briefly, you need to create a JDBC data source, start the PointBase server, and populate the database.
Jennifer

Similar Messages

  • Problems with database access in Servlet Apllication (Duke's Bookstore)

    Hi! My name is Elena Veretilo! I am so newbie in JavaEE. So I really need you help and advice!!!
    I started to learn JavaEE with "The JavaEE5 tutorial for Sun Java Application Server 9.1" (http://java.sun.com/javaee/5/docs/tutorial/doc/) and this tutorial recommended the next examples: http://java.sun.com/javaee/5/docs/tutorial/information/download.html. I try to work in NetBeans 6.0 and NetBeans 6.5.
    First problem - I couldn't add Sun Java Application Server 9.1 to NetBeans' server list - it just doesn't see the installed Sun Java Application Server 9.1.
    Second problem - I couldn't run Duke's Bookstore example (from tutorial examples) - something wrong with working (maybe creating or accessing) database. The Database Server started, GlassFish Server also started, so I don't know where the problem could be.
    There is exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table/View 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, FIRSTNAME, SURNAME, ONSALE, INVENTORY, CALENDAR_YEAR, TITLE, PRICE, DESCRIPTION FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
    bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    If anybody had learned this tutorial and examples or just know what I need to do, please help me!!!!! If it's possible, tell me step by step, what I need to do!
    And one more question - do I really need Sun Java Application Server 9.1 to work with or GlassFish includes Sun Java Application Server 9.1?????

    [http://forums.sun.com/thread.jspa?threadID=5350426]
    Crossposting without notification is very rude. Please stick to one topic.

  • Problem deploying Duke's Bookstore JavaEE5 example

    Hello everyone,
    I am having problems deploying the Duke's Bookstore example. I am trying to follow the tutorial.
    I have already updated the information concerning AS_ADMIN_PASSWORD on the file "build.properties". It took me some times... by the way i am new in J2EE tecnology and i am trying to get the example working so i can see the example running.
    Right now i am able to run ant to build the example so i get the .war file and the other files in the "build" and "dist" directory.
    I am stock in the operation concerning the database. I get to the same error weather i try "ant deploy" or "ant create-tables"... this is the message that i get:
    C:\javaeetutorial5\examples\web\bookstore1>ant deploy
    Buildfile: build.xml
    check:
    tools:
    -pre-deploy:
    -pre-init:
    init:
    check:
    tools:
    start-db:
    [exec] Database already started on host localhost, port 1527.
    [exec] Command start-database executed successfully.
    delete-tables:
    [sql] Executing file: C:\javaeetutorial5\examples\web\bookstore1\${db.delete.src}
    BUILD FAILED
    C:\javaeetutorial5\examples\web\bookstore1\build.xml:25: The following error occurred while executing this line:
    C:\javaeetutorial5\examples\bp-project\database-ant.xml:48: java.io.FileNotFoundException: C:\javaeetutorial5\examples\web\boo
    kstore1\${db.delete.src} (El sistema no puede hallar el archivo especificado)
    Total time: 7 seconds
    By the way, i am spanish thats why the error message its in spanish! :)
    Its saids something about a missing file, a file that it can not be found. I dont know which one is the missing file... so i dont know what to do.
    I have looked both "build.xml" and "database-ant.xml" to see if i see something, but as i told you i am need in J2EE and this is getting very difficult.
    It seems very easy in the tutorial, but in practice you have to do other things to make it works. I dont know why this information it is not in the tutorial.
    I really hope that somebody can help me...
    Thx in advances

    Hello everyone,
    I am having problems deploying the Duke's Bookstore
    example. I am trying to follow the tutorial.
    I have already updated the information concerning
    AS_ADMIN_PASSWORD on the file "build.properties". It
    took me some times... by the way i am new in J2EE
    tecnology and i am trying to get the example working
    so i can see the example running....
    C:\javaeetutorial5\examples\web\bookstore1>ant
    deploy
    Buildfile: build.xml
    check:
    tools:
    -pre-deploy:
    -pre-init:
    init:
    check:
    tools:
    start-db:
    [exec] Database already started on host
    localhost, port 1527.
    [exec] Command start-database executed
    successfully.
    delete-tables:
    [sql] Executing file:
    C:\javaeetutorial5\examples\web\bookstore1\${db.delete
    .src}
    BUILD FAILED
    C:\javaeetutorial5\examples\web\bookstore1\build.xml:2
    5: The following error occurred while executing this
    line:
    C:\javaeetutorial5\examples\bp-project\database-ant.xm
    l:48: java.io.FileNotFoundException:
    C:\javaeetutorial5\examples\web\boo
    kstore1\${db.delete.src} (El sistema no puede hallar
    el archivo especificado)
    Total time: 7 seconds
    By the way, i am spanish thats why the error message
    its in spanish! :)
    Its saids something about a missing file, a file that
    it can not be found. I dont know which one is the
    missing file... so i dont know what to do.
    I have looked both "build.xml" and "database-ant.xml"
    to see if i see something, but as i told you i am
    need in J2EE and this is getting very difficult.The property db.delete.src is set in:
    .../javaeetutorial5/examples/bp-project/javadb.properties
    Check to make sure that this file exists. It should. You don't have to create it or edit it, as it is shipped with the correct properties for the tutorial.
    Also, have you followed the instructions on setting javaee.home in your build.properties, as described here:
    http://java.sun.com/javaee/5/docs/tutorial/doc/About.html#wp87965
    -ian

  • Duke's Bookstore - bugs in tutorial

    Hello Friends,
    I've installed the latest J2EE 1.4 tutorial, and tried to compile Duke's Bookstore example.
    I got many errors - references to classes that don't exist.
    For example, database.BookDetails - the class is not in database package. The only class there is BookDBAO.java... etc.
    Sure Sun should do simple testing before releasing the tutorial for public download???
    I ran standard "asant build" task... Other examples build with no errors.

    The suggestion to add bookstore.jar was a response to the compilation errors.
    If you can't create the connection to the database, it's probably because you haven't created the JDBC resource in the Application Server or you haven't mapped the jdbc/BookDB resource reference in the WAR to the JDBC resource in the Application Server.
    If you still have a problem, there may be an error in the JDBC resource reference. I have seen the error "BookDB not found" if the JDBC resource reference has a trailing space. If you look in J2EE_HOME/domains/domain1/config/domain.xml you should have a JDBC resource defined as follows:
    <jdbc-resource enabled="true" jndi-name="jdbc/BookDB" object-type="user" pool-name="PointBasePool"/>
    If there is an extra space after BookDB as shown below , the resource name won't be resolved correctly:
    <jdbc-resource enabled="true" jndi-name="jdbc/BookDB " object-type="user" pool-name="PointBasePool"/>
    You can either edit domain.xml and restart the server, or recreate the JDBC resource.

  • Duke's Bookstore Example - Pointbase console

    Hi,
    I'm trying to set up the Duke's Bookstore Examples and I'm having a problem starting the pointbase console because I don't know the password. I can't recall every being asked for a password on installation, other than my AppServer password.
    All help apprectiated.
    Thanks.

    Try using pbpublic/pbpublic as the user/pass.
    thanks.

  • Listeners.ContextListener causeing error when deploying Duke's Bookstore

    Hi,
    I am getting this ...
    [#|2004-02-06T14:25:39.666-0800|SEVERE|j2ee-appserver1.4|javax.enterprise.system.container.web|_ThreadID=12;|Exception sending context initialized event to listener instance of class listeners.ContextListener
    java.lang.NoClassDefFoundError: exception/OrderException
    at listeners.ContextListener.contextInitialized(Unknown Source)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3674)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4123)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:868)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:166)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:188)
    ... in my server.log when i try to deploy bookstrore1 from the J2EE 1.4 Tutorial. I guess I messed up adding the listeners.ContextListener? The PointBase database server is running and has all its tables and data. The steps for adding the Event Listener seem pretty fool proof. What could I have done wrong?
    Thanks

    I sent a email to the feedback for the J2ee Tutorial ([email protected]) And got the answer to this problem:
    >
    You have to add bookstore.jar to the bookstore1 WAR in deploytool.
    Stephanie

  • Duke's Bookstore Example (yet again)

    Folks'es,
    i'm currently ploughing my way through the j2ee tutorial 1.4. now that i come to the interesting parts (JSP et al) i'm stuck with getting the bookstore example to work.
    i've done everything to compile and packge the bookstore.jar, i've created and populated the database, and created the data source in the server, all without problems.
    but then it says under the heading "Specifying a Web Application's Resource Reference", that i should use deploytool and "1.Select the WAR (created in Chapters 11 through 22).". but i have no war file for the bookstore example! (i have some war's for the other examples and that's all.)
    what am i missing? were did i go wrong?
    any help is greatly appreciated.
    thomas

    well, i found it by just reading on (several 100s of pages).
    you actually need to do all this much later (pg 443 ff).
    thomas

  • Problems with Duke's Bookstore Examples (Chapter 3 of the J2EE 1.4 Tut)

    Hi
    Please help me, I am going through the J2EE tutorial (I have the Sun App Server 8 installed on a Win XP Service Pack 2 machine) but am running into problems.
    I'm having a problem with the
    1. asant build and
    2. asant create-db_common
    commands.
    1. asant build
    ===========
    When trying to use the command asant build I get the following problems:
    D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant build
    Buildfile: build.xml
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
    init:
    prepare:
    build:
    [javac] Compiling 11 source files to D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\booksto
    re\build
    BUILD FAILED
    file:D:/P.Files%20Ext/MJ%20Ext/J2EE%201.4%20Tutorial%20EXT/j2eetutorial14/examples/web/bookstore/build.xml:54: D:\lib not found.
    Total time: 8 seconds
    I then created an empty folder = D:\lib
    It then seemed to work?? but still could not find targets.xml as below
    D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant build
    Buildfile: build.xml
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
    init:
    prepare:
    build:
    [javac] Compiling 11 source files to D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore\build
    BUILD SUCCESSFUL
    Total time: 18 seconds
    D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>
    2. asant create-db_common
    ======================
    When trying to use the command asant create-db_common I get the following problems (I had to create an empty folder - D:\pointbase\lib to get this far)
    D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>asant create-db_common
    Buildfile: build.xml
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\common\targets.xml could not be found
    D:\P.Files%20Ext\MJ%20Ext\J2EE%201.4%20Tutorial%20EXT\j2eetutorial14\examples\web\common\targets.xml could not be found
    init:
    create-db_common:
    [java] java.lang.NoClassDefFoundError: com/pointbase/tools/toolsCommander
    [java] Exception in thread "main"
    [java] Java Result: 1
    BUILD SUCCESSFUL
    Total time: 8 seconds
    D:\P.Files Ext\MJ Ext\J2EE 1.4 Tutorial EXT\j2eetutorial14\examples\web\bookstore>
    Now I know that creating empty folders is not the solution so if anyone has any ideas as to what is wrong PLEASE tell me. I think there is something I need to add to a configuration file or something. I have re-installed the App Server but I still get the same problems. Thanks for your time!!

    Hi
    I have the same problem with the hello2 example, in the tutorial... You didnt??
    anyway maybe you are not setting the j2ee.home.
    somebody named " Jennifer " give me this advise ( i told you this to recognice that i was helped before)
    " Hello,
    You are probably not setting j2ee.home correctly. Please go to the following page and read section Building The Examples. Pay special attention to the Note in that section.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/About.html
    thanks,
    Jennifer "
    good luck, see ya

  • Duke's bookstore2 displays only one book title

    When I run Duke's bookstore2 from the Tutorial (Chapter 12: JavaServer Pages Technology: The Example JSP Pages), I'm not getting any error messages, but instead of seeing the graphical "Duke's Bookstore" heading followed by a horizontal line and "Please choose from our selections:" the only display I'm actually seeing at http://localhost:1024/bookstore2/bookstore is this single link:
    "Web Components for Web Developers,"
    and when I View Source for the page, I see only this:
    <p><b><fmt:message key="What"/></b></p>
    [actually 5 lines of space here]
    <p>
    <c:url var="url" value="/bookdetails" />
    <blockquote><p><em>Web Components for Web Developers</em>,
    <c:url var="url" value="/bookcatalog" />
    <fmt:message key="Talk"/></blockquote>
    <p><b><fmt:message key="Start"/></b>
    It seems to be displaying only the contents of one data set, rather than the data for all the books as part of a complete HTML page. (But when I open the pointbase console and "select * from books;" I see details for all 7 books in the table. So the full table is populated in the database.)
    When I click on that single link, I go to this URL:
    http://dar2000:1024/bookstore2/bookstore?bookId=203
    where I still see only one line with that one book title and nothing else on the page.
    Any suggestions? Thanks!

    Actually, I did add the prelude and coda pages in the JSP Properties tab.
    But, when I entered "/*.jsp" under URL Patterns on that same JSP Properties page, I did not erase first the "/URL_properties" that appeared there by default, so I ended up with "/URL_properties/*.jsp" in that field.
    When I reduced that to "/*.jsp" the complete page displayed, including the bookstore header, clock applet, Start Shopping link, copyright info, etc.
    Stephanie, thanks!

  • Is there any practical reason to use DB helper class?

    Is there any practical reason to use database helper class ( e.g. database.bookDB in Duke's bookstore)in servlet design? What if I setup a DB connection for every servlet?

    to ken_robinson
    I am currently setup DataSurece in servlet init().Usually (I know WebLogic is this way), if you configure the DataSource through the app server's configuration app, it is available to all applications.
    The most efficient way to look up the DataSource in a particular app is have a ServletContextListener lookup the DataSource from JNDI and set it in the Context as an Attribute. Each servlet would then, in it's init() method, get the DataSource from the ServletContext (faster than using JNDI for each Servlet. The ServletContextListener requires the container you are running in support the 2.3 spec. If it does not, simply use a startup servlet (servlet that is loaded when the app is loaded) and do the same thing.

  • Using JSP-Beans in Apache

    Hi all!
    I'm trying to deploy a jsp page in Tomcat 4.1.19. This page uses Java Beans to set and get various properties. I've put the class file of Java Bean in WEB-INF/classes directory and jsp page in Dir root. But whenever I run the jsp page it shows error page saying the bean name as unresolved symbol.
    Please tell me the steps that are involved in setting up a Java Bean for jsp in tomcat and also if any special lines are needed to be added to Deployment Descriptor.
    Thanx
    Varun

    sorry for tha :) maybe my english sucks to much...
    here's what sun says:
    "Note: In the section JSP Scripting Elements we mentioned that you must import any classes and packages used by a JSP page. This rule is slightly altered if the class is only referenced by useBean elements. In these cases,
    ---***you must only import the class if the class is in the unnamed package***---.
    For example, in What Is a JSP Page? (page 246), the page index.jsp imports the MyLocales class. However, in the Duke's Bookstore example, all classes are contained in packages and thus are not explicitly imported."
    as mentioned here:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPBeans4.html#64054

  • Ee tutorials - ant error on building .war

    Hi
    I recently started learning J2EE using this nice tutorial on the Sun website. I got into chapter 3 and there was a discussion about a bundle of example web applications generally... these are hello1, hello2, hello3 and 6 of duke's bookstore examples.
    I was just following tutorial and I managed to build and deploy hello1 example, it was cool. But then hello2 didn't work. I tried many many chekings amendments etc... but it is over my skill. I also found out that none of duke's bookstore examples are working, and it is for a very same reason as hello2 example. However hello3 example works fine again.
    btw, I wanted to use NB (6.1) but attached nb project files for these tutorials are somewhat not compatible with the latest 6.1 version. at least, my nb did not let me to open these. so i end up with ant. and here is the error which is given by ant, and when i am in a hello2 dir and type "ant" into my command prompt.
    -pre-init:
    init:
    default-ear:
    -pre-compile:
    bpp-actual-compilation:
         [echo] Compiling hello2
        [javac] Compiling 2 source files to D:\Java\tutorial\examples\web\hello2\build\web\WEB-INF\classes
    BUILD FAILED
    D:\Java\tutorial\examples\bp-project\command-line-ant-tasks.xml:92: D:\Java\tutorial\examples\web\hello2\"D:\Java\AppServer" not found.
    Total time: 0 secondsI hope you are able to catch what is this message talking about, i do not understand why is this ant trying to look into hello2 dir concatenated with appserv root directory at first place.
    My appserv is installed in D:\\Java\\AppServer
    and tutorial is located in D:\\Java\\tutorial
    I am sure that my bp-project\\build.properties is configured pretty well (unless it is not :).
    and this is the extract of command-line-and-tasks.xml, of that ellement which has line 92 in it...
    <target name="bpp-actual-compilation" if="has-java-sources">
    <echo>Compiling ${module.name}</echo>
    <mkdir dir="${build.classes.dir}"/>
    <javac srcdir="${src.dir}"
    source="${default.javac.source}"
    target="${default.javac.target}"
    excludes="${javac.excludes}"
    debug="${javac.debug}"
    debuglevel="${javac.debuglevel}"
    destdir="${build.classes.dir}"
    includes="**">
    <classpath refid="classpath"/>
    </javac>
    </target>
    so i don't know, what is going on? why is it constructing such a weird path which cannot be valid obviously?
    Edited by: wandue on Sep 22, 2008 6:59 AM

    OK, forget about it,
    I scrapped it all, deleted tutorials, unzipped them again, set the parameters, and it looks working now,
    must have been something silly

  • Problems with my installed J2EE platform.

    I am having trouble working with the J2EE development environment. My issues are as follows:
    1. In trying to run some of the examples include with the environment I have noticed that I do not have all the same directories and directory structure as specified in the the tutorial. For example, a step in the tutorial references using a file in the <INSTALL> (sun\appserver)\docs\tutorial\... directory, I do not have a docs\tutorial directory underneath my <INSTALL> directory. Are there different directory conventions implemented based on what platform to which you are installing the J2EE environment? (We are running WindowsXP Professional)
    2. At the beginning of the tutorial it makes reference to adding some additional information to your path. One such example is adding the <INSTALL>(sun\appserver)\shared\bin directory. I do not have such a directory. I have a <INSTALL>(sun\appserver)\bin directory but not a shared\bin directory.
    (Note: Could the above problems be corrected by merely uninstalling and re-installing the J2EE platform?)
    3. When I try to run the Duke's Bookstore servlet example I get an HTTP 404: File not found error. Does this error have something to do with the structure of my created web component, my browser (IE), or something else entirely?
    Any assistance would be greatly appreciated.
    Thanks,
    Michael Sucena

    Note that tutorial is not being shipped as part of J2EE SDK distribution - it is separate download and must be downloaded and unzipped independently of J2EE SDK installation which you already have. Download URL is here:
    http://java.sun.com/j2ee/1.4/download.html#tutorial
    Only after you download this, you can start following environment setup instructions you are refering to. Please note that you'll have to deal with two different installation directories - one is installation directory of J2EE SDK (one you already have), the other one is installation directory of tutorial (i.e. location where you will unzip downloaded tutorial) - these two may or may not be the same, so pay close attention to instructions. Some of your questions might also be covered in this thread:
    http://forum.java.sun.com/thread.jsp?forum=14&thread=470575&tstart=30&trange=15
    (namely, <install_dir>\share\bin folder is now obsolete, unfortunately reference to it was not removed from Tutorial instructions)
    Hope this helps....

  • Java EE5 Tutorial - Totally lost!

    HI I'm just working through the Java EE5 Tutorial.
    I'm using:
    Sun Java System Application Server Platform Edition 9 Update 1 Patch 1
    installed in C:\Sun\SDK
    The tutorial/example projects are therefore in:
    C:\Sun\SDK\domains\domain1\docroot\javaeetutorial5\examples\web\bookstore1
    Netbeans IDE 5.5.1
    I'm having problems specifically with Chapter 2: Populating the Example Database
    The instructions state:
    When you deploy any of the Duke's Bookstore applications using ant deploy, the database is automatically populated at the same time. If you want to populate the database separately from the deploy task or are using NetBeans 5.5 to deploy the application, follow these steps:
    1. In a terminal window, go to the books directory or any one of the bookstore1 through bookstore6 example directories.
    2. Start the Java DB database server. For instructions, see Starting and Stopping the Java DB Database Server. You don't have to do this if you are using NetBeans 5.5. It starts the database server automatically.
    3. Run ant create-tables. This task runs a command to read the file tutorial.sql and execute the SQL commands contained in the file.
    At the end of the processing, you should see the following output:
    [sql] 181 of 181 SQL statements executed successfully
    The first problem I have is that the Runtime/Databases section, I cannot connect to:
    jdbc:derby://localhost:1527/sample
    (though I don't think this matters for this problem)
    Next if I use the ant command from the command prompt I get:
    C:\Sun\SDK\domains\domain1\docroot\javaeetutorial5\examples\web\bookstore1>ant c
    reate-tables
    'ant' is not recognized as an internal or external command,
    operable program or batch file.
    C:\Sun\SDK\domains\domain1\docroot\javaeetutorial5\examples\web\bookstore1>Using asant I get:
    C:\Sun\SDK\domains\domain1\docroot\javaeetutorial5\examples\web\bookstore1>asant create-tables
    Buildfile: build.xml
    -pre-init:
    init:
    check:
    BUILD FAILED
    C:\Sun\SDK\domains\domain1\docroot\javaeetutorial5\examples\bp-project\app-serve
    r-ant.xml:417: Property javaee.server.passwordfile not specified. Please
                specify the javaee.server.passwordfile property in 'bp-project/build
    .properties'.
                You will also need to ensure that the passwordfile is present and co
    ntains
                AS_ADMIN_PASSWORD.
    Total time: 0 secondsI can deploy the project no problem, If I navigate to
    http://localhost:8080/bookstore1/bookstore
    I get the exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, FIRSTNAME, SURNAME, ONSALE, INVENTORY, CALENDAR_YEAR, TITLE, PRICE, DESCRIPTION FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
         bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)Can anyone give me any pointers as to what I'm doing wrong?
    I must say that I find the whole tutorial completely inaccessible, as it seems to give no tutorial at all, simply stating a stream of remotely connected facts, without any practical example. Is there an alternative book/guide to working through Java EE 5 for beginners?

    Dear all
    I am having a similar problem with the bookstore1 example from JEE5 Tutorial. When I launch it from the browser I get an Exception
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, INVENTORY, DESCRIPTION, PRICE, TITLE, FIRSTNAME, SURNAME, ONSALE, CALENDAR_YEAR FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
         bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    My environment (under Windows) is set up as follows:
    JAVAEE_HOME points to C:\\Program Files\\Java\\java_ee_sdk-5_02
    The tutorial is located in C:\\javaeetutorial5
    Application server is running at localhost:8080
    Java DB running at localhost:1527
    Java DB databases directory is located at C:\\DERBYDB
    I created BookDB database and it is in C:\\DERBYDB\\BookDB
    I populated the database, can connect to it and view tables from within NetBeans > Runtime
    I can also execute SQL queries from NetBeans on the datasets.
    In Runtime>Databases the URL for the database is setup as jdbc:derby://localhost:1527/BookDB
    In NetBeans > Tools > Options > Advanced Options > Server and External Tool Settings > Java DB Database the properties are set as
    Java DB Location: C:/Program Files/Java/java_ee_sdk-5_02/javadb
    Database Location : C:/DERBYDB
    In Application Server > Resources > JDBC > JDBC Resources I have
    JNDI Name:     derby
    Pool Name: DerbyPool     
    Status:     Enabled
    JNDI Name:     jdbc/BookDB
    Pool Name:     DerbyPool
    Status:     Enabled
    as well as jdbc/__CallFlowPool, jdbc/__default, jdbc/__TimerPool
    Project bookstore1 properties feature
    Libraries > bookstore - dist/bookstore.jar
    The output from the Application Server console:
    deployed with moduleid = bookstore1
    WEB0100: Loading web module [bookstore1] in virtual server [server] at [bookstore1]
    naming.bind
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The alias name for the entity class [class com.sun.bookstore.database.Book] is being defaulted to: Book.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public java.lang.String com.sun.bookstore.database.Book.getDescription()] is being defaulted to: DESCRIPTION.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public java.lang.String com.sun.bookstore.database.Book.getSurname()] is being defaulted to: SURNAME.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public java.lang.String com.sun.bookstore.database.Book.getTitle()] is being defaulted to: TITLE.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public java.lang.String com.sun.bookstore.database.Book.getBookId()] is being defaulted to: BOOKID.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public int com.sun.bookstore.database.Book.getInventory()] is being defaulted to: INVENTORY.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public float com.sun.bookstore.database.Book.getPrice()] is being defaulted to: PRICE.
    [TopLink Config]: 2007.08.31 08:05:26.546--ServerSession(15189713)--The column name for element [public java.lang.String com.sun.bookstore.database.Book.getFirstName()] is being defaulted to: FIRSTNAME.
    [TopLink Config]: 2007.08.31 08:05:26.562--ServerSession(15189713)--The column name for element [public boolean com.sun.bookstore.database.Book.getOnSale()] is being defaulted to: ONSALE.
    [TopLink Config]: 2007.08.31 08:05:26.562--ServerSession(15189713)--The column name for element [public int com.sun.bookstore.database.Book.getCalendar_year()] is being defaulted to: CALENDAR_YEAR.
    [TopLink Config]: 2007.08.31 08:05:26.578--ServerSession(15189713)--property toplink.server.platform.class.name is deprecated, property toplink.target-server should be used instead.
    topLink_version
    application_server_name_and_version
    platform=>JavaDBPlatform
    user name=> ""
    connector=>JNDIConnector datasource name=>null
    );|connecting
    ;|connected_user_database_driver
    platform=>JavaDBPlatform
    user name=> ""
    connector=>JNDIConnector datasource name=>null
    );|connecting
    ;|connected_user_database_driver
    login_successful
    WARNING *********** NetBeans HTTP Monitor ************
    The request cannot be recorded most likely because the NetBeans HTTP Server is not running. Go to the IDE and start the HTTP Server from within the Runtime window to fix this problem.
    =======================================================
    The number of hits is: 1
    =======================================================
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.apache.derby.client.am.SqlException: Table 'WEB_BOOKSTORE_BOOKS' does not exist.Error Code: -1
    Call:SELECT BOOKID, INVENTORY, DESCRIPTION, PRICE, TITLE, FIRSTNAME, SURNAME, ONSALE, CALENDAR_YEAR FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = ?)
    bind => [203]
    Query:ReadObjectQuery(com.sun.bookstore.database.Book)
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:303) ...
    Could anyone enlighten me why the table 'WEB_BOOKSTORE_BOOKS' cannot be found? As I said I can see it in NetBeans and can run a query e.g. SELECT BOOKID, INVENTORY, DESCRIPTION, PRICE, TITLE, FIRSTNAME, SURNAME, ONSALE, CALENDAR_YEAR FROM WEB_BOOKSTORE_BOOKS WHERE (BOOKID = '201')
    Also does the line connector=>JNDIConnector datasource name=>null in the Application Server output have any implication on this problem?
    I will greatly appreciate your help as I have run out of ideas how to fix this.

  • J2EE Sample Apps -

    Hi Friends,
    I was trying to do sample application provided by J2EE
    "http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html"
    I was stuck at one point. I was doing Java Servlet Technology example, in that book store example example it was told to find the bookstore.jar file and add to deployment tool.
    In step 8.g(below), we are asked to find the bookstore.jar.
    But when i downloaded the examples there was no bookstore.jar. did anybody of you faced smilar think. Please let me know. How to procced.
    Thank You all,
    SriJ2EE.
    ---------------Steps given in J2EE example -----------
    Build and package the bookstore common files as described in Duke�s
    Bookstore Examples (page 103).
    2. In a terminal window, go to <INSTALL>/j2eetutorial14/examples/
    web/bookstore1/.
    3. Run asant build. This target will spawn any necessary compilations and
    copy files to the <INSTALL>/j2eetutorial14/examples/web/
    bookstore1/build/ directory.
    4. Start the Application Server.
    5. Perform all the operations described in Accessing Databases from Web
    Applications (page 104).
    6. Start deploytool.
    7. Create a Web application called bookstore1 by running the New Web
    Component wizard. Select File&#8594;New&#8594;Web Component.
    8. In the New Web Component wizard:
    a. Select the Create New Stand-Alone WAR Module radio button.
    b. In the WAR Location field, enter <INSTALL>/j2eetutorial14/
    examples/web/bookstore1/bookstore1.war.
    c. In the WAR Name field, enter bookstore1.
    d. In the Context Root field, enter /bookstore1.
    e. Click Edit Contents.
    f. In the Edit Archive Contents dialog box, navigate to <INSTALL>/
    j2eetutorial14/examples/web/bookstore1/build/. Select
    errorpage.html, duke.books.gif, and the servlets, database,
    filters, listeners, and util packages. Click Add.
    450 JAVA SERVLET TECHNOLOGY
    g. Add the shared bookstore library. Navigate to <INSTALL>/
    j2eetutorial14/examples/build/web/bookstore/dist/. Select
    bookstore.jar and click Add.
    h. Click OK.
    i. Click Next.
    j. Select the Servlet radio button.
    k. Click Next.
    l. Select BannerServlet from the Servlet Class combo box.
    m.Click Finish.
    ----------------------------------

    Hi,
    Can i suggest you download the latest and greatest tutorial. there isonly the bookstore directory in the new bundles so I would work through it.
    make sure in the old tutorial that you ran the package-bookstore target in the bookstore directory as this creates the bookstore.jar

Maybe you are looking for

  • HT1766 can you have multiple iPhones in the same iTunes account without overwriting each phones content?

    Can you have multiple iPhones in the same iTunes account without overwriting each phones content?

  • Combine csv files and insert source filename

    Newbie powershell question - Need help combining multiple csv files (100+) and inserting a column containing the name of the source file ex:  Apples.csv A,B,C,D 1,2,3,4 Oranges.csv A,B,C,D 1,2,3,4 Desired output would look like this: combined.csv A,B

  • How to archive the file

    HI All,         In file to file scenario, i am trying to archive the file being sent by the source. But it's not showing up in the archive directory. The scenario is working fine, i am getting the file at the target end as req. But why is archiving n

  • Just using part of a song?

    I've been watching the tutorials on how to place background music on to my imovie but I cant work out how to select just a part of a song and place it with the correct photo or video clip. Can anyone help? Many thanks

  • Dumb question/install probably

    Hey everyone. I installed the jdk for windows, got installed and set my path and classpath. The problem im having now is I wrote this dumb program: import java.awt.*; public class MoveText { public static void main(String[] args) Rectangle cerealBox