The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: MySQL Connection pool in Glassfish V2

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 25 - Last Post: Oct 13, 2008 7:13 AM by: gwg
slepage01

Posts: 12
MySQL Connection pool in Glassfish V2
Posted: Aug 12, 2008 6:11 PM
  Click to reply to this thread Reply

I can connect to the DB in all manner except when in a Connection Pool backed JNDI JDBC resource.

Here is the Connection Pool in the domain.xml

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="proxibid-mysql" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<property name="URL" value="jdbc:mysql://:3306/databasename"/>
<property name="user" value="user"/>
<property name="password" value="password"/>
</jdbc-connection-pool>
When a Toplink session attempts to connect the following error is recorded:

RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]

I am wracking my brain on this. I have tried ever possible combination to no avail.

Help!!

Manfred Riem
RE: MySQL Connection pool in Glassfish V2
Posted: Aug 12, 2008 9:21 PM   in response to: slepage01
  Click to reply to this thread Reply

Try property name: User with value: your username and
property name: Password with value: your password.

Note the case!

Manfred

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Tuesday, August 12, 2008 7:12 PM
To: users@glassfish.dev.java.net
Subject: MySQL Connection pool in Glassfish V2

I can connect to the DB in all manner except when in a Connection Pool backed JNDI JDBC resource.

Here is the Connection Pool in the domain.xml

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="proxibid-mysql" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<property name="URL" value="jdbc:mysql://:3306/databasename"/>
<property name="user" value="user"/>
<property name="password" value="password"/>
</jdbc-connection-pool>
When a Toplink session attempts to connect the following error is recorded:

RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]

I am wracking my brain on this. I have tried ever possible combination to no avail.

Help!!
[Message sent by forum member 'slepage01' (slepage01)]

http://forums.java.net/jive/thread.jspa?messageID=292929

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Shalini Muthukr...
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 4:55 AM   in response to: Manfred Riem
  Click to reply to this thread Reply

Could you try to access the app after doing a ping on the connection pool?

Thanks,
Shalini.

Manfred Riem wrote:
> Try property name: User with value: your username and
> property name: Password with value: your password.
>
> Note the case!
>
> Manfred
>
> -----Original Message-----
> From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
> Sent: Tuesday, August 12, 2008 7:12 PM
> To: users@glassfish.dev.java.net
> Subject: MySQL Connection pool in Glassfish V2
>
> I can connect to the DB in all manner except when in a Connection Pool backed JNDI JDBC resource.
>
> Here is the Connection Pool in the domain.xml
>
> <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="proxibid-mysql" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
> <property name="URL" value="jdbc:mysql://:3306/databasename"/>
> <property name="user" value="user"/>
> <property name="password" value="password"/>
> </jdbc-connection-pool>
> When a Toplink session attempts to connect the following error is recorded:
>
> RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]
>
> I am wracking my brain on this. I have tried ever possible combination to no avail.
>
> Help!!
> [Message sent by forum member 'slepage01' (slepage01)]
>
> http://forums.java.net/jive/thread.jspa?messageID=292929
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 7:40 AM   in response to: Shalini Muthukr...
  Click to reply to this thread Reply

That is the most infuriating part of the matter. I can ping the database with from connection pool setup page with success. But when I access the connection pool to an application via a jdbc resource this error is tossed.

In fact I can access the database in every manner except through the connection pool!!!

slepage01

Posts: 12
Re: RE: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 7:37 AM   in response to: Manfred Riem
  Click to reply to this thread Reply

Thank you for that suggestion.

I have tried every combination possible. Case has not mattered. Username is not a valid parameter for the MySQL driver.

Manfred Riem
RE: RE: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 7:37 AM   in response to: slepage01
  Click to reply to this thread Reply

Not Username, but User?

manfred

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Wednesday, August 13, 2008 8:37 AM
To: users@glassfish.dev.java.net
Subject: Re: RE: MySQL Connection pool in Glassfish V2

Thank you for that suggestion.

I have tried every combination possible. Case has not mattered. Username is not a valid parameter for the MySQL driver.
[Message sent by forum member 'slepage01' (slepage01)]

http://forums.java.net/jive/thread.jspa?messageID=293048

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


slepage01

Posts: 12
Re: RE: RE: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 8:07 AM   in response to: Manfred Riem
  Click to reply to this thread Reply

Yes, I have tried User and Password with the same result.

In fact I have even added these params to the URL parameter with the myslq://:3306/db?user=xxx&password=**** with the same results.

Manfred Riem
RE: RE: RE: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 8:07 AM   in response to: slepage01
  Click to reply to this thread Reply

Weird

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Wednesday, August 13, 2008 9:08 AM
To: users@glassfish.dev.java.net
Subject: Re: RE: RE: MySQL Connection pool in Glassfish V2

Yes, I have tried User and Password with the same result.

In fact I have even added these params to the URL parameter with the myslq://:3306/db?user=xxx&password=**** with the same results.
[Message sent by forum member 'slepage01' (slepage01)]

http://forums.java.net/jive/thread.jspa?messageID=293060

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Shing Wai Chan
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 9:55 AM   in response to: Manfred Riem
  Click to reply to this thread Reply

One can find an example of creating the connection pool for MySQL in
point 12 of the following blog:0
http://blogs.sun.com/swchan/entry/jdbcrealm_in_glassfish_with_mysql
Shing Wai Chan


Manfred Riem wrote:
> Try property name: User with value: your username and
> property name: Password with value: your password.
>
> Note the case!
>
> Manfred
>
> -----Original Message-----
> From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
> Sent: Tuesday, August 12, 2008 7:12 PM
> To: users@glassfish.dev.java.net
> Subject: MySQL Connection pool in Glassfish V2
>
> I can connect to the DB in all manner except when in a Connection Pool backed JNDI JDBC resource.
>
> Here is the Connection Pool in the domain.xml
>
> <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="proxibid-mysql" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
> <property name="URL" value="jdbc:mysql://:3306/databasename"/>
> <property name="user" value="user"/>
> <property name="password" value="password"/>
> </jdbc-connection-pool>
> When a Toplink session attempts to connect the following error is recorded:
>
> RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]
>
> I am wracking my brain on this. I have tried ever possible combination to no avail.
>
> Help!!
> [Message sent by forum member 'slepage01' (slepage01)]
>
> http://forums.java.net/jive/thread.jspa?messageID=292929
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 12:02 PM   in response to: Shing Wai Chan
  Click to reply to this thread Reply

Thank you again.

I have stripped it down to the bare minimum of connection properties with the same result. Again, I can connect to the database from a main class using the driver and mysql connector. But when I try to access this via a connection pool in the glassfish application server, this is the result.

I have sent nearly 12 hours on this...in every combination. By the way the environment is:

Glassfish v2ur2-b04 also tried in V2.1 stable binary
MySQL Connector J mysql-connector-java-5.1.6-bin.jar
Toplink version Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))

mvatkina

Posts: 755
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 12:13 PM   in response to: slepage01
  Click to reply to this thread Reply

Can you post your persistence.xml?

thanks,
-marina

Alex Sherwin
RE: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 12:19 PM   in response to: mvatkina
  Click to reply to this thread Reply

I use the exact same config (same GF version, same MySQL JDBC Driver) with XA DataSources/Non-XA DataSources just fine...

Inside the glassfish directory, in "\lib\install\templates\resources\jdbc" they have included examples of JDBC driver config files that work with glassfish. Remove all default params, and try using only the same ones they use in that config file.


Alex Sherwin
alex.sherwin@acadiasoft.com

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Wednesday, August 13, 2008 3:13 PM
To: users@glassfish.dev.java.net
Subject: Re: MySQL Connection pool in Glassfish V2

Can you post your persistence.xml?

thanks,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=293130

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 2:23 PM   in response to: mvatkina
  Click to reply to this thread Reply

Here is the persistence.xml

Thanks!

mvatkina

Posts: 755
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 2:34 PM   in response to: slepage01
  Click to reply to this thread Reply

Which PU do you reference in your code?

thanks,
-marina

slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 2:41 PM   in response to: mvatkina
  Click to reply to this thread Reply

The JTA one. The first one.

mvatkina

Posts: 755
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 3:26 PM   in response to: slepage01
  Click to reply to this thread Reply

I think we are chasing the wrong target :(. The message that you get is from GlassFish code security, not the driver. Can you check your application settings?

thanks,
-marina

slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 5:38 PM   in response to: mvatkina
  Click to reply to this thread Reply

What would I be looking for?

In the case of this project the Web client is using the Spring Security and Spring MVC. Would this be an issue in the web.xml? Or in the application.xml or the ejb.xml? Both the app.xml and the ejb.xml are minimal.

Thank you for all the help on this.

jr158900

Posts: 323
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 13, 2008 10:01 PM   in response to: slepage01
  Click to reply to this thread Reply

Did you change any of the driver property (--property of connection pool) ?
If you have done so after deploying the application that is accessing the pool, you will have to redeploy the application or restart glassfish.

http://docs.sun.com/app/docs/doc/819-3671/ablch?a=view

If you are facing the issue straight away (start appserver, application's fresh access gets the exception),
can you post the server.log (with "connectors" and "resource-adapter" log-levels set to FINEST) ?

slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 14, 2008 9:37 AM   in response to: jr158900
  Click to reply to this thread Reply

Stripping the properties to the absolute minimums with the resulting entry in the domain.xml

<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="false" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="proxibid-mysql" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.ConnectionPoolDataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<property name="databaseName" value="xxxxx"/>
<property name="port" value="3306"/>
<property name="serverName" value="localhost"/>
<property name="password" value="xxxxx"/>
<property name="user" value="xxxxx"/>
</jdbc-connection-pool>

clears the reported error....only to be replaced with this one....

[#|2008-08-14T10:54:08.671-0500|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=23;_ThreadName=httpSSLWorkerThread-8080-1;|
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: null source
java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at javax.sql.StatementEvent.<init>(StatementEvent.java:39)
at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeStatement(DatabaseAccessor.java:318)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.releaseStatement(DatabaseAccessor.java:1209)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:581)
at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:285)
at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:615)
at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2416)
at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2382)
at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:802)
at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:508)
at com.proxibid.auctionbuilder.manager.impl.LotManager.findListingLotByLotId(LotManager.java:82)
at com.proxibid.auctionbuilder.manager.bean.LotManagerBean.findListingLotByLotId(LotManagerBean.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4005)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:483)
at com.sun.ejb.Invocation.proceed(Invocation.java:498)
at com.proxibid.common.interceptor.LoggingInterceptor.logEnterExitMessage(LoggingInterceptor.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:579)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:483)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:205)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3978)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
at $Proxy161.findListingLotByLotId(Unknown Source)
<snip>......

Where to look now....? Data is in the DB so a result should be given....

Thanks for all the input from everyone.

mvatkina

Posts: 755
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 14, 2008 11:02 AM   in response to: slepage01
  Click to reply to this thread Reply

Do you restart the server after making changes to the connection pool settings?

thanks,
-marina

slepage01

Posts: 12
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 14, 2008 11:25 AM   in response to: mvatkina
  Click to reply to this thread Reply

This is the result of a complete bounce of the server and restart of the applications...

Short answer, yes.

mellel

Posts: 1
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 24, 2008 1:27 AM   in response to: slepage01
  Click to reply to this thread Reply

The whole "java.lang.IllegalArgumentException: null source" when using MySQL and Toplink essentials is indeed strange.

My solution for this problem was to download an OLDER VERSION of the MySQL connector.

The exception happened when I used version 5.1.6
The exception was gone when I used version 5.0.8

Don't forget to restart your server after replacing the libs!

Have fun!!

Message was edited by: mellel

mjohnsonaz74

Posts: 1
Re: MySQL Connection pool in Glassfish V2
Posted: Oct 11, 2008 1:35 PM   in response to: mellel
  Click to reply to this thread Reply

Yes, this solution worked for me as well. I am deploying a Grails application and I was having issues with the Bootstrap process. The first object would be persisted, but the next obects would not and GF would throw the "source null" error. I reverted to the Connector J 5.0.8 driver and the problem disappeared. I suspect that this is a bug in the newer version of Connector J.

nzidol

Posts: 1
Re: MySQL Connection pool in Glassfish V2
Posted: Aug 20, 2008 2:58 AM   in response to: slepage01
  Click to reply to this thread Reply

hi,

Similar problem trying to run Liferay on Glassfish with MySQL. Ping worked but ORM layer complaining about No Password supplied.

Solution ,,,, set Url and URL (both were created by default) to
jdbc:mysql://localhost:3306/lportal?user=lportal&password=xxxx

restart and it worked.

Don't ask me why....

jr158900

Posts: 323
Re: MySQL Connection pool in Glassfish V2
Posted: Oct 12, 2008 9:09 PM   in response to: nzidol
  Click to reply to this thread Reply

as explained above in the thread, if you have changed any of jdbc-driver property, you need to restart appserver / reploy referring application.

http://docs.sun.com/app/docs/doc/819-3671/ablch?a=view

gwg

Posts: 9
Re: MySQL Connection pool in Glassfish V2
Posted: Oct 13, 2008 7:13 AM   in response to: slepage01
  Click to reply to this thread Reply

When you change to the older MySQL driver, how do you get the DB-level transactions to work? The older MySQL driver seems to always have autocommit=true so that it is impossible to rollback any higher-level transactions when using the connection pool. Do you see the same problem? If not, how did you set up your connection pool?

The problem that I am seeing is identical to this thread:

http://forums.java.net/jive/thread.jspa?threadID=25163

Any help will be appreciated.




 XML java.net RSS