Foros de discusión

Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

Erik Borš, modificado hace 6 años.

Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

New Member Mensajes: 5 Fecha de incorporación: 20/02/14 Mensajes recientes
Hi to all,
after deployment a portlet app from Liferay version 6 to 7, i have got this error -
Caused by: java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()Lorg/hibernate/engine/jdbc/connections/spi/ConnectionProvider;
Detail:

15:49:45,982 ERROR [DispatcherPortlet:276] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEmf' defined in PortletContext resource [/WEB-INF/testEIAPluginProject-portlet.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()Lorg/hibernate/engine/jdbc/connections/spi/ConnectionProvider;
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:915)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
        at org.springframework.web.portlet.FrameworkPortlet.createPortletApplicationContext(FrameworkPortlet.java:356)
        at org.springframework.web.portlet.FrameworkPortlet.initPortletApplicationContext(FrameworkPortlet.java:294)
        at org.springframework.web.portlet.FrameworkPortlet.initPortletBean(FrameworkPortlet.java:268)
        at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:120)
        at javax.portlet.GenericPortlet.init(GenericPortlet.java:136)
        at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:297)
        at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.init(MonitoringInvokerPortlet.java:141)
        at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:293)
        at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:193)
        at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:116)
        at com.liferay.portal.kernel.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:416)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:208)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:96)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:237)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:104)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:75)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
        at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
        at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:51)
        at sun.reflect.GeneratedMethodAccessor458.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:145)
        at com.sun.proxy.$Proxy479.contextInitialized(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:357)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:310)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:67)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:573)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:203)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
        at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
        at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
        at org.eclipse.osgi.container.Module.start(Module.java:452)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()Lorg/hibernate/engine/jdbc/connections/spi/ConnectionProvider;
        at org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.use42Api(AbstractUserTypeHibernateIntegrator.java:80)
        at org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.integrate(AbstractUserTypeHibernateIntegrator.java:61)
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750)
        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:92)
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:287)
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
        ... 88 more)</init></init>


form pom.xml file:
postgres : 9.0.801.jdbc4
hibernate: 4.2.0 Final
mysql.connector: 5.1.18 (but im using the postgres db)
spring: 3.1.4.RELEASE

I have seen that the combination of spring and hibernate can cause such error, but this combination worked very well on Liferay 6 :-/

Thanx for any help, i havent seen any help on other sites ...
thumbnail
Andrew Jardine, modificado hace 6 años.

RE: Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Erik,

Are you bundling the hibernate libraries with your plugin? or are you leveraging the libs that ship with the portal? I'm not on the exact same version as you but when I open up the hibernate-core jar from the ROOT application I see version 3.6.10 as referenced in the pom.xml.

As you mentioned, I have seen people reporting this before and it has always been, if my memory serves me, a version conflict.
Erik Borš, modificado hace 6 años.

RE: Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

New Member Mensajes: 5 Fecha de incorporación: 20/02/14 Mensajes recientes
Hi Andrew,

thank you for your response.
I have the dependencies in the pom.xml defined, so im using hibernate libraries in my plugin. Here is my part of pom.xml.
I would really appreciate, if you have any working combination of spring / hibernate what is working in Liferay 7.

And maybe one stupid question. When i change the hibernate library version to 4.1.x, where that method should be ( according what i have read on other forums), i see still that error. Can i somehow see, what library is trying to call method of hibernate, what no more exists in newer versions? Maybe this library : at org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.use42Api, from pom.xml i had org.jadira.usertype 3.2.0 GA, i have tried 5.0.0.GA. And the error still remains.

Maybe i have some mess in the pom.xml, so im sorry for that :-/

I would really appreciate some help how to find such conflict error by myself as well. So if you have any working configuration for Liferay 7, i will try for sure.

Thanx


<profiles>
		<profile>
			<id>Liferay-v7</id>
			<activation>
				<activebydefault>true</activebydefault>
			</activation>
			<properties>
				<liferay.version>6.2.1</liferay.version>
				<liferay.maven.plugin.version>6.2.1</liferay.maven.plugin.version>
				<liferay.auto.deploy.dir>C:\portal\liferay7\deploy</liferay.auto.deploy.dir>
				<liferay.app.server.deploy.dir>C:\portal\liferay7\tomcat\webapps</liferay.app.server.deploy.dir>
				<liferay.app.server.lib.global.dir>C:\portal\liferay7\tomcat\lib\ext</liferay.app.server.lib.global.dir>
				<liferay.app.server.portal.dir>C:\portal\liferay7\tomcat\webapps\ROOT</liferay.app.server.portal.dir>
				<postgres.version>9.0-801.jdbc4</postgres.version>
				<hibernate.version>4.2.0.Final</hibernate.version>
				<slf4j.version>1.6.1</slf4j.version>
				<spring.version>3.1.4.RELEASE</spring.version>
				<project.build.sourceencoding>UTF-8</project.build.sourceencoding>
			</properties>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupid>com.liferay.maven.plugins</groupid>
				<artifactid>liferay-maven-plugin</artifactid>
				<version>${liferay.maven.plugin.version}</version>
				<!-- <executions> <execution> <id>1</id> <phase>generate-sources</phase> 
					<goals> <goal>build-css</goal> </goals> </execution> </executions> -->
				<configuration>
					<autodeploydir>${liferay.auto.deploy.dir}</autodeploydir>
					<appserverdeploydir>${liferay.app.server.deploy.dir}</appserverdeploydir>
					<appserverlibglobaldir>${liferay.app.server.lib.global.dir}</appserverlibglobaldir>
					<appserverportaldir>${liferay.app.server.portal.dir}</appserverportaldir>
					<liferayversion>${liferay.version}</liferayversion>
					<plugintype>portlet</plugintype>
				</configuration>
			</plugin>
			<plugin>
				<artifactid>maven-compiler-plugin</artifactid>
				<version>2.5</version>
				<configuration>
					<encoding>UTF-8</encoding>
					<source>1.7
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactid>maven-resources-plugin</artifactid>
				<version>2.5</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupid>org.apache.maven.plugins</groupid>
				<artifactid>maven-surefire-plugin</artifactid>
				<version>2.13</version>			
				<configuration>
					<skiptests>true</skiptests>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<!-- LifeRay -->

		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>portal-service</artifactid>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-bridges</artifactid>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-taglib</artifactid>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>util-java</artifactid>
			<version>${liferay.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- Portlet and Servlet API -->

		<dependency>
			<groupid>javax.portlet</groupid>
			<artifactid>portlet-api</artifactid>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> 
			<version>2.4</version> <scope>provided</scope> </dependency> -->
		<dependency>
			<groupid>javax.servlet.jsp</groupid>
			<artifactid>jsp-api</artifactid>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupid>javax.servlet</groupid>
			<artifactid>javax.servlet-api</artifactid>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>javax.servlet</groupid>
			<artifactid>jstl</artifactid>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupid>commons-logging</groupid>
			<artifactid>commons-logging</artifactid>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupid>commons-lang</groupid>
			<artifactid>commons-lang</artifactid>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupid>org.apache.commons</groupid>
			<artifactid>commons-lang3</artifactid>
			<version>3.0</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-asm</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-beans</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-context</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-core</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-expression</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-webmvc-portlet</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-webmvc</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-web</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-test</artifactid>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-aop</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-tx</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-orm</artifactid>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupid>org.springframework</groupid>
			<artifactid>spring-oxm</artifactid>
			<version>${spring.version}</version>
		</dependency>
		
		<dependency>
			<groupid>cglib</groupid>
			<artifactid>cglib</artifactid>
			<version>2.2.2</version>
		</dependency>

		<!-- Spring Data JPA -->
		<dependency>
			<groupid>org.springframework.data</groupid>
			<artifactid>spring-data-jpa</artifactid>
			<version>1.4.3.RELEASE</version>
		</dependency>


		<!-- Bean Validation Dependencies -->
		<dependency>
			<groupid>javax.validation</groupid>
			<artifactid>validation-api</artifactid>
			<version>1.0.0.GA</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-validator</artifactid>
			<version>${hibernate.version}</version>
			<scope>runtime</scope>
		</dependency>


		<!-- Hibernate -->
		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-core</artifactid>
			<version>${hibernate.version}</version>
		</dependency>

		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-entitymanager</artifactid>
			<version>${hibernate.version}</version>
		</dependency>

		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-search</artifactid>
			<version>${hibernate.version}</version>
		</dependency>
		
		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-jpamodelgen</artifactid>
			<version>4.3.7.Final</version>
		</dependency>

		<dependency>
			<groupid>javassist</groupid>
			<artifactid>javassist</artifactid>
			<version>3.12.1.GA</version>
		</dependency>


		<!-- Connection Pool -->

		<dependency>
			<groupid>commons-dbcp</groupid>
			<artifactid>commons-dbcp</artifactid>
			<version>1.3</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>


		<!-- PostgreSQL JDBC 4 -->
		<dependency>
			<groupid>postgresql</groupid>
			<artifactid>postgresql</artifactid>
			<version>${postgres.version}</version>
		</dependency>

		<!-- BoneCP -->
		<dependency>
			<groupid>com.jolbox</groupid>
			<artifactid>bonecp</artifactid>
			<version>0.7.1.RELEASE</version>
		</dependency>

		<!-- Logging dependencies -->
		<dependency>
			<groupid>org.slf4j</groupid>
			<artifactid>slf4j-api</artifactid>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupid>org.slf4j</groupid>
			<artifactid>slf4j-log4j12</artifactid>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
			<version>1.2.16</version>
		</dependency>
		<!-- Testing Dependencies -->
		<dependency>
			<groupid>junit</groupid>
			<artifactid>junit</artifactid>
			<version>4.9</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupid>xerces</groupid>
			<artifactid>xercesImpl</artifactid>
			<version>2.9.0</version>
		</dependency>

		<dependency>
			<groupid>org.codehaus.castor</groupid>
			<artifactid>castor-xml</artifactid>
			<version>1.3.3</version>
		</dependency>


		<dependency>
			<groupid>commons-beanutils</groupid>
			<artifactid>commons-beanutils</artifactid>
			<version>1.8.3</version>
		</dependency>

		<dependency>
			<groupid>joda-time</groupid>
			<artifactid>joda-time</artifactid>
			<version>2.7</version>
		</dependency>

		<dependency>
			<groupid>org.jadira.usertype</groupid>
			<artifactid>usertype.extended</artifactid>
			<version>3.2.0.GA</version>
		</dependency>

		<dependency>
			<groupid>org.apache.velocity</groupid>
			<artifactid>velocity</artifactid>
			<version>1.7</version>
		</dependency>

		<!-- ZIP -->
		<dependency>
			<groupid>org.apache.ant</groupid>
			<artifactid>ant-compress</artifactid>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupid>com.github.junrar</groupid>
			<artifactid>junrar</artifactid>
			<version>0.7</version>
		</dependency>

		<dependency>
			<groupid>javax.mail</groupid>
			<artifactid>mail</artifactid>
			<version>1.4</version>
		</dependency>

	</dependencies>
thumbnail
Andrew Jardine, modificado hace 6 años.

RE: Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

Liferay Legend Mensajes: 2416 Fecha de incorporación: 22/12/10 Mensajes recientes
Hi Eric,

In truth I always use Service Builder when I am working with data driven portlets in Liferay -- regardless of the database they are stored in, so I have never come across this issue, but only because I don't usually build this way. Many of the libraries that you are referencing in your pom though do live in the portal (as Liferay makes such heavy use of Spring as it is) so I am wondering if perhaps you could use the "provided" libraries that Liferay ships with to meet some of your needs. You other question about how to figure out which library is being used and such, I don't know if any simple mechanism to do that to be honest. I'm gonna refer David to this thread -- I wonder if he can provide some insight for us.
thumbnail
David H Nebinger, modificado hace 6 años.

RE: Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Normally I would not chime in on something like this.

Spring MVC is okay, of course, but whenever you go off and do your own persistence layer after saying for many years now that you do so at your own risk/peril/responsibility, I typically just let you stew in your own juices. I mean after all, it is the bed you made and you have to go ahead and lie in it.

This is kind of the perfect example why, in fact.

Your Spring MVC war gets deployed into Liferay which does a WAR->WAB conversion on it and basically exposes it as an OSGi component. That means that actually some dependencies can come from the container and some you need to provide on your own.

Liferay is, of course, using Hibernate also, but version 3.6.10. This is likely where your "NoSuchMethod" exception originates from, you have it in 4.2 but doesn't exist in 3.6.

You may be able to find some help from https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/upgrading-a-spring-mvc-portlet and https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/spring-mvc. Pay attention to all of the notes, including the one from the second link about using a version of spring that is different than the portal's, the note about naming differently may expose some light on what you are trying to do.

Otherwise it is going to come down to the same old thing - you have a dependency that either a) you need to provide or b) want to provide (in lieu of what the portal offers) and you'll need to figure out the right combination to get it working.
Erik Borš, modificado hace 6 años.

RE: Liferay 7.0.4 GA5 CE deploy with error NoSuchMethodError

New Member Mensajes: 5 Fecha de incorporación: 20/02/14 Mensajes recientes
Hi David and Andew,

thanx for the responses and all info, i will try to repair the bad prepared bed step by step.