You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Jozef Hartinger (JIRA)" <ji...@apache.org> on 2013/06/12 20:12:20 UTC

[jira] [Reopened] (DELTASPIKE-380) NPE in PartialBeanLifecycle if javassist not on classpath

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

Jozef Hartinger reopened DELTASPIKE-380:
----------------------------------------


It may be available to the test itself but is not part of the tested web archive and therefore not available to the tested container in the incontainer mode.

https://git-wip-us.apache.org/repos/asf?p=deltaspike.git;a=blob;f=deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc003/PartialBeanAsAbstractClassWithInterceptorTest.java;h=40fadde3313eb4c8ba0cab0511719d3c5abbddd7;hb=HEAD
                
> 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
>
> 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