jboss-weld

“Exception while loading the app” without a stack trace

六眼飞鱼酱① 提交于 2019-12-01 03:50:10
I'm migrating my app from GlassFish 3.0.1 to GlassFish 3.1.1. Deployment fails, with the following error messages: SEVERE: Exception while loading the app SEVERE: Exception while shutting down application container SEVERE: Exception while shutting down application container : java.lang.NullPointerException SEVERE: java.lang.RuntimeException: Error occurred during deployment: Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more details. There is no stack trace. I turned on the root logging level to FINEST, and the first SEVERE

Dynamically fire CDI event with qualifier with members

余生长醉 提交于 2019-12-01 03:24:50
问题 I'm trying to use CDI events in my backend services, on JBoss AS6 - ideally with maximum code reuse. I can see from the docs I can cut down on the qualifier annotation classes I have to create by using a qualifier with members e.g. @Qualifier @Retention(RUNTIME) @Target({METHOD, FIELD, PARAMETER, TYPE}) public @interface Type { TypeEnum value(); } I can observe this with public void onTypeAEvent(@Observes @Type(TypeEnum.TYPEA) String eventMsg) {...} So far, so good. However, to further cut

Differences between Java EE 6 CDI Implementations

瘦欲@ 提交于 2019-12-01 02:54:43
I've looked at JBoss' Weld Reference Implementation of JSR-299 Contexts and Dependency Injection, and I wanted to know how others CDI implementations compare to each other. Specifically, I know about Weld, Resin CanDI (by Caucho), and Apache OpenWebBeans. Quick overview of the protagonists: Weld is the RI (there is only one RI), version 1.0 is out, it is built into GlassFish v3 and the upcoming JBoss AS EE 6 but can also be used with other containers (with some limitations). OpenWebBeans is still under development, version 1.0.0 is planned for end of April 2010. Caucho CanDI seems to be tied

“Exception while loading the app” without a stack trace

我们两清 提交于 2019-12-01 00:54:44
问题 I'm migrating my app from GlassFish 3.0.1 to GlassFish 3.1.1. Deployment fails, with the following error messages: SEVERE: Exception while loading the app SEVERE: Exception while shutting down application container SEVERE: Exception while shutting down application container : java.lang.NullPointerException SEVERE: java.lang.RuntimeException: Error occurred during deployment: Exception while shutting down application container : java.lang.NullPointerException. Please see server.log for more

Differences between Java EE 6 CDI Implementations

我们两清 提交于 2019-11-30 23:50:05
问题 I've looked at JBoss' Weld Reference Implementation of JSR-299 Contexts and Dependency Injection, and I wanted to know how others CDI implementations compare to each other. Specifically, I know about Weld, Resin CanDI (by Caucho), and Apache OpenWebBeans. 回答1: Quick overview of the protagonists: Weld is the RI (there is only one RI), version 1.0 is out, it is built into GlassFish v3 and the upcoming JBoss AS EE 6 but can also be used with other containers (with some limitations). OpenWebBeans

CDI injection loop

三世轮回 提交于 2019-11-30 21:48:00
I'm running into a issue with CDI Injection into a Weld container in JBoss 7.1.1 I've got the following object model : @Stateless class ServiceEjb { @Inject A a; } class A { @Inject B b; } class B { @Inject A a; } When trying to inject A or B in my stateless class, injection loop and crash with a javax.enterprise.inject.CreationException. I try many thing (scoping, @Singleton on A or B but without success). I don't want to break the code, and those injections makes senses. Any clues will be greatly appreciated. Nick Circular dependency injection is not required by the CDI standard , unless at

Injecting a bean from a different Jar in Weld

我与影子孤独终老i 提交于 2019-11-30 17:15:30
I have two Jars A and B where A depends on B. Jar B has a single class: @ApplicationScoped public class MyManagedBean { private String user; public MyManagedBean(){ //Constructor necesary for CDI } @Inject public MyManagedBean(@Named("user") String user){ this.user = user; } ... } Jar A (more precisely, an EJB jar) has a bean: @ApplicationScoped public class AnotherManagedBean { public AnotherManagedBean(){ //Constructor necesary for CDI } @Inject public AnotherManagedBean(MyManagedBean bean){ ... } } And a configuration bean with a @Produces method: @ApplicationScoped public class

CDI injection loop

被刻印的时光 ゝ 提交于 2019-11-30 17:13:14
问题 I'm running into a issue with CDI Injection into a Weld container in JBoss 7.1.1 I've got the following object model : @Stateless class ServiceEjb { @Inject A a; } class A { @Inject B b; } class B { @Inject A a; } When trying to inject A or B in my stateless class, injection loop and crash with a javax.enterprise.inject.CreationException. I try many thing (scoping, @Singleton on A or B but without success). I don't want to break the code, and those injections makes senses. Any clues will be

CDI ConversationScoped long-running Bean not working

放肆的年华 提交于 2019-11-30 16:11:52
I got some problems understanding the Conversation scope of Weld or CDI. In my JSF Faclets page i call: <f:metadata> <f:event type="preRenderView" listener="#{viewBean.start}" /> </f:metadata> The bean: import javax.enterprise.context.Conversation; import javax.enterprise.context.ConversationScoped; @Named @ConversationScoped public class ViewBean implements Serializable { @Inject private Conversation conversation; public void start() { if (conversation.isTransient()) { System.out.println("START CONVERSATION"); conversation.begin(); } } Now every time I refresh my browser, a new Conversation

JSF 1.2 on Wildfly 8 Final - weld-core-jsf is still referencing JSF 2.2 API

眉间皱痕 提交于 2019-11-30 15:46:06
I'm currently migrating a JSF-1.2 app to Wildfly 8 Final and am stuck :( First of all, I've read many post with related issues (e.g. https://community.jboss.org/message/845006 or Migrate JSF 1.2 Seam app to WildFly Beta 1 ) but the proposed solution (excluding the weld subsystem) doesn't work for me. What I did: I followed the multi-jsf feature tutorial here and installed JSF 1.2 as a module for wildfly (to be exact, 3 modules). The next was that I added exclusions for javax.faces.api and com.sun.jsf-impl (main slots) as well as the corresponding dependencies to the 1.2 slots to my jboss