Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ds-jpa example and jboss eap

    I imported the sample ds-jpa from SmartGWT 2.5p to test on jboss 5.
    It import and built with no problem.
    When I deploy to jboss 5 I get the following error:
    Code:
    java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You hav
    e not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: ds
            at org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init(PersistenceUnitInfoImpl.java:124)
            at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275)
            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.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
            at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(
    ReflectMethodInfoImpl.java:150)
            at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
    Any pointers as to what does not work in the same jpa example and jboss 5?

    #2
    Check if your persistence.xml is in place.

    Look at 'JPA transactions' in http://www.smartclient.com/docs/8.2/...jpaIntegration as well.

    Regards,
    Alius

    Comment


      #3
      The persistence file is located in the correct location.
      I tried both JPA 1.0 and JPA 2.0 both yield the same error.

      Has anyone been successfull deploying the sample JPA application to jboss 5.
      It worked with jboss 4.2.3 but not jboss 5

      I found another posting discussing how to define a non-jta-data-source; that quiets the deployment error but when the application attempts to create the EMF it fails.

      Changes to persistence.xml for non-jta were:

      <non-jta-data-source>java:/DefaultDS-no-tx</non-jta-data-source>
      <property name="jndi-name" value="DefaultDS-no-tx"/>

      Comment


        #4
        Is there specific requirement using NON-JTA data source?

        You are in J2EE container environment - use it's advantages.

        Change RESOURCE_LOCAL to JTA in persistence.xml;
        Change jpa.emfProvider to com.isomorphic.jpa.EMFProviderBMT in server .properties;
        Add resource references in web.xml and set it in server.properties as described in
        http://www.smartclient.com/docs/8.2/...jpaIntegration


        Regards,
        Alius

        Comment

        Working...
        X