What to do, the steps, the guides on configuring the Glassfish server with MySQL Dataresource

I initially created the JDBC connection pool and made a successful ping
No description
22 Replies
JavaBot
JavaBot10mo ago
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Rag...JN 🌌 🦡 👽 💰 🐊
and I don't know what's next Getting this error when running the app Exception during lifecycle processing org.glassfish.deployment.common.DeploymentException: JNDI lookup failed for the resource: Name: WebPU, So I assume I need to make a JNDI connection in the glassfish server
imp_o_rt
imp_o_rt10mo ago
What's under jdbc resources You need to link the data source to a jndi name under jdbc resources
imp_o_rt
imp_o_rt10mo ago
Stack Overflow
Glasshfish jndi lookup failed
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 ...
Rag...JN 🌌 🦡 👽 💰 🐊
Alright I'll try this Currently outside can't this added in the glassfish server instead of the app?
Rag...JN 🌌 🦡 👽 💰 🐊
here somewhere/
No description
Rag...JN 🌌 🦡 👽 💰 🐊
because I got the app/project from my friend, it works for him. but not for me because I missed some configurations
imp_o_rt
imp_o_rt10mo ago
Expand jndi resources under jdbc Not jndi by itself
Rag...JN 🌌 🦡 👽 💰 🐊
yea Test is the one I successfully created
No description
imp_o_rt
imp_o_rt10mo ago
But it's not available as a jndi resource Create a jdbc resource that points to Test connection pool
Rag...JN 🌌 🦡 👽 💰 🐊
alright so I have to create a new JDBC resource
No description
imp_o_rt
imp_o_rt10mo ago
Yes. This will make it discoverable by apps running on the app server By its jndi name
Rag...JN 🌌 🦡 👽 💰 🐊
JNDI name should be WebPU
imp_o_rt
imp_o_rt10mo ago
Ok
Rag...JN 🌌 🦡 👽 💰 🐊
Still the same issue
Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: JNDI lookup failed for the resource: Name: WebPU, Lookup: jdbc/test, Type: javax.sql.DataSource -- Lookup failed for jdbc/test in SerialContext[myEnv={java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}]
Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: JNDI lookup failed for the resource: Name: WebPU, Lookup: jdbc/test, Type: javax.sql.DataSource -- Lookup failed for jdbc/test in SerialContext[myEnv={java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}]
Rag...JN 🌌 🦡 👽 💰 🐊
jdbc/test could be it?
imp_o_rt
imp_o_rt10mo ago
Oh you were asking not telling WebPU sounds like the name of the jpa persistence unit (PU). Based on that error yes the jndi name should be jdbc/test
Rag...JN 🌌 🦡 👽 💰 🐊
also there are codes uses that configuration as well.
Rag...JN 🌌 🦡 👽 💰 🐊
I am confused whether it should be jdbc/Test or jdbc/WebPU @imp_o_rt Hey it was the old ejb after I rebuild my modules the error gone
JavaBot
JavaBot10mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?