I am new on stack, this is my first post, so sorry if I did something wrong. I'm trying to connect my glassfish 5 server with my MySQL database in NetBeans 8.2, but every time time I try to deploy my web application, glassfish console gives me
Exception while deploying the app [appname]: JNDI lookup failed for the resource: Name: [appnamePU], Lookup: [java:app/jdbc_blogdb], Type: [javax.sql.DataSource]
I have tried to reconfigure JDBC connection pools at glassfish admin panel, but after restarting the server it always returns this exception. I'm pasting screenshots of glassfish admin panel with JDBC resources and glassfish-resources.xml file as well. Do you have any idea, why glassfish doesn't want to cooperate with my database?
[edit]
I forgot to add, that this error is shown only when i try to run and deploy my web application
You would need to use this sub-context in the code for looking up-
java:comp/env/jdbc/jdbc_blogdb