Discussion:
How to exclude scanning of a web app with scan.xml
awmurray
2017-11-17 20:37:26 UTC
Permalink
I have a jar I won't want scanned by Tomee inside of a war.

I have an exclusions.list file in tomee/conf and also scan.xml files in the
web app.

The director structure is:
webapps
\_
serverapp
\_
WEB-INF
\_
lib
\_ appJar.jar (<-- this is being scanned by tomee it
looks like)
META-INF
\_
scan.xml

The scan.xml contents:
<?xml version="1.0" encoding="UTF-8"?>
<scan/>

Shouldn't this scan.xml file prevent any jars/classes from being scanned? I
want this war to not be scanned since it has no EJB resources.

I'm seeing it scan it:
17-Nov-2017 15:19:51.945 SEVERE [localhost-startStop-1]
org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke error
invoking ***@2a898881
java.lang.RuntimeException: Resource class class
com.package.ServiceAppContextImpl has no valid constructor
...

I'm not worried about the error but I don't think
org.apache.openejb.observer.ObserverManager should be seeing it with this
setup?





--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Romain Manni-Bucau
2017-11-18 13:02:32 UTC
Permalink
Hi

Scan.xml goes into WEB-INF. Putting default-list and appJar in
exclusions.list should also work.


Le 17 nov. 2017 21:37, "awmurray" <***@lexisnexis.com> a écrit :

I have a jar I won't want scanned by Tomee inside of a war.

I have an exclusions.list file in tomee/conf and also scan.xml files in the
web app.

The director structure is:
webapps
\_
serverapp
\_
WEB-INF
\_
lib
\_ appJar.jar (<-- this is being scanned by tomee it
looks like)
META-INF
\_
scan.xml

The scan.xml contents:
<?xml version="1.0" encoding="UTF-8"?>
<scan/>

Shouldn't this scan.xml file prevent any jars/classes from being scanned? I
want this war to not be scanned since it has no EJB resources.

I'm seeing it scan it:
17-Nov-2017 15:19:51.945 SEVERE [localhost-startStop-1]
org.apache.openejb.observer.ObserverManager$MethodInvocation.invoke error
invoking ***@2a898881
java.lang.RuntimeException: Resource class class
com.package.ServiceAppContextImpl has no valid constructor
...

I'm not worried about the error but I don't think
org.apache.openejb.observer.ObserverManager should be seeing it with this
setup?





--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html

Loading...