1 Reply Latest reply on Sep 25, 2007 7:38 AM by Joshua Jackson

    DataSource problem in spring example of Seam 2.0.0cr01

    dapeng wang Newbie

      Hi,

      just downloaded the Seam 2.0.0cr01 today and wanted to try out the spring example. I used the ant script (need to add tomcat.deploy goal in the build.xml myself) to build the war file, which was still copied to the jboss.home instead of tomcat.home as specified in build.properties. I manually copied the war from jboss to tomcat and get following error upong startup.

      FATAL: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//loca
      lhost/,J2EEApplication=none,J2EEServer=none
      24.09.2007 16:31:17 org.apache.catalina.startup.HostConfig deployDirectory
      FATAL: Error deploying web application directory ROOT
      java.lang.RuntimeException: org.jboss.deployers.spi.IncompleteDeploymentExceptio
      n: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      persistence.units:unitName=bookingDatabase -> java.lang.RuntimeException: You ha
      ve not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence co
      ntext named: bookingDatabase
      
      
       at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
      java:92)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:117)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
      239)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:791)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
      1)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      
       at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
      a:920)
       at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
      ava:883)
       at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492
      )
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
      :311)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:117)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
      
       at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      
       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
      )
       at org.apache.catalina.core.StandardService.start(StandardService.java:5
      16)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
      )
       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
       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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: org.jboss.deployers.spi.IncompleteDeploymentException: Summary of inc
      omplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      persistence.units:unitName=bookingDatabase -> java.lang.RuntimeException: You ha
      ve not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence co
      ntext named: bookingDatabase
      
      
       at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.ja
      va:151)
       at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
       at org.jboss.embedded.tomcat.WebinfScanner.lifecycleEvent(WebinfScanner.
      java:88)
       ... 24 more


      I am only able to get the example run after I have added <non-jta-data-source>java:/MySqlDS</non-jta-data-source> into persistence.xml and defined MySqlDS datasource in embedded JBoss.

      Obviously the application is working with the HSQL datasource defined locally in spring context and not the MySQL one configured in embedded jboss. Is it a bug? What can I do to get rid of the unnecessary data source reference.

      regards
      Dapeng