Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

! EmbeddedDriver and SCHEMA problem

 
Alex Bru
Greenhorn
Posts: 11
1
  • Mark post as helpful
  • send pies
  • 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.
     
    Knute Snortum
    Bartender
    Pie
    Posts: 2902
    62
    Chrome Eclipse IDE Java Postgres Database VI Editor
    • Mark post as helpful
    • send pies
    • 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
    • Quote
    • Report post to moderator
    Same exception, unfortunately.

    This is really frustrating. :/
     
    K. Tsang
    Bartender
    Posts: 3583
    16
    Android Java
    • Mark post as helpful
    • send pies
    • 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
    • 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
    • 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*.


     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic