You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by szmuler <ta...@op.pl> on 2013/09/09 14:56:48 UTC

Unable to load beans.xml.

I have change server from tomcat 7 to tomee. After deploy I can not use CDI.
On console:

Application deploy but all CDI dont work. 



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to load beans.xml.

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Oh sorry, means you use @Inject with spring but tomee thinks you forgot to
activate cdi, just ignore it
Le 10 sept. 2013 09:22, "szmuler" <ta...@op.pl> a écrit :

> You misunderstand me. This file is bean.xml for cdi. All my spring xml's i
> have in separate directory.
> If I remove this file i got:
> WARNING: WARN ... app:    The application [app] uses @Inject but CDI is not
> enabled. Maybe youd need to add a beans.xml file.
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025p4665030.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to load beans.xml.

Posted by szmuler <ta...@op.pl>.
I figured it up. I debug core openejb project. And got real exception of this
problem: "org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot
be cast to org.apache.xerces.xni.parser.XMLParserConfiguration"

In my project i have other version of xerces. After remove all is ok. But i
have a question. About this piece of code : 


I think that real error should be logged or print.



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025p4665031.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to load beans.xml.

Posted by szmuler <ta...@op.pl>.
You misunderstand me. This file is bean.xml for cdi. All my spring xml's i
have in separate directory.
If I remove this file i got:
WARNING: WARN ... app:    The application [app] uses @Inject but CDI is not
enabled. Maybe youd need to add a beans.xml file.





--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025p4665030.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to load beans.xml.

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Just move/rename this file. Tomcat ignores cdi so beans.xml, not tomee
Le 9 sept. 2013 19:50, "szmuler" <ta...@op.pl> a écrit :

> beans.xml
>
>
> But u have right it is project which i used spring. Should I add somthing
> extra to work spring and cdi on tomee? On tomcat everything is ok.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025p4665028.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to load beans.xml.

Posted by szmuler <ta...@op.pl>.
beans.xml 


But u have right it is project which i used spring. Should I add somthing
extra to work spring and cdi on tomee? On tomcat everything is ok.



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025p4665028.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to load beans.xml.

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

isn't it a spring beans.xml? it has a particular meaning in JavaEE and is
reserved.

*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/9/9 szmuler <ta...@op.pl>

> I have change server from tomcat 7 to tomee. After deploy I can not use
> CDI.
> On console:
>
> Application deploy but all CDI dont work.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-load-beans-xml-tp4665025.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>