0
votes

I have a micro instance in EC2, so there I install the MySQL server and the Glassfish 3 Open Source edition, then I create users in MySQL so I can make select, insert, delete and etc.

As you can see here (I'm using the MySQL Workbench to do this) : enter image description hereenter image description hereenter image description hereenter image description hereenter image description here

The I create a DataSourcePool in the Glassfish:

enter image description hereenter image description here

And this ConnectionPool is using the user 'root' in 'localhost', the weird thing is this: In localhost everything works fine but when I make the deploy and try to execute it, nothing happens, not even a single exception, the server.log generated from glassfish is blank.

Any idea why this is happening ?

2

2 Answers

1
votes

As you are getting Ping Succeeded message on connection pool setup screen and not getting anything in log file suggest me that problem is not with your data source settings. I can think of following thing:

  1. May be application is not deployed properly. Do you see any errors at deployment time?
  2. Either application not getting any request?
  3. If application is getting request then persistence unit is not getting any request for load.
  4. May be handle of your log files is screwed up, that's why you are not seeing anything coming to the current log file. Do you see log statements corresponding to any other activities? If not then try restarting the server once.

Most certainly you might have checked many of the above things. If not then give it a try.

I see that you are doing proper MySQL settings but you can reconfirm few things as I have suggested in following post: Connect to mysql on Amazon EC2 from a remote server

0
votes

You're not showing the screenshot but I would check the JDBC Resources section. IIRC, you need to have the JNDI mapping from the Persistence Unit to the pool there otherwise there is no way to access the pool.

Wierd though, I would still expect an exception of some sort either from a failed JNDI lookup or some other JPA exception. Are you getting any errors on deployment?

My only other question would be how you determined that nothing happened? I assume your UI is a web page of some sort. What happens when you try to load the page?