[JBoss JIRA] Created: (WELD-748) Incorrect DefinitionException fired for @Produces @Dependent WildCard<?> method() when bootstrapping.
by Lincoln Baxter III (JIRA)
Incorrect DefinitionException fired for @Produces @Dependent WildCard<?> method() when bootstrapping.
-----------------------------------------------------------------------------------------------------
Key: WELD-748
URL: https://jira.jboss.org/browse/WELD-748
Project: Weld
Issue Type: Bug
Reporter: Lincoln Baxter III
In: org.jboss.weld.bean.AbstractProducerBean
The "else if" conditional also needs to check for "!Dependent.class.equals(getScope())"
for (Type type : getWeldAnnotated().getActualTypeArguments())
{
if (!Dependent.class.equals(getScope()) && type instanceof TypeVariable<?>)
{
throw new DefinitionException(PRODUCER_METHOD_WITH_TYPE_VARIABLE_RETURN_TYPE_MUST_BE_DEPENDENT, getWeldAnnotated());
}
else if (type instanceof WildcardType)
{
throw new DefinitionException(PRODUCER_METHOD_WITH_WILDCARD_RETURN_TYPE_MUST_BE_DEPENDENT, getWeldAnnotated());
}
}
-------------------------SOURCE
public class ResourceProducer
{
@Produces
@Current
@Dependent
public Resource<?> getCurrentResource(InjectionPoint ip, Shell shell, BeanManager manager)
{
//...
}
-------------------------EXCEPTION
org.jboss.arquillian.impl.event.FiredEventException: org.jboss.weld.exceptions.DefinitionException: WELD-000098 A producer method with a parameterized return type with a wildcard must be declared @Dependent scoped. Method [method] @Produces @Current @Dependent public org.jboss.seam.forge.shell.project.resources.ResourceProducer.getCurrentResource(InjectionPoint, Shell, BeanManager)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:68)
at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:96)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:162)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000098 A producer method with a parameterized return type with a wildcard must be declared @Dependent scoped. Method [method] @Produces @Current @Dependent public org.jboss.seam.forge.shell.project.resources.ResourceProducer.getCurrentResource(InjectionPoint, Shell, BeanManager)
at org.jboss.weld.bean.AbstractProducerBean.checkProducerReturnType(AbstractProducerBean.java:186)
at org.jboss.weld.bean.AbstractProducerBean.initialize(AbstractProducerBean.java:200)
at org.jboss.weld.bean.ProducerMethod.initialize(ProducerMethod.java:120)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:110)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:189)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:412)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockLifecycle.beginApplication(MockLifecycle.java:87)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.startContainer(TestContainer.java:264)
at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.deploy(WeldEEMockContainer.java:81)
at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)
at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:50)
at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
... 15 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
[JBoss JIRA] Created: (WELD-659) hello-world example - unexpected behavior
by Jozef Hartinger (JIRA)
hello-world example - unexpected behavior
-----------------------------------------
Key: WELD-659
URL: https://jira.jboss.org/browse/WELD-659
Project: Weld
Issue Type: Bug
Components: Examples
Affects Versions: 1.1.0.Beta1
Reporter: Jozef Hartinger
Priority: Minor
Fix For: 1.1.0.Beta2
According to documentation, the example should print "Hello ${name}" where name is an environment property passed to maven i.e. "mvn -Drun -Dname=Pete". However, the following profile configuration
<configuration>
<mainClass>org.jboss.weld.environment.se.StartMain</mainClass>
<arguments>
<argument>${project.name}</argument>
</arguments>
</configuration>
results in "Hello Weld Examples: Hello World (Java SE)" to be printed every time independently on the name environment property.
--
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-587) Exception happened when invalid session before ending Conversation with Post-Redirect-Get
by Wang Liyu (JIRA)
Exception happened when invalid session before ending Conversation with Post-Redirect-Get
-----------------------------------------------------------------------------------------
Key: WELD-587
URL: https://jira.jboss.org/browse/WELD-587
Project: Weld
Issue Type: Bug
Components: Conversations, Scopes & Contexts
Affects Versions: 1.0.1.Final
Environment: Weld-servlet 1.0.1.Final, GlassFish3.0.1 or Tomcat6.0.26
Reporter: Wang Liyu
See http://seamframework.org/Community/ExceptionWhenEndingConversationWithPos... for the test case.
basically, when you call HttpSession.invalidate() method with a LRC running, after redirect, it will report an exception:
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: HelloWorld was constructed
INFO: begin the LRC here.
INFO: about to invalid the session here.
WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
org.jboss.weld.context.NonexistentConversationException: WELD-000301 Could not restore long-running conversation 2 because id not known
at org.jboss.weld.conversation.AbstractConversationManager.beginOrRestoreConversation(AbstractConversationManager.java:107)
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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:113)
at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
at org.jboss.weld.conversation.ServletConversationManager_$$_javassist_3.beginOrRestoreConversation(ServletConversationManager_$$_javassist_3.java)
at org.jboss.weld.jsf.WeldPhaseListener.initiateSessionAndConversation(WeldPhaseListener.java:171)
at org.jboss.weld.jsf.WeldPhaseListener.beforeRestoreView(WeldPhaseListener.java:118)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:87)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
--
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: (WELDSE-23) Disable logging out of the box
by Peter Royle (JIRA)
Disable logging out of the box
------------------------------
Key: WELDSE-23
URL: https://jira.jboss.org/jira/browse/WELDSE-23
Project: Weld support for Java SE
Issue Type: Feature Request
Affects Versions: 1.0.1.Final
Reporter: Peter Royle
Assignee: Peter Royle
Priority: Minor
Fix For: 1.0.2.CR1
The presence of SLF4J-simple within the Weld SE jar causes problems for those wanting to use a different SLF4J provider (eg: jdk14).
This comment from Ceki points to a good solution, using SLF4J 1.6:
Ceki Gulcu - 23/Apr/10 04:17 AM
As of SLF4J version 1.6.0, if no binding is found on the class path, then slf4j-api will default to a no-operation implementation discarding all log requests. Thus, instead of throwing an exception, SLF4J will emit a single warning message about the absence of a binding and proceed to discard all log requests without further protest. If Weld's distribution includes slf4j-api.jar but no binding, then even in the absence of any SLF4J binding on the class path, Weld's distribution will still work out-of-the-box, and without requiring the end-user to download a binding from SLF4J's web-site. Only when the end-user wishes to enable logging will she need to install a binding.
The problem with this currently is that version 1.6 is still alpha, so resolution of this issue will have to wait until version 1.6 is released as stable, and becomes available in the JBoss maven repositories:
--
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
14 years, 1 month
[JBoss JIRA] Created: (WELD-478) Tomcat dependencies are incomplete in documentation
by Hontvári József (JIRA)
Tomcat dependencies are incomplete in documentation
---------------------------------------------------
Key: WELD-478
URL: https://jira.jboss.org/jira/browse/WELD-478
Project: Weld
Issue Type: Bug
Components: Documentation
Affects Versions: 1.0.1.Final
Reporter: Hontvári József
In section 18.3. there is a list of dependencies for servlet containers. This is incomplete, it does not list all dependecies and it also does not specify their versions. After tracking some NoClassDefFoundError, here are some additional jars:
-jsr299-api.jar is listed but this does not exist in Weld 1.0.1.Final distribution. Likely this is cdi-api.jar from the artifacts/cdi directory.
-weld-logging.jar is listed, but I cannot find such jar. Likely this entry is obsolete.
-cal10n-api-0.7.2.jar
-javax.inject-1.jar
-jboss-interceptor-1.0.0-CR11.jar
-jboss-interceptor-api-1.1.jar
-slf4j-ext-1.5.10.jar
After adding these jars Weld starts with the web application but org.jboss.weld.environment.servlet.Listener throws a com.google.common.collect.ComputationException: java.lang.reflect.GenericSignatureFormatError. I tries to follow the maven configuration, but without success, I can only guess that I included the wrong version of one of the jars.
--
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
14 years, 1 month