greptilian logo

IRC log for #friendlyjava, 2014-12-12

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
06:30 mr_lou joined ##friendlyjava
07:09 mr_lou joined ##friendlyjava
09:18 Richard_2340985 joined ##friendlyjava
09:19 Richard_2340985 Hey... maybe you can help me with my question? http://stackoverflow.com/questions/27426126/how-do-i-run-the-jsfsecure-sample-with-postgresql
09:23 aditsu Richard_2340985: can you translate the exception?
09:24 pulsar Richard_2340985: missing "username" field in the database schema
09:25 pulsar FEHLER: Spalte „username“ existiert nicht -> ERROR: column "username" does not exist.
09:25 aditsu I guess that was for me ^^
09:25 pulsar was it?
09:25 aditsu I asked for the translation
09:25 pulsar ah
09:26 pulsar which is ... funky as the users table has that column
09:26 pulsar dafuq?
09:26 aditsu well, I guess Richard_2340985 needs to make sure which database he's connecting to, and test the same query with psql
09:27 pulsar yup
09:27 aditsu maybe the createdb script was not run properly, or something changed later
09:27 pulsar or was executed against a wrong schema
09:27 pulsar etc.
09:28 pulsar nothing a breakpoint and some live expressions in the debugger could not fix.
09:29 Richard_2340985 with psql? but it shows the table on postgresql admin tool
09:29 pulsar Richard_2340985: no, break into the spring class and see what database is actually used in the prepared statement, and do some adhoc introspection
09:30 Richard_2340985 ok, I try to
09:30 pulsar RemoteIpAddress: 0:0:0:0:0:0:0:1
09:30 pulsar also very WTF
09:31 aditsu that's localhost isn't it?
09:31 aditsu ipv6
09:31 Richard_2340985 yes
09:31 pulsar wasnt it fe80::something?
09:31 pulsar for localhost
09:31 aditsu I think that's a "scope link", whatever that means
09:32 Richard_2340985 I just used localhost in the settings, so it is assigned automatically
09:32 pulsar Richard_2340985: 42703 error code is thrown by the database
09:32 aditsu ah, "link-local address prefix"
09:32 pulsar http://www.postgresql.org/docs/8.2/static/errcodes-appendix.html
09:32 pulsar 42703UNDEFINED COLUMNundefined_column
09:32 pulsar so there  *is* something wrong with the database
09:33 Richard_2340985 that is what the text message said, hm...
09:33 pulsar check the effective connection you are using, what schema is being queried, check if the database is properly initialized
09:33 pulsar that is what the low level jdbc connection said
09:33 Richard_2340985 I had run the script manually
09:33 pulsar or the database as a matter of fact
09:34 Richard_2340985 so the database is set up
09:34 pulsar so there is something wrong with the connection / permissions
09:35 pulsar ah ::1 is valid for localhost.
09:35 pulsar confusing and perhaps also the issue ;)
09:35 Richard_2340985 I used netbeans for the connection settings, set up the connection there and put the settings into glassfish-resources.xml
09:35 pulsar i had lots of problems with v6 and gf3
09:35 pulsar -Djava.net.preferIPv4Stack=true
09:36 pulsar give that a try.
09:36 Richard_2340985 where do I have to use that? starting glassfish with this?
09:36 pulsar but... on the other hand it would give you a connection error
09:36 pulsar and you are past that
09:36 pulsar so ignore that
09:43 Richard_2340985 I added my persistence.xml to the problem...
09:43 Richard_2340985 the first version of jsfsecure, without spring does work
09:46 Richard_2340985 ah no, that was the primefaces code: https://code.google.com/p/primefaces/
09:46 aditsu Richard_2340985: so have you tried running that query directly on the db?
09:49 Richard_2340985 that one? [select username,password,enabled from users where username = ?]
09:49 Richard_2340985 username should not be '?' I'd say
09:50 aditsu actually '?' would work :) (rather than ?)
09:50 aditsu or use any string
09:50 Richard_2340985 ok
09:51 Richard_2340985 that does not work - SQL Status:42601
09:51 aditsu any error message?
09:53 Richard_2340985 FEHLER:  Syntaxfehler am Ende der Eingabe
09:53 Richard_2340985 LINE 1: ...lect username,password,enabled from users where username = ?
09:53 Richard_2340985 ^
09:53 Richard_2340985 ********** Fehler **********
09:53 Richard_2340985 FEHLER: Syntaxfehler am Ende der Eingabe
09:53 Richard_2340985 SQL Status:42601
09:53 Richard_2340985 Zeichen:63
09:53 Richard_2340985 syntax error at the end of the input
09:53 aditsu uh.. you wrote ? not '?'
09:55 aditsu so try again with: where username = '?'
09:55 Richard_2340985 ah right
09:55 Richard_2340985 with '?' it works
09:56 Richard_2340985 gives back empty response
09:57 aditsu ok, so the db is fine.. that means you're either not connecting to the same thing or not running the same query
09:58 aditsu try to debug it..
10:00 Richard_2340985 ok
10:01 aditsu or alternatively, use something simpler instead ^^
10:10 Richard_2340985 this is the output on startup of glassfish: http://pastebin.com/5T6vyePu
10:12 aditsu that's horrible..
10:17 Richard_2340985 that means?
10:19 aditsu it just means I don't want to look at it, too much junk :p
10:20 Richard_2340985 :D
10:22 Richard_2340985 maybe around line 319?
10:26 Richard_2340985 hm, wrong database I think
10:27 Richard_2340985 Warnung:   RAR5038:Unexpected exception while creating resource for pool postgreSQLJDBCPool.
10:28 Richard_2340985 I renamed that one, just wondering now, where it gets the configuration to use that pool
10:37 Richard_2340985 haha shit, found it
10:37 Richard_2340985 create-jdbc-resource --connectionpoolid postgreSQLJDBCPool jdbc/springSecurityDatasource
10:37 Richard_2340985 that was the problem
10:51 Richard_2340985 ha! thanks, now it's working! what a stupid copy&paste error!
11:04 aditsu joined ##friendlyjava
11:05 aditsu Richard_2340985: alright :)
11:30 aditsu joined ##friendlyjava
15:15 mr_lou joined ##friendlyjava

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode