0 Replies Latest reply on Jul 24, 2009 12:06 AM by kapil sharma

    jboss problem with persistence.xml

    kapil sharma Newbie

      Hi Everyone,

      I am using Struts2, Spring,Hibernate, JPA entity classes in order to develop a website. I am getting an annoying error while deploying it on the JBOSS AS 5.1.Informix11.5 is used as the database server.

      Here is the snapshot of persistence.xml:

      xml version="1.0"
      persistence version="1.0"xlmns attributes
      <persistence-unit name="test"
      transaction-type="RESOURCE_LOCAL">
      org.hibernate.ejb.HibernatePersistence
      </persistence-unit>
      /persistence

      Here is a snapshot of data source bean defined in Spring(applicationContext.xml)








      Deployment of the application fails and gives the following error:

      19:00:59,036 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#test
      19:00:59,045 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#test state=Create
      java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: test
      at org.jboss.jpa.deployment.PersistenceUnitInfoImpl.< init>(PersistenceUnitInfoImpl.java:124)
      at org.jboss.jpa.deployment.PersistenceUnitDeployment .start(PersistenceUnitDeployment.java:285)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.reflect.plugins.introspection.Reflection Utils.invoke(ReflectionUtils.java:59)
      at org.jboss.reflect.plugins.introspection.ReflectMet hodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
      at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.d ispatch(BasicMethodJoinPoint.java:66)
      .
      .
      .
      .

      19:01:04,610 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
      19:01:04,800 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS IN ERROR: Name -> Error

      persistence.unit:unitName=#test-> java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: test


      JBOSS is complaining about non-jta-data-source but I dont know what should be the value of it. Or if I have to create that in JBOSS somewhere how should I do that.

      Please give me some directions about it as I need to finish it ASAP.

      Any suggestion or help will be really appreciated....