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

Similar Messages

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

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

  • Java EE Tutorial ant deploy

    Hi
    I have a problem when using the ant deploy command in the hello1 app in the tutorial. I get an error:
    BUILD FAILED
    E:\dev\javaeetutorial5\examples\bp-project\app-server-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 contains
    AS_ADMIN_PASSWORD.
    can any one point me in the direction for correcting this? Where do i find the password file so i can add it to the app-server-ant.xml file
    Thank you for any help.

    E:\dev\javaeetutorial5\examples\bp-project\app-server-
    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 contains
    AS_ADMIN_PASSWORD.
    point me in the direction for correcting this? Where
    do i find the password file so i can add it to the
    app-server-ant.xml file
    hank you for any help.Create a password file, say password.txt with the following line
    AS_ADMIN_PASSWORD=<substitue your admin password, most probably adminadmin>
    Open bp-project/build.properties and update the following line
    javaee.server.passwordfile=<absolute path to password.txt, example: c:/appserver/password.txt>
    It is preferrable to create the file password.txt under a directory which has no spaces.
    If bp-project/build.properties does not exist, copy bp-project/build.properties.sample to bp-project/build.properties and update it based on your application server installation.
    - sreeni

  • Java EE Tutorial ant deploy error.

    I'm not really sure where this post belongs, but I thought I would throw it out there as an FYI to anyone using the ant command line tools for the Java EE Tutorial.
    I have been playing around with the Java EE Tutorial and believe I may have found a bug with the war-ant.xml file. When running the deployment from the command line, the deploy portion of the build fails. The following is an example error message.
    deploy:
    [exec] Usage: deploy [--terse=false] [--echo=false] [--interactive=true] [-
    -host localhost] [--port 4848|4849] [--secure | -s] [--user admin_user] [--passw
    ordfile file_name] [--virtualservers virtual_servers] [--contextroot context_roo
    t] [--force=true] [--precompilejsp=false] [--verify=false] [--name component_nam
    e] [--upload=true] [--retrieve local_dirpath] [--dbvendorname dbvendorname] [--c
    reatetables=true|false | --dropandcreatetables=true|false] [--uniquetablenames=t
    rue|false] [--deploymentplan deployment_plan] [--enabled=true] [--generatermistu
    bs=false] [--availabilityenabled=false] [--libraries jar_file[(pathseparator)jar
    _file]*] [--target target(Default server)] filepath
    [exec] CLI019 Invalid number of operands. Number of operands should be equ
    al to 1.
    deploy-url-message:
    [echo] Application Deployed at: http://localhost:8080/bookstore1
    BUILD FAILED
    The root cause of the problem stems from the fact that the script basically calls a command line tool to deploy the war to the app server. If you examine the error output, all parameters are optional except the last one... filepath. This parameter is set in the war-ant.xml in the following line.
    <property name="app.module" value="${build.dir}/${module.name}.war"/>
    This line look innocuous at first but upon closer inspection, one notices that the path name refers to the build.dir. This is problematic because the build dir does not contain the war file. The build process puts the war file in the dist dir under the project root. So this line is incorrect. The following line offers the correct solution.
    <property name="app.module" value="${dist.dir}/${module.name}.war"/>
    By changing the line to use the dist.dir, which is where the file is located, the build script executes correctly. :)

    As a follow-up to be clear, the app.module property is used in the deploy task of the app-server-ant.xml. It is the last argument of the argument list.
    <target name="deploy" depends="tools,-pre-deploy"
    description="deploys the application">
    <fail unless="app.module" message="app.module must be set before invoking this target. Otherwise there is no application to deploy."/>
    <fail unless="module.name" message="app.name must be set before invoking this target. Otherwise there is no application to deploy."/>
    <condition property="app.url" value="http://${javaee.server.name}:${javaee.server.port}/${run.uri}">
    <not>
    <isset property="app.endpointuri"/>
    </not>
    </condition>
    <property name="failonerror" value="true"/>
    <exec executable="${asadmin}" failonerror="${failonerror}">
    <arg line=" deploy "/>
    <arg line=" --user ${javaee.server.username}" />
    <arg line=" --passwordfile ${javaee.server.passwordfile}" />
    <arg line=" --host ${javaee.server.name}" />
    <arg line=" --port ${javaee.adminserver.port}" />
    <arg line=" --name ${module.name}"/>
    <arg line=" --force=true "/>
    <arg line=" --upload=true "/>
    <arg line=" --dbvendorname ${db.vendorname}"/>
    <arg line="${app.module}" />
    </exec>
    <antcall target="deploy-url-message"/>
    </target>

  • Ant - create a build file

    Hi,
    I am working on creating a build.xml which will compile my source code, and create a jar.
    My project that I need to compile though references another project...this is where I am having problems. Here is the scenario
    C:\projectA\src\HelloWorld.java
    C:\projectB\src\com\helloworld\HelloWorldDialog.java
    ....so my build.xml file looks like
    <project name="Hello World" default="dist" basedir=".">
         <target name="compile">
              <javac srcdir="." destdir="\build" includes="C:/projectB/src/com/helloworld/**"  debug="on" listfiles="true">
                   <include name="**/*.java" />
              </javac>
         </target>
         <target name="jar" depends="compile">
         </target>
         <target name="dist" depends="jar">
              <echo>Build complete</echo>
         </target>
    </project>...I havent filled out the jar part, etc yet....just trying to get through the compile.
    I get errors that point to the imports in projectA's HelloWorld.java...it complains that "package com.helloworld" does not exist....any ideas? I have tried reading the ant javac manual and searching google, but havent solved this yet...so I thought I'd try here.
    thanks

    is this what you meant, b/c i still cant get it to compile
    <project name="Hello World" default="dist" basedir=".">
         <target name="compile">
              <javac srcdir="./src" destdir="./build" debug="on" listfiles="true">
                   <classpath>
                        <pathelement location="C:/eclipse/worksspace/projectB/bin" />
                        <fileset dir="C:/eclipse/workspace/projectB/bin/">
                             <include name="**/*.class" />
                        </fileset>
                   </classpath>
                   <include name="**/*.java" />
              </javac>
         </target>
         <target name="jar" depends="compile">
         </target>
         <target name="dist" depends="jar">
              <echo>Build complete</echo>
         </target>
    </project>

  • Create table statement fail

    Hello experts
    Oracle 10g on RHEL 4
    when I fire the statement as sys user "create table tab2 as select * from dba_objects tablespace users" it gives the error "ORA-00933: SQL command not properly ended"
    But when I fire "create table tab2(id number) tablespace users" it successed WHY?

    Justin has already answered.
    rearrange query
    and tablespace clause
    SQL> create table tab2 as select * from dba_objects tablespace users;
    create table tab2 as select * from dba_objects tablespace users
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL>  create table tab2 tablespace users  as select * from dba_objects;
    Table created.

  • Cannot populate Example Database using ant create-tables

    I encounter the problem like this [t-5362238]. But I've tried to do any thing, but I still cannot populate database. Somebody has another way to populate the database (not use ant) ?
    And more. I can't use ant to deploy the *.WAR file. The terminal shows the message like the message when I perform ant create-tables

    I encounter the problem like this [t-5362238]. But I've tried to do any thing, but I still cannot populate database. Somebody has another way to populate the database (not use ant) ?
    And more. I can't use ant to deploy the *.WAR file. The terminal shows the message like the message when I perform ant create-tables

  • Java EE Tutorial - problem with the example Bookstore

    Hi,
    I've been working few days on a problem running the Bookstore example from the Java EE Tutorial. When I run the application, I'm redirected from the servlet BookStoreServlet to errorpage.html with the following message: The application is unavailable. Please try later. The tutorial troubleshooting reads: ... a servlet can’t retrieve the web context attribute representing the bookstore. This will occur if the database server hasn’t been started. But the database server is running (I'm running Derby bundled into NetBeans 6.5). The Glassfish admin console reads:
    StandardWrapperValve[BookStoreServlet]: PWC1406: Servlet.service() for servlet BookStoreServlet threw exception
    com.sun.bookstore.exception.BookNotFoundException: Couldn't find book: 203
            at com.sun.bookstore1.database.BookDBAO.getBook(BookDBAO.java:58)
            at com.sun.bookstore1.servlets.BookStoreServlet.doGet(BookStoreServlet.java:76)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at com.sun.bookstore1.filters.HitCounterFilter.doFilter(HitCounterFilter.java:71)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)This would indicate that the tables are empty, but they were created according to the tutorial, with the command ant create-tables, and I can see their content in NetBeans. Please help, I really need to run the examples.
    Best regards,
    Rene Puchinger

    I solved the problem running the command that is correctly explained in the page 97 of the tutorial:
    Ant create-tables
    My mistake was that until that day, I was believing that I could do everything inside Netbeans.
    For this you explicitly need to use ant.
    Then I got some error which I solved fixing the file
    C:\Java\JavaEETutorial5\examples\bp-project\ build.properties
    ( like set correctly the path to the server and so on)

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

  • Create-tables problem

    hi,
    i've re-posted this into a new post.
    i'm following the java ee tutorial at sun.com and i'm having a problem with the bokstore1 example.
    i've set the password file correctly and when i go to the bookstore1 dir and type 'ant' everything seems ok.
    the problem i'm having is once i've started the server and DB server and then type ' ant create-tables' the build fails and i get this output-
    "Starting database it the background. log redirected to c:\SunAppserver\......\....\...db.log
    comand start-database failed
    delete-tables:
    BUILD FAILED
    C:\javaeetutorial5\bp-project\database-ant.xml:48: c:\sun\appserver\javadb\lib not found"
    can anyone help?
    thanks in advance
    mat

    Based on the info. provided, seems to me the value for 'javaee.home' in build.properties may not be correct. Make sure that the property javaee.home in build .properties pints to valid installtion of application server, for ex. if you do 'dir' or 'ls' you should see javadb directory at this location.
    Also check if you have a build.properties file under windows user directory (in addition to bp-project under tutorial) and if it points to a different application server installation.
    - sreeni

  • SAPINST System Copy MaxDB J2EE 7.0 "Row too long" at CREATE TABLE

    Hello Guru's,
    w'll make a system copy of a EP J2EE JAVA standalone system with sapinst an jload.
    At the phase Import JAVA Dump, the import halted with the following error...
    {Apr 1, 2009 3:10:35 PM com.sap.inst.jload.Jload dbImport
    INFO: trying to drop table KMC_UWL_ITEMS
    Apr 1, 2009 3:10:35 PM com.sap.inst.jload.Jload dbImport
    INFO: table dropped
    Apr 1, 2009 3:10:35 PM com.sap.inst.jload.Jload dbImport
    INFO: trying to create table KMC_UWL_ITEMS
    Apr 1, 2009 3:10:36 PM com.sap.inst.jload.Jload logStackTrace
    SEVERE: com.sap.dictionary.database.dbs.JddException: CREATE TABLE KMC_UWL_ITEMS failed
    15:10:35 2009-04-01 dbs-Info:  <<< Analyze table KMC_UWL_ITEMS >>>
    15:10:36 2009-04-01 dbs-Info:  predefined action is: >>>null<<<
    15:10:36 2009-04-01 sap-Info:  Table KMC_UWL_ITEMS not found on DB.
    15:10:36 2009-04-01 dbs-Info:  Action: CREATE
    15:10:36 2009-04-01 ope-Info:  Create table in database SAPDB
    E R R O R ******* (DbObjectSqlStatements)
    15:10:36 2009-04-01 dbs-Error:  Exception caught during SQL execution [-2000] (at 831): Row too long CREATE TABLE "KMC_UWL_ITEMS"("ITEM_ID" FIXED(19) DEFAULT 0 NOT NULL, "I_CONNECTOR_ID" INTEGER DEFAULT 0 NOT NULL, "SYSTEM_ID" VARCHAR(54) UNICODE  NOT NULL, "EXTERNAL_ID" VARCHAR(300) UNICODE  NOT NULL, "USER_ID" FIXED(19) DEFAULT 0 NOT NULL, "APP_CONTEXT" VARCHAR(255) UNICODE  , "ATTACHMENT_COUNT" INTEGER  , "CREATED_DATE" TIMESTAMP  , "CREATOR_ID" VARCHAR(255) UNICODE  , "DESCRIPTION" LONG UNICODE  , "DELETED_FLAG" VARCHAR(1) UNICODE  NOT NULL, "DUE_DATE" TIMESTAMP  , "EXTERNAL_OBJECT_ID" VARCHAR(255) UNICODE  , "EXECUTION_URL" VARCHAR(750) UNICODE  , "EXPIRY_DATE" TIMESTAMP  , "EXTERNAL_TYPE" VARCHAR(255) UNICODE  , "FLAGS" INTEGER  , "ITEM_TYPE" VARCHAR(255) UNICODE  NOT NULL, "PRIORITY" INTEGER  , "STATUS" VARCHAR(50) UNICODE  , "SUBJECT" VARCHAR(255) UNICODE  , "GROUP_ACTION" VARCHAR(1024) UNICODE DEFAULT ' ' , "PROCESSOR" VARCHAR(255) UNICODE DEFAULT ' ' )
    15:10:36 2009-04-01 ope-Info:  Table KMC_UWL_ITEMS could not be created in database
            at com.sap.inst.jload.db.DBTable.create(DBTable.java:109)
            at com.sap.inst.jload.Jload.dbImport(Jload.java:278)
            at com.sap.inst.jload.Jload.executeJob(Jload.java:397)
            at com.sap.inst.jload.Jload.main(Jload.java:621)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
            at java.lang.reflect.Method.invoke(Method.java:391)
            at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Apr 1, 2009 3:10:36 PM com.sap.inst.jload.db.DBConnection disconnect
    INFO: disconnected
    We have MaxDB 7.6.00.09.
    The SAP Note  852597 is only for MaxDB Databases at Build 10.
    It's fixed at Build 15. SapHelp is not helpful.
    how WE can solve it????
    regards
    chris

    We have solved the issue with a newer MaxDB version. Not the best solution but works.

  • ORABPEL-10903 when installing AIA 2.0.1 rollup patch = build failed

    Hello,
    When installing on a RHEL 4.7 Linux server the AIA rollup patch 2.0.1, I got this error very often (even if the OUI said the installation is OK, the installActions logs are not OK):
    [exec] [exec] compile:
    [exec] [exec] [echo]
    [exec] [exec] [echo] --------------------------------------------------------------
    [exec] [exec] [echo] | Compiling bpel process QueryCustomerPartyListPortalProvABCSImpl, revision 1.0
    [exec] [exec] [echo] --------------------------------------------------------------
    [exec] [exec] [echo]
    [exec] [exec] ORABPEL-01021
    [exec] [exec]
    [exec] [exec] Echec de la validation BPEL.
    [exec] [exec] Echec de la validation de la source BPEL. Erreurs :
    [exec] [exec]
    [exec] [exec] *[Erreur ORABPEL-10903] : échec de la lecture du WSDL*
    [exec] [exec] [Description] : dans "bpel.xml", Echec de la lecture du document WSDL.
    [exec] [exec] Echec de la lecture du document WSDL dans "http://dvedvb40:7777/orabpel/default/AIAAsyncErrorHandlingBPELProcess/AIAAsyncErrorHandlingBPELProcess?wsdl". Cause : "Echec de la lecture du WSDL dans http://dvedvb40:7777/orabpel/default/AIAAsyncErrorHandlingBPELProcess/AIAAsyncErrorHandlingBPELProcess?wsdl : WSDL introuvable".
    [exec] [exec] Assurez-vous que le document WSDL est valide. Vous devrez peut-être démarrer le serveur OraBPEL ou vérifier que le processus BPEL associé est correctement déployé.
    [exec] [exec] .
    [exec] [exec] [Solution potentielle] : Si votre site utilise un serveur proxy, vous pouvez configurer le serveur BPEL, BPEL Designer et votre navigateur Web avec les paramètres de configuration de ce serveur proxy (pour obtenir des instructions, reportez-vous à la note technique sur le site http://otn.oracle.com/bpel).
    [exec] [exec] .
    [exec] [exec]
    [exec] [exec]      at com.collaxa.cube.lang.compiler.CubeProcessor.validateClientSide(CubeProcessor.java:1133)
    [exec] [exec]      at com.collaxa.cube.lang.compiler.CubeProcessor.transformClientSide(CubeProcessor.java:449)
    [exec] [exec]      at com.collaxa.cube.lang.compiler.CubeParserHelper.compileClientSide(CubeParserHelper.java:83)
    [exec] [exec]      at com.collaxa.cube.ant.taskdefs.Bpelc.execute(Bpelc.java:626)
    [exec] [exec]      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [exec] [exec]      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    [exec] [exec]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [exec] [exec]      at java.lang.reflect.Method.invoke(Method.java:585)
    [exec] [exec]      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [exec] [exec]      at org.apache.tools.ant.Task.perform(Task.java:348)
    [exec] [exec]      at org.apache.tools.ant.Target.execute(Target.java:357)
    [exec] [exec]      at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [exec] [exec]      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [exec] [exec]      at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [exec] [exec]      at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [exec] [exec]
    [exec] [exec] BUILD FAILED
    When I copy/past those 2 URL into my browser:
    http://dvedvb40:7777/orabpel/default/AIAAsyncErrorHandlingBPELProcess/AIAAsyncErrorHandlingBPELProcess?wsdl
    http://dvedvb40:7777/orabpel/default/AIAAsyncErrorHandlingBPELProcess/1.0
    they are perfectly found, though!
    At the end of the install process, OUI says the installation was fine, but it's not what the installActions log says...
    What do you think of that?
    Thanks in advance.
    Regards,
    KaRiNe.
    Edited by: user10975061 on 28 mai 2009 05:42

    Hello,
    We did go further into the installation process, but we still got this same old error at the end (after more than 6 hours!!!)... :((
    Checking the processes status at the end of this installation, we can see the oc4j_soa server and HTTP server are Stop and Down which is not good:
    dvedvb40:oracle:/exec/applis/tbaia/products/oracle/10.1.3.1/OracleAS/opmn/bin> ./opmnctl status
    Processes in Instance: AIADB.dvedvb40
    --------------------------------------------------------------+---------
    ias-component | process-type | pid | status
    --------------------------------------------------------------+---------
    ASG | ASG | N/A | Down
    OC4JGroup:default_group | OC4J:oc4j_soa | 6746 | Stop
    OC4JGroup:default_group | OC4J:home | 6745 | Alive
    HTTP_Server | HTTP_Server | N/A | Down
    Regards,
    KaRiNe.

  • Creating tables in pl/sql block

    I have the following piece of code that I execute in sqlplusw as @c:\process.sql
    On running @c:\process.sql, an input is provided as prompted. There is a
    declare and begin that processes some code. What I am looking for is -- Is there
    a way that I can check the all_tables view for the following 3 tables :
    TABLE1, TABLE2, TABLE3. Only on finding these tables, this
    anonymous sql (that is inside starting from declare ... should execute).
    If these tables are not found, I want to attempt creating the tables. If the attempt
    was successful, then process. If creating tables attempt fails, exit with a dbms_output.put_line message and don't process
    anything....
    Can this be done ? If so, any hints would be great.....
    Thanks
    ACCEPT input_ssn prompt 'Enter SSN :'
    SET feedback off
    SET serveroutput on
    SET echo off
    SET term off
    SET heading off
    SET pagesize 0
    SET linesize 10000
    SET verify off
    undefne sdate input_ssn
    COL sdate new_value sdate
    COL input_ssn new_value input_ssn
    SELECT TO_CHAR (SYSDATE, 'YYYYMMDD') sdate
    FROM DUAL;
    SPOOL C:\SCRUB_DATA_&&sdate._&&input_ssn..TXT
    SELECT 'REPORT GENERATED ON : ' || SYSDATE
    FROM DUAL;
    ALTER TRIGGER TRIG1 DISABLE;
    DECLARE
    BEGIN
    FOR i IN .........
    LOOP
    END LOOP;
    BEGIN
    SELECT ..........
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    END;
    UPDATE ...........
    FOR i IN .....
    LOOP
    UPDATE ....
    BEGIN
    SELECT ...
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    END;
    UPDATE ...
    BEGIN
    SELECT ....
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    END;
    UPDATE ...
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
         NULL;
    WHEN OTHERS
    THEN
    ecode := SQLCODE;
    emesg := SQLERRM;
    DBMS_OUTPUT.put_line ('Error code is : '||' - '|| ecode);
    DBMS_OUTPUT.put_line ('Error message is :' || ' - ' || emesg);
    END;
    COMMIT ;
    ALTER TRIGGER TRIG1 ENABLE;
    SET term on
    SET HEADING on
    SELECT 'Processing complete for ' || '&&input_ssn'
    FROM DUAL;
    SPOOL off;
    SET verify on
    SET feedback on
    ----------------------------------------------------------

    This is what I am doing :
    ACCEPT input_ssn prompt 'Enter SSN :'
    SET feedback on
    SET serveroutput on
    SET echo on
    SET term on
    SET heading on
    SET pagesize 0
    SET linesize 10000
    SET verify on
    undefne sdate input_ssn
    COL sdate new_value sdate
    COL input_ssn new_value input_ssn
    SELECT TO_CHAR (SYSDATE, 'YYYYMMDD') sdate
    FROM DUAL;
    SPOOL C:\TEMP_DATA_&&sdate._&&input_ssn..TXT
    ALTER TRIGGER TRIG1 DISABLE;
    DECLARE
    v_postal cheque.postal%TYPE;
    v_count NUMBER;
    l_tabexist NUMBER;
    BEGIN
    DBMS_OUTPUT.PUT_LINE('HELLO THERE');
         BEGIN
              DBMS_OUTPUT.PUT_LINE('HI THERE');
              SELECT 1 INTO l_tabexist FROM all_tables
                   WHERE table_name = 'TABLE1_TEMP' AND owner='HARPER';
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
                   EXECUTE IMMEDIATE 'CREATE TABLE TABLE1_TEMP AS SELECT * FROM TABLE1 WHERE 1=2';
                   EXECUTE IMMEDIATE 'ALTER TABLE TABLE1_TEMP ADD(TEMP_STATUS VARCHAR2(1))';
         END;
         BEGIN
                   SELECT 1 INTO l_tabexist FROM all_tables
                        WHERE table_name = 'TABLE2_TEMP' AND owner='HARPER';
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                        EXECUTE IMMEDIATE 'CREATE TABLE TABLE2_TEMP AS SELECT * FROM TABLE2 WHERE 1=2';
                        EXECUTE IMMEDIATE 'ALTER TABLE TABLE2_TEMP ADD(TEMP_STATUS VARCHAR2(1))';
         END;
    BEGIN
    <my code that uses TABLE1_TEMP and TABLE2_TEMP supposed to be created above>
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    DBMS_OUTPUT.put_line ('No Data Found Exception encountered');
    END;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.Put_Line('Something bad happened');
    RAISE;
    END;
    COMMIT ;
    ALTER TRIGGER TRIG1 ENABLE;
    SET term on
    SET HEADING on
    SPOOL off;
    SET verify on
    SET feedback on
    What is happening here is that until ALTER TRIGGER DISABLE, things are fine.
    Then, it tries to process <my code> and cries saying 'Table or view not found'. Finally it enables the trigger back.
    It is not even displaying either the 'HELLO THERE' or 'HI THERE' - which I suppose is the first thing it should have done.
    Thanks

  • Create tables in different database schemas using EJB 3 Entity Persistent

    Hi All,
    I would like to find out how to get the following tasks done using EJB 3.0 Java Entity Persistent:
    ( i ) Create tables in different schemas such as STUDENT under EDUCATION schema and table PATIENT in HOSPITAL schema. We can then reference them in SQL as EDUCATION.STUDENT and HOSPITAL.PATIENT.
    ( ii ) Reference these tables uniquely once they are created.
    There are no pre-existing tables or naming conventions that needs to be adhere to in this situation.
    I have no problem creating tables on the current schema in EJB 3.0 Java Entity Persistent.
    Any suggestions would be appreciated.
    Thanks,
    Jack

    Use the schema attribute of the Table annotation:
    package javax.persistence;
    @Target({TYPE}) @Retention(RUNTIME)
    public @interface Table
       String name( ) default "";
       String catalog( ) default "";
       String schema( ) default "";
       UniqueConstraint
    uniqueConstraints( ) default {};
    }

Maybe you are looking for