[ 
https://issues.apache.org/jira/browse/DELTASPIKE-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Struberg reopened DELTASPIKE-380:
--------------------------------------

      Assignee: Mark Struberg  (was: Gerhard Petracek)

we need to add javassist to the @Deployment for some containers. Otherwise 
quite a few tests fail.
                
> NPE in PartialBeanLifecycle if javassist not on classpath
> ---------------------------------------------------------
>
>                 Key: DELTASPIKE-380
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-380
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: PartialBean
>    Affects Versions: 0.4
>            Reporter: Jozef Hartinger
>            Assignee: Mark Struberg
>             Fix For: 0.5
>
>
> I am getting 
> java.lang.NullPointerException
>         at 
> org.apache.deltaspike.partialbean.impl.PartialBeanLifecycle.<init>(PartialBeanLifecycle.java:73)
>         at 
> org.apache.deltaspike.partialbean.impl.PartialBeanBindingExtension.createPartialBean(PartialBeanBindingExtension.java:142)
>         at 
> org.apache.deltaspike.partialbean.impl.PartialBeanBindingExtension.createBeans(PartialBeanBindingExtension.java:109)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at 
> org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)
>         at 
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:274)
>         at 
> org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:121)
>         at 
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:261)
>         at 
> org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:240)
>         at 
> org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:171)
>         at 
> org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:130)
>         at 
> org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:104)
>         at 
> org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:63)
>         at 
> org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:35)
>         at 
> org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:58)
>         at 
> org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:516)
>         at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
>         at 
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1974)
>         at 
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1907)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> when javassist is not on the classpath. The corresponding code is:
> Object proxyFactory = 
> ClassUtils.tryToInstantiateClassForName("javassist.util.proxy.ProxyFactory");
>                 Method setSuperclassMethod = 
> proxyFactory.getClass().getDeclaredMethod("setSuperclass", Class.class);
> proxyFactory is null when javassist is not on classpath.
> Also note that tests for partial beans do not bundle javassist within the 
> test archive which they should! Otherwise those tests won't pass on a 
> container that does not implicitly add javassist to the classpath (e.g. 
> WildFly).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to