Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
mukesh kumar
java.lang.ClassCastException
October 24, 2013 10:35 PM
Answer

mukesh kumar

Rank: Junior Member

Posts: 57

Join Date: March 12, 2012

Recent Posts

Hi,
I am getting the following error

Could not instantiate connection provider
java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.connection.ConnectionProvider
Can anybody have a look and suggest me something




Also
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayHibernateSessionFactory' defined in ServletContext resource [/WEB-INF/classes/META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider

Regards,
Mukesh
Meera Prince
RE: java.lang.ClassCastException
October 24, 2013 11:24 PM
Answer

Meera Prince

Rank: Liferay Legend

Posts: 1110

Join Date: February 8, 2011

Recent Posts

Hi

May i know when you are getting this error... this is problem with libraries....

you have to pass the org.hibernate.connection.ConnectionProvider this but ur passing org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider .


if you are using service builder in plugin portlet .

first take you portlet back up .


now do following this.


go to source META-INF delete all xml files and run service builder once again....
mukesh kumar
RE: java.lang.ClassCastException
October 25, 2013 5:38 AM
Answer

mukesh kumar

Rank: Junior Member

Posts: 57

Join Date: March 12, 2012

Recent Posts

Hi,
thanks for the reply..
I am getting this error while starting on the server itself .
I am using service builder and i have not done any explict configuration for passing either org.hibernate.connection.ConnectionProvider or org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider. By internally its taking because of extra jars added in lib folder in WEB-INF.
I have removed extra jars..
i have also followed your suggestion for go to source META-INF delete all xml files and run service builder once again....
Still i am getting the following errors.
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayHibernateSessionFactory' defined in ServletContext resource [/WEB-INF/classes/META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.

Regards,
Mukesh
Subhash Pavuskar
RE: java.lang.ClassCastException
October 25, 2013 10:35 AM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 234

Join Date: March 12, 2012

Recent Posts

Hi Mukesh ,

If you getting this error at the startup of your tomcat server then i guess you missed portal-ext.properties file in webapps\ROOT\WEB-INF\classes.
portal-ext.properties define your database connection.
Tiago Augusto Nogueira Coelho
RE: java.lang.ClassCastException
March 20, 2014 9:50 AM
Answer

Tiago Augusto Nogueira Coelho

Rank: Junior Member

Posts: 40

Join Date: October 4, 2013

Recent Posts

mukesh kumar:
Hi,
thanks for the reply..
I am getting this error while starting on the server itself .
I am using service builder and i have not done any explict configuration for passing either org.hibernate.connection.ConnectionProvider or org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider. By internally its taking because of extra jars added in lib folder in WEB-INF.
I have removed extra jars..
i have also followed your suggestion for go to source META-INF delete all xml files and run service builder once again....
Still i am getting the following errors.
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liferayHibernateSessionFactory' defined in ServletContext resource [/WEB-INF/classes/META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.

Regards,
Mukesh


did you solve the problem? I am getting the same error.