yes surely a side effect of descriptor scanning, can for sure be enhanced
but not sure it is that annoying since it is an unexpected structure


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-09-17 14:19 GMT-07:00 cfnz <[email protected]>:

> Hi,
>
> I shall fill in a few more details and highlight (some of) the errors of my
> ways...
>
> >> As soon as I add a resources.xml file things stop working...etc...
> >> org.apache.openejb.OpenEjbContainer$NoModulesFoundException: No modules
> >> found to deploy.
>
> >this is not directly linked, surely a side effect of something else, we
> >would need more detail on how to reproduce it
>
> I give a few more details below, I put the file in the wrong place, still
> not sure why the error though.
>
> >> Why am I trying to add a resources.xml? I was just testing pulling out
> >> the
> >> datasource settings into a config file rather than in the java source.
> >>
> >tomee.xml is external to the app so allows you to deploy the same binary
> in
> >multiple environment but otherwise resources.xml is good
>
> Thanks for that, and your comment below about maven not using it helps too.
>
> >> I may be completely barking up the wrong tree, but here are steps to
> >> reproduce what I am doing:
> >>
> >> svn co
> >>
> http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/jpa-eclipselink
> >> cd jpa-eclipselink
> >> ...
> >> Create WEB-INF/resources.xml file (or, it would seem, any file)
> >>
> >> mvn clean test
> >> >>> Fail with error mentioned above
> >> ...
> >mvn test uses the classpath so META-INF and not WEB-INF which is the war
> >place (unknown in classpath mode)
> >
> >Just to be sure: where do you create WEB-INF? in src/main/webapp? it
> doesnt
> >change anything for me. Didn't you also change dependencies or java
> version?
>
> Ummmm.... yes, pays to be sure... looks like I was barking up the wrong
> tree... I mistakenly put it under /src/main/resources... that is when the
> above error occurs...
>
> In terms of my dependencies and java version, yes, I have another folder
> with the java 8 version and updated xbeans to handle the annotation
> scanning, etc.
>
> But for these test cases I try to get a fresh svn copy of an example and
> make the minimal changes necessary to make the test case fail... in this
> case I should have been more clear with my WEB-INF placement (e.g.
> main/resources/WEB-INF) and it would have made my error more obvious...
> sorry about that... (also, I am assuming that maven will pick up the
> unmodified jars as they are different versions)
>
> So to replicate the error is fairly easy, but maybe it is expected
> behaviour? I shall breifly repeat below
>
> svn checkout the jpa-eclipselink example, builds and tests OK.
> create a WEB-INF folder where it is not supposed to go, e.g.
> /src/main/resources
> mvn clean test is still happy
> put a file in the created WEB-INF folder (can be an empty file named
> anything)
> mvn clean test fails.
>
> Since WEB-INF is in the wrong place, maybe this is nothing to worry
> about...
>
> So thanks for your help... I am learning slowly :-)
>
> Regards
> Colin
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/How-to-add-resources-and-still-scan-for-beans-tp4676236p4676288.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to