I have found an EAR with jars and war with my spring definitions, and beans. Xml I am using Maven to build this project. The code inside the jar is trying to find the beans. XML, but he does not know.
Do I want beans In XML:
Meta-INF / Beans Xml of ER?
or
JR's Meta-INF / Beans.xm?
I have tried the following:
Failure 1: Jar's Meta-INF /beans.xml It gives: BeansDeployer deployed org.apache.webbeans.exception.WebBeansException: Unable to read the original element of the given input stream. Reason: By: java.net.ConnectException: Connection timed out: Connect Failure 2: EAR Meta-INF / Beans.xm This provides FileNotFoundException because Maven-Earn-plugin simply copys the application.xml but does not include Beans.XML while earning the app. If this is the right method, then is there any way to create Megan in which beans.xmm is formed? Or should it be somewhere else? According to Regards "Generally speaking, - Nothing should be done in the INF. " You think why should it be within the Meta-INF? But, if you want it to be copied to the meta-INF folder of your ear, then it's under your
String CONFIG_FILE_NAME = "meta-inf / beans.xml"; ApplicationContext Reference = New FileSystemXmlApplicationContext (CONFIG_FILE_NAME); BeanFactry Factory = Reference;
string CONFIG_FILE_NAME = "classpath *: / meta-INF / * bees.xml"; ApplicationContext Reference = New ClassPath XmlApplicationContext (CONFIG_FILE_NAME); BeanFactry Factory = Reference;
ejb / src / main / resources / META-INF directory You may need to manually create some of them
No comments:
Post a Comment