Hey all,

I just started to debug some compatibility problems between OWB and
SeamFaces. Unfortunately I had some major problems while trying to set
up a simple sample application for my tests using Tomcat7 and the
latest OWB release. I had a deeper look at the issues and now want to
share my thoughts on it.

Some of the Seam modules (like Seam Persistence) contain optional
Maven dependencies. The persistence module for example declares
Hibernate as an provided dependency. The Seam Persistence module
contains only one single class that requires Hibernate which is an SPI
implementation to support specific Hibernate features. This class is
only loaded/used if Hibernate is detected. Furthermore it's important
to know that this bean is not meant to be a bean manged by the CDI
runtime. Therefore it is annotated with @Veto (Seam Solder API) to get
vetoed during CDI startup.

All this works very fine with Weld 1.1.x. Unfortunately OWB fails to
deploy the Seam Persistence JAR with the following exception:

http://pastebin.com/raw.php?i=0rs98g6m

For me it looks like the class scanner tries to build a set of Class
objects from all classes in the bean archive. But this fails as soon
as the class compiled against the Hibernate API is picked up as
Hibernate is not on the classpath.

If I remember correctly Weld 1.0.x had similar issues. Somehow this
was resolved in Weld 1.1.x but I don't know anything about the
details.

I think it would be easy to fix this. ClassUtil.getClassFromName() or
AbstractMetaDataDiscovery.getBeanClasses() could catch
NoClassDefFoundError and handles them in some way. I think it would
make sense to simply ignore such errors during the bean archive
scanning process on continue with the next class.

What do you think?

Christian


-- 
Christian Kaltepoth
Blog: http://chkal.blogspot.com/
Twitter: http://twitter.com/chkal

Reply via email to