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

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: 7125
    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*.


     
    And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic