0

I want to create a JDBC Connection Pool in glassfish 4.

I run my application server in eclipse Mars, and I access to the administration page of glassfish.

Then, I go to JDBC -> JDBC CONNECTION POOL -> NEW...

In the form, I informs following information:

enter image description here

And when I clic on next I get this error page

enter image description here

And the error log is :

2015-11-11T16:13:20.350+0000|Avertissement: Context path from ServletContext:  differs from path from bundle: /
2015-11-11T16:13:21.789+0000|Infos: Redirecting to /index.jsf
2015-11-11T16:13:21.878+0000|Infos: Admin Console: Initializing Session Attributes...
2015-11-11T16:13:21.978+0000|Avertissement: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
2015-11-11T16:13:30.379+0000|Infos: Exception Occurred :null
2015-11-11T16:13:30.382+0000|Grave: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event144'.

2015-11-11T16:13:44.087+0000|Infos: Exception Occurred :null
2015-11-11T16:14:00.368+0000|Avertissement: StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
Mahmoud
  • 325
  • 10
  • 25
  • Check your domain logs and post the stack trace so we can see if there is a workaround (glassfish4/glassfish/domains//logs/server.log) otherwise log a bug against the Glassfish project. – Samuel Nov 11 '15 at 16:13
  • Ouch, looks like a bug in the admin interface. If you can't work around it you can always edit the domain.xml file directly yourself. – Gimby Nov 11 '15 at 16:14
  • @Gimby : What should I change exactly in domain.xml file. I'm not a profesional in the field of application servers. – Mahmoud Nov 11 '15 at 16:23
  • I don't really know what you expect me to reply to that, better google it. – Gimby Nov 11 '15 at 16:27
  • I face same problem, you can see this answer http://stackoverflow.com/a/34030106/5627499 – ajd.nas Dec 02 '15 at 14:47

1 Answers1

0

I'm facing the same issue and I found a solution: instead of creating the connection pool using my IDE (Netbeans), I used the command line:

My DB username is root with an empty password and I'm working on my localhost. My table is named tmpDb.

Here is the command I used:

$> cd "c:\Program Files\glassfish4\bin"
$> asadmin create-jdbc-connection-pool --restype  javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --validationmethod table --validationtable DUAL --property User=root:Password="":ServerName=localhost:tmpDb --ping true MyPool

Does this work for you?

Ala Eddine JEBALI
  • 7,033
  • 6
  • 46
  • 65