Hi folks, Happy New Year! :)
Did you manage to take a look at my sample app? Thanks, Ivan On Tue, Dec 23, 2014 at 2:31 PM, Ivan St. Ivanov <[email protected]> wrote: > Hi, > > Thanks everybody for your quick answer! > > It's not on github. I have attached the sources to this mail. > > Regards, > Ivan > > On Tue, Dec 23, 2014 at 1:19 PM, Ludovic Pénet <[email protected]> wrote: > >> Quick question : do you have a beans.xml file ? >> >> Ludovic >> >> Le 23 décembre 2014 10:05:26 UTC+01:00, "Ivan St. Ivanov" <ivan.st. >> [email protected]> a écrit : >> >>> Hello, >>> >>> I have a question about integrating OpenWebBeans with a pure Tomcat >>> server. >>> >>> I looked for some solutions in the internet and here is what I did with >>> my project: >>> >>> First I added some dependencies to the pom.xml: >>> >>> <*dependency*> >>> <*groupId*>javax.enterprise</*groupId*> >>> <*artifactId*>cdi-api</*artifactId*> >>> <*version*>1.2</*version*> >>> </*dependency*> >>> <*dependency*> >>> <*groupId*>org.apache.openwebbeans</*groupId*> >>> <*artifactId*>openwebbeans-spi</*artifactId*> >>> <*version*>1.2.7</*version*> >>> </*dependency*> >>> <*dependency*> >>> <*groupId*>org.apache.openwebbeans</*groupId*> >>> <*artifactId*>openwebbeans-impl</*artifactId*> >>> <*version*>1.2.7</*version*> >>> </*dependency*> >>> <*dependency*> >>> <*groupId*>org.apache.openwebbeans</*groupId*> >>> <*artifactId*>openwebbeans-web</*artifactId*> >>> <*version*>1.2.7</*version*> >>> </*dependency*> >>> >>> >>> Having them, I was able to compile and deploy my project, however the >>> dependency injection simply did not work. >>> >>> Then I additionally added the following dependency: >>> >>> <*dependency*> >>> <*groupId*>org.apache.openwebbeans</*groupId*> >>> <*artifactId*>openwebbeans-tomcat7</*artifactId*> >>> <*version*>1.2.7</*version*> >>> </*dependency*> >>> >>> >>> And also created context.xml file under the src/main/webapp/META-INF >>> folder of my app with the following content: >>> >>> <*Context*> >>> < >>> *Listener className= >>> "org.apache.webbeans.web.tomcat7.ContextLifecycleListener" */> >>> </*Context*> >>> >>> However, this time I had deployment issue: >>> >>> Dec 22, 2014 6:54:28 PM org.apache.tomcat.util.digester.Digester >>> startElement >>> >>> SEVERE: Begin event threw exception >>> >>> java.lang.ClassNotFoundException: >>> org.apache.webbeans.web.tomcat.ContextLifecycleListener >>> >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >>> >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >>> >>> at java.security.AccessController.doPrivileged(Native Method) >>> >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >>> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:425) >>> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:358) >>> >>> at >>> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144) >>> >>> at >>> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1288) >>> >>> at >>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) >>> >>> I tried to tackle that with adding the OWB jars in the tomcat/lib >>> folder. But gave it up after the fifth ClassNotFoundError. It is not an >>> option for me anyway: I am not in control of the productive server, so I >>> cannot touch its lib directory. >>> >>> I also looked in the OpenWebBeans samples, but they don't even package >>> the jars with them. >>> >>> Can anyone share their experience with me? >>> >>> Thanks a lot! >>> Ivan >>> >>> >>> >>> >> -- >> Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté. >> >> | >> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT. >> | >> >> >
