• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

troubles with glassfish when i do a sql statment from jsp

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone!
I just try to do netbeans E-commerce Tutorial I stoped on step 6. https://netbeans.org/kb/docs/javaee/ecommerce/connect-db.html
What I already did:
- i created a sql scheme affablenean
- created a Connection Pool and Data Source jdbc/affablebean
-did a pinging the Connection Pool - it's succeed
-created a Resource Reference to the Data Source
-in testDataSource.jsp which i created next i did a generating db report into.
-next i run it
and i got exception:
Exception


javax.servlet.ServletException:
SELECT * FROM category, product WHERE category.id=product.category_id
Таблица/просмотр 'CATEGORY' не существует.
Table/review 'CATEGORY' didn't exist



configs:
glassfish-resources.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
<jdbc-resource enabled="true" jndi-name="jdbc/affablebean" object-type="user" pool-name="AffableBeanPool">
<description/>
</jdbc-resource>
<jdbc-connection-pool allow-non-component-callers="false"
associate-with-thread="false"
connection-creation-retry-attempts="0"
connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false"
connection-leak-timeout-in-seconds="0"
connection-validation-method="auto-commit"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
fail-all-connections="false"
idle-timeout-in-seconds="300"
is-connection-validation-required="false"
is-isolation-level-guaranteed="true"
lazy-connection-association="false"
lazy-connection-enlistment="false"
match-connections="false"
max-connection-usage-count="0"
max-pool-size="32"
max-wait-time-in-millis="60000"
name="AffableBeanPool"
non-transactional-connections="false"
statement-timeout-in-seconds="-1"
steady-pool-size="8"
validate-atmost-once-period-in-seconds="0"
wrap-jdbc-objects="true">
<description> Connects to the affablebean database</description>
<property name="URL" value="jdbc:mysql://172.16.1.100:3306/affablebean"/>
<property name="User" value="affablebean"/>
<property name="Password" value="q123456"/>
</jdbc-connection-pool>
</resources>



sql:




__________________

what's wrong?
Maybe is it a netbeans trouble?
 
Bartender
Posts: 1367
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first sight, it looks like an SQL statement error. Is it correct to close category, product identifiers within a couple of ' character ? I mean, shouldn't you use CREATE TABLE CATEGORY instead of CREATE TABLE 'CATEGORY' ?
 
Paper beats rock. Scissors beats tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic