[JBoss JIRA] Created: (WELD-818) Interceptors won't work on base beans if there's at least double inheritance
by Tomasz Szymanski (JIRA)
Interceptors won't work on base beans if there's at least double inheritance
----------------------------------------------------------------------------
Key: WELD-818
URL: https://issues.jboss.org/browse/WELD-818
Project: Weld
Issue Type: Bug
Components: Interceptors and Decorators
Affects Versions: 1.1.0.CR3, 1.1.0.CR4
Environment: Mac OS X 10.6.5, Java SUN 1.6.0_22, mvn version 3.0.1
Reporter: Tomasz Szymanski
Imagine you have an abstract BaseBean that is extended by abstract MiddleBean that is extended by the ImplementingBean.
ImplementingBean is annotated with @Interceptable that is an Interceptor binding for TestInterceptor. Now calling any of the methods from any of those classes on an ImplementingBean should invoke the interceptor.
The result is that the methods from MiddleBean and ImplementingBean are intercepted, while methods from BaseBean are not (!). If the BaseBean calls any method from either MiddleBean or ImplementingBean the call *will* get intercepted.
If there's only one inheritance, it will work well. For 2 and more, only the parent of ImplementingBean gets intercepted.
Please check the attached arquillian test.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (WELD-839) weld-servlet
by Ara Minosian (JIRA)
weld-servlet
------------
Key: WELD-839
URL: https://issues.jboss.org/browse/WELD-839
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.1.0.Final
Environment: Windows 7 64, GAE, java version "1.6.0_23" 64, JSF 2.0.3
Reporter: Ara Minosian
Weld-servlet 1.0.1. works fine. I try to find common issue without success. I investigated examples but saw only JSF 1.2 support. I post to forum without any answer, so decided that problem exists.
25.01.2011 21:58:20 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
25.01.2011 21:58:20 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed G:\ideaworkspace\ideal\agost\target\agost-1.0\WEB-INF/appengine-web.xml
25.01.2011 21:58:20 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed G:\ideaworkspace\ideal\agost\target\agost-1.0\WEB-INF/web.xml
25.01.2011 21:58:20 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
25.01.2011 21:58:22 org.jboss.weld.bootstrap.WeldBootstrap <clinit>
INFO: WELD-000900 1.1.0 (Final)
25.01.2011 21:58:22 org.jboss.weld.environment.servlet.Listener contextInitialized
WARNING: @Resource injection not available in simple beans
25.01.2011 21:58:22 org.jboss.weld.bootstrap.WeldBootstrap startContainer
INFO: WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
25.01.2011 21:58:23 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@2d189c{/,G:\ideaworkspace\ideal\agost\target\agost-1.0}: java.lang.NoClassDefFoundError: org/apache/catalina/core/ApplicationContextFacade
25.01.2011 21:58:23 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler@1bfa3d3: java.lang.NoClassDefFoundError: org/apache/catalina/core/ApplicationContextFacade
25.01.2011 21:58:23 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error starting handlers
java.lang.NoClassDefFoundError: org/apache/catalina/core/ApplicationContextFacade
at org.jboss.weld.environment.tomcat.WeldForwardingAnnotationProcessor.getStandardContext(WeldForwardingAnnotationProcessor.java:92)
at org.jboss.weld.environment.tomcat.WeldForwardingAnnotationProcessor.replaceAnnotationProcessor(WeldForwardingAnnotationProcessor.java:69)
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:192)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:149)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.core.ApplicationContextFacade
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 21 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (WELD-729) Servlet / listener / filter injection support for Jetty 7 and up
by Dan Allen (JIRA)
Servlet / listener / filter injection support for Jetty 7 and up
----------------------------------------------------------------
Key: WELD-729
URL: https://jira.jboss.org/browse/WELD-729
Project: Weld
Issue Type: Feature Request
Components: Servlet Container Support
Affects Versions: 1.1.0.Beta1
Reporter: Dan Allen
Fix For: 1.1.0.Beta2
Jetty changed it's packaging in version 7 when it moved to the Eclipse runtimes project. Therefore, the following required class check only works in earlier versions of Jetty.
private static final String JETTY_REQUIRED_CLASS_NAME = "org.mortbay.jetty.servlet.ServletHandler";
boolean jetty = true;
try
{
Reflections.classForName(JETTY_REQUIRED_CLASS_NAME);
}
catch (IllegalArgumentException e)
{
jetty = false;
}
A second check should be performed for the class org.eclipse.jetty.servlet.ServletHandler.
But then we have the issue that the WeldServletHandler extends a class only in Jetty 6. So we'll likely need a special classifier for weld-servlet that runs on jetty 7 and above.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (WELD-783) @EJB injection fails in @Named bean when interceptor is present
by Alexander Hanschke (JIRA)
@EJB injection fails in @Named bean when interceptor is present
---------------------------------------------------------------
Key: WELD-783
URL: https://jira.jboss.org/browse/WELD-783
Project: Weld
Issue Type: Bug
Components: CDI API, Interceptors and Decorators
Affects Versions: 1.0.1.Final
Environment: Windows 7, NetBeans 6.9.1, GlassFish 3.0.1, Mojarra 2.0.2 (FCS b10), Java 1.6.0_22
Reporter: Alexander Hanschke
I have a @Named bean in which I'd like to inject a component, using @Inject as well as a stateless session bean, using @EJB. The ejb is accessed using the no-interface view. Both references get injected properly in that case, but when I use an interceptor on one of the methods, only the references annotated with @Inject get injected, whereas those annotated with @EJB don't.
The interceptor doesn't need to do anything special, this behaviour occurs even if only proceed() is invoked on the invocation context - the interceptor is always invoked correctly.
The following snippet explains the issue:
@Named
public class MyController {
@EJB
private SomeDao dao;
@Interceptors(MyInterceptor.class)
public void control() {
dao.doDataAccessStuff(); /* NPE */
}
}
---------------------------------------------------------------
@Stateless
public class MyDao {
public void doDataAccessStuff() { ... }
}
---------------------------------------------------------------
public class MyInterceptor {
@AroundInvoke
public Object intercept(InvocationContext context) throws Exception {
return context.proceed();
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (WELD-856) Unable to deploy Weld application on AIX
by Mike Finkenzeller (JIRA)
Unable to deploy Weld application on AIX
----------------------------------------
Key: WELD-856
URL: https://issues.jboss.org/browse/WELD-856
Project: Weld
Issue Type: Bug
Components: Bootstrap and Metamodel API
Affects Versions: 1.1.0.Final
Environment: AIX 6.1
IBM JDK 1.6.0 (build pap3260sr9-20101125_01 (SR9))
JBoss 6.0.0.Final
Reporter: Mike Finkenzeller
Deployment of any Weld application fails on AIX. The same application can be deployed on Windows, MACOSX, Linux (tested on Redhat), etc. Seems to be some sort of a classloader issue.
2011-02-14 14:49:04,760 TRACE [org.jboss.classloader.spi.base.BaseClassLoader] (Thread-7) BaseClassLoader@376a376a{bootstrap-classloader:0.0.0$MODULE} class not found sun.reflect.GeneratedMethodAccessor124
2011-02-14 14:49:04,739 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (Thread-7) Error installing to Start: name=vfs:///usr/local/SOA/jboss/server/prelude/deploy/prelude-soa-rest-api.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deployers$resteasy$deployer"-Built-in-UserTransaction_$$_WeldProxy
at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:285) [:6.0.0.Final]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Created: (WELD-873) Injections not working for certain bean methods
by Nicklas Karlsson (JIRA)
Injections not working for certain bean methods
-----------------------------------------------
Key: WELD-873
URL: https://issues.jboss.org/browse/WELD-873
Project: Weld
Issue Type: Bug
Reporter: Nicklas Karlsson
Given a class
@RequestScoped
@Named
public class Foo implements Map<String, ResourceBundle>, Serializable
{
@Inject
BeanManager beanManager;
public int size()
{
// TODO Auto-generated method stub
return 0;
}
public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}
public boolean containsKey(Object key)
{
// TODO Auto-generated method stub
return false;
}
public boolean containsValue(Object value)
{
// TODO Auto-generated method stub
return false;
}
public ResourceBundle get(Object key)
{
if (beanManager == null)
{
throw new NullPointerException();
}
return null;
}
public ResourceBundle put(String key, ResourceBundle value)
{
// TODO Auto-generated method stub
return null;
}
public ResourceBundle remove(Object key)
{
// TODO Auto-generated method stub
return null;
}
public void putAll(Map<? extends String, ? extends ResourceBundle> m)
{
// TODO Auto-generated method stub
}
public void clear()
{
// TODO Auto-generated method stub
}
public Set<String> keySet()
{
// TODO Auto-generated method stub
return null;
}
public Collection<ResourceBundle> values()
{
// TODO Auto-generated method stub
return null;
}
public Set<java.util.Map.Entry<String, ResourceBundle>> entrySet()
{
// TODO Auto-generated method stub
return null;
}
}
The following test fails
@RunWith(Arquillian.class)
public class StrangeTest
{
@Inject
Foo foo;
@Deployment
public static Archive<?> deploy()
{
return ShrinkWrap.create(BeanArchive.class).addClass(Foo.class);
}
@Test
public void testAccess()
{
Assert.assertNull(foo.get("bleh"));
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months