Return-Path: X-Original-To: apmail-deltaspike-users-archive@www.apache.org Delivered-To: apmail-deltaspike-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 772581154F for ; Sun, 17 Aug 2014 18:45:22 +0000 (UTC) Received: (qmail 14359 invoked by uid 500); 17 Aug 2014 18:45:22 -0000 Delivered-To: apmail-deltaspike-users-archive@deltaspike.apache.org Received: (qmail 14329 invoked by uid 500); 17 Aug 2014 18:45:22 -0000 Mailing-List: contact users-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@deltaspike.apache.org Delivered-To: mailing list users@deltaspike.apache.org Received: (qmail 14317 invoked by uid 99); 17 Aug 2014 18:45:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Aug 2014 18:45:21 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gerhard.petracek@gmail.com designates 209.85.218.51 as permitted sender) Received: from [209.85.218.51] (HELO mail-oi0-f51.google.com) (209.85.218.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Aug 2014 18:45:17 +0000 Received: by mail-oi0-f51.google.com with SMTP id g201so2999683oib.10 for ; Sun, 17 Aug 2014 11:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=cH9Zo8S0+Fqxl8mZ8X+a74v+ruuJ8BfRYmLu5Jq2/2A=; b=nUrI9UmtZo3g3nZkY7gxzaU8sywBQJRZ5eWOROc3zn6OWtPBj6p1RQM/c2ZNLlS4jA mPZREXrxATrBhPQWU2zVZIXSCOo7UdaGqslq987JigT3BCaav2cAcLsqzXAn+NHl2NK8 i1sT43TmnPNGPRL6j2+mP0ScaoXJqPLJx5J2UQFa/2quDXu6wsmUc1Tf7JaDIvviHviW A6IaAuaxlx/1bg9iuYsgUYM/6+j+2mwi+GgGp0ho6NRxyslwcVjBdwPh6PrCzz7JBdQd g7vgWOKSj2If0jYic0rq+U7cJ3NEyDh2Jx4hKltZro4uMHFB+o4/gCykV4uC/kIYqZ3n DYDg== X-Received: by 10.182.114.169 with SMTP id jh9mr32381892obb.25.1408301097300; Sun, 17 Aug 2014 11:44:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.68.66 with HTTP; Sun, 17 Aug 2014 11:44:37 -0700 (PDT) In-Reply-To: References: From: Gerhard Petracek Date: Sun, 17 Aug 2014 20:44:37 +0200 Message-ID: Subject: Re: Problem with TestRunner CdiTestRunner needing myfaces on path To: users@deltaspike.apache.org Content-Type: multipart/alternative; boundary=001a11c2f63ea43cd60500d7a691 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2f63ea43cd60500d7a691 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable @karl: test-control can be used with java-se + cdi as well (see [1]). everything else is optional -> it only depends on your project-setup. (esp. on your optional config - see META-INF/services/org.apache.deltaspike.testcontrol.spi.ExternalContainer) regards, gerhard [1] https://github.com/os890/javase-cdi-ds-project-template http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2014-08-17 18:58 GMT+02:00 John D. Ament : > Yes, CdiTest has a dependency on myfaces test at [1]. Somewhere along th= e > line you're triggering [2] to be launched. > > The reason I'm saying the JSF module is because your exception that you > gave was from the JSF module: > Caused by: java.lang.NoClassDefFoundError: > javax/faces/bean/ApplicationScoped > at > > org.apache.deltaspike.jsf.impl.scope.mapped.MappedJsf2ScopeExtension.( > MappedJsf2ScopeExtension.java:54) > > > [1]: > > https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-= control/impl/pom.xml#L75 > [2]: > > https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-= control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MyFac= esContainerAdapter.java#L42 > > > On Sun, Aug 17, 2014 at 12:51 PM, Karl Kild=C3=A9n > wrote: > > > Hrmm. JSF Module seems irrelevant because it should not have a depedenc= y > to > > myfaces-test? It is Deltaspike test that has the dependency? > > > > > > On 17 August 2014 18:45, John D. Ament wrote: > > > > > Ok. I would say that this is expected then. CdiTestRunner basically > > boots > > > a CDI container over your entire classpath. Because we package our > > > extensions to be automatically loaded, they'll be loaded on boot. > > > > > > > > > On Sun, Aug 17, 2014 at 11:27 AM, Karl Kild=C3=A9n > > > wrote: > > > > > > > The test module can integrate with myfaces test stuff. But I never > > tried > > > > that stuff. I do have the Deltaspike JSF module in use though... > > > > > > > > > > > > On 17 August 2014 16:07, John D. Ament > wrote: > > > > > > > > > Just want to make sure I'm clear, you're using CdiTestRunner w/ J= SF > > > > module? > > > > > > > > > > > > > > > On Sun, Aug 17, 2014 at 9:41 AM, Karl Kild=C3=A9n < > karl.kilden@gmail.com> > > > > > wrote: > > > > > > > > > > > Hello, > > > > > > > > > > > > All of the sudden while doing a few experiments I started > getting a > > > lot > > > > > of > > > > > > ClassNotFoundException etc. For example if I don't have myfaces > on > > my > > > > > path: > > > > > > > > > > > > Caused by: java.lang.NoClassDefFoundError: > > > > > > javax/faces/bean/ApplicationScoped > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.deltaspike.jsf.impl.scope.mapped.MappedJsf2ScopeExtension.(MappedJsf2ScopeExtension.java:54) > > > > > > at > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > > > Method) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc= cessorImpl.java:57) > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst= ructorAccessorImpl.java:45) > > > > > > at > > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:525) > > > > > > at java.lang.Class.newInstance0(Class.java:374) > > > > > > at java.lang.Class.newInstance(Class.java:327) > > > > > > at > > > > > > java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:37= 3) > > > > > > ... 36 more > > > > > > Caused by: java.lang.ClassNotFoundException: > > > > > > javax.faces.bean.ApplicationScoped > > > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:36= 6) > > > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:35= 5) > > > > > > at java.security.AccessController.doPrivileged(Native > > Method) > > > > > > at > > java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:423= ) > > > > > > at > > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > > > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:356= ) > > > > > > ... 44 more > > > > > > > > > > > > > > > > > > I had to have these three to make sure I didn't get any > > exceptions... > > > > > > > > > > > > > > > > > > org.apache.myfaces.core > > > > > > myfaces-impl > > > > > > ${myfaces.version} > > > > > > test > > > > > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.test > > > > > > myfaces-test22 > > > > > > 1.0.7 > > > > > > test > > > > > > > > > > > > > > > > > > > > > > > > org.apache.myfaces.core > > > > > > myfaces-impl-test > > > > > > 2.2.4 > > > > > > test > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Anyone knows what could be wrong? I am sure it's something on m= y > > > > side... > > > > > > Cheers > > > > > > > > > > > > > > > > > > > > > --001a11c2f63ea43cd60500d7a691--