[EJB 3.0] - Composite Primary Keys - org.hibernate.AnnotationException:
by mrodrigues
I need help with composite primary keys
This example always give the exception below.
package pt.giss.siss.persistence;
import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
@Entity
public class Entity1 {
private int attribute;
private Entity1PK pk;
public int getAttribute() { return attribute; }
public void setAttribute(int attribute) { this.attribute = attribute; }
@EmbeddedId
public Entity1PK getPk() { return pk; }
public void setPk(Entity1PK pk) { this.pk = pk; }
}
@Embeddable
class Entity1PK implements Serializable {
private String attr1;
private String attr2;
public Entity1PK() {}
public boolean equals(Object obj) {
return true;
}
public int hashCode() {
return attr1.hashCode() + attr2.hashCode();
}
}
22:27:07,328 INFO [AnnotationBinder] Binding entity from annotated class: pt.giss.siss.persistence.Entity1
22:27:07,328 INFO [EntityBinder] Bind entity pt.giss.siss.persistence.Entity1 on table Entity1
22:27:07,328 WARN [ServiceController] Problem starting service persistence.units:unitName=Entities
org.hibernate.AnnotationException: pt.giss.siss.persistence.Entity1PK has not persistent id property
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1517)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1067)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:641)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:295)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:216)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1001)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:840)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:161)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:624)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:308)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:115)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
at $Proxy84.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:77)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:624)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:473)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
at $Proxy32.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:385)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
at $Proxy33.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
22:27:07,328 INFO [EJB3Deployer] Deployed: file:/D:/isel_dev/jboss-4.0.4.CR2/server/default/deploy/siss_persistence.jar
22:27:07,343 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:unitName=Entities
State: FAILED
Reason: org.hibernate.AnnotationException: pt.giss.siss.persistence.Entity1PK has not persistent id property
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:unitName=Entities
State: FAILED
Reason: org.hibernate.AnnotationException: pt.giss.siss.persistence.Entity1PK has not persistent id property
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DefaultDS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967354#3967354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967354
19 years, 8 months
[JBoss Messaging] - Re: JNP message queues through SSH tunnels
by ovidiu.feodorov@jboss.com
Keep in mind that JNDI server connection is just the first connection attempted by the JMS client. It also needs to go to the server-side Remoting connector:
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.messaging:service=Connector,transport=socket"
| display-name="Socket transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="socket">
| <attribute name="marshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
| <attribute name="serializationtype" isParam="true">jboss</attribute>
| <attribute name="dataType" isParam="true">jms</attribute>
| <attribute name="socket.check_connection" isParam="true">false</attribute>
| <attribute name="timeout">0</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">4457</attribute>
|
| ......
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967347#3967347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967347
19 years, 8 months
[JBossWS] - Web Services JBOSS 4.0.3 to JBOSS 4.0.4 Port Issues
by mandar_raje@hotmail.com
Hi,
I have a couple of web services running on JBOSS 4.0.3SP1. I access these services using stand-alone clients (Java client using AXIS and Perl client using SOAP Lite). Both clients work fine; can invoke methods and get values returned to them including String Arrays.
I deployed the same application in JBOSS 4.0.4GA. Now both clients are having issues - albeit different issues. Here they are:
1. Java client can invoke methods that return Simple Types, but not String Arrays or Complex Types. Here is the error I see on the client:
org.xml.sax.SAXException: Deserializing parameter 'result': could not find deserializer for type {http://vcc.ws.eds.com/types/arrays/java/lang}StringArray
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.Call.invoke(Call.java:2470)
2. Perl client cannot invoke any method. Here is the error I see on the client side (the same error appears in JBOSS log as well):
Error: Endpoint {http://vcc.ws.eds.com/}VCCSecurityQueryPort does not contain operation meta data for: {http://148.92.114.81:7070/vcc_security_ws}doesUserExist
Any ideas? I know the web services stack changed from 4.0.3 to 4.0.4 and JBOSS moved away from AXIS. Are these the known issues?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967344#3967344
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967344
19 years, 8 months