Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting up application database in glassfish server 4.1  RSS feed

 
Julius Adek
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, I just developed an app with Netbeans 8.1 called "Group Manager". It is working well on my pc through Netbeans IDE, but now i want to deploy it to another pc with Glassfish server 4.1. I have searched for how to setup JDBC connection pool and JDBC Resources on several websites and I got the following settings below which I have implemented but getting the error message indicated below after I have tried it several time. Please, help resolve this. Thanks for your quick response.


JDBC connection pool

Resource Type:  javax.sql.DataSource
Datasource Classname: org.apache.derby.jdbc.ClientDataSource40
Initial and Minimum Pool Size: 8
Maximum Pool Size: 32
Pool Resize Quantity:  2
Idle Timeout:  300
Max Wait Time:  6000

TraceFileAppend: false
SecurityMechanism: 4
ConnectionAttributes: create=true
User: web
DatabaseName: group_manager_db
RetrieveMessageText: true
ServerName: localhost
PortNumber: 1527
Password: web


JDBC Resources

JNDI Name: jdbc/group_manager_db
Pool Name: group_manager_db


ERROR:


An error has occurred. Ping Connection Pool failed for group_manager_db. Connection could not be allocated because: Connection authentication failure occurred. Reason: Userid or password invalid. Please check the server.log for more details.
 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error clearly says invalid username/password. Did you provide this info in the other server?

Such info can be stored in the connection pool.
 
Julius Adek
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not actually deployed the app but i was pinging this JDBC connection pool when this error was displayed. I don't even understand how this will locate my database and enable me to create tables for this app. Please, any help that will make me understand fully on how this works with my app will be accepted.

Even let us assume that I have successfully created JDBC connection pool and JDBC resources and it works perfectly, how and where my database will be created and store? I will greatly appreciate your help and any resource that can bring me understanding about database and table creation in a glassfish server 4.1.

Thanks so much for your response.
 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So where is the database? If you don't know how to access it, you need to ask whoever administer the site (whether it's the hosting service or company).

Regarding the connection pool, I recall such configuration is deployed/created when the app is deployed. Another way is explicitly create the pool using the glassfish JDBC screens.
 
Julius Adek
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your quick response. It is working now.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!