Nick's Tech Blog: java.lang.NoSuchMethodException: com.ibm.ejs.j2c.DefaultSecurityHelper

Pages

Thursday, June 9, 2011

java.lang.NoSuchMethodException: com.ibm.ejs.j2c.DefaultSecurityHelper

Problem

Received the following exceptions from Websphere7.

Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
[Root exception is java.lang.NoSuchMethodException: com.ibm.ejs.j2c.DefaultSecurityHelper.(javax.resource.spi.ManagedConnectionFactory, com.ibm.ejs.j2c.MCFExtendedProperties)]

Caused by: java.lang.NoSuchMethodException: com.ibm.ejs.j2c.DefaultSecurityHelper.(javax.resource.spi.ManagedConnectionFactory, com.ibm.ejs.j2c.MCFExtendedProperties)


Solution

I'm not sure if one (or a combination of both) solutions fixed the issue, but here they are.

A) Remove any "connection-api" dependencies from the application.
See: https://forum.hibernate.org/viewtopic.php?t=189&view=previous&sid=13f603a429a675f5d397059b237952df

B) The application is trying to use an XA datasource, but the driver (.jar file) doesn't support it. Check the datasource is using the correct libraries.
See: http://www.ibm.com/developerworks/forums/thread.jspa?threadID=109582

2 comments:

  1. Once again Nick, you saved the day :)

    Option A worked for me as I wasn't using an XA datasource.

    ReplyDelete
  2. Are you stalking me? Haha

    Glad to hear it helped you.

    ReplyDelete