• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 1381
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' ?
 
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic