You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by djheisterberg <dj...@yahoo.com> on 2013/08/12 02:46:36 UTC
liquibase -- Cannot unmarshall the beans.xml
Is anyone using liquibase 3 with OpenEJB? I wasn't really intending to but
discovered that liquibase is CDI-ready (maybe even CDI-demanding!) and found
that simply having it in the classpath resulted in an exception when
starting the container:
org.apache.openejb.OpenEJBException: Cannot unmarshall the beans.xml
at
org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:552)
at
org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:442)
at
org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:75)
... and much more ...
The liquibase beans.xml has only some weld-specific excludes.
I tried removing beans.xml from the liquibase jar. The container came up,
but it looks like CDI annotations were still being processed as it failed
with unresolved injection points for some liquibase classes.
I do have a small maven project that reproduces this.
djh
--
View this message in context: http://openejb.979440.n4.nabble.com/liquibase-Cannot-unmarshall-the-beans-xml-tp4664595.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: liquibase -- Cannot unmarshall the beans.xml
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
in fact exclusion are standard in next cdi version.
Ignoring a namespace would mean ignoring app config if the user
misconfigured its app so that's not a solution too.
Here i think the liquid packaging should be reworked (it is easy to replace
it by a small custom cdi extension)
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/8/12 djheisterberg <dj...@yahoo.com>
> Wow! Thanks for the quick response -- go GMT!
>
> This is a third-party jar so "fixing" it is not a long-term option. The
> beans.xml contains weld exclusions in their own namespace. Can't the
> OpenWebBeans provider simply ignore them? If the CDI spec doesn't provide
> for that, or for a provider-neutral include/exclude mechanism, it pretty
> much excludes third-party jars from an application, does it not?
>
> The beans.xml file is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:weld="http://jboss.org/schema/weld/beans"
> xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/beans_1_0.xsd
> http://jboss.org/schema/weld/beans
> http://jboss.org/schema/weld/beans_1_1.xsd">
> <weld:scan>
> <weld:include name="**"/>
> <weld:exclude name="liquibase.integration.ant.**">
> <weld:if-class-available name="!org.apache.tools.ant.Task"/>
> </weld:exclude>
> <weld:exclude name="liquibase.integration.servlet.**">
> <weld:if-class-available name="!javax.servlet.ServletContext"/>
> </weld:exclude>
> <weld:exclude name="liquibase.integration.spring.**">
> <weld:if-class-available
> name="!org.springframework.beans.factory.InitializingBean"/>
> </weld:exclude>
> </weld:scan>
> </beans>
>
> Ignoring unknown namespaces would be a useful feature.
>
> djh
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/liquibase-Cannot-unmarshall-the-beans-xml-tp4664595p4664605.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: liquibase -- Cannot unmarshall the beans.xml
Posted by djheisterberg <dj...@yahoo.com>.
Wow! Thanks for the quick response -- go GMT!
This is a third-party jar so "fixing" it is not a long-term option. The
beans.xml contains weld exclusions in their own namespace. Can't the
OpenWebBeans provider simply ignore them? If the CDI spec doesn't provide
for that, or for a provider-neutral include/exclude mechanism, it pretty
much excludes third-party jars from an application, does it not?
The beans.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:weld="http://jboss.org/schema/weld/beans"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd
http://jboss.org/schema/weld/beans
http://jboss.org/schema/weld/beans_1_1.xsd">
<weld:scan>
<weld:include name="**"/>
<weld:exclude name="liquibase.integration.ant.**">
<weld:if-class-available name="!org.apache.tools.ant.Task"/>
</weld:exclude>
<weld:exclude name="liquibase.integration.servlet.**">
<weld:if-class-available name="!javax.servlet.ServletContext"/>
</weld:exclude>
<weld:exclude name="liquibase.integration.spring.**">
<weld:if-class-available
name="!org.springframework.beans.factory.InitializingBean"/>
</weld:exclude>
</weld:scan>
</beans>
Ignoring unknown namespaces would be a useful feature.
djh
--
View this message in context: http://openejb.979440.n4.nabble.com/liquibase-Cannot-unmarshall-the-beans-xml-tp4664595p4664605.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: liquibase -- Cannot unmarshall the beans.xml
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
If beans.xml has specific tags it will not be read.
If it fails once "fixed" it is surely it needs this particular config so
you need the same/equivalent for openejb (for instance using inclusion
config with scan.xml)
Le 12 août 2013 02:48, "djheisterberg" <dj...@yahoo.com> a écrit :
> Is anyone using liquibase 3 with OpenEJB? I wasn't really intending to but
> discovered that liquibase is CDI-ready (maybe even CDI-demanding!) and
> found
> that simply having it in the classpath resulted in an exception when
> starting the container:
>
> org.apache.openejb.OpenEJBException: Cannot unmarshall the beans.xml
> at
>
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:552)
> at
>
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:442)
> at
> org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:75)
> ... and much more ...
>
> The liquibase beans.xml has only some weld-specific excludes.
>
> I tried removing beans.xml from the liquibase jar. The container came up,
> but it looks like CDI annotations were still being processed as it failed
> with unresolved injection points for some liquibase classes.
>
> I do have a small maven project that reproduces this.
>
> djh
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/liquibase-Cannot-unmarshall-the-beans-xml-tp4664595.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>