[JBoss JIRA] Created: (WELD-752) Registering an interceptor in beans.xml from a Jar;
by Robson Saraiva Ximenes (JIRA)
Registering an interceptor in beans.xml from a Jar;
---------------------------------------------------
Key: WELD-752
URL: https://jira.jboss.org/browse/WELD-752
Project: Weld
Issue Type: Bug
Components: Bootstrap and Metamodel API, CDI API
Affects Versions: 1.1.0.Beta2
Environment: Ubuntu, Weld-servlet and Weld-SE
Reporter: Robson Saraiva Ximenes
Fix For: 1.1.0.Beta2
I have a jar with an Interception class registered in META/INF/beans.xml;
My web app has this jar into classpath, but when I deploy some problems show up.
1 - Registering the interceptor inside the JAR/META-INF/beans.xml: notthing happend and the interceptor is not registered
2 - Registering the interceptor in WEB-INF/META-INF/beans.xml: throws an exception duplicated exception
I believe that the best way is to merge all beans.xml and give a way of programmatically resolve any conflict;
P.S: It works for Weld-se but not to Weld-servlet!
--
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
14 years, 1 month
[JBoss JIRA] Created: (WELD-773) BeansXmlParser doesn't close beans.xml file InputStream
by Sivakumar Thyagarajan (JIRA)
BeansXmlParser doesn't close beans.xml file InputStream
-------------------------------------------------------
Key: WELD-773
URL: https://jira.jboss.org/browse/WELD-773
Project: Weld
Issue Type: Bug
Components: Resolution (Typesafe and by Name)
Affects Versions: 1.1.0.Beta2
Reporter: Sivakumar Thyagarajan
Priority: Minor
The stream opened for parsing beans.xml is not closed expliciltly in a finally block in BeansXmlParser.java
Here is the relevant trace:
at java.net.URL.openStream(URL.java:1010)
at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:80)
at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:122)
at org.jboss.weld.bootstrap.WeldBootstrap.parse(WeldBootstrap.java:509)
at org.glassfish.weld.BeanDeploymentArchiveImpl.getBeansXml(BeanDeploymentArchiveImpl.java:180)
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:103)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:184)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:155)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:286)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:161)
GlassFish throws a WARNING in the server log when such scenarios happens (ie a stream is left unclosed after use, and the application classloader goes out of scope or is finalized) [1]. So it would be nice if we could fix this in Weld 1.1.
[1] [#|2010-12-02T22:36:25.313+0530|WARNING|glassfish3.1|javax.enterprise.system.core.classloading.com.sun.enterprise.loader|_ThreadID=132;_ThreadName=admin-thread-pool-4848(5);|Input stream has been finalized or forced closed without being explicitly closed; stream instantiation reported in following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader$SentinelInputStream.<init>(ASURLClassLoader.java:1230)
at com.sun.enterprise.loader.ASURLClassLoader$InternalJarURLConnection.getInputStream(ASURLClassLoader.java:1338)
at java.net.URL.openStream(URL.java:1010)
at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:80)
at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:122)
at org.jboss.weld.bootstrap.WeldBootstrap.parse(WeldBootstrap.java:509)
at org.glassfish.weld.BeanDeploymentArchiveImpl.getBeansXml(BeanDeploymentArchiveImpl.java:180)
at org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:103)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:184)
at org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:155)
at org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:286)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:161)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:266)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:369)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1079)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1257)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1246)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:449)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:216)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
|#]
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] Created: (WELD-549) Conversation propagated by default with h:link
by David Beaumont (JIRA)
Conversation propagated by default with h:link
----------------------------------------------
Key: WELD-549
URL: https://jira.jboss.org/browse/WELD-549
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.0.1.Final
Environment: GlassFish Server Open Source Edition 3.0.1 on Mac OS 10.6 and Windows 7. WELD-000900 1.0.1 (SP2)
Reporter: David Beaumont
Attachments: CdiConvoBug.war
I created a long running conversation by running a method on a conversation scoped bean:
private boolean initialized;
public void init() {
if(initialized) return;
conversation.begin();
initialized = true;
}
>From a facelets page using the JSF2 event system:
<f:metadata>
<f:event type="preRenderView" listener="#{convoBean.init}" />
</f:metadata>
If a conversation has been made long-running, the h:link tag will produce links with the conversation query parameter, thereby propagating the conversation whether that was what you wanted or not.
I.e:
<p>Link: <h:link outcome="page2.xhtml" value="a link" /></p>
produces
<p>Link: <a href="/CdiConvoBug/page2.jsf?cid=3">a link</a></p>
--
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
14 years, 1 month
[JBoss JIRA] Created: (WELD-777) package org.jboss.arquillian.container.weld.ee.embedded_1_1.mock does not exist
by sreekanth manga (JIRA)
package org.jboss.arquillian.container.weld.ee.embedded_1_1.mock does not exist
-------------------------------------------------------------------------------
Key: WELD-777
URL: https://jira.jboss.org/browse/WELD-777
Project: Weld
Issue Type: Bug
Components: Testing Infrastructure (Mocks and Harness Integration)
Environment: glassfish 3.1 , linux, weld
Reporter: sreekanth manga
Hi ,
I am cloning the repository from http://github.com/weld/core.git.
After getting a local copy , I am trying to run the tests located at core/tests-arquillian with glassfish-remote profile, I am seeing this compilation issues:
INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 785 source files to /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[16,63] package org.jboss.arquillian.container.weld.ee.embedded_1_1.mock does not exist
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[80,44] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[36,6] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[36,36] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[61,6] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
[ERROR] /space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[61,36] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
[INFO] 6 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[16,63] package org.jboss.arquillian.container.weld.ee.embedded_1_1.mock does not exist
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[80,44] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[36,6] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[36,36] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[61,6] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
/space/hudson/.hudson/jobs/Tests-Arquillian-RemoteGlassfish/workspace/coreworkspace/core/tests-arquillian/src/test/java/org/jboss/weld/tests/threadlocal/ThreadLocalTestCase.java:[61,36] cannot find symbol
symbol : class TestContainer
location: class org.jboss.weld.tests.threadlocal.ThreadLocalTestCase
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 1 month
[JBoss JIRA] Created: (WELD-733) Better error message for @ManagedBean annotated Beans that do not have a no-arg constructor
by Sivakumar Thyagarajan (JIRA)
Better error message for @ManagedBean annotated Beans that do not have a no-arg constructor
-------------------------------------------------------------------------------------------
Key: WELD-733
URL: https://jira.jboss.org/browse/WELD-733
Project: Weld
Issue Type: Feature Request
Components: Class Beans (Managed and Session)
Reporter: Sivakumar Thyagarajan
If we have an @ManagedBean annotated class that does not have a no-arg constructor, and is CDI-enabled(for instance has an interceptor binding annotation assigned to one of its methods), Weld proxy creation fails with an InstantiationException(see below) because of the missing no-arg ctor. It would be nice if Weld detects this case better and provides a better error message. I have filed a GlassFish issue (GlassFish issue 14076) for us to fail deployment, but Weld's handling of this issue would help GlassFish and other containers.
Caused by: org.jboss.weld.exceptions.DeploymentException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:600)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:256)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:338)
at org.jboss.weld.context.DependentContext.get(DependentContext.java:62)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:660)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:734)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:757)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:840)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:852)
at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:122)
at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:50)
at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:227)
at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:181)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:478)
at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:428)
at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:300)
... 28 more
Caused by: org.jboss.weld.exceptions.DefinitionException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:223)
at org.jboss.weld.bean.ManagedBean.applyInterceptors(ManagedBean.java:594)
... 46 more
Caused by: java.lang.InstantiationException: test.beans.org$jboss$weld$bean-$export$work$workspaces$gfv3$v3$distributions$glassfish$target$glassfish3$glassfish$domains$domain1$applications$cdi-simple-managed-bean-interceptor-web$-ManagedBean-class_test$beans$TestManagedBean_$$_WeldProxy
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:396)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:216)
at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:391)
at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:218)
... 47 more
|#]
--
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
14 years, 1 month