javaEE:class java.lang.RuntimeException in GlassFish when create JDBC Resources

Published on:
Last updated:

This post is also available in: 日本語 (Japanese)

When I developed with javaEE and GlassFish, tried to create JDBC Resources from GlassFish Dashbord(usually localhost:4848), I got an error as following.
So, I made a note.

class java.lang.RuntimeException

Solution:Create JDBC Resources from Command Prompt

If you use Windows, there is a file 'asadmin' under 'C:\Program Files\glassfish\bin'.
So, open a command prompt with administrator privileges under 'bin' folder, then you can create JDBC Resource by entering the command.

For example, if you want to create JDBC Resources named 'sample_pool', execute the following command.

asadmin create-jdbc-resource --connectionpoolid sample_pool jdbc/sample_db
No tags for this post.

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.