Strange behavior with SQL table name in PostgreSQL (case) and Java code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behavior with SQL table name in PostgreSQL (case) and Java code

ungars
hello,

I have installed Netbeans 8.2 and PostgreSQL 10.1. As The Glassfish server 4 is not functionnal I have installed version 5.
I have created my tables under a new database, in the shema "public".
The role using them has been created also.
A connection Pool has been created, and the ping via the Glassfish web console is OK.
When I run my web application, in the log of Glassfish 5, there is a message : table "XXXX" not found. But under PGAdmin 4, the name of the table is 'xxxx'. As in the java code ! So why this mismatch vith the case XXXX is not xxxx...

Thanks for your help.




Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior with SQL table name in PostgreSQL (case) and Java code

geertjan.wielenga@oracle.com
You’re encouraged to move to the Apache NetBeans mailing lists as soon as possible, ask your questions and discuss any concerns, etc, there and to not write to the @netbeans.org mailing lists anymore.

https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate

https://jaxenter.com/netbeans/january-1st-2018-end-netbeans-org-mailing-lists


Geertjan Wielenga | Principal Product Manager
Phone: +31620320056 | 
Oracle Developer Tools

ORACLE Netherlands | Hertogswetering 163-167 | 3543 AS Utrecht | Netherlands


Oracle is committed to developing practices and products that help protect the environment

On 29 Nov 2017, at 21:02, ungars <[hidden email]> wrote:

hello,

I have installed Netbeans 8.2 and PostgreSQL 10.1. As The Glassfish server 4 is not functionnal I have installed version 5.
I have created my tables under a new database, in the shema "public".
The role using them has been created also.
A connection Pool has been created, and the ping via the Glassfish web console is OK.
When I run my web application, in the log of Glassfish 5, there is a message : table "XXXX" not found. But under PGAdmin 4, the name of the table is 'xxxx'. As in the java code ! So why this mismatch vith the case XXXX is not xxxx...

Thanks for your help.





Reply | Threaded
Open this post in threaded view
|

Strange behavior with SQL table name in PostgreSQL (case) and Java code

markwade
In reply to this post by ungars

ungars wrote:
> hello,
>
> When I run my web application, in the log of Glassfish 5, there is a message : table "XXXX" not found. But under PGAdmin 4, the name of the table is 'xxxx'. As in the java code ! So why this mismatch vith the case XXXX is not xxxx...
>


I think you have to quote it, don't remember single or double quotes




Reply | Threaded
Open this post in threaded view
|

Strange behavior with SQL table name in PostgreSQL (case) and Java code

markwade
In reply to this post by ungars
I have this string from a sql query to postgresql:
"SELECT id,password FROM \"public\".\"JVRUser\""


markwade wrote:
>
> ungars wrote:
> > hello,
> >
> > When I run my web application, in the log of Glassfish 5, there is a message : table "XXXX" not found. But under PGAdmin 4, the name of the table is 'xxxx'. As in the java code ! So why this mismatch vith the case XXXX is not xxxx...
> >
>
>
> I think you have to quote it, don't remember single or double quotes