Forums de discussion

Error creating bean with name 'liferayHibernateSessionFactory' defined in

Jason Easterday, modifié il y a 9 années.

Error creating bean with name 'liferayHibernateSessionFactory' defined in

New Member Publications: 5 Date d'inscription: 13/02/13 Publications récentes
I have been struggling with this issue for a week or so and am finally going to request help on this.

Database: mysql
OS: Linux 3.13.0-37-generic
CPU: 8x Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz 933.000 MHz, 7.8 GB RAM
Distribution: Ubuntu 14.04.1 LTS
Liferay version: 6.1.1 ce ga2

Background, I have a very large portlet that I know I have gotten to run on sql-server with it's current configuration, however when I switch it to mysql, i get this stacktrace:


10:38:25,093 INFO  [Dialect:127] HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
10:38:25,098 ERROR [localhost-startStop-2][ContextLoader:227] 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 dialect class
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:98)
	at com.liferay.portal.deploy.hot.SpringHotDeployListener.doInvokeDeploy(SpringHotDeployListener.java:77)
	at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:40)
	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
	at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:162)
	at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:99)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:117)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
	at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.buildSessionFactory(PortalHibernateConfiguration.java:65)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
	... 39 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.MySQLDialect cannot be cast to org.hibernate.dialect.Dialect
	at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:156)
	... 50 more
10:38:25,101 ERROR [localhost-startStop-2][HotDeployImpl:191] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for my-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error initializing Spring for my-portlet
	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
	at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:43)
	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:188)
	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:64)
	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:56)
	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1230)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
Caused by: 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 dialect class
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
	at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:98)
	at com.liferay.portal.deploy.hot.SpringHotDeployListener.doInvokeDeploy(SpringHotDeployListener.java:77)
	at com.liferay.portal.deploy.hot.SpringHotDeployListener.invokeDeploy(SpringHotDeployListener.java:40)
	... 24 more
Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
	at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:162)
	at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:99)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:117)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
	at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.buildSessionFactory(PortalHibernateConfiguration.java:65)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
	... 39 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.MySQLDialect cannot be cast to org.hibernate.dialect.Dialect
	at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:156)
	... 50 more
10:38:25,103 INFO  [localhost-startStop-2][HookHotDeployListener:550] Registering hook for my-portlet


This is what I have tried:
I have removed the portlet from my server, cleaned, deleted the xml files in the META-INF, deleted the class files and classes for my service, rebuilt the service using the service-builder.
I have verified the jars on the server and made sure that they wasn't a classloader problem (but this has to be the issue).
I have verified my portal-ext.properties file to ensure that it's pointing to mysql and i can see it being populated.

I'm open to suggestions and anything that you need in helping me solve this problem would be greatly appreciated. Also note that once we get this problem sorted out, I'll be posting the solution to the problem unlike so many other posts that I have gone through where they say, "the problem went away but that was 6 months ago, so i don't remember what i did".... grrrrr

Thanks in advance!
Jason
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Legend Publications: 14917 Date d'inscription: 02/09/06 Publications récentes
You're having issues w/ the class loader, probably due to different hibernate jars floating around. The class cast exception you're seeing is indicative of that.
Jason Easterday, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

New Member Publications: 5 Date d'inscription: 13/02/13 Publications récentes
That makes perfect sense but I guess I have a conflict of hibernate jars then. Liferay has hibernate3.jar and the portlet that I have is requiring hibernate4-core.jar.
Here's my liferay-plugin-package.properties file for my portlet

name = my
module-group-id = liferay
module-incremental-version = 1
tags = 
short-description = 
change-log = 
page-url = http://www.liferay.com
author = Liferay,Inc.
licenses = LGPL
portal-dependency-jars = antlr2.jar,antlr3-runtime.jar,aopalliance.jar,asm.jar,asm-commons.jar,asm-tree.jar,aspectj-weaver.jar,axis.jar,bsh.jar,cglib.jar,commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-dbcp.jar,commons-digester.jar,commons-discovery.jar,commons-fileupload.jar,commons-httpclient.jar,commons-io.jar,commons-lang.jar,commons-logging.jar,commons-pool.jar,commons-validator.jar,dom4j.jar,ehcache-core.jar,freemarker.jar,httpclient.jar,httpcore.jar,javassist.jar,jaxrpc.jar,jsr107cache.jar,lucene-analyzers.jar,lucene-core.jar,lucene-highlighter.jar,lucene-memory.jar,nekohtml.jar,oro.jar,quartz.jar,saaj-api.jar,saaj-impl.jar,slf4j-api.jar,stax.jar,struts.jar,tomcat-jdbc.jar,velocity.jar,velocity-tools.jar,wsdl4j.jar,wstx.jar,xercesImpl.jar,xml-apis.jar,xpp3.jar,xstream.jar,log4j-extras.jar,log4j.jar
required-deployment-contexts = my-hook
liferay-versions = 6.1.1
security-manager-enabled = false


if liferay is requiring hibernate3 and my portlet is requiring hibernate4, do i just try and upgrade liferay's jar? do I just remove it? How is my portlet able to conflict with it?

I saw somewhere someone recommended a change to my portlet's hibernate-spring.xml

<!--?xml version="1.0"?-->

<beans default-destroy-method="destroy" default-init-method="afterPropertiesSet" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	<bean id="liferayHibernateSessionFactory" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean">
		<constructor-arg value="com.liferay.portal.spring.hibernate.PortletHibernateConfiguration" />
		<constructor-arg>
			<map>
				<entry key="dataSource" value-ref="liferayDataSource" />
			</map>
		</constructor-arg>
	</bean>
	<bean id="liferaySessionFactory" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean">
		<constructor-arg value="com.liferay.portal.dao.orm.hibernate.PortletSessionFactoryImpl" />
		<constructor-arg>
			<map>
				<entry key="dataSource" value-ref="liferayDataSource" />
				<entry key="sessionFactoryClassLoader" value-ref="portletClassLoader" />
				<entry key="sessionFactoryImplementor" value-ref="liferayHibernateSessionFactory" />
			</map>
		</constructor-arg>
	</bean>
	<bean id="liferayTransactionManager" class="com.liferay.portal.kernel.util.InfrastructureUtil" factory-method="getTransactionManager" />
</beans>


where <entry key="dataSource" value-ref="liferayDataSource" /> to be changed to it's own datasource, but I'm not sure how to do that and there's not a lot of examples happening with such a change.
Jason Easterday, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

New Member Publications: 5 Date d'inscription: 13/02/13 Publications récentes
Also, my catalina.properties file:


#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext,${catalina.home}/lib/ext/*.jar

# List of JAR files that should not be scanned for configuration information
# such as web fragments, TLD files etc. It must be a comma separated list of
# JAR file names.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Sun JDK JARs
# - Apple JDK JARs
tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
jasper.jar,jasper-el.jar,ecj-*.jar,\
tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
tomcat-jdbc.jar,\
commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
commons-math*.jar,commons-pool*.jar,\
jstl.jar,\
geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunmscapi.jar,\
sunpkcs11.jar,jhall.jar,tools.jar,\
sunec.jar,zipfs.jar,\
apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar,\
junit.jar,junit-*.jar,ant-launcher.jar


which shouldn't be loading the hibernate jars until each of the applications load, ie ROOT, my-portlet
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Legend Publications: 14917 Date d'inscription: 02/09/06 Publications récentes
Yeah, no, you're stuck. Upgrading Liferay to use hib 4 is going to prove difficult. Your best bet is to downgrade your portlet's hibernate to 3 to be compatible with the portal.
Jason Easterday, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

New Member Publications: 5 Date d'inscription: 13/02/13 Publications récentes
easier said than done emoticon
I only have one question then, I have it working currently on another server, tomcat 7.0.50 with liferay 6.1.1 ce ga2 but a sql_server instead of mysql. only when i port it to mysql do i have this problem. Why could that be? the hibernate jars are both present and both have the sql server dialect.
Jason
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Legend Publications: 14917 Date d'inscription: 02/09/06 Publications récentes
Question - was Liferay and your portlet using the same database when working under sql server?

liferayHibernateSessionFactory is liferay's session factory, if you were using a different session factory it could have worked allowing both to coexist, but honestly I never would have suggested trying to mix hibernate versions because of the class conflicts that would have resulted.
Jason Easterday, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

New Member Publications: 5 Date d'inscription: 13/02/13 Publications récentes
Actually no, they are separate databases. I have liferay using a database: lportal and my-portlet using a database: myDatabase. My portlet is using a jdbc connection that I have defined in the context.xml file.
Meanwhile I just did a -verbose:class on my server and it appears that myportlet is getting loaded before portal is, not sure if this makes a difference but trying to sort out anything odd with the classloader.
thumbnail
Jack Bakker, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Master Publications: 978 Date d'inscription: 03/01/10 Publications récentes
You might try second datasource config as per my comment at October 2, 2013 12:12 AM

https://www.liferay.com/community/forums/-/message_boards/view_message/16407861#_19_message_30082160

I haven't tried hibernate4 yet and generally try to surf over top of current version Liferay libs. Maybe that coming big OSGi wave will afford a better ride.
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Legend Publications: 14917 Date d'inscription: 02/09/06 Publications récentes
Yeah, Jack, in like 2 years emoticon
thumbnail
Jack Bakker, modifié il y a 9 années.

RE: Error creating bean with name 'liferayHibernateSessionFactory' defined

Liferay Master Publications: 978 Date d'inscription: 03/01/10 Publications récentes
David H Nebinger:
Yeah, Jack, in like 2 years emoticon


I read somewhere that time flies when you are having fun.