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.

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 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 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

  • JDeveloper 10G: Annoying bug Toplink Tutorial

    Hi,
    While I was completing the simple tutorial for Toplink I came to the point to create a Java class using my Toplink mapping. When I clicked the link I got the following error stack in my JDev window. This is very annoying cause it means I've done all my work the last few hours for nothing since I still don't know how to use the Toplink classes I've just created.
    Error message:
    oracle.help.topicDisplay.TopicDisplayException: BrowserTopicDisplay: Error Disp
    laying Topic
    at oracle.help.topicDisplay.BrowserTopicDisplay.setBrowserURL(Unknown So
    urce)
    at oracle.help.topicDisplay.BrowserTopicDisplay.protocolReceived(Unknown
    Source)
    at oracle.help.htmlBrowser.ICEBrowser._fireProtocolEvent(ICEBrowser.java
    :673)
    at oracle.help.htmlBrowser.ICEBrowser.access$5000071(ICEBrowser.java)
    at oracle.help.htmlBrowser.ICEBrowser$DeferringStormBase._captureOHJProt
    ocol(ICEBrowser.java)
    at oracle.help.htmlBrowser.ICEBrowser$DeferringStormBase.renderContent(I
    CEBrowser.java:822)
    at ice.storm.Pilot.renderContent(Unknown Source)
    at ice.pilots.html4.DefaultActionHandler.handleDefaultActionOnLinks(Unkn
    own Source)
    at ice.pilots.html4.DefaultActionHandler.mouseAction(Unknown Source)
    at ice.pilots.html4.DefaultActionHandler.onClick(Unknown Source)
    at ice.pilots.html4.DefaultActionHandler.handleEvent(Unknown Source)
    at ice.pilots.html4.DDocument.processEvent(Unknown Source)
    at ice.pilots.html4.DNode.dispatchEvent(Unknown Source)
    at ice.pilots.html4.CSSLayout.do_handleEvent(Unknown Source)
    at ice.pilots.html4.CSSLayout.handleEvent(Unknown Source)
    at ice.pilots.html4.DocPaneXml.uiEvent(Unknown Source)
    at ice.pilots.html4.swing.DocView.onComponentMouseEvent(Unknown Source)
    at ice.pilots.html4.swing.DocView.onComponentEvent(Unknown Source)
    at ice.pilots.html4.swing.DocView.onComponentEvent(Unknown Source)
    at ice.pilots.html4.swing.DocPanel.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Component.java:3639)
    at java.awt.Container.dispatchEventImpl(Container.java:1623)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
    at java.awt.Container.dispatchEventImpl(Container.java:1609)
    at java.awt.Window.dispatchEventImpl(Window.java)
    at java.awt.Component.dispatchEvent(Component.java)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    JDev version: 9.0.5.13.88
    Java version: 1.4.1_02 (came with jdev)
    Running on Windows XP professional.
    Suggestions are welcome!

    Okay, It seems I was a little to quick with my comments. Although the error still occurs, it doesn't mean I cannot end the tutorial. So this make it a little less annoying ;-).
    Regards,
    paskal

  • ATTN: JDEV TEAM....bug in tutorial

    I have tried to do the following tutorial:
    Developing the Online Orders Data Forms Client.
    Creating the Data Forms Client.
    Creating the Order-View Data Form.When i try to define the detail - detail relationship in the "Creating the Order-View Data Form" component of the tutorial. It resets to the master - detail relationship.
    Problem details...
    I set the following
    master rowSetInfo to: rowSetOrd
    viewObjectCandidate to :LineItemView1
    select the attributes.
    Then select the rowSetOrd in the masterLinkInfo dialog.
    when i renter the queryInfo dialog it has reset the selections to:
    rowSetInfo to :rowSetCust
    viewObjectCandidate to :ordView
    What is causing this ??????
    help
    null

    In case that wasn't clear because it converted my note, the last sentence in the first paragraph should read something like:
    ...data tags need to convert quotes to & quot where the & and the quot don't have a space between them.
    Joe

  • Bookstore examplw-j2ee tutorial problem-plz help

    Hi,
    I have been working on the bookstore1 example servlets from the J2ee tutoril for quite a few days.
    I followed the same procedure as given in the tutorials to deploy the application.
    Wen i type
    http://localhost:8080/bookstore1 on the browser,
    I get the erropage.html and the .gif file listed.
    But when i try to use
    http://localhost:8080/bookstore1/bookstore it issues an error message
    saying "The application is unavailable. Please try later."
    I happened to see the same question posted by many,,,and the solution being,,the Pointbase server should be started in the background
    I think my Pointbase server is running fine...But anyway i would be greatful if anyone cud reply in much detail about the configuration and working of the pointbase server.Or if my problem is due to some other cause,,please let me know.I jave all the properties set in the "asant listprops".
    Please help
    S&S

    Please don't post duplicate questions.
    Have you tried deploying the provided WAR?
    <INSTALL>/examples/web/provided-wars/bookstore1.war
    You should also look through the server.log file (either through the Admin Console or directly in the file) to look for the error. It should give you clues about what isn't working.
    -Ian Evans

  • 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!

  • 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.

  • Regarding the JavaEE Tutorial 9.1 (sep. 2007) - problem...

    Hey there ! i have a question , i am following the JavaEE Tutorial 9.1 (sep.2007), and i am wondering if the examples in this book (Duke's Bookstore, Duke's Bank, CoffeeBreak) can be deployed using BEA Weblogic Server 9.2 or newer (even maybe imported into their BEA Workshop instead of NetBeans?)...and if this can be done,do you have any ideas on how...or what is the best approach?
    Thank you in advance !

    neodude wrote:
    Hey there ! i have a question , i am following the JavaEE Tutorial 9.1 (sep.2007), and i am wondering if the examples in this book (Duke's Bookstore, Duke's Bank, CoffeeBreak) can be deployed using BEA Weblogic Server 9.2 or newer (even maybe imported into their BEA Workshop instead of NetBeans?)...and if this can be done,do you have any ideas on how...or what is the best approach?
    If it can't be done, the Java EE spec is a lie. You should be able to deploy any Java EE app on a compliant app server.
    The trick is writing the code so it doesn't depend on which app server you're using and adding the app-specific configuration that you need.
    You should be able to add in a weblogic-application.xml and be good to go.
    Best advice? Try it.
    %

  • 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

Maybe you are looking for

  • How to handle small images e.g icons

    I'm developing iPhone apps and when I design the icons in either photoshop or illustrator I always have the same problem. When working with very small images like 100px x 100px and smaller it's very hard to get a good resolution of the creation. For

  • Error with  org/apache/axis/AxisFault

    Hello Hi: I have server over Linux Red Hat Enterprise. and other server in local the if connect with the other server the servers are weblogic but need a create a webservice the that need the .jar axis.jar but not find the class AxisFault, and genera

  • How to edit the Object Data pane inside PDF 3D?

    Hello, I'm wondering if it is possible to import Property and Value data to populate the Model Tree property pane associated with the 3D PDF data. If this is possible I would really appreciate some example code. My problem: I export a U3D file from A

  • Nokia N8 Landscape Keyboard Double Spaces when typ...

    Has anyone else had a problem when on Facebook or Twitter or any other text field when browsing the internet. When you turn the phone to landscape to get a full keyboard and you his space between words you get a double space... this happens ALL THE T

  • MS Office Export/Import to Excel

    Do we have standard API to implement export/import functionality for MS Excel 2007. I am not sure if JXL/HSSF or any other APIs have come up for this new version of excel. Any thoughts?