<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss 5.1 NoSuchMethodError when deploying persistenceEntitiy EJB3 app
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/sandfurz">sandfurz</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/621736#621736">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have a problem deploying an EJB3 Enterprise Application with peristence entities.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Code part of the bean where the EntityManager is used:</p><p>@PersistenceContext</p><p>   private EntityManager entityManager;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Code part of the entity:</p><p>@Entity</p><p>@Table(name = "NCM_CACHE")</p><p>public class NCMEntityHVB</p><p>{</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>   @Basic(fetch=FetchType.EAGER)</p><p>   @Column(name = "UNIQUE_ID")</p><p>   @Id</p><p>   private String key;</p><p>   @Basic(fetch=FetchType.EAGER)</p><p>   @Column(name = "BUSINESS_KEY")</p><p>   private String businessKey;</p><p>   @Basic(fetch=FetchType.EAGER)</p><p>   @Column(name = "SETTLT_STATUS")</p><p>[...]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When deploying I always get the NoSuchMethodError. No idea where this comes from.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>17:45:44,796 WARN  [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.</p><p>17:45:44,921 INFO  [AnnotationBinder] Binding entity from annotated class: com.smc.ncm.server.comp.caching.NCMEntityHVB</p><p>17:45:45,031 INFO  [EntityBinder] Bind entity com.smc.ncm.server.comp.caching.NCMEntityHVB on table NCM_CACHE</p><p>17:45:45,109 INFO  [AnnotationBinder] Binding entity from annotated class: com.smc.ncm.server.comp.caching.NCMEntityCoba</p><p>17:45:45,109 INFO  [EntityBinder] Bind entity com.smc.ncm.server.comp.caching.NCMEntityCoba on table NCM_CACHE_COBA</p><p>17:45:45,296 INFO  [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not e</p><p>nabled.</p><p>17:45:45,468 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider</p><p>17:45:45,468 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource</p><p>17:45:45,484 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=ncm.ear/NCM.jar#entityManager state=Create</p><p>j<strong>ava.lang.NoSuchMethodError: javax.resource.ResourceException: method <init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found</strong></p><p>        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)</p><p>        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)</p><p>        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)</p><p>        at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)</p><p>        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)</p><p>        at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)</p><p>        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)</p><p>        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)</p><p>        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)</p><p>        at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)</p><p>        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)</p><p>        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)</p><p>        at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)</p><p>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</p><p>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</p><p>        at java.lang.reflect.Method.invoke(Method.java:597)</p><p>        at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)</p><p>        at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)</p><p>        at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)</p><p>        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)</p><p>        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)</p><p>        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)</p><p>        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)</p><p>        at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)</p><p>        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)</p><p>        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)</p><p>        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)</p><p>        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)</p><p>        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)</p><p>        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)</p><p>        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)</p><p>        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)</p><p>        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)</p><p>        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)</p><p>        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)</p><p>        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)</p><p>        at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)</p><p>        at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)</p><p>        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)</p><p>        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)</p><p>        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)</p><p>        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)</p><p>        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)</p><p>        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)</p><p>        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)</p><p>        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)</p><p>        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)</p><p>        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)</p><p>        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)</p><p>        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)</p><p>        at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)</p><p>        at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:263)</p><p>        at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:177)</p><p>        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)</p><p>        at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)</p><p>        at org.jboss.remoting.Client.invoke(Client.java:1724)</p><p>        at org.jboss.remoting.Client.invoke(Client.java:629)</p><p>        at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:305)</p><p>        at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:190)</p><p>        at org.jboss.profileservice.management.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:231)</p><p>        at org.jboss.profileservice.management.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:88)</p><p>        at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:120)</p><p>        at org.rhq.plugins.jbossas5.util.DeploymentUtils.deployArchive(DeploymentUtils.java:103)</p><p>        at org.rhq.plugins.jbossas5.ApplicationServerComponent.createContentBasedResource(ApplicationServerComponent.java:400)</p><p>        at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:211)</p><p>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Please help !</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Many thanks in advance</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Sand</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/621736#621736">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>