java.io.FileNotFoundException

E:\glassfishv3\glassfish\docs\javaee-tutorial\examples\examples\common\sql\javadb\delete.sql The problem here is that the folder examples is used twice. I fixed that in glassfishv3\glassfish\docs\javaee-tutorial\examples\bp-project\javadb.properties: Before: db.create.src=${javaee.tutorial.home}/examples/common/sql/${db.vendor}/tutorial.sql db.delete.src=${javaee.tutorial.home}/examples/common/sql/${db.vendor}/delete.sql After: db.create.src=${javaee.tutorial.home}/common/sql/${db.vendor}/tutorial.sql db.delete.src=${javaee.tutorial.home}/common/sql/${db.vendor}/delete.sql Now I get an SQLSyntaxErrorException: ... create-tables: [sql] connecting to jdbc:derby://localhost:1527/sun-appserv-samples;create=true; [sql] Loading org.apache.derby.jdbc.ClientDriver using a cached AntClassLoader. [sql] Executing resource: E:\glassfishv3\glassfish\docs\javaee-tutorial\examples\common\sql\javadb\tutorial.sql [sql] SQL: CREATE TABLE WEB_BOOKSTORE_BOOKS (bookId VARCHAR(8), surname VARCHAR(24), firstName VARCHAR(24), tit le VARCHAR(96), price FLOAT, onSale SMALLINT, calendar_year INT, description VARCHAR(30), inventory INT) [sql] 0 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('201', 'Duke', '', 'My Early Years: Growing up on *7', 30.75, 0, 1995, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('202', 'Jeeves', '', 'Web Servers for Fun and Profit', 40.75, 1, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('203', 'Masterson', 'Webster', 'Web Components for Web Develop ers', 27.75, 0, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('205', 'Novation', 'Kevin', 'From Oak to Java: The Revolution of a Language', 10.75, 1, 1998, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('206', 'Gosling', 'James', 'Java Intermediate Bytecodes', 30.9 5, 1, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('207', 'Thrilled', 'Ben', 'The Green Project: Programming for Consumer Devices', 30.00, 1, 1998, 'What a cool book', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('208', 'Tru', 'Itzal', 'Duke: A Biography of the Java Evangeli st', 45.00, 0, 2001, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: CREATE TABLE BANK_SEQUENCE_GENERATOR ( GEN_KEY VARCHAR(255), GEN_VALUE NUMERIC(20) ) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_ACCOUNT ( ACCOUNT_ID NUMERIC(20) CONSTRAINT PK_ACCOUNT PRIMARY KEY, TYPE VARCHAR(24 ), DESCRIPTION VARCHAR(30), BALANCE NUMERIC(10,2), CREDIT_LINE NUMERIC(10,2), BEGIN_BALANCE NUMERIC(10,2), BEGIN_BALANCE _TIME_STAMP TIMESTAMP) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_CUSTOMER ( CUSTOMER_ID NUMERIC(20) CONSTRAINT PK_CUSTOMER PRIMARY KEY, LAST_NAME VA RCHAR(30), FIRST_NAME VARCHAR(30), MIDDLE_INITIAL VARCHAR(1), STREET VARCHAR(40), CITY VARCHAR(40), STATE VARCHAR(2), ZI P VARCHAR(5), PHONE VARCHAR(16), EMAIL VARCHAR(30)) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_TX ( TX_ID NUMERIC(20) CONSTRAINT PK_TX PRIMARY KEY, ACCOUNT_ID NUMERIC(20), TIME_S TAMP TIMESTAMP, AMOUNT NUMERIC(10,2), BALANCE NUMERIC(10,2), DESCRIPTION VARCHAR(30), CONSTRAINT FK_TX_ACCOUNT_ID FOREIG N KEY (ACCOUNT_ID) REFERENCES BANK_ACCOUNT(ACCOUNT_ID)) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_CUSTOMER_ACCOUNT_XREF ( CUSTOMER_ID NUMERIC(20), ACCOUNT_ID NUMERIC(20), CONSTRAINT FK_BANK_CUSTOMER_ID FOREIGN KEY (CUSTOMER_ID) REFERENCES BANK_CUSTOMER(CUSTOMER_ID), CONSTRAINT FK_BANK_ACCOUNT_ID FORE IGN KEY (ACCOUNT_ID) REFERENCES BANK_ACCOUNT(ACCOUNT_ID)) [sql] 0 rows affected [sql] SQL: INSERT INTO EJB_ORDER_SEQUENCE_GENERATOR VALUES ('VENDOR_PART_ID',1) [sql] Failed to execute: INSERT INTO EJB_ORDER_SEQUENCE_GENERATOR VALUES ('VENDOR_PART_ID',1) BUILD FAILED java.sql.SQLSyntaxErrorException: Die Tabelle/Ansicht 'EJB_ORDER_SEQUENCE_GENERATOR' ist nicht vorhanden.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1

  • Stack trace

    • java.io.FileNotFoundException: E:\glassfishv3\glassfish\docs\javaee-tutorial\examples\examples\common\sql\javadb\delete.sql The problem here is that the folder examples is used twice. I fixed that in glassfishv3\glassfish\docs\javaee-tutorial\examples\bp-project\javadb.properties: Before: db.create.src=${javaee.tutorial.home}/examples/common/sql/${db.vendor}/tutorial.sql db.delete.src=${javaee.tutorial.home}/examples/common/sql/${db.vendor}/delete.sql After: db.create.src=${javaee.tutorial.home}/common/sql/${db.vendor}/tutorial.sql db.delete.src=${javaee.tutorial.home}/common/sql/${db.vendor}/delete.sql Now I get an SQLSyntaxErrorException: ... create-tables: [sql] connecting to jdbc:derby://localhost:1527/sun-appserv-samples;create=true; [sql] Loading org.apache.derby.jdbc.ClientDriver using a cached AntClassLoader. [sql] Executing resource: E:\glassfishv3\glassfish\docs\javaee-tutorial\examples\common\sql\javadb\tutorial.sql [sql] SQL: CREATE TABLE WEB_BOOKSTORE_BOOKS (bookId VARCHAR(8), surname VARCHAR(24), firstName VARCHAR(24), tit le VARCHAR(96), price FLOAT, onSale SMALLINT, calendar_year INT, description VARCHAR(30), inventory INT) [sql] 0 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('201', 'Duke', '', 'My Early Years: Growing up on *7', 30.75, 0, 1995, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('202', 'Jeeves', '', 'Web Servers for Fun and Profit', 40.75, 1, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('203', 'Masterson', 'Webster', 'Web Components for Web Develop ers', 27.75, 0, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('205', 'Novation', 'Kevin', 'From Oak to Java: The Revolution of a Language', 10.75, 1, 1998, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('206', 'Gosling', 'James', 'Java Intermediate Bytecodes', 30.9 5, 1, 2000, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('207', 'Thrilled', 'Ben', 'The Green Project: Programming for Consumer Devices', 30.00, 1, 1998, 'What a cool book', 20) [sql] 1 rows affected [sql] SQL: INSERT INTO WEB_BOOKSTORE_BOOKS VALUES('208', 'Tru', 'Itzal', 'Duke: A Biography of the Java Evangeli st', 45.00, 0, 2001, 'What a cool book.', 20) [sql] 1 rows affected [sql] SQL: CREATE TABLE BANK_SEQUENCE_GENERATOR ( GEN_KEY VARCHAR(255), GEN_VALUE NUMERIC(20) ) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_ACCOUNT ( ACCOUNT_ID NUMERIC(20) CONSTRAINT PK_ACCOUNT PRIMARY KEY, TYPE VARCHAR(24 ), DESCRIPTION VARCHAR(30), BALANCE NUMERIC(10,2), CREDIT_LINE NUMERIC(10,2), BEGIN_BALANCE NUMERIC(10,2), BEGIN_BALANCE _TIME_STAMP TIMESTAMP) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_CUSTOMER ( CUSTOMER_ID NUMERIC(20) CONSTRAINT PK_CUSTOMER PRIMARY KEY, LAST_NAME VA RCHAR(30), FIRST_NAME VARCHAR(30), MIDDLE_INITIAL VARCHAR(1), STREET VARCHAR(40), CITY VARCHAR(40), STATE VARCHAR(2), ZI P VARCHAR(5), PHONE VARCHAR(16), EMAIL VARCHAR(30)) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_TX ( TX_ID NUMERIC(20) CONSTRAINT PK_TX PRIMARY KEY, ACCOUNT_ID NUMERIC(20), TIME_S TAMP TIMESTAMP, AMOUNT NUMERIC(10,2), BALANCE NUMERIC(10,2), DESCRIPTION VARCHAR(30), CONSTRAINT FK_TX_ACCOUNT_ID FOREIG N KEY (ACCOUNT_ID) REFERENCES BANK_ACCOUNT(ACCOUNT_ID)) [sql] 0 rows affected [sql] SQL: CREATE TABLE BANK_CUSTOMER_ACCOUNT_XREF ( CUSTOMER_ID NUMERIC(20), ACCOUNT_ID NUMERIC(20), CONSTRAINT FK_BANK_CUSTOMER_ID FOREIGN KEY (CUSTOMER_ID) REFERENCES BANK_CUSTOMER(CUSTOMER_ID), CONSTRAINT FK_BANK_ACCOUNT_ID FORE IGN KEY (ACCOUNT_ID) REFERENCES BANK_ACCOUNT(ACCOUNT_ID)) [sql] 0 rows affected [sql] SQL: INSERT INTO EJB_ORDER_SEQUENCE_GENERATOR VALUES ('VENDOR_PART_ID',1) [sql] Failed to execute: INSERT INTO EJB_ORDER_SEQUENCE_GENERATOR VALUES ('VENDOR_PART_ID',1) BUILD FAILED java.sql.SQLSyntaxErrorException: Die Tabelle/Ansicht 'EJB_ORDER_SEQUENCE_GENERATOR' ist nicht vorhanden. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Statement.execute(Unknown Source) at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:565) at org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:535) at org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:776) at org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:706) at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:449) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.Main.runBuild(Main.java:758) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.