1 Reply Latest reply on Oct 28, 2008 3:19 AM by Adam Warski

    Unrecognized listener type [pre-collection-update]

    Louie Liu Newbie

      Thanks for fixing all the issues for us.

      After upgrading the Enver version to 1.1.0.GA and using the hibernate 3.3 version, we found the following errors:

      [hibernatetool] org.hibernate.MappingException: Unrecognized listener type [pre-collection-update]
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error executing ant tasks
      
      Embedded error: Problems in creating a configuration for JPA. Have you remembered to add hibernate E
      ntityManager jars to the classpath ?
      Unrecognized listener type [pre-collection-update]
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error executing ant tasks
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
       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:597)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
       at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:114)
       at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
       ... 16 more
      Caused by: Problems in creating a configuration for JPA. Have you remembered to add hibernate EntityManager jars to the classpath ?
       at org.hibernate.tool.ant.JPAConfigurationTask.createConfiguration(JPAConfigurationTask.java:57)
       at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:54)
       at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
       at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51)
       at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
       at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
       at org.apache.tools.ant.Task.perform(Task.java:364)
       at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
       at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
       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:597)
       at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
       at org.apache.tools.ant.Task.perform(Task.java:364)
       at org.apache.tools.ant.Target.execute(Target.java:341)
       at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
       ... 19 more
      Caused by: java.lang.reflect.InvocationTargetException
       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:597)
       at org.hibernate.tool.ant.JPAConfigurationTask.createConfiguration(JPAConfigurationTask.java:43)
       ... 37 more
      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: gravitas] Unable to configure EntityManagerFactory
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
       ... 42 more
      Caused by: org.hibernate.MappingException: Unrecognized listener type [pre-collection-update]
       at org.hibernate.event.EventListeners.getListenerClassFor(EventListeners.java:116)
       at org.hibernate.cfg.Configuration.setListeners(Configuration.java:1654)
       at org.hibernate.ejb.Ejb3Configuration.setListeners(Ejb3Configuration.java:1317)
       at org.hibernate.ejb.EventListenerConfigurator.setProperties(EventListenerConfigurator.java:163)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:853)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)
       ... 42 more
      [INFO] ------------------------------------------------------------------------
      


      Here is our environment:

      hibernate-core-3.3.1.GA
      hibernate*.3.4.+;

      Please help.