• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

obtaining Datasource with Spring.

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We have an application build entirely with Spring, and we're deploying it on WebSphere. In WSAD Test environment everything is fine, however problems are occuring on the deployment.
The applicationContext cant be created and it appears to boil down to

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.<init>(javax.resource.spi.ManagedConnectionFactory, com.ibm.ejs.j2c.MCFExtendedProperties)]


I dont really have a clue what to look for.
The xml codings look like:


Hopefully anybody a hint?
regards,
Jeroen.
[ September 14, 2006: Message edited by: jeroen dijkmeijer ]
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks to me like a classloader issue, dude. Big time classloader.

Where are you jar files packaged?
 
jeroen dijkmeijer
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what i've been thinking as well during my (extended) weekend. Jars are all packaged in EAR and jars are referenced by WAR in (WEBContent)/META-INF/MANIFEST.MF, i've been changing the parent first/last and policy to application/module. So far no luck. Again any help would be greatly appreciated.

Thanks for your response!
Jeroen.
 
jeroen dijkmeijer
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm still looking into it but I found a link on
spring forum which gives some recognizable problem descriptions and hints.
I'll keep you all posted.
regards,
jeroen.
 
jeroen dijkmeijer
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I worked it out:
there was a catch22 situation because of the hibernate mapping files (hbm.xml) I needed to set the classloader to parent last, however setting this to parent last would set the datasource to an IBM implementation, and as everybody should know be now: keep as far as possible away from IBM implementations, this caused the described issue. The hbm files were generated and together with the low level daos and pojos kept in a separate project (completely generated). I first tried to import the source in the business project, still was could not locate them. The trick was to include the whole generated project in the WEB-INF/lib directory and change the LocalSessionFactoryBean to have . tmtowtdi, i'm sure. Let me know if you find it.
regards,
jeroen.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic