[JBoss JIRA] (WELD-1032) Lifecycle stacktrace in the exception message: What's causing is my bean being created too early?
by Geoffrey De Smet (Created) (JIRA)
Lifecycle stacktrace in the exception message: What's causing is my bean being created too early?
-------------------------------------------------------------------------------------------------
Key: WELD-1032
URL: https://issues.jboss.org/browse/WELD-1032
Project: Weld
Issue Type: Feature Request
Reporter: Geoffrey De Smet
When not using (C)DI, you can easily see when a component is created too early by looking at the stacktrace:
{code}
"database username is null"
at ConnectionManager.createConnection()
at DogDao.createInstance()
at DogDao.getInstance()
at PersonDao.createInstance()
at PersonDao.getInstance()
at PersonService.createInstance()
at PersonService.getInstance()
at Main.beforeDatabaseUsernameIsAsked()
{code}
Clearly, beforeDatabaseUsernameIsAsked() has the problem: it shouldn't call PersonService.getInstance().
However, turn this code into (C)DI and you get something like this stacktrace:
{code}
"database username is null"
at ConnectionManager.createConnection()
at java.reflect....
at org.jboss.weld...
at org.jboss.arquillian...
{code}
Now, it's not clear any more that Main.beforeDatabaseUsernameIsAsked() is the problem, isn't it?
There is absolutely no mention of Main.
And then it is a challenge to find out what's causing the lifecycle to behave differently that you expected
and how the lifecycle is actually behaving now.
It would be nice if the exception message contains something like
{code}
"database username is null"
during creation of ConnectionManager
for DogDao
for PersonDao
for PersonService
for Main
at ConnectionManager.createConnection()
....
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (WELDX-38) ConversationScoped not working on Tomcat
by Fabio Wang (JIRA)
ConversationScoped not working on Tomcat
----------------------------------------
Key: WELDX-38
URL: https://jira.jboss.org/jira/browse/WELDX-38
Project: Weld Extensions
Issue Type: Bug
Components: Servlet Containers
Affects Versions: Servlet Containers 1.0.0.CR1
Environment: Apache Tomcat 6.0.20
Reporter: Fabio Wang
Trying to mark a conversation as long-running causes an exception (java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject) when the ServletConversationManager tries to get a proxy for the httpSession.
The ProxyFactory.classLoaderProvider ends up resolving the classloader to an instance of org.apache.catalina.loader.StandardClassLoader (which doesn't know the javassist lib, since it's only in the app classloader).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (WELD-840) Weld 1.1 breaks compatibility with groovy objects
by Jeff Howard (JIRA)
Weld 1.1 breaks compatibility with groovy objects
-------------------------------------------------
Key: WELD-840
URL: https://issues.jboss.org/browse/WELD-840
Project: Weld
Issue Type: Bug
Components: Proxies
Affects Versions: 1.1.0.Final
Environment: Groovy 1.7.6, tomcat 6, weld 1.1, JSF 2 (mojarra 2.0.3)
Reporter: Jeff Howard
Weld created proxies need to know how to work with groovy objects. Currently, weld is attempting to proxy the methods from the groovy.lang.GroovyObject interface which is confusing the groovy runtime. Groovy objects have a per-class metaclass that is getting used with the wrong class instances.
Also, weld is using hyphen characters in the generated proxy class names, which breaks groovy's dynamic invoke mechanism.
The referenced forum thread contains a patch that addresses the groovy incompatabilities in weld's ProxyFactory.java
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (WELD-893) Injection Exception classes not found
by Fernando Mato Mira (JIRA)
Injection Exception classes not found
-------------------------------------
Key: WELD-893
URL: https://issues.jboss.org/browse/WELD-893
Project: Weld
Issue Type: Bug
Environment: JBoss AS 6.0.0.Final, JBoss AS 6.1.0-SNAPSHOT
Reporter: Fernando Mato Mira
When trying to implement Seam @ViewConfig, this subsytem tries to raise an exception whose class cannot be found.
16:02:06,710 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seamproto].[Faces Servlet]] "Servlet.service()" pour la servlet Faces Servlet a généré une exception: java.lang.NoClassDefFoundError: org/jboss/weld/injection/Exceptions
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:214) [:6.0.0.Final]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:270) [:6.0.0.Final]
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) [:6.0.0.Final]
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222) [:6.0.0.Final]
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:611) [:6.0.0.Final]
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:604) [:6.0.0.Final]
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:598) [:6.0.0.Final]
at org.jboss.seam.faces.event.SeamPreNavigationHandler.handleNavigation(SeamPreNavigationHandler.java:47) [:3.0.1.Final]
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:126) [:2.0.3-]
at javax.faces.component.UICommand.broadcast(UICommand.java:311) [:2.0.3-]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781) [:2.0.3-]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246) [:2.0.3-]
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77) [:2.0.3-]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0_16]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (WELD-908) Random NPE while serializing bean sent
by Yannick Menager (JIRA)
Random NPE while serializing bean sent
---------------------------------------
Key: WELD-908
URL: https://issues.jboss.org/browse/WELD-908
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.0.Final
Environment: Glassfish 3.1
Reporter: Yannick Menager
The problem happens randomly (like 50% of the time), when calling an EJB through it's remote interface, and passing a Session scoped object as an argument, resulting in an NPE:
java.lang.NullPointerException
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1088)
at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:397)
at org.jboss.weld.bean.proxy.util.SerializableProxy.writeObject(SerializableProxy.java:92)
at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:646)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:612)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:196)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:235)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:216)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:180)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:852)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:837)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:962)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:976)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:521)
at com.sun.corba.ee.impl.corba.TCUtility.marshalIn(TCUtility.java:157)
at com.sun.corba.ee.impl.corba.AnyImpl.write_value(AnyImpl.java:627)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_any(CDROutputStream_1_0.java:627)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_any(CDROutputObject.java:489)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:366)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.write_Array(ValueHandlerImpl.java:499)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:233)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:216)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:180)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.callWriteValue(CDROutputStream_1_0.java:852)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeArray(CDROutputStream_1_0.java:768)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:949)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:976)
at com.sun.corba.ee.impl.encoding.CDROutputObject.write_value(CDROutputObject.java:521)
at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:76)
at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:65)
at com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:69)
at com.sun.corba.ee.impl.orbutil.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:59)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:771)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObjects(Util.java:742)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyArguments(DynamicMethodMarshallerImpl.java:439)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:227)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
------------------------------------------
import java.io.Serializable;
public class TestObj implements Serializable{
private String val;
public TestObj() {
}
public TestObj(String val) {
this.val = val;
}
public String getVal() {
return val;
}
public void setVal(String val) {
this.val = val;
}
}
------------------------------------------
@RequestScoped
@Named("test")
public class TestWeb {
@EJB
private RemoteService remoteService;
@Inject
private TestObj testObj;
@Produces
@SessionScoped
public TestObj create() {
return new TestObj("ads");
}
public String getVal() {
return remoteService.test(testObj);
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (WELD-944) Improve error message for missing interceptor's class.
by Ondrej Zizka (JIRA)
Improve error message for missing interceptor's class.
------------------------------------------------------
Key: WELD-944
URL: https://issues.jboss.org/browse/WELD-944
Project: Weld
Issue Type: Enhancement
Reporter: Ondrej Zizka
Based on WELD-940:
When an interceptor or decorator is defined in beans.xml, but the class is missing, current error message is a bit misleading:
{quote}
WELD-001417 Enabled interceptor class <class>org.jboss.weld.environment.se.jpa.JpaTransactionInterceptor</class> in jar:file:/mnt/ssd1/data/.m2/repository/org/jboss/jawabot/JawaBot-core/2.0.0-SNAPSHOT/JawaBot-core-2.0.0-SNAPSHOT.jar!/META-INF/beans.xml@11 is neither annotated @Interceptor nor registered through a portable extension
at org.jboss.weld.bootstrap.Validator.validateEnabledInterceptorClasses(Validator.java:466)
{quote}
Maybe we should check whether the class is loaded, and if not, log WARN or ERROR about it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months