[JBoss JIRA] Created: (WELD-448) invoking sendRedirect() in a JSP causes WELD-001303
by Dan Allen (JIRA)
invoking sendRedirect() in a JSP causes WELD-001303
---------------------------------------------------
Key: WELD-448
URL: https://jira.jboss.org/jira/browse/WELD-448
Project: Weld
Issue Type: Bug
Components: Conversations
Affects Versions: 1.0.1.CR2
Reporter: Dan Allen
Fix For: 1.0.1.GA
When sendRedirect() is used inside of a JSP page, it results in the exception WELD-001303: No active contexts for scope type @ConversationScoped
A source of this error is a typical /index.jsp redirector page:
<% response.sendRedirect("home.jsf"); %>
The ConversationPropagationFilter is wrapping all requests (not just JSF requests). The conversation scope is only active during JSF requests. The problem comes when ConversationPropagationFilter traps calls to sendRedirect(). It first checks whether the conversation is transient. But this check mandates that the conversation scope be active.
ConverationPropagationFilter.java:
...
@Override
public void sendRedirect(String path) throws IOException
{
ConversationImpl conversation = conversation(ctx);
if (!conversation.isTransient())
{
...
}
super.sendRedirect(path);
}
...
ConversationImpl.java
...
public boolean isTransient()
{
checkConversationActive();
return _transient;
}
...
I don't understand why isTransient() is enforcing that a conversation be active. If it's not active, then that should be considered transient (or there needs to be a portable way of checking if it's active.
--
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-453) Disable use of Javassist ProxyFactory cache due to leaks
by David Allen (JIRA)
Disable use of Javassist ProxyFactory cache due to leaks
--------------------------------------------------------
Key: WELD-453
URL: https://jira.jboss.org/jira/browse/WELD-453
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Reporter: David Allen
Assignee: David Allen
Fix For: 1.0.2.CR1
The ProxyFactory proxy class cache is a broken concept that cannot work in Java unless a global AS service is established and all proxies are created through the service. But that would degrade performance as well.
Since Weld stores the proxy class created for each bean and decorator already, this cache is not actually used. To eliminate the classloader leaks and the heap memory leaks from this cache, it should be disabled every time before a new proxy class is created.
--
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, 11 months
[JBoss JIRA] Created: (WELD-463) Unable to inject MessageDrivenContext into a Message Driven Bean
by Ian (JIRA)
Unable to inject MessageDrivenContext into a Message Driven Bean
----------------------------------------------------------------
Key: WELD-463
URL: https://jira.jboss.org/jira/browse/WELD-463
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Environment: JBoss 6.0.0 M2 with Weld 1.0.1 Final, Windows XP SP3
Reporter: Ian
When I try to inject a MessageDrivenContext into a Message Driven Bean, I get errors as the bean is created.
The code for the Message Driven Bean is:
MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/NotificationsQueue")})
public class OptinNotificationProcessor
implements MessageListener {
@Resource
private MessageDrivenContext context;
@Inject
private Logger logger;
public void onMessage(Message message) {
etc etc
}
The problem occurs when I use the @Resource tag with the MessageDrivenContext. If I take that out, the code sort of works. But if I put it in, I get the stacktrace shown at the bottom. As an aside, the logger injection works if I remove the @Resource tag so I know injection is working.
The stacktrace is as follows:
10:05:18,673 ERROR [org.jboss.aspects.tx.TxPolicy] javax.ejb.EJBTransactionRolledbackException: java.lang.reflect.InvocationTargetException
10:05:18,673 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] Unexpected error delivering message delegator->JBossMessage[5192369433149442]:PERSISTENT, deliveryId=0: javax.ejb.EJBTransactionRolledbackException: java.lang.reflect.InvocationTargetException
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:80)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:299)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:152)
at $Proxy281.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:179)
at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_6405193.invoke(SessionAspect_z_handleRun_6405193.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:236)
at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800)
at java.lang.Thread.run(Thread.java:619)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.jboss.ejb3.interceptors.container.AbstractContainer.invokeCallback(AbstractContainer.java:262)
at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1161)
at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1170)
at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1181)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:93)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
... 34 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodLazyInterceptor.invoke(LifecycleCallbackInterceptorMethodLazyInterceptor.java:109)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_6405193.invoke(InvocationContextInterceptor_z_setup_6405193.java)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
at org.jboss.ejb3.interceptors.container.AbstractContainer.invokeCallback(AbstractContainer.java:258)
... 43 more
Caused by: java.lang.RuntimeException: Error looking up java:comp/env/package.optin.notifier.OptinNotificationProcessor/context in JNDI
at org.jboss.weld.injection.spi.helpers.AbstractResourceServices.resolveResource(AbstractResourceServices.java:51)
at org.jboss.weld.util.Beans.injectEEFields(Beans.java:755)
at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:121)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
at org.jboss.weld.integration.ejb.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:97)
... 55 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is java.lang.NullPointerException]]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.weld.injection.spi.helpers.AbstractResourceServices.resolveResource(AbstractResourceServices.java:47)
... 60 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.NullPointerException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350)
... 65 more
Caused by: java.lang.NullPointerException
at org.jboss.ejb3.EJBContextFactory.getObjectInstance(EJBContextFactory.java:57)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1483)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1500)
... 70 more
--
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, 11 months
[JBoss JIRA] Created: (CDITCK-119) Documentation issues
by Jozef Hartinger (JIRA)
Documentation issues
--------------------
Key: CDITCK-119
URL: https://jira.jboss.org/jira/browse/CDITCK-119
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation
Affects Versions: 1.0.1.GA
Reporter: Jozef Hartinger
Despite the fact that CDITCK-54 has been closed, some of issues reported there are still present in the CDI-TCK 1.0.1 documentation
- JBoss Test Harness version 1.0.0 - should be 1.1.0-CR5
- TestNG 5.9 - it is actually 5.10
- Part III - a reference to JBoss Test Harness documentation is missing - there is a "TODO" placeholder
- in-container-execution.png is not displayed in the section 10.1. Negotiating the execution of an in-container test
- Table "12.1. Weld JBoss TCK Runner Dependencies" is outdated and should perhaps be removed
- statement "You can find all of these artifacts in the JBoss Maven repository." is not true since they are published to sonatype
- section 2.4 references legacy https://jira.jboss.org/jira/browse/WBTCK instead of https://jira.jboss.org/jira/browse/CDITCK
- update JBoss AS version globally (JBoss AS 5.2 is mentioned somewhere while JBoss AS 6.0.0.M1 somewhere else)
--
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, 11 months