1 Reply Latest reply on Feb 23, 2006 11:11 PM by smichea

    Stacktrace does not help much...

      Hi

      I have an application with around 60 entity beans that I'm trying to persist in AS4.0.4RC1 with annotations.
      I'm stuck with absolutely no clue with the following exception:


      22:02:45,234 WARN [ServiceController] Problem starting service persistence.unit
      s:ear=divioenterprise.ear.ear,jar=divioEnterprise-EJBModule.jar.jar,unitName=com
      panyDB
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWra
      pper.java:97)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      org.hibernate.mapping.SimpleValue

      ...etc...
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:197)
      Caused by: java.lang.ClassCastException: org.hibernate.mapping.SimpleValue
      at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPa
      ss(CollectionBinder.java:719)
      at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPa
      ss(CollectionBinder.java:421)
      at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(Collectio
      nBinder.java:382)
      at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondP
      ass.java:35)

      ...etc...

      at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnit
      Deployment.java:260)
      ... 78 more


      The problem is that I cannot see anything in the stack trace related to my code...

      How is it possible to debug this ?

      Thanks in advance,
      Sebastien

        • 1. Re: Stacktrace does not help much...

          As usual It's 5 min after I posted the problem that i found the solution...
          The trick is to look into server.log, then the DEBUG line just before the exception looked like


          DEBUG [org.hibernate.cfg.annotations.CollectionBinder] Binding as ManyToMany: store.Catalog.categories

          and store.Catalog.categories whas exactly the properties with the problem.

          Might help some of you....