3 Replies Latest reply on Mar 2, 2007 12:54 AM by pgherveou

    hibernate tomcat mysql

    pgherveou
      Hi there,

      I got a problem trying to make tomcat 5, flex and hibernate work together.
      I got the following error in tomcat log :

      tomcat log
      =====

      Feb 26, 2007 5:36:10 PM org.apache.catalina.core.ApplicationContext log
      SEVERE: StandardWrapper.Throwable
      flex.messaging.config.ConfigurationException: Unable to create service 'flex.data.DataService' for 'data-service' due to the
      following error: Error instantiating application scoped instance of type 'flex.data.assemblers.HibernateAssembler' for
      destination 'user.hibernate'..
      at flex.messaging.config.MessagingConfiguration.createServices(MessagingConfiguration.java:2 02)
      ...
      Feb 26, 2007 5:36:10 PM org.apache.catalina.core.StandardContext loadOnStartup
      SEVERE: Servlet /eatProject threw load() exception

      flex.data.adapters.AdapterException: No Hibernate mapping was found for entity name
      'myProject.vo.User ' configured in destination 'null'.

      In the catalina log I got the following info on Hibernate log


      catalina log
      =====

      INFO: Configuration resource: /hibernate.cfg.xml
      Feb 26, 2007 5:50:31 PM org.hibernate.cfg.Configuration addResource
      INFO: Reading mappings from resource: myProject/vo/User.hbm.xml
      Feb 26, 2007 5:50:31 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
      INFO: Mapping class: myProject.vo.User -> user
      Feb 26, 2007 5:50:31 PM org.hibernate.cfg.Configuration doConfigure
      INFO: Configured SessionFactory: null

      thinks a lot for your help
        • 1. Re: hibernate tomcat mysql
          yggdraa
          >>flex.data.adapters.AdapterException: No Hibernate mapping was found for entity name 'myProject.vo.User ' configured in destination 'null'.


          make sure you have in your hibernate.cfg.xml this entry:
          <mapping resource="myProject/vo/User"/>
          • 2. hibernate tomcat mysql
            pgherveou Level 1
            Thinks for your help

            I changed few things, I am now able to display data but I can't add delete, or delete data

            I got the following log in tomcat :

            [Flex] Serializing AMF/RTMP response
            Version: 3
            (Command method=_error (0) trxId=4)
            (Typed Object #0 'flex.messaging.messages.ErrorMessage')
            rootCause = (Typed Object #1 'javax.naming.NamingException')
            rootCause = null
            localizedMessage = "Cannot create resource instance"
            resolvedObj = null
            resolvedName = null
            remainingName = null
            message = "Cannot create resource instance"
            cause = null
            explanation = "Cannot create resource instance"
            destination = "hibernate-user"
            headers = (Object #2)
            correlationId = "BC1B888D-63F8-BBD4-50C5-0F88B995C614"
            faultString = "Unable to access UserTransaction in DataService."
            messageId = "A6ECD297-E709-B1BC-C8E2-3CD3118BBCAC"
            faultCode = "Server.Processing"
            timeToLive = 0.0
            extendedData = null
            faultDetail = null
            clientId = null
            timestamp = 1.172786691031E12
            body = null

            • 3. Re: hibernate tomcat mysql
              pgherveou Level 1
              Ok I found the answer on adobe web site