BookDBAO bug in JavaEE tutorial bookstore1

In the JavaEE tutorial example bookstore1, BookDBAO is a java bean stored in context scope and used by all threads. In BookDBAO, the not thread-safe EntityManager em is used by all threads to db actions. I think this is a bug since EntityManager is not thread-safe.
Regards,
Rice

invalid target release: 1.6seems like the version of Java you have installed is too old. Install the latest Java 6 JDK and make sure that its bin directory is the one added to the PATH system variable, plus is the one set in the JAVA_HOME variable.
That is basic Java stuff by the way: I hope you are familiar with Java (not only the language, but also the tools!) itself before you try to dive into Java EE development. If not, you'll probably end up being very confused and frustrated.

Similar Messages

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

  • Where can I find The JavaEE tutorial in the downloaded Glassfish and EE SDK

    Where can I find The JavaEE tutorial in the downloaded Glassfish and EE SDK.The downloaded URL is (http://java.sun.com/javaee/downloads/index.jsp). I downloaded the whole pack.It includes the Java EE tutorial, But I can't find it to view offline
    Varuna

    The LOAD command instruction is 0xE8 and not 0xE0/0xE1.
    Lc is one byte, so how can you exceed FF?
    Optionally the LOAD response can include a receipt (delegated management). If your card mandates a response length of 1 byte (Le=01) it means that no receipt is expected --> receipt length 00. JCOPs LOAD command has Le=0x00 set by default --> response length undefined. This is in accordance with Java Card API, which follows the ISO 7816-4 APDU structure.
    Let's look at the help of the JCOP tools upload command:usage: upload [-p|--progress][-c|--components][-r|--random][-l|--package package-name][-s|--sd SD-AID][-m|--params parameters][-b|--block_length length][-a|--auto][-d|--load-debug] CAP-file
    -c|--components
                Load CAP-file component wise.
    -r|--random
                Load with random APDU length.
    -b|--block_length length
                Max. block (APDU) length sent to the card during package upload.
        length  Max. block (APDU) length.So you can set the block length --> Lc as you wish.
    Message was edited by:
    lexdabear

  • Bugs in DRDT tutorial

    Section 6.2.1 of the tutorial says:
    18 if (!pflag)
    19 continue;
    20 if (v % i == 0) {
    21 pflag[v] = 0;
    22 return 0;
    23 }
    The Data-Race Detection Tool reports that there is a data-race between the Write to pflag[] on line 21 and the Read of pflag[] on line 18. However, this data-race is benign as it does not affect the correctness of the final result. At line 18, a thread checks whether pflag[i], for a given value of i is equal to 0. If pflag[i] is equal to 0, then the thread continues on to the next value of i. If pflag[] is not equal to 0 and v is divisible by i, then the thread writes the value 0 to pflag[i]. It does not matter if, from a correctness point of view, multiple threads check the same pflag[i] and write to it concurrently, since the only value that is written to pflag[i] is 0.
    Looking closely at the text, the reference to pflag[] should be pflag[i], and the last three references to pflag[i] should really be to pflag[v]. No, wait, that's not right, either. pflag[i] is not both checked and written. pflag[i] is checked, and pflag[v] is written. The paragraph itself needs to be re-written (perhaps it was edited concurrently by multiple authors? :-) ).
    Also, Section 6.2 says there are two examples below, when in fact there are three.
    Also, Section 6.2.2 says:
    20 volatile int is_bad = 0;
    106 int i;
    107 for (i=my_start(thread_id); i<my_start(thread_id); i++) {
    108 if (is_bad)
    109 return;
    110 else {
    111 if (is_bad_element(data_array[i])) {
    112 is_bad = 1;
    113 return;
    114 }
    115 }
    116 }
    There is a data-race between the Read of is_bad on line 108 and the Write of is_bad on line 112. However, the data-race does not affect the correctness of the final result.
    But no, that's not really why there's no bad data race. The real reason is because the loop condition will never cause the body of the loop to be executed, if (as one would expect) mystart() always returns the same result given the same parameter. Also, once that is fixed, shouldn't you be mentioning that the apparent benign character of this race depends on the difference between the two values (0 and 1) being only one bit, and therefore one need not worry about the atomicity of the write? That is, if you had a 32-bit integer, and the initial value had the low bit set and the final value had the high bit set (with the value test correspondingly adjusted), and if the machine architecture allowed a 32-bit integer to be written at the hardware level in two 16-bit chunks, you'd still have to worry about a race condition potentially making invalid values appear in the shared is_bad variable.
    Also, I find it rather astounding that the third example is of double-checked locking, especially without any mention of the history of and problems with this idea (http://en.wikipedia.org/wiki/Double-checked_locking and http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf).
    Finally, in the usage flow diagram in Section 5.4, under "L1: Perform a data-race detection experiment:" you should mention the use of processor sets: http://developers.sun.com/solaris/articles/solaris_processor.html

    Herteg,
    Thank you very much for your detail review and good suggestions.
    The upper bound of the loop in section 6.2.2 should be my_end(thread_id).
    We will update the document.
    Thanks!
    -- Yuan

  • BUG: JDeveloper BC4J Tutorial is incorrect

    I have searched everywhere, but cannot find a correct working solution for this problem.
    Description:
    In a fresh install of JDeveloper 9i RUP7, I have tried to run the tutorial found under:
    Help Menu -> Help Topics -> Tutorial
    In the BC4J Tutorial titled "Business Components Programmatic Client Tutorial",
    I have run all the steps and the compiler gives me the error:
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file /OnlineOrders/common/bc4j.xcfg in the classpath
    There is no information regarding how to correctly configure the classpath or fix this problem.
    I downloaded JDeveloper 9i RUP7 at the Oracle Support site Knowledgebase 416708.1 for Release 11i:
    https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=8751878
    How can this this be resolved, so that I can successfully create a BC4J client in JDeveloper?
    Thanks in advance for any help

    Try asking on the OA Framework Forum

  • Problems with J2ee tutorial-Bookstore1 example--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

    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

  • Problem with bookstore1 example in J2EE 5 tutorial

    Hi everyone. I'm pretty experienced with J2EE but new to the 1.5 version. I'm using the Sun One Server 9.1 and the ant tools. This is referring to the samples in the J2EE 1.5 tutorial. I set my build.properties file and tried to build bookstore1 using ant and then ant deploy. I get the following error.
    Deploying application in domain failed; Error loading deployment descriptors for module [bookstore1] -- javax.annotation.Resource.authenticationType()Ljavax/annotation/Resource$AuthenticationType;at com.sun.enterprise.deployment.annotation.AnnotationInfo@4b35d5 Error loading deployment descriptors for module [bookstore1] -- javax.annotation.Resource.authenticationType()Ljavax/annotation/Resource$AuthenticationType;at com.sun.enterprise.deployment.annotation.AnnotationInfo@4b35d5
    This error is wracking my brain. If any one could help me with this, I'd really appreciate it.

    Well, i haven't checked this forum for a while so by now you've probably figured this out. Anyway, there is a build.properties.sample file in the $JAVA_TUTORIAL_HOME\examples\bp-project directroy. Rename that file to build.properties. Open it and look at it. Really, it should already be filled out. There is a property in there like this
    javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-password.txtYou have to go to this admin-password.txt file and set the password to your app server. In mine, I have
    AS_ADMIN_PASSWORD=passwordNow, you can go to any web project and run asant. Us asant (which stands for Application Server ant). You can use ant, but using asant will ensure your using the right version. Also be sure your using Java Application Server 9 and the asant that comes with it.

  • Problems with javaee 5 tutorial

    Hello!
    I'm trying to follow Building the Examples on the Command-Line Using Ant of the Java EE 5 tutorial by sun.
    I downloaded the tutorial bundle but when I try to run
    ant create-topicI get
    create-jms-resource:
         [exec] Invalid user or password
         [exec] CLI137 Command create-jms-resource failed.
         [exec] Result: 1I already changed the properties file as requested.
    Also I'm on a mac
    thanks for any help, I'm deperated

    I've reinstalled the whole netbeans/glassfish bundle. He didn't ask for any username or password for glashfish and when I check at the preferences the username is admin and the number of characters of the password is the same as adminadmin so there is zero chance of typos now.
    (Needless to say I still get the same error)
    As for files, I checked the build.xml and under ant-topic there was
      <target name="create-topic"
        description="create JMS topic">
        <antcall target="create-jms-resource">
            <param name="jms.restype" value="javax.jms.Topic" />
            <param name="jms.resource.property" value="Name=PhysicalTopic" />
            <param name="jms.resource.name" value="jms/Topic" />
        </antca
      </target>I don't know how to interpret this but I see no passwords mentioned. However in this file there is an import --> <import file="../../../bp-project/main.xml"/>
    I checked this file and this was what it had:
    <project name="main" default="dummy-default">
        <property file="build.properties"/>
        <property value="1.5" name="default.javac.source"/>
        <property value="1.5" name="default.javac.target"/>
        <condition property="common-ant-tasks-file"
                   value="${ant.file}/../nbproject/build-impl.xml"
                   else="${ant.file.main}/../command-line-ant-tasks.xml">
            <and>
                <isset property="netbeans.home"/>
                <available file="${ant.file}/../nbproject/build-impl.xml"/>
            </and>
        </condition>
        <import file="${common-ant-tasks-file}"/>
        <condition property="jaxb-tasks-file" value="${ant.file.main}/../jaxb-ant.xml">
            <isset property="is.jaxb.app"/>
        </condition>
        <import file="${jaxb-tasks-file}" optional="true"/>
        <target name="dummy-default"/>
    </project>I also went ahead and checked the build.properties file
    # Uncomment the property javaee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property javaee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by GlassFish.
    javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-password.txt
    # Digital certificate properties for mutual authentication
    keystore=${javaee.tutorial.home}/examples/jaxws/simpleclient-cert/support/client_keystore.jks
    truststore=${javaee.home}/domains/domain1/config/cacerts.jks
    keystore.password=changeit
    truststore.password=changeitIn the admin-password.txt the pasword is adminadmin
    I can't see anything wrong with any of these files.
    What could I do next?
    Thanks in advance

  • E71 : Tutorial bug

    Just started investigating new E71, and seems there is a bug in the Tutorial app. (Menu>Help>Tutorial) : Several topics cause the app. to end (crash) without showing info. e.g. Keys>Power key. Perhaps there are missing topics, because I also notice that where one of these "crash" topics appears in the middle of a list, lower topics actually launch the topic above them in the list e.g. anything below Calling>Dialled numbers.
    Am I the only one suffering this? Seems relatively trivial, but then does not inspire confidence : if a simple app. like Tutorial is bad, what chance complex stuff being good?

    I noticed that too. On my E63 tough, it works fine. These tuts are a bit silly. The manual is better documented and even then there are settings I can't find. The connections and buttons on the side are not described in the Dutch version.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Java EE tutorial, problem with ANT populating database

    Hi!
    I have followed the instructions in the Java EE tutorial to set up the enviroment but when I execute the command "ant create tables" I get this output:
    C:\javaeetutorial5\examples\web\bookstore1>ant create-tables
    Buildfile: build.xml
    -pre-init:
    init:
    check:
    tools:
    start-db:
    BUILD FAILED
    C:\javaeetutorial5\examples\bp-project\app-server-ant.xml:140: The directory you specified does not existI have changed in the build.properties file to this:
    # The SDK's default installation on Windows is c:/Sun/SDK
    # The Application Server's default installation on Windows is
    # c:/Sun/AppServer
    javaee.home=C:\Sun\SDK
    javaee.tutorial.home=C:\javaeetutorial5
    # machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where the app-server is accessed by the users
    javaee.server.port=8080
    # port number where the admin server of the app-server is available
    javaee.adminserver.port=4848
    # Uncomment the property j2ee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property j2ee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by the glassfish app-server installation.
    javaee.server.passwordfile=${javaee.tutorial.home}\examples\common\admin-passwo rd.txt
    appserver.instance=server
    # Uncomment and set this property to the location of the browser you
    # choose to launch when an application is deployed.
    # On Windows and Mac OS X the default browser is used.
    #default.browser=\Applications\Firefox.app\Contents\MacOS\firefox-bin
    # Database vendor property for db tasks
    db.vendor=javadb
    # Digital certificate properties for mutual authentication
    keystore=${javaee.tutorial.home}\examples\jaxws\simpleclient-cert\support\clien t_keystore.jks
    truststore=${javaee.home}\domains\domain1\config\cacerts.jks
    keystore.password=changeit
    truststore.password=changeitAny idea which directory the error refers to?
    I�m using Netbeans 5.5 and have a connection to my local mysql database.

    Ok, this is the build.xml from bookstore1:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- You may freely edit this file. See commented blocks below for -->
    <!-- some examples of how to customize the build. -->
    <!-- (If you delete it and reopen the project it will be recreated.) -->
    <project name="bookstore1" default="default" basedir=".">
        <description>Builds, tests, and runs the project bookstore1.</description>
        <property name="is.war.module" value="true" />
        <property name="uses.db.sql.file" value="true"/>
        <path id="common.jars">
            <filelist dir="../bookstore" files="build.xml"/>
        </path>
        <macrodef name="iterate">
            <attribute name="target"/>
            <sequential>
                <subant target="@{target}" failonerror="false">
                    <buildpath refid="common.jars"/>
                </subant>
            </sequential>
        </macrodef>
        <import file="../../bp-project/main.xml" />
        <target name="-pre-deploy" unless="netbeans.home">
            <antcall target="create-tables"/>
        </target>
        <target name="-pre-compile" unless="netbeans.home" depends="init,build-common,copy-common-jars"/>
        <target name="build-common" unless="netbeans.home" depends="init">
            <iterate target="default"/>
        </target>
        <target name="copy-common-jars" unless="netbeans.home" depends="init">
            <mkdir dir="${build.web.dir}/WEB-INF/lib"/>
            <copy file="${reference.bookstore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
        </target>
    </project>And the build.xml in bookstore looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- You may freely edit this file. See commented blocks below for -->
    <!-- some examples of how to customize the build. -->
    <!-- (If you delete it and reopen the project it will be recreated.) -->
    <project name="bookstore1" default="default" basedir=".">
        <description>Builds, tests, and runs the project bookstore1.</description>
        <property name="is.war.module" value="true" />
        <property name="uses.db.sql.file" value="true"/>
        <path id="common.jars">
            <filelist dir="../bookstore" files="build.xml"/>
        </path>
        <macrodef name="iterate">
            <attribute name="target"/>
            <sequential>
                <subant target="@{target}" failonerror="false">
                    <buildpath refid="common.jars"/>
                </subant>
            </sequential>
        </macrodef>
        <import file="../../bp-project/main.xml" />
        <target name="-pre-deploy" unless="netbeans.home">
            <antcall target="create-tables"/>
        </target>
        <target name="-pre-compile" unless="netbeans.home" depends="init,build-common,copy-common-jars"/>
        <target name="build-common" unless="netbeans.home" depends="init">
            <iterate target="default"/>
        </target>
        <target name="copy-common-jars" unless="netbeans.home" depends="init">
            <mkdir dir="${build.web.dir}/WEB-INF/lib"/>
            <copy file="${reference.bookstore.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
        </target>
    </project>And the main.xml in \bp-projects looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.  You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at:
    http://developer.sun.com/berkeley_license.html
    $Id: main.xml,v 1.2 2006/04/12 17:20:13 ie139813 Exp $ -->
    <!-- main.xml: this is the file that should be included by the project
         build files. It will figure out whether it is running from inside Netbeans
         or command line and include appropriate tasks.
         @Author: Inderjeet Singh -->
    <project name="main" default="dummy-default">
      <property file="build.properties"/>
      <property value="1.5" name="default.javac.source"/>
      <property value="1.5" name="default.javac.target"/>
      <condition property="common-ant-tasks-file"
              value="${ant.file}/../nbproject/build-impl.xml"
              else="${ant.file.main}/../command-line-ant-tasks.xml">
        <and>
        <isset property="netbeans.home"/>
        <available file="${ant.file}/../nbproject/build-impl.xml"/>
        </and>
      </condition>
      <import file="${common-ant-tasks-file}"/>
      <target name="dummy-default"/>
    </project>

  • J2ee tutorial. "ant create-tables" problem

    I am following Java ee 5 tutorial. In one of its sections it asks me to populate the db by following the below instructions:
    1. In a terminal window, go to the books directory or any one of the bookstore1 through
    bookstore6 example directories.
    2. Start the JavaDB database server. For instructions, see ?Starting and Stopping the JavaDB
    Database Server? on page 69. You don?t have to do this if you are usingNetBeans IDE. It
    starts the database server automatically.
    3. Type ant create-tables. This task runs a command to read the file tutorial.sql and
    execute the SQL commands contained in the file.
    4. At the end of the processing, you should see the following output:
    [sql] 181 of 181 SQL statements executed successfully
    when i reach step 3 and type ant create-tables, i get the following error:
    C:\netbeans-javatutorials\JavaEE5Tutorial\J2EEe-tutorial_5\examples\web\books>ant create-tables
    Buildfile:build.xml
    -pre-init:
    check:
    BUILD FAILED
    C:\netbeans-javatutorials\JavaEE5Tutorial\J2EEe-tutorial_5\examples\bp-project\app-server-ant.xml:419: 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 contains AS_ADMIN_PASSWORD.
    Total time :0 seconds
    I have configure the build.properties file as follows:
    # Set the property javaee.home, using the path to your
    # GlassFish installation.
    # C:/Program Files/glassfish-v3 is the GlassFish v3 default installation
    # path on Windows.
    javaee.home=C:/Sun/AppServer
    # Set the property javaee.tutorial.home to the location where you
    # installed the Java EE Tutorial bundle.
    javaee.tutorial.home=C:/netbeans-javatutorials/JavaEE5Tutorial/J2EEe-tutorial_5
    # machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where GlassFish applications are accessed by users
    javaee.server.port=8080
    # port number where the Admin Console of GlassFish is available
    javaee.adminserver.port=4848
    # Uncomment the property javaee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property javaee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by GlassFish.
    javaee.server.passwordfile=C:/netbeans-javatutorials/JavaEE5Tutorial/J2EEe-tutorial_5/examples/common/admin-password.txt
    appserver.instance=server
    # Uncomment and set this property to the location of the browser you
    # choose to launch when an application is deployed.
    # On Windows and Mac OS X the OS default browser is used.
    #default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin
    # Database vendor property for db tasks
    # JavaDB is the default database vendor. See the settings in javadb.properties
    db.vendor=javadb
    # Digital certificate properties for mutual authentication
    keystore=${javaee.tutorial.home}/examples/jaxws/simpleclient-cert/support/client_keystore.jks
    truststore=${javaee.home}/domains/domain1/config/cacerts.jks
    keystore.password=changeit
    truststore.password=changeit
    and the admin-password.txt
    AS_ADMIN_PASSWORD=adminadmin
    Any suggestions.

    I was stuck with the same problem but finally managed to get it to work.
    The only difference being, I did not change the "javaee.server.passwordfile" field. Like someone else said, I just changed the first two fields. The following are the values I set for the GlassFish 3.1 server with NetBeans 6.7.1,
    javaee.home=C:/Sun/AppServer
    javaee.tutorial.home=C:/JavaWork/javaeesuntutorial/javaeetutorial5
    Hope this helps.

  • Javaee5 Tutorial first step error(can not run ant)

    Hi all,
    I have just installed Sun Java System Application Server enterprise Edition in my computer.
    My system is getoo .
    I copy the javaee5Tutorial to the directory of Sun Java System Application Server enterprise Edition
    Here is the error:
    in the bookstore1 directory: run ant
    Buildfile: build.xml
    BUILD FAILED
    /opt/SUNWappserver/javaeetutorial5/examples/web/bookstore1/build.xml:23: The following error occurred while executing this line:
    /opt/SUNWappserver/javaeetutorial5/examples/bp-project/main.xml:20: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.
    Total time: 1 second
    regards!
    aries211

    Hi all ....
    it's me again.....I just try a couple of minutes ago to run ANT for the bookstore1 of the Example Servlets of the Java EE 5 Tutorial and still getting this frustated error:
    C:\javaeetutorial5\examples\web\bookstore1>ant
    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 C:\javaeetutorial5\examples\web\booksto
    re\build\classes
    [javac] javac: invalid target release: 1.5
    [javac] Usage: javac <options> <source files>
    [javac] where possible options include:
    [javac] -g Generate all debugging info
    [javac] -g:none Generate no debugging info
    [javac] -g:{lines,vars,source} Generate only some debugging info
    [javac] -nowarn Generate no warnings
    [javac] -verbose Output messages about what the compiler
    is doing
    [javac] -deprecation Output source locations where deprecated
    APIs are used
    [javac] -classpath <path> Specify where to find user class files
    [javac] -sourcepath <path> Specify where to find input source files
    [javac] -bootclasspath <path> Override location of bootstrap class fil
    es
    [javac] -extdirs <dirs> Override location of installed extension
    s
    [javac] -d <directory> Specify where to place generated class f
    iles
    [javac] -encoding <encoding> Specify character encoding used by sourc
    e files
    [javac] -source <release> Provide source compatibility with specif
    ied release
    [javac] -target <release> Generate class files for specific VM ver
    sion
    [javac] -help Print a synopsis of standard options
    [subant] Failure for target 'default' of: C:\javaeetutorial5\examples\web\boo
    kstore\build.xml
    [subant] The following error occurred while executing this line:
    [subant] C:\javaeetutorial5\examples\bp-project\command-line-ant-tasks.xml:89
    : Compile failed; see the compiler error output for details.
    copy-common-jars:
    [mkdir] Created dir: C:\javaeetutorial5\examples\web\bookstore1\build\web\WE
    B-INF\lib
    BUILD FAILED
    C:\javaeetutorial5\examples\web\bookstore1\build.xml:36: Warning: Could not find
    file C:\javaeetutorial5\examples\web\bookstore\dist\bookstore.jar to copy.
    Total time: 1 second
    C:\javaeetutorial5\examples\web\bookstore1>
    Here it is the build.properties file
    # uncomment the property javaee.home, and add the path
    # to your GlassFish Java EE 5 SDK installation
    javaee.home=c:/Sun/AppServer
    javaee.tutorial.home=c:/javaeetutorial5
    # machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where the app-server is accessed by the users
    javaee.server.port=8080
    # port number where the admin server of the app-server is available
    javaee.adminserver.port=4848
    # Uncomment the property j2ee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property j2ee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by the glassfish app-server installation.
    javaee.server.passwordfile=${javaee.tutorial.home}/examples/common/admin-password.txt
    appserver.instance=server
    # Uncomment and set this property to the location of the browser you
    # choose to launch when an application is deployed.
    # On Windows and Mac OS X the default browser is used.
    #default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin
    # Database vendor property for db tasks
    db.vendor=javadb
    This is in my SYSTEM VARIABLE:
    CLASSPATH= c:\sun\appserver\lib;C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;c:\j2sdk1.4.2_07;C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip\
    javaee.home = C:\\Sun\\AppServer
    JAVA_HOME = c:\j2sdk1.4.2_07
    Thank you in advanced....

  • Java EE5 Tutorial -  'ant create-tables' BUILD FAILED

    Hi,
    Appologies, this is quite a begineers question, hopefully it's an easy one to answer. I've searched for the last few hours regarding this issue,
    trying things and searched the forums here at sun with no similar issue. As you can see below, I cannot create the tables for the bookstore1 application using 'ant'.
    I am getting a FileNotFoundException however the delete.sql and tutorial.sql files are at this location C:\javaee\javaeetutorial5\examples\common\sql\javadb\
    I have also made sure that the files have read and write access. I know their could be some permissions issues using vista if I installed at C:/ProgramFiles, so everything is in C:/
    Another thing I have tried is using the ant command directly even though the PATH is in my enviroment variables, just incase another version was conflicting, as I read about people having such issues.
    "C:\Sun\AppServer\lib\ant\bin\ant create-tables" => This gave the same error as below. Im not sure what other information may help you help me here, so just ask.
    Annoying thing is, this example worked fine when I set up the environment on my work laptop (which I have no access to now) earlier, I didn't have this issue.
    Thanks for your help.
    /Paul.
    c:\javaee\javaeetutorial5\examples\web\bookstore1>ant create-tables
    Buildfile: build.xml
    -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:\javaee\javaeetutorial5\examples\web\bookstore1\=C:\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql
    BUILD FAILED
    C:\javaee\javaeetutorial5\examples\bp-project\database-ant.xml:48: java.io.FileNotFoundException: C:\javaee\javaeetutorial5\examples\web\bookstore1\=C
    :\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql (The filename, directory name, or volume label syntax is incorrect)
    Total time: 21 seconds
    c:\javaee\javaeetutorial5\examples\web\bookstore1>

    Hi,
    This is due to the path problem that u specified in build.properties file for javaee.tutorial.home= variable. Use / instead of \. Problem will solved.
    Thanks
    Amalka

  • Couldn't complete tutorial 'Integrating EJB 3.0 into Web Dynpro ...'

    Hi All,
    I am trying to complete the “Integrating EJB 3.0 into Web Dynpro Using the EJB Model Importer” tutorial that goes with SAP NetWeaver Composition Environment 7.1 SP3 Developer Studio.
    Does anyone ever completed this tutorial because I have problems completing it. The result is very important for me because I need to use this technology for my essay.
    In this tutorial you create a button that calls the method StudsBean.getStudent(String). In this method the object student is created and it will be returned. In several labels the information of the returned student should be displayed. But that doesn’t happen, when I push the button no error occurs but the labels are still empty. When I try to debug the Enterprise Bean and Web Dynpro application I see that the method StudsBean.getStudent(String) is called and the property’s are set and the student object is returned, but still it isn’t displayed.
    After discussing this with a colleague I tried to search for a solution on the SDN and of course Google. First I thought I would be a bug but I only found 2 people with the same problem. I found it remarkable because it’s one of the key subjects of Java EE 5 and it’s a tutorial displayed in the welcome page of the Developer Studio.
    So do you people think it’s a bug in WebDynpro? Because I am sure that I followed all the steps mentioned (a colleague checked it even).
    Regards,
    Sander

    Hi Sander,
    I guess, it's not a bug in Web Dynpro, maybe it's a bug in the tutorial
    I tried something similar, but not following the tutorial and it works. I wasn't able to call the model from the view controller and I guess that's the problem. Take the code from the init-method of the view controller and put it to the component controller's init -method and the code inside the onActionGetStudent and put it into a method you create in the component controller, too. From onActionGetStudent just call this method in the component controller with some code like this:
    wdThis.wdGet<your component controller's name>.<your method's name>;
    Hope this helps
    Kind regards
    Stefanie

  • Having problem in getting JaveEE tutorial example source

    I have tried to follow the link below to get example source, unfortunately it doesnt work, can someone show me how to get or send it to my email.
    http://docs.oracle.com/javaee/6/tutorial/doc/gexaj.html#giqtt
    Thanks~

    Please provide your platform OS and version, jdk version and the version of any tools you are using (netbeans, glassfish, etc).
    Also, what happens when you follow the instructions titled' To Obtain the Tutorial Component Using the Update Tool' at the link you provided?
    Java EE 6 Tutorial Component
    The tutorial example source is contained in the tutorial component. To obtain the tutorial component, use the Update Tool.
    To Obtain the Tutorial Component Using the Update Tool
    1.Start the Update Tool.
    From the command line, type the command updatetool.
    On a Windows system, from the Start menu, choose All Programs, then chooseJava EE 6 SDK, then choose Start Update Tool.
    2.Expand the GlassFish Server Open Source Edition node.
    3.Select the Available Add-ons node.
    4.From the list, select the Java EE 6 Tutorial check box.
    5.Click Install.
    6.Accept the license agreement.
    After installation, the Java EE 6 Tutorial appears in the list of installed components. The tool is installed in the as-install/docs/javaee-tutorial directory. This directory contains two subdirectories: docs and examples. The examples directory contains subdirectories for each of the technologies discussed in the tutorial.

Maybe you are looking for