java-ee

“JBAS016069: Error injecting persistence unit into CDI managed bean.” When deploying WAR with dependency to EJB-JAR

放肆的年华 提交于 2020-01-03 17:42:53
问题 I have the following setup: EJB-JAR: Contains some entities and DAOs. Holds the persistence.xml for the EntityManager used in the DAOs. Test-WAR: Contains a servlet that injects one of the DAOs of the EJB-JAR (either using @Inject or @EJB). The Problem: I am currently deploying the applications to Wildfly 8.x When I deploy the jar with a singleton that is started after deployment, I'm able to use the DAOs as intended. I'm getting results from the DB ... But when I try to deploy the war with a

Return @Async method result in Spring MVC and return it to Ajax client - continuation

别等时光非礼了梦想. 提交于 2020-01-03 17:28:39
问题 This is continuation of this question: Return @Async method result in Spring MVC and return it to Ajax client I have @Async task which calculates something and return it to the Future the calculation happens on the request and might take up to 15 minutes. I don't want to create new Ajax request every few seconds to check whether calculation is done and I don't want to keep my connection Open for up to 15 minutes till result is calculated. What might be the best solution for Spring MVC in such

web.xml Versioning

随声附和 提交于 2020-01-03 15:15:14
问题 I am building a web application in Eclipse and get a version issue in web.xml : <web-app version="2.4" xmlns="java.sun.com/xml/ns/javaee" xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:schemaLocation="java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> The error is: cvc-enumeration-valid: Value '2.4' is not facet-valid with respect to enumeration '[2.5]'. It must be a value from the enumeration. The project facet shows version 2.4 for both the Dynamic Web Module and the

java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO jboss EAP 6

狂风中的少年 提交于 2020-01-03 13:57:03
问题 We are using the JBoss EAP 6; Everything works well till production environment. But Post deployment in production, we are getting the below error: java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO The error happening in one of the servlet where we are creating the Captcha. This is the line where this error is happening : ImageIO.write(bufferedImage, "png", baos); Here is the stack trace for the Error : Server:server-three] Caused by: java.lang

How to send MMS with MM7 using Java?

微笑、不失礼 提交于 2020-01-03 13:41:08
问题 Please let me know is there any way to send MMS using MM7 protocol in Java? If there is a free API to generate the appropriate SOAP message please let me know it too. I'm in a dead end situation and I really need a way to do this. Your wise suggestions are also welcome. Thank in advance. 回答1: The MMS Soap should look like this: 3GPP MM7 SOAP Spesicifation. Here is how I'm doing it: You will need activation.jar, saaj-api.jar, activation.jar, and saaj-impl.jar (and any other dependent jar files

How to send MMS with MM7 using Java?

丶灬走出姿态 提交于 2020-01-03 13:41:08
问题 Please let me know is there any way to send MMS using MM7 protocol in Java? If there is a free API to generate the appropriate SOAP message please let me know it too. I'm in a dead end situation and I really need a way to do this. Your wise suggestions are also welcome. Thank in advance. 回答1: The MMS Soap should look like this: 3GPP MM7 SOAP Spesicifation. Here is how I'm doing it: You will need activation.jar, saaj-api.jar, activation.jar, and saaj-impl.jar (and any other dependent jar files

Generate XML mapping of a recursive directory search

↘锁芯ラ 提交于 2020-01-03 13:09:55
问题 I am reading a list that has a large number of archives under certain components. e.g. component1:filelocation1/a11.ear component1:filelocation1/a12.ear component2:filelocation2/a2.ear component3:filelocation3/a3.ear component4:filelocation3/basefile.properties I need to unzip each archive recursively till the last level of data and generate an XML mapping file capturing the correct mapping from the component to the last element in the archive. The xml document structure of which would be

EJB on Wildfly calling remote EJB from another Wildfly

◇◆丶佛笑我妖孽 提交于 2020-01-03 11:46:24
问题 my current problem in general is, that i have two Wildfly 8.2.0Final instances running on my machine. I know, there are similar questions, but none of them really help with my problem. One of them holds a restful application that triggers a stateless session bean SenderBean when it receives a GET. Afterwards, this stateless session bean should invoke a method from a remote stateless session bean PrintBean , which is located on the other wildfly instance. I'll start of by explaining what i

EJB on Wildfly calling remote EJB from another Wildfly

倖福魔咒の 提交于 2020-01-03 11:46:07
问题 my current problem in general is, that i have two Wildfly 8.2.0Final instances running on my machine. I know, there are similar questions, but none of them really help with my problem. One of them holds a restful application that triggers a stateless session bean SenderBean when it receives a GET. Afterwards, this stateless session bean should invoke a method from a remote stateless session bean PrintBean , which is located on the other wildfly instance. I'll start of by explaining what i

How do I combine @Asynchronous and Weld/CDI Events and @Observes(during=TransactionPhase.AFTER_COMPLETION) in Glassfish 3.1

谁说胖子不能爱 提交于 2020-01-03 11:30:08
问题 First of all let me state, that the following code example worked just fine in GF 3.0.1. The troubles started when we switched to GF 3.1. I'm using a method @Asynchronous public void executeFlowStep( @Observes(during=TransactionPhase.AFTER_COMPLETION) ExecuteFlowStepEvent executeFlowStepEvent) { Since the switch, whenever this should receive an ExecuteFlowStepEvent I get the following error message: WELD-000401 Failure while notifying an observer of event [package].ExecuteFlowStepEvent No