[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3248) If not using EJBs, and not using JNDI datasource (thanks to Spring) then Seam Test fails with a hard to understand message

Francisco Jose Peredo Noguez (JIRA) jira-events at lists.jboss.org
Wed Aug 13 11:45:41 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12424813#action_12424813 ] 

Francisco Jose Peredo Noguez commented on JBSEAM-3248:
------------------------------------------------------

I know the error message is sent by JBoss Embedded, but the problem is caused by Seam, not by JBoss.
Why do I think that?
Because if I modify org.jboss.seam.mock.EmbeddedBootstrap (note I commented out the first if) then it doesn't crash, why it is not Seam responsibility to bootstrap Jboss in a way that either doesn't cause a crash, or sends an exception saying that the Boostrap will fail before it actually fails? 

public void startAndDeployResources() throws Exception
   {
      Bootstrap bootstrap = Bootstrap.getInstance();
      bootstrap.bootstrap();

      /*if (resourceExists("seam.properties")) 
      {
         bootstrap.deployResourceBases("seam.properties");
      }*/
      if (resourceExists("META-INF/components.xml")) 
      {
         bootstrap.deployResourceBases("META-INF/components.xml");
      }
      if (resourceExists("META-INF/seam.properties")) 
      {
         bootstrap.deployResourceBases("META-INF/seam.properties");
      }
   }


> If not using EJBs, and not using JNDI datasource (thanks to Spring) then Seam Test fails with a hard to understand message 
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3248
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3248
>             Project: Seam
>          Issue Type: Feature Request
>          Components: Test Harness
>    Affects Versions: 2.0.2.GA
>            Reporter: Francisco Jose Peredo Noguez
>            Assignee: Pete Muir
>
> When developing Seam integration tests  if you aren't deploying EJBs, then you don't need the container to deploy archives which contain EJBs. But if you have org.jboss.embedded.Bootstrap.class in the classpath, and you are using a datasource configured with Spring (and without JDNI) you will get this error: 
> persistence.units:unitName=webappsbmi-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: webappsbmi-test
> Instead of that, it should send an error saying something like:
> "As you aren't deploying EJBs, then you don't need the container to deploy archives which contain EJBs."
> or
> "As you you are not using a JNDI datasource then you can not use the container to deploy archives which contain EJBs."
> or something  like that... I wasted a lot of time trying to find out what was happening

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list