Gerhard,

Yes I did not have this problem before. Any advice on how I can debug why
it tries to boot the myfaces stuff? My problem is I don't want it to and I
don't understand why it happens :-)



On 17 August 2014 20:44, Gerhard Petracek <[email protected]>
wrote:

> @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 <[email protected]>:
>
> > Yes, CdiTest has a dependency on myfaces test at [1].  Somewhere along
> the
> > 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.<init>(
> > 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/MyFacesContainerAdapter.java#L42
> >
> >
> > On Sun, Aug 17, 2014 at 12:51 PM, Karl Kildén <[email protected]>
> > wrote:
> >
> > > Hrmm. JSF Module seems irrelevant because it should not have a
> depedency
> > to
> > > myfaces-test? It is Deltaspike test that has the dependency?
> > >
> > >
> > > On 17 August 2014 18:45, John D. Ament <[email protected]> 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én <[email protected]
> >
> > > > 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 <[email protected]>
> > wrote:
> > > > >
> > > > > > Just want to make sure I'm clear, you're using CdiTestRunner w/
> JSF
> > > > > module?
> > > > > >
> > > > > >
> > > > > > On Sun, Aug 17, 2014 at 9:41 AM, Karl Kildén <
> > [email protected]>
> > > > > > 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.<init>(MappedJsf2ScopeExtension.java:54)
> > > > > > >         at
> > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > > > > > > Method)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > > > > > >         at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.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:373)
> > > > > > >         ... 36 more
> > > > > > > Caused by: java.lang.ClassNotFoundException:
> > > > > > > javax.faces.bean.ApplicationScoped
> > > > > > >         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: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...
> > > > > > >
> > > > > > >         <dependency>
> > > > > > >             <groupId>org.apache.myfaces.core</groupId>
> > > > > > >             <artifactId>myfaces-impl</artifactId>
> > > > > > >             <version>${myfaces.version}</version>
> > > > > > >             <scope>test</scope>
> > > > > > >         </dependency>
> > > > > > >
> > > > > > >         <dependency>
> > > > > > >             <groupId>org.apache.myfaces.test</groupId>
> > > > > > >             <artifactId>myfaces-test22</artifactId>
> > > > > > >             <version>1.0.7</version>
> > > > > > >             <scope>test</scope>
> > > > > > >         </dependency>
> > > > > > >
> > > > > > >         <dependency>
> > > > > > >             <groupId>org.apache.myfaces.core</groupId>
> > > > > > >             <artifactId>myfaces-impl-test</artifactId>
> > > > > > >             <version>2.2.4</version>
> > > > > > >             <scope>test</scope>
> > > > > > >         </dependency>
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Anyone knows what could be wrong? I am sure it's something on
> my
> > > > > side...
> > > > > > > Cheers
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to