weld

The calling class org.jboss.resteasy.cdi.CdiInjectorFactory is placed in multiple bean archives

天大地大妈咪最大 提交于 2019-12-13 06:31:09
问题 This question was asked before on stackoverflow but, was not appearing as the main question of the post. It was a secondary question. That's why I asked it on a new discussion. The aim is to have a better answer rate. I asked stackoverflow an advice before posting this question I try to run a deployment of an app with jetty 9.4.8. It is an angular java maven multi module app Here is my web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi=

Embedded JAX-RS CDI (Undertow, RestEasy & Weld)

只愿长相守 提交于 2019-12-13 03:46:22
问题 I've been trying in the last couple of days to setup an embedded Undertow server, with JAX-RS, using RestEasy, and CDI using weld. No matter what I do, nothing seems to work. I've read through every possible answer, and demo available I could find; Nothing worked! The JAX-RS resource: @Path("/") @Produces(MediaType.TEXT_PLAIN) @RequestScoped public class EchoResource { @Inject @Named("upperCase") private UpperCaseTextProcessing upperCaseTextProcessing; @Inject @Named("lowerCase") private

Jersey + Spring deployment failure on Glassfish : CDI issue

限于喜欢 提交于 2019-12-13 02:38:23
问题 I'm tryng to setup a Glassfish + Spring configuration. Please find below the relevant part of my pom : <dependencyManagement> <dependencies> <dependency> <groupId>org.glassfish.jersey</groupId> <artifactId>jersey-bom</artifactId> <version>${jersey.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-servlet</artifactId> <scope

Weld is not injecting

安稳与你 提交于 2019-12-12 15:03:52
问题 I'm trying to set up a very simple implementation of weld in java SE. I have the extension class: public class MyExtension implements Extension { void beforeBeanDiscovery(@Observes BeforeBeanDiscovery bbd) { System.out.println("Starting scan..."); } <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> annotatedType, BeanManager beanManager) { System.out.println("Scanning type: " + annotatedType.getAnnotatedType().getJavaClass().getName()); } void afterBeanDiscovery(@Observes

Spring dependency injection with WildFly

落花浮王杯 提交于 2019-12-12 14:14:28
问题 I have a web application (war file) that depends (Maven) on another project (jar file) that uses Spring for dependency injection. So in that other project I have a couple of xml files to declare my beans, in my case business objects. I started using WildFly instead of Tomcat/Jetty and apparently there is that thing called Weld in charge of DI. My web app doesn't use Spring (for now), it's just a simple Jersey RESTful API. I want my business objects to be injectable (@Inject) in my resources

PAX-CDI: how to get reference to BeanManager in bundle without using CDI

谁都会走 提交于 2019-12-12 01:57:32
问题 There is a bundle A and threre is a class MyClass in bundle A. And we suppose that pax-cdi+weld is on. Can can I get reference to BeanManager of the bundle A inside MyClass without using @Inject and other CDI annotations? Via osgi service? Or how? 回答1: You can look up the CdiContainer OSGi service and invoke getBeanManager() . With recent versions of Pax CDI CDI.current().getBeanManager() should work as well. Having said that, the whole idea of Pax CDI is to make CDI work in OSGi just like in

Apache felix and org.osgi for weld cdi - constraint violation

♀尐吖头ヾ 提交于 2019-12-12 01:25:08
问题 I want to do the following solution:Apache Felix + Weld for Java SE. For that I want to run one of examples from weld archive - weld-osgi-paint. For now I have the following bunle list: cdi-api.jar ops4j-base-lang-1.5.0.jar pax-swissbox-core-1.8.0.jar weld-osgi-paint-core.jar org.apache.felix.scr-1.8.2.jar pax-swissbox-lifecycle-1.8.0.jar weld-osgi-paint-square.jar javax.annotation-api-1.2.jar org.apache.servicemix.bundles.javax-inject-1_2.jar pax-swissbox-tracker-1.8.0.jar weld-osgi-paint

Wildfly 14 CDI: WELD-001408 on 3rd part JAR after migration from JBoss 7

跟風遠走 提交于 2019-12-11 18:28:54
问题 We are migrating a few old systems written in Java 5, 6 and 7 to Java 8 and from JBoss 7 to Wildfly 14. After the migration, I get all the time this kind of error: WELD-001408: Unsatisfied dependencies for type InterfaceTypeConverterProvider with qualifiers @Named I understand that from CDI 1.2 things changed and the @Inject don't work as it used to be and it need some refactoring. I got many errors like this, some of them are classes in my own project that try to Inject other classes also

WELD-001409: Ambiguous dependencies for type StepContext with qualifiers @Default

橙三吉。 提交于 2019-12-11 17:30:02
问题 I am trying to run this example in java SE mode from my windows command prompt. I have built a jar with all dependencies included in it and running it from my command prompt. but, keep getting this error. From this answer, i understand that there could be multiple StepContext classes in my runtime classpath. i now replaced the maven-assembly plugin with the maven-shade plugin to build my fat jar and i can see the following warning while packaging the jar [WARNING] javax.inject-1.jar, weld-se

How to merge records together

限于喜欢 提交于 2019-12-11 15:07:45
问题 i am able to update the database so for each section a user saves it saves there work fine, in the correct column of the database, but what i am now trying to achieve is instead of saving into a new row, check there studentNumber and if it already has a record in the table (which it will have to to get this far ) update the columns to that record rather than starting a new one how can i do that ? currently this is my code : this is the u.i. where they select the value and press submit <p