wildfly

How to prevent HTTP 404 during deployment of ear in Wildfly/Jboss

这一生的挚爱 提交于 2019-12-04 13:58:32
We're using WildFly 10 as our application server and deploy via Docker (deployment in WF is ordinary hotdeployment). We're not using WildFly's clustering mechanisms but simply have load-balancers (HAProxys) in front. The problem is that WF opens its HTTP port while the EAR deployment is still in progress. This (of course?) leads to HTTP 404 errors which we don't want to handle specifically in the LBs. This could lead to false negatives... Is there a way to allow HTTP connections only after the EAR has started successfully? Alternatively is it possible to replace the "404 because nothing is

Right way to export\\transfer WildFly 9 server options to other PC

僤鯓⒐⒋嵵緔 提交于 2019-12-04 13:40:48
I need to export\transfer options (such as DataSource to MySQL) to other PC\server. How to do it correctly? I had tried to copy and rename standalone.xml and run it on other PC by following command: ./standalone.sh --server-config=standalone-(full)-myProject.xml Is it right way? And next problem - how export installed module (in WildFly) for MySQL correctly? I installed it like this (as module) at my machine http://hpehl.info/jdbc-driver-setup.html I would strongly encourage you to use the jboss-cli to run this instead. Copying the files will work but I would argue that it's better to have a

Add CORS headers to response of j_security_check

喜夏-厌秋 提交于 2019-12-04 13:29:10
I'm building a REST API with jax-rs and WildFly 10 . Some of the endpoints are secured. I'm using FORM based authentication. In my javascript code, I check the response of the AJAX request, and if it is set to 401 Unauthorized , I then present a login form to the user. When he fills it in, I POST the details to j_security_check . Running on localhost this all works fine, but when the webserver and the REST server are on different machines, the browser denies the AJAX request due to cross-origin issues. I understand CORS, so I added a CORS filter to my REST server that sets CORS headers for the

Use specific keystore for JMS

浪子不回头ぞ 提交于 2019-12-04 12:51:15
We have the requirement to use SSL client certificate for a JMS connection to an IBM MQ server. I already asked a question specifically for Websphere MQ but then I learned that this is mainly the job of JSSE and can be configured via Java System Properties (e.g. -Djavax.net.ssl.keyStore=<location of keyStore> ). But since there are already active keystores for other parts of the application within our WildFly 9 AS, I'm looking for a way to enable a specific keystore just for the JMS part - can this be done? Yes it is possible for an MQ classes for JMS application to use a specific keystore and

Why is WildFly 10 + JSF 2.3 not working with Omnifaces 2.6.1?

你离开我真会死。 提交于 2019-12-04 11:57:01
I've been trying to get an app up and running using jsf 2.3, primefaces 6 and omnifaces 2.6.1 on Wildfly 10. I have already splitted the jsf 2.3 (api and impl) and completed the set up for WildFly. The applications starts smoothly without omnifaces 2.6.1. But right when I add the omnifaces jar to the application classpath (/lib) this one fails at start up, giving the next exception: 13:21:52,024 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 78) Critical error during deployment: : com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null

Multiple persistence units in Wildfly?

半城伤御伤魂 提交于 2019-12-04 10:28:39
Is it possible to have two persistence units in a Wildfly (9.0.2) application? I get "WFLYJPA0061: Persistence unitName was not specified and there are 2 persistence unit definitions in application deployment deployment "jasper-web.war". Either change the application deployment to have only one persistence unit definition or specify the unitName for each reference to a persistence unit." I have unitName specified in the @PeristenceContext annotations. I read somewhere I could disable <!-- <subsystem xmlns="urn:jboss:domain:jpa:1.1"> <jpa default-datasource="" default-extended-persistence

How do I undeploy all artifacts from WildFly?

这一生的挚爱 提交于 2019-12-04 10:07:46
I am developing a web application and deploying (with IntelliJ) to WildFly 10.1. I recently renamed my webapp module, which results in renaming my war file from foo.war to bar.war . Every time I start up, I get this error: 12:24:15,899 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."foo_war_exploded.war".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "foo_war_exploded.war" at org.jboss.as.server

Is it possible to use a datasource deployment descriptor with a driver module in Wildfly?

人盡茶涼 提交于 2019-12-04 09:51:12
I can´t configure my datasource by using a "*-ds.xml" deployment descriptor with the database driver installed as module. The datasource *-ds.xml file is only valid if I deploy the database driver directly as jar. I think that If you choose to install the driver as a module you will have to configure the datasource in the standalone.xml directly. I would like the solution driver module + deployment descriptor. eis For your module to be visible to your application, you need to import the module to your application. You need jboss-deployment-structure.xml in your WEB-INF for your application,

Datasource configuration in wildfly 10

不想你离开。 提交于 2019-12-04 09:48:52
I am trying to configure a PostgreSQL datasource in Wildfly 10 Application Server on Mac OS. I am doing what the instructions prescribe. I have created an order: /wildfly-10.1.0.Final/modules/system/layers/base/org/postgresql/main. In this order I have put the JDBC driver: postgresql-9.3-1104.jdbc4.jar and I have created a module.xml file: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.3" name="org.postgresql“> <resources> <resource-root path="postgresql-9.3-1104.jdbc4.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/>

Java EE 7 CDI - Injection doesn't work, sending NullPointerException

醉酒当歌 提交于 2019-12-04 09:31:39
I have a problem with my injection, it's the first time I try it. I'm working with Wildfly and Java EE 7. I've got a NullPointerException when trying to access Authenticator instance in LoginController . I use maven, my beans.xml is found under src/main/webapp/META-INF but I'v tried to put it in src/main/webapp/WEB-INF/classes without success. Here is my code : The class to inject : @Stateless public class Authenticator { @Inject HashGenerator hashGenerator; @Inject UserPersistance userPersistance; public boolean authenticate(final String username, final String password) { User user =