0 Replies Latest reply on Mar 7, 2005 10:14 PM by Jens Elkner

    composite demo does not work

    Jens Elkner Apprentice

      Hi,

      has anybody a hint, why the composite demo in "Composite Primary Keys" of the ejb3 tutorial does not work? I always get the following error when deploying it:

      04:08:53,769 INFO [Ejb3Module] found EJB3 stateless session bean: org.jboss.tutorial.composite.bean.EntityTestBean
      04:08:53,775 INFO [Ejb3Module] found EJB3 Entity bean: org.jboss.tutorial.composite.common.Customer
      04:08:53,776 INFO [Ejb3Module] found EJB3 Entity bean: org.jboss.tutorial.composite.common.CustomerPK
      04:08:53,778 INFO [Ejb3Module] found EJB3 Entity bean: org.jboss.tutorial.composite.common.Flight
      04:08:53,810 INFO [Ejb3Module] EJB3 jar using default hibernate.properties: {hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.show_sql=true, hibernate.hbm2ddl.auto=create-drop, hibernate.connection.datasource=java:/DefaultDS, hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory}
      04:08:53,867 ERROR [XMLHelper] Error parsing XML: XML String(14) The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*)".
      04:08:53,870 ERROR [Configuration] Could not configure datastore from XML
      org.hibernate.MappingException: invalid mapping
      at org.hibernate.cfg.Configuration.addXML(Configuration.java:312)
      at org.jboss.ejb3.entity.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:145)
      at org.jboss.ejb3.Ejb3Module.createHibernateSessionFactory(Ejb3Module.java:252)
      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:264)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:416)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy16.start(Unknown Source)
      at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:166)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,(id|composite-id),discriminator?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array|query-list)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*)".
      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      ...
      04:08:53,875 INFO [EJB3Deployer] Deployed: file:/opt/jboss40/server/default/deploy/tutorial.ejb3
      04:08:53,877 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
      MBeans waiting for other MBeans:
      ObjectName: jboss.j2ee:service=EJB3,module=tutorial.ejb3
      state: FAILED
      I Depend On:
      Depends On Me: org.hibernate.MappingException: org.hibernate.MappingException: invalid mapping
      ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.composite.bean.EntityTestBean
      state: CREATED
      I Depend On:
      Depends On Me:

      MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
      ObjectName: jboss.j2ee:service=EJB3,module=tutorial.ejb3
      state: FAILED
      I Depend On:
      Depends On Me: org.hibernate.MappingException: org.hibernate.MappingException: invalid mapping
      ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.composite.bean.EntityTestBean
      state: CREATED
      I Depend On:
      Depends On Me:

      Is there a way to tell jboss, that it should log the class name[s], which caused the problem ?