Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

EmbeddedDriver and SCHEMA problem

 
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I am dealing with a really, really annoying problem that's been bugging me for quite some time now.

My goal is to create a desktop application using Java's EmbeddedDriver (not the ClientDriver).

Problem

Whenever I try to retrieve some records using a SELECT-statement, I get the following error (right click -> Open image in new tab to maximize):


Exception:


DBConnect.java

Database.java

Pet.java

Some things that I have already tried doing

I know that whenever I do not provide a user and password, NetBeans defaults the SCHEMA to "APP".
  • I have tried not providing a user and password, and it game the exact Exception.
  • I have tried creating the SQL tables manually and programmatically, both have yielded the same Exception.


  • Some things that DO work

    Strange enough, I am able to retrieve data from the SCHEMA "SYS" (so table " SYS.SYSALIASES") with success, but any other SCHEMA does not work and gives the same Exception.
     
    Sheriff
    Posts: 7113
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Since you're connected to the Schema ALEX already, have you tried just:
     
    Alex Bru
    Greenhorn
    Posts: 11
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Same exception, unfortunately.

    This is really frustrating. :/
     
    Bartender
    Posts: 3648
    16
    Android Mac OS X Firefox Browser Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Have you try set schema to your own?
     
    Alex Bru
    Greenhorn
    Posts: 11
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    K. Tsang wrote:Have you try set schema to your own?



    Yes, I've tried executing

    It worked, however, it didn't change anything. It throws the same exception.

    Another thing I've tried is to define the derby home directory, and so instead, I have this:

    DBConnect.java

    This one throws a new exception, namely


    Progress, I guess?
     
    Alex Bru
    Greenhorn
    Posts: 11
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    After quite a lot of "research", I have decided to use the H2 Database Engine instead, which has the functionality of running in memory, embedded, or in server mode.

    None of these problems / exceptions occur while using H2, so I am assuming it's not me *goes on defense*.


     
    Forget Steve. Look at this tiny ad:
    free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
    reply
      Bookmark Topic Watch Topic
    • New Topic