deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Ament" <john.d.am...@gmail.com>
Subject Re: Problem with TestRunner CdiTestRunner needing myfaces on path
Date Sun, 17 Aug 2014 16:58:01 GMT
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 <karl.kilden@gmail.com> 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 <john.d.ament@gmail.com> 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 <karl.kilden@gmail.com>
> > 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 <john.d.ament@gmail.com> 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 <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.<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
> > > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message