FAQ Database Discussion Community


Separating client and server side deployments JavaEE & Website dev

maven,java-ee,wildfly
I need to deploy 2 packages to Wildfly: 1. EAR file - containing all server side (JavaEE) code. 2. WAR file - containing website code (HTML,JS,CSS...). In order for the website path to be something like localhost:8080/somename/index.html, I need to specify <finalName>somename</finalName> in Maven. On the other hand, the EAR...

Set system properties in standalone-full.xml in wildfly 8.2

jboss,jboss7.x,wildfly,wildfly-8
I have added system-properties tag in standalone-full.xml but its not working in standalone mode. But if I add the same tag in domain.xml its working for domain mode. <?xml version='1.0' encoding='UTF-8'?> <server xmlns="urn:jboss:domain:2.2"> <extensions> .... </extensions> <system-properties> <property name="java.util.Arrays.useLegacyMergeSort" value="true"/> </system-properties> </server> In this article https://docs.jboss.org/author/display/WFLY8/General+configuration+concepts Its written...

Parameters from f:param not submitted with AJAX request when form enctype is multipart/form-data

ajax,jsf,jsf-2,jsf-2.2,wildfly
I'm running Wildfly 8.2 and I'm using the JSF version bundled with it, 2.2.8-jbossorg-1. I have the following facelet: <h:form enctype="multipart/form-data"> <h:commandButton value="Submit"> <f:param name="myparam" value="true"/> <f:ajax execute="@this" render="@this"/> </h:commandButton> </h:form> When I press the submit button, several parameters are submitted, but not myparam. If I remove enctype="multipart/form-data" from the...

How does Wildfly know that a number of files need to be deleted if the “max-backup-index” attribute has been configured?

java,xml,oop,logging,wildfly
In order to implement this issue, i.e., max-backup-index feature for periodic-rotating-file-handler I am trying to understand how the max-backup-index attribute works in the size-rotating-file-handler. Attempts Wildfly reads the xml configuration: <size-rotating-file-handler name="FILE" autoflush="true"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <rotate-size...

Wildfly server:Partial Content and Range Requests

http,jboss,jboss7.x,wildfly,wildfly-8
Is there a way for wildfly server support http range header? We are requesting file for server with http get and http header "Range: bytes 200-400" The files that served from apache tomcat server responds http status code 206 and partial file content but wildfly server responds same request with...

How to see the CLI generated by Wildfly web interface

jboss7.x,wildfly
Using Wildfly, I want to use the CLI to execute common tasks with a script. Usually, I use the web interface and I know how it works. Let's say I want to create a datasource with the web interface. Is there a way to look at a generated CLI, so...

Wildfly - “Connector 'netty' not found on the main configuration file”

java,eclipse,jboss,netty,wildfly
I've added a connection factory at the standalone-full file of Wildfly: <jms-connection-factories> <connection-factory name="K19Factory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="K19Factory"/> <entry name="java:jboss/exported/jms/K19Factory"/> </entries> </connection-factory> ... </jms-connection-factories> And I have the following code to use it: Properties props = new Properties();...

Cannot find org.wildfly.swarm.bootstrap.Main when launching fatjar built by wildfly-swarm-plugin:1.0.0.Alpha1

java,wildfly
I've checked out https://github.com/arun-gupta/wildfly-samples/tree/master/swarm by Arun Gupta, but when trying to launch the built jar I get Error: Could not find or load main class org.wildfly.swarm.bootstrap.Main. \wildfly-samples-master\swarm>mvn clean install [INFO] --- wildfly-swarm-plugin:1.0.0.Alpha1:create (default) @ swarm --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ swarm --- [INFO] Installing \wildfly-samples-master\swarm\target\swarm-1.0-SNAPSHOT.war to...

Cannot Retry a Request Which Hasn't Previously Been Completed

wildfly
I had to copy some existing beans and their remote interfaces within an existing working application. Now whenever I call one of the methods, I get the following exception: java.lang.IllegalStateException: EJBCLIENT000032: Cannot retry a request which hasn't previously been completed at org.jboss.ejb.client.EJBClientInvocationContext.retryRequest(EJBClientInvocationContext.java:203) at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:256) at...

Profile management in Wildfly

wildfly
The domain.xml file is huge, with large <profile> sections. Each <profile> section has a lot in common. Is it possible to split it something more modular ? My guess is no because the server has to rewrite the whole domain.xml file at any change, and because I've never read anything...

WildFly deploy failed : missing jboss.naming.context.java.jboss.PostgreSql

java,maven,jboss,wildfly,wildfly-8
I am new in Jboss/Wildfly. I created simple EAR application in Eclipse using Maven archetype: http://mvnrepository.com/artifact/org.wildfly.archetype/wildfly-javaee7-webapp-ear-blank-archetype/8.2.0.Final My standalone.xml -http://wklej.to/fhzg8 I am using WildFly 8.2 I have two files: + Przychodnia-ds.xml + presistence.xml Przychodnia-ds.xml: <?xml version="1.0" encoding="UTF-8"?> <!-- This is an unmanaged datasource. It should be used for proofs of concept...

Restricting access to particular URL for sesame server deployed on JBoss (WildFly 8.2)

jboss,wildfly,sesame
I have a sesame server running deployed in a WildFly 8.2.0 final container. How can I restrict access to some particular URLs? I know I have to edit some XML files (deployment descriptor and some other files) but I don't know which files and where to find them....

Remote JMS communication works, EJB communication fails

ejb,jms,wildfly,java-ee-7
I'm currently introducing myself into Java EE, especially into how to use EJB and JMS. The Issue in a Nutshell I have a local client and a remote server in the internet. JMS communication works fine, EJB communication doesn't. Either communication succeeds in my local network. The Issue in More...

PicketLink protection stops JSF 2.2 resource contract from being loaded

jsf-2,jsf-2.2,wildfly,picketlink,resource-contracts
I have a JSF 2.2 webapp with a contract and several pages, located directly in the WebContent folder. The contract consists of an image, a template file template.xhtml and a css file global.css. So far everything is working as expected. Now I want to use PicketLink for user authentication and...

Embedded Message Driven Resource Adapter fails to deploy

jboss,wildfly,ear,wildfly-8,jca
I have been struggling to get an example of a Message driven (inbound) resource adapter to deploy and interact with an EAR on Wildfly 8.2.0. I used this Java EE 7 JCA sample as the basis of my application. I can see in the log files that the Resource Adapter...

Persistence.xml overridden in Arquillian tests

java,java-ee,integration-testing,wildfly,jboss-arquillian
Arquillian examples mainly show how to construct WarArchive, JavaArchive, etc. I can't find any good example how to override one of jar files which exists in already compile war file. The reason is that one of the jars contains persistence.xml which I wan't to override to defined for instance hbm2ddl.auto...

Wildfly and Process controller

jboss,wildfly,administration
I see here and there the term of process controller in Jboss articles, but I can't find any description of it in the official documentation. Search in the documentation : no trace old documentation : some trace question in Stack : seems important So the question is : what is...

Keycloak logging with log4j to use custom rolling appender

logging,log4j,wildfly,keycloak
I'm trying to use Log4J for keycloak project as logging framework since there are custom rolling appenders we have written with few value additions. I was referring to changing logging subsystem in wildfly (keycloak embbeded server - keycloak/standalone/configuration/standalone.xml ), but seems like I'm missing something. How can I add a...

Adding SMTP log handler in Wildly 8.1

log4j,wildfly,wildfly-8,jboss-logging
I have been through lot of WildFly documentation in past day and so fat I have failed to understand how a SMTP Handler could be added to WildFly logging sybsystem. This was very easy when JBoss used log4j but now there are hardly any documentation available. Places I have already...

How to configure WildFly 8.2 to use AccessLogHandler

jboss,wildfly
I have found that there is a handler io.undertow.server.handlers.accesslog.AccessLogHandler that can log http access. However I am not able to configure it so it will produce any log messages. Here is a code snippet from my standalone.xml: <filter class-name="io.undertow.server.handlers.accesslog.AccessLogHandler" name="access-log-handler" module="io.undertow.core"> <param name="formatString" value="common"/> <param name="accessLogReceiver" value="io.undertow.server.handlers.accesslog.JBossLoggingAccessLogReceiver"/>...

How implement LDAP login in wildfly web app

java-ee,authentication,ldap,wildfly
How to implement LDAP authentication in a Java EE WildFly app? Are there any examples? I'm new to Java EE and need to write an app using LDAP and I'm stuck. I read a book about developing in WildFly but there was no information about LDAP there. ...

JBoss Wildfly - Authentication of Web App against LDAP

authentication,ldap,jboss7.x,jsf-2.2,wildfly
I have a security domain defined in jboss-web.xml as below <jboss-web> <security-domain>java:/jaas/my_ldap_security_domain</security-domain> <disable-audit>true</disable-audit> </jboss-web> I also have defined inside my standalone.xml <subsystem xmlns="urn:jboss:domain:security:1.2"> <security-domains> <security-domain name="my_ldap_security_domain" cache-type="default"> <authentication> <login-module code="LdapExtended" flag="sufficient"> <module-option...

Java external property on Wildfly

java,properties,jboss,wildfly
Actually, I have this code to get a folder with properties Properties props=System.getProperties(); String path = props.getProperty("jym.classpath"); And the "jym.classpath" is defined on Apache Tomcat console -> Java -> Java Options, like: -Djym.classpath=C:\JAVA_SYS\props\jym\props I want to do the same on a JBoss Wildfly 8.2, without doing it on my code,...

Database connections not closed after idle-timeout in wildfly Datasource

java,datasource,wildfly,wildfly-8
I have an application running under wildfly 8.1 The database connections used in the applications are taken from a Datasource defined in standalone.xml file. Problem: I don't know why but the Connection from the Pool never goes Idle and are released. Eventually the Pool gets filled will all active Connection...

Generate keycloak user setting page URL

java-ee,wildfly,keycloak
I know the user setting page is: https://DOMAIN:PORT/auth/realms/REALM/account/?referrer=APPLICATION Is there anyway to generate this URL on a servlet without hard-coding server DOMAIN and the other parameters (Getting these parameters from keycloak.json or from application server by any provided API)?...

Register new undertow SessionManager

java,wildfly,wildfly-8,session-management,undertow
I have wildfly 8.1 server running. I have my own SessionManager implementing io.undertow.server.session.SessionManager. And i want to configure the system to use my session manager. Where and how should i configure/add new settings for my session manager?...

wildfly docker image authentication issue

jboss,docker,wildfly,dockerfile
I've followed the instructions on the following link: WildFly Docker image in the section Extending the image However, after I make the build, when I go to the URL http://localhost:9990, I have the following message: The management interface could not be loaded. Authentication required. ...

Enable Https blocking http wildfly 8.2 (i.e without using security-constraint in web.xml)

xml,wildfly,jboss6.x,wildfly-8
Migrate Jboss6 to WildFly8.2 Working on https keystone connection in wildlfy8.2. After configuring my application on standalone-full.xml conf using http://blog.eisele.net/2015/01/ssl-with-wildfly-8-and-undertow.html. I was able to access both http and https on my application i have to access https alone blocking http. After adding security-constraint inside web.xml i was able to redirect...

How to map JSON with nullable array properties to POJO using WildFly RestEasy

json,java-ee,resteasy,wildfly,pojo
I have JSON { "name": "volo", "friends": ["joe", "alex"] } and Java POJO class Person { private String name; private Set<String> friends; //constructor, getters, setters } POST method: @POST @Consumes("application/json") public Response createPerson(Person person) { //logic } This is work nice when POST or PUT request are coming and JSON...

org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.module.auth.auth.ValidatorFactory is already

java,hibernate,jboss,wildfly
I'm getting below errors with Wildfly 8.2 trying to run standalone.sh: And with Hibernate Validator: 16:18:14,731 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.1.3.Final 16:18:14,798 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."auth-server.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."auth-server.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of...

Spring Security Kerberos chained with basic

java,spring,jboss,spring-security,wildfly
I have a hopefully quick question about Spring Security. I am looking for a solution to integrate security into our application which provides SSO but HTTP basic as well. One of the automated pieces of our system can only support basic authentication and we are pretty locked into it. Currently...

immutant failing to add a cache to a web cache container

caching,clojure,wildfly,immutant
I have a heimdallr application that is deployed via wildfly. In this application I am using the cache functionality that is provided by the namespace immutant.caching. The first time I deploy the application everything goes fine without error. If I attempt to redeploy the application I get the following error:...

Wildfly mysql with SSL

mysql,ssl,wildfly
I have a web app using a mysql database as its data store. It is currently running in Glassfish and talking to that mysql database with SSL. I am thinking about migrating to Wildfly but I can't seem to create a Wildfly datasource that will talk to the mysql database...

How to hunt down obscure HA clustering bug in Wildfly 8.2.0.Final

rest,session,cluster-computing,wildfly,weld
The setup I have a Wildfly 8.2.0.Final application server running a cluster in domain mode using the full-ha profile. The cluster consists of two instances of wildfly, master and slave, each running on its own virtual machine. The application My project is deployed as a war-file on the application server....

HTTP Handler and Resteasy Deployment with undertow and resteasy

resteasy,wildfly,undertow
I am trying to run both HTTPServer and also the REST Handler. Only one works at a time not able to make it work both at same time. I need to serve html pages and also the api. here is my code. public class HttpServer { private final UndertowJaxrsServer server...

Right way to configure the log in Wildfly 8.2

java,logging,jboss,wildfly,wildfly-8
I have confusion in setting up the log in Wildfly-8.2.0. Initially I had used my own logging system, with log4j.xml built into the WAR file, all worked very well. But, when I make any changes to the log configuration I need to redeploy the app to make the changes effect....

JBoss7/WildFly webapp - how to access properties file from class

java,file,properties,jboss,wildfly
I try to load webapp project's settings from own config.properties file, but there's no success: the file not found. I can't use ServletContext method, because i've access the file from ordinary class. file = Config.class.getClassLoader().getResourceAsStream("/config.properties"); - it's returns null. I've tried to put the file to WEB-INF and resources folders,...

Mysql version 5.6 jar version 5.1

mysql,jdbc,jar,version,wildfly
I have current MySQL version 5.6.22 x64 installed. Can I user a v5.1 connector jar? - Im not finding the 5.6 connector jar. Is there any? The purpose is to configure my Wildfly server with it. My OS is a Windows 8.1 x64bits...

Log4j external file loading - multiple war

java,log4j,war,wildfly
i have multiple web applications (multiple war) in one instance of wildfly. Each web application read its log4j.properties file called webapp1.log4j.properties stored in WILDFLY_HOME/standalone/configuration directory when start with servlet called by: <servlet> <servlet-name>LoadPropertiesServlet</servlet-name> <display-name>LoadPropertiesServlet</display-name> <servlet-class>it.h2h.smart.identity.servlet.LoadPropertiesServlet</servlet-class>...

HornetQ using JNDI / remoting when used with WildFly 8.1 cluster

cluster-computing,jndi,wildfly,hibernate-search,hornetq
Previously 2 JBoss 6 servers (master & slave) were started with 2 different IP addresses (127.0.0.1 and 127.0.0.2) and those 2 server instances were run in domain mode. The instances used HornetQ to communicate index jobs for Hibernate Search. I'm trying to create a similar configuration using Wildfly instead of...

How to set node name in WildFly-8.2.0 domain mode

wildfly,wildfly-8
I can set this in standalone mode by using -Djboss.node.name=nodeA. I wonder, how can this be set for each node managed in domain mode? I found that there is a small change in the node name when it is in domain mode compared to standalone mode. In standalone mode it...

Deploying Immutant to WildFly with several contexts

jboss,clojure,wildfly,undertow,immutant
I have an Undertow web server with Immutant (Clojure), my main- looks like this: (run (-> routes/app wrap-something-app-specific wrap-params) (options {:path "/" :port 8080})) (run (-> routes/billing wrap-something-billing-specific) (options {:path "/billing" :port 8081 :worker-threads 4})) When running not in a WildFly countainer, it works just fine: localhost:8080/ maps to app...

How to obtain JBoss Server Group Name programatically when deployed to a domain

java-ee,jboss7.x,wildfly,jboss-eap-6
How can I obtain the jboss eap 6.x / wildfly server group name programmatically from within a java enterprise application deployed to a domain? Some of the other jboss values such as node name can be obtained via system property values but server-group-name does not appear to be exposed this...

Is it possible to configure JBoss/Wildfly datasources to use changing client credentials?

dynamic,jboss,credentials,wildfly
I know it is not the usual way. We are using an existing Oracle DB with many stored procedures. The Procedures are using variables USER in many ways. Also the licensing does not allow to use "functional" User logins, each user must use his own account. The the question came...

JBoss WildFly FIPS 140-2 compliance on CentOS

wildfly,fips,nss
I have an existing application that is being migrated to JBoss WildFly 8.1.0 and will be deployed in CentOS. One of the requirements we have is to have the applications be FIPS 140-2 compliant. I understand that we have to go through independent provider to get the certification but wanted...

Maven web project does not start

java,eclipse,maven,wildfly,wildfly-8
After converting eclipse web project to maven web project it was not resolve some dependensies. Description Resource Path Location Type Missing artifact org.infinispan:infinispan-core:jar:4.2.1.FINAL pom.xml /Visual Expressions line 2 Maven Dependency Problem Description Resource Path Location Type Missing artifact xalan:xalan:jar:2.7.1.jbossorg-2 pom.xml /Visual Expressions line 2 Maven Dependency Problem Then I put...

With trailing slash in URL , jsp show source code

wildfly,wildfly-8
we have application deployed over wildfly 8.1 . All works fine for jsps , but whenever I put a slash , browser shows source code of jsp. This is an issue from security. Can I handle this at wildfly or undertow configuration level . For example : localhost:8080/TaskManager/login.jsp/ - show...

Wildfly 8.2 fails scanning entities inside WEB-INF/lib/*.jar directory. Is this the expected behavior?

hibernate,java-ee,wildfly,wildfly-8
I was deploying a war that contained the entities inside the WEB-INF/classes directory, but now I moved those entities to a separate proyect/module and now the entities reside inside WEB-INF/lib/*.jar After the change wildfly failed to scan the entities producing errors while deploying. I then tried adding <class>class.inside.webinf.lib.Entity1</class> tags inside...

Wildfly 8.2 + JSF + SessionScoped : sometimes wrong data returned

jsf,session,cdi,wildfly,jboss-weld
In one of our systems in production we encounter a very weird problem in jboss 8.2 and latest JDK 7, centos 7 64 bits, latest primefaces on javax.enterprise.context.SessionScoped beans. (No jsf annotations are used in the whole project, only CDI annotation to avoid potential conflicts) At some point in time...

Wildfly Custom auth-method

authentication,wildfly
How do you add a custom authenticator in Wildfly? I used to do this in JBoss 4.2: In <JBoss>\jboss-as\server\production\deploy\jboss-web.deployer\META-INF\jboss-service.xml, add the following in : <java:property> <java:key>MY-CUSTOM-AUTH</java:key> <java:value>com.test.MyCustomAuthenticator</java:value> </java:property> In <JBoss>\jboss-as\server\production\deploy\jboss-portal-ha.sar\portal-server.war\WEB-INF\web.xml, modify : ... <login-config>...

Wildfly Kafka clients module javax/management/JMException not found

java-ee,jboss,wildfly,kafka
I'm try to create Kafka clients module for Wildfly. Here is module.xml: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.apache.kafka.clients"> <resources> <resource-root path="kafka-clients-0.8.2.0.jar"/> <resource-root path="lz4-1.2.0.jar"/> <resource-root path="snappy-java-1.1.1.6.jar"/> </resources> <dependencies> <module name="org.slf4j"/> </dependencies> </module> Wildfly (8.2.0-Final) gives this error on boot:...

User wildfly does not exist

linux,wildfly,wildfly-8
I am trying to run wildfly-init-debian.sh to run wildfly on starup but when I run the file it gives "user wildfly does not exist..." error. How can I define this user?...

How to set external folders in classpath through command line while starting wildfly server

jboss,classpath,jboss7.x,wildfly,wildfly-8
I want to set external folders in classpath through command line while starting wildfly server. Unable to set it through -p standalone.sh -p path of folder ...

WildFly context forwarding

jboss,wildfly
Default installation of WildFly has only root context specified - for welcome pages <subsystem xmlns="urn:jboss:domain:undertow:1.2" instance-id="main"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server>...

How to configure Jackson in Wildfly?

java,rest,jackson,jax-rs,wildfly
I've got a Session Bean with the folling method: @POST @Consumes("application/x-www-form-urlencoded") @Path("/calculate") @Produces("application/json") public CalculationResult calculate(@FormParam("childProfile") String childProfile, @FormParam("parentProfile") String parentProfile) { ... } The returned CalculationResult cannot be mapped to JSON and the following exception occurs: Caused by: com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class com.test.UniqueName and no properties discovered...

Deploying an EJB .jar to jBoss/WildFly from Eclipse

eclipse,maven,java-ee,jboss,wildfly
I am new to Java EE. I use Eclipse, jBoss/WildFly and Maven. I have a multi module Maven project: parent Maven project (pom) web application (war) EJB project (jar) Currently, the EJB jar project is packaged inside the web application and the entire solution is deployed as one war file....

How convert GlassFish connection pool and GlassFish realm to WildFly container?

java,jsf,glassfish,wildfly
I have an application developed to GlassFish container. In my searches I saw how create a connection pool in WildFly, but, how about data base configurations in the glassfish-resources.xml? How can I adapt this file to use with WildFly? And about glassFish-web.xml, with the realm configuration? How can I convert...

Possible to detect when application starts successfully in Wildfly?

jboss,wildfly,wildfly-8
Is there a way to detect when a war file is successfully loaded by Wildfly and cause some code to execute?

Modifying Wildfly logging configuration on application deploy

logging,jboss,wildfly
I'm using Wildfly 9 and I want to have a separate log file for my application. I also want to use Wildfly Administation Console's Log viewer to view this log file. It also would be great if each node's apllication logs will be available from Wildfly domain controller, like it's...

Wildfly - Infinispan Transactions configuration

java,transactions,ejb,wildfly,infinispan
I am using Wildfly 8.2 with its included Infinispan (6.0.2) and I am trying to cache all values from some Oracle database table in an Infispan cache. In most cases, it seems to work, but sometimes it does not. When accessing the cache.values() (which also may not be a good...

How to monitor Wildfly with Nagios?

linux,wildfly,nagios
I've read that it's possible to monitor Wildfly with Nagios in links like this one and I also know that there are solutions that provide that service as well. Does anybody knows how to do that, how to monitor Wildfly with Nagios, any recommendations on how to start? Any reference...

postgres database with wildfly in eclipse

hibernate,postgresql,java-ee,jpa,wildfly
i’m having troubles to set up a database connection in my Dynamic Web Project, using Eclipse. I added a datasource to Wildfly, so the standalone.xml looks like this: <datasource jta="true" jndi-name="java:jboss/datasources/weathermonitor" pool-name="weathermonitor" enabled="true" use-ccm="true"> <connection-url>jdbc:postgresql://localhost:5432/weathermonitor</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>postgres</driver> <security>...

Websocket (java ee) how to get role of current user

security,java-ee,websocket,wildfly
I just added a Websocket endpoint to my java ee jax-rs application. Within Jax-Rs endpoints i can access the role of the user via SecurityContext. But within websocket i can't inject context stuff. So how to know the role of the user that tries to open a websocket session?...

Wildfly 8.0.0.Final + EntityManager + PostgreSQL - idle in transaction

java,hibernate,postgresql,wildfly,entitymanager
I have the following code running on Wildfly 8.0.0.Final: @Stateful public class MyJPABean<T> { @PersistenceContext(unitName = "myUnitName") private EntityManager em; @TransactionAttribute(TransactionAttributeType.REQUIRED) public void write(T entity) { em.persist(entity); em.flush(); } @TransactionAttribute(TransactionAttributeType.REQUIRED) public void update(T entity) { em.merge(entity); } } Both write and update methods are called parallely, because they are called...

JPA error: expecting IdClass mapping

hibernate,jpa,wildfly
i hava a @MappedSuperclass VoBusinessObject which contains the id and version ` @MappedSuperclass @javax.persistence.TableGenerator(name = "VoBusinessObjectIdGenerator", table = "UidTable", pkColumnName = "object", valueColumnName = "nextHiValueColumn", pkColumnValue = "object", allocationSize = 10) public class VoBusinessObject @Id @GeneratedValue(strategy = GenerationType.TABLE) public Integer getId() { return this.id; } @Version @Column(name = "version", nullable...

Wildfly migration from 8.2 to 9 CR1

java,wildfly,ejb-2.x
I'm trying to migrate our project from Wildfly 8.2 to 9, and using version 9.0.0 CR1. One of the problems I faced is with old EJB2 code. While in 8.2 everything works fine, in 9 I get ERROR [org.jboss.as.ejb3.invocation] (MSC service thread 1-2) WFLYEJB0034: EJB Invocation failed on component MetadataInstanceFacade...

Integrate OSGi with WildFly-8.2.0.Final

jboss,osgi,wildfly,wildfly-8
I would like to know the steps to integrate OSGi with WildFly-8.2.0.Final. I have followed https://docs.jboss.org/author/display/JBOSGI/Getting+Started?_sscc=t but it is for older version and thrown exceptions on startup. Please share if you ave any idea. Thanks!...

JMS Message Persistence in Wildfly 8.0 server

java,jboss7.x,message,wildfly,persistent-storage
How can i achieve message Persistence in the case of JMS in Wildfly server or Jboss 7.1.1 final? Can i persist the messsgaes in database using any Wildfly provided services? Any help would be appreciated, I am working on JBoss 5 to Wildlfy Migration where i have this requirement....

Why do the JBoss/wildfly BOMs not contain all of the provided modules?

jboss,dependencies,pom.xml,wildfly,wildfly-8
Wildfly 8.x ships with BOMs for easy dependency management: https://github.com/wildfly/boms These are useful for the module-based classloading described here: https://docs.jboss.org/author/display/WFLY8/Implicit+module+dependencies+for+deployments However, when I look in $JBOSS_HOME\modules\system\layers\base, I see many, many more included modules. For example, dozens of org.apache modules like commons-lang, etc. are included. These deps are also not in...

“Traditional” threads cannot lookup JNDI names in WildFly

java-ee,jndi,wildfly,java-ee-7,managedthreadfactory
I'm migrating an old application (uses no beans or dependency injection) from Weblogic to WildFly. For the most part, it now works fine. However, it also creates threads in "traditional way" (new Thread()), and these threads cannot lookup JNDI names, meaning database and mailing is not available to them. It...

Why is my EntityManager not properly injected?

jpa,ejb,wildfly,entitymanager
I tried to build a project with manages Employees using JPA and Beans and JSF. I started trying to manipulated an existing user which I manually created in the database. (before I tried to read the data from the database, this worked well) I tried this in various ways, by...

Multithreading transactions hanging during persisting entity to postgresql via wildfly

java,hibernate,transactions,ejb,wildfly
I've got a bean definition with an entityManager like this: @Stateless public class JPABean<T> { private static final Logger LOG = Logger.getLogger(JPABean.class); @PersistenceContext(unitName = "myPersistanceSettings") private EntityManager em; public void write(T o) { LOG.info("PERSISTING"); em.persist(o); LOG.info("FLASHING"); em.flush(); LOG.info("SUCCESS"); } My persistance.xml <persistence-unit name="eSystemJPA" transaction-type="JTA" > <provider>org.hibernate.ejb.HibernatePersistence</provider>...

Jboss-cli: JBAS014653 (“Expected [OBJECT] but was LIST”) when trying to add datasource

postgresql,jboss,wildfly,xa,jboss-cli
I tried inserting a new XA-Datasource in Wildfly 8.1: /opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.1.220:9990 [[email protected]:9990 /] xa-data-source add --name=myName --jndi-name=java:jboss/datasources/myDS --driver-name=postgresql --user-name=myUser --password=myPass --use-java-context=true --use-ccm=true --min-pool-size=10 --max-pool-size=100 --transaction-isolation=TRANSACTION_READ_COMMITTED --pool-prefill=true --allocation-retry=1 --prepared-statements-cache-size=32...

Mapping WebService-Client-Access to @Stateful

java,web-services,java-ee,wildfly,stateful-session-bean
if I understand it right a @Stateful bean saves the state. If the client does a request again it comes back to the same instance. So it's possible to save class-attributes, what's not possible in @Stateless. In an other thread here someone wrote "it's like a classical java instance, every...

Wildfly 8 Unexpected element '{urn:jboss:domain:web:1.1}subsystem'

java,jboss,wildfly,wildfly-8,keycloak
I'm getting below error when I start Keycloak service: 0:09:08,028 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final 00:09:08,268 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final 00:09:08,348 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.1.0.Final "Kenny" starting 00:09:08,985 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676:...

jsp is not reachable

jsp,java-ee,servlets,wildfly,java-ee-7
I have a simple web application that contains: a web service: @Path("hello") public class Hello { @GET public String hello() { return "Hello"; } } in the webapp folder, a login.jsp file that says hello I can access the former on http://my-ip:8080/my-app/hello but I can't access the latter on http://my-ip:8080/my-app/login.jsp....

Benefits over using an EAR vs. WAR?

java,java-ee,war,wildfly,ear
We're deploying our JavaEE 7 application on Wildfly 8. Previously, we've packaged all of our enterprise applications (WAR, multiple EJB JAR files) as an EAR. However, with JavaEE now allowing you to package EJBs in a WAR file (or as a JAR within the WAR's WEB-INF/lib) we're wondering if there...

How to use DatabaseCertificate login module

authentication,jboss,authorization,wildfly
I want to use DatabaseCertificate login module to load groups from DB. Current config: > <security-domain name="LDAPAuth"> > <authentication> > <login-module code="LdapExtended" flag="required"> > <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/> > <module-option name="java.naming.provider.url" value="***************"/> > <module-option name="java.naming.security.authentication" value="simple"/> > <module-option name="bindDN"...

How to configure wildfly to use https with ClientBuilder in resteasy?

java,ssl,jax-rs,resteasy,wildfly
This is the first time every I got the requirement to connect to https url. Within no time, I came to know that I need SSLContext to be passed. I also came to know that I need to configure in standalone.xml to get it done. Any pointers towards the solution/link,...

Wildfly standalone in local network

java-ee,wildfly,application-server
I need some way to give access to my web application frontend (which is on localhost:8080 by default) to local network users (192.168.x.y). Assuming that my ip is 192.168.1.72, I want other client in my network could view my application frontend in his browser by typing 192.168.1.72:8080 in address bar....

Adding a datasource to wildfly via web console

java,mysql,jndi,wildfly
I have searched for days now and cant get any further. I am trying to assign a MySQL datasource to my Wildfly 9 server via web console. If I add the resource I'll get an error in testing the resource due a bug in wildfly 9 which creates the resource...

How to enable certain cipher-suites in WildFly?

ssl,encryption,wildfly,wildfly-8
I want to explicitly enable certain cipher-suites on my WildFly application server. Therefore I tried to edit the configuration in wildflys standalone.xml. Let's assume I want to enable the AES128-GCM-SHA256 cipher (cipher suite names from: OpenSSL documentation). I've edited the standalone.xml file of my WildFly server like this: <https-listener name="listener"...

WildFly8 EJB3 MySQL load driver don't work

java,mysql,ejb,wildfly
Hi I use IDE Eclipse Luna,JavaSE8.40,WildFly8.2,MySQL5.6.23 and Windows7 32bit. I would like with @Stateful bean connect do MySQL server. When I use datasource it´s work correctly(I create datasource throw webconsole). I would like connect to database without datasource.I have a problem with load the driver. This work correctly public class...

Authentication failing spring security wildfly

spring-security,wildfly
I am trying to migrate my spring application from tomcat to wildfly. I can't login anymore. It seems that the initial successful authentication gets lost or over written and then an anonymous session gets created. spring security: 4.0.1.RELEASE wildfly 8.2.0 I'm stuck, can't figure it out. Any help or suggestions...

Get spring framework logging in wildfly

spring,logging,wildfly
I was trying to get Spring 4 to log in Wildfly 8.2. I wanted spring to use the wildfly logging configuration. All the examples I could find were trying to complicate this process by adding additional logging frameworks and configuration. So here is how I did it, for prosperity....

Wildfly 8.2 not recognising spring module

spring,wildfly,wildfly-8
I am getting exception Caused by: org.jboss.modules.ModuleNotFoundException: org.springframework.sp ring:main"}}}} I defined spring modules as per the link http://www.javacodegeeks.com/2013/11/add-apache-camel-and-spring-as-jboss-modules-in-wildfly.html but no use....

Wildfly 9 console - changed its look and feel

wildfly
Something happened and WF console changed to this look and feel, can you please advise? Previously: http://www.mastertheboss.com/images/stories/wildfly9/ds-templates1.png...

@Resource datasource breaking DB connection

java,jpa,jdbc,jboss,wildfly
I recently wrote a class, in my web application, for parsing a huge XML file and feed a db table with its content. My application is running on Wildfly9, and uses JPA with Hibernate provider to handle a MySQL DB. The AS configuration is pretty standard, I just added my...

Wildfly 8.1 Log System

log4j,wildfly,wildfly-8
I am trying to make my Web Services Application Log using Wildfly 8.1 Final Log System Categories. My App declares private static final Logger LOGGER = Logger.getLogger("myapp"); It calls in parts of the code for LOGGER.debug("something"); Using the log4j property file definition below it behaves as expected. The problem is...

Issues with CDI when injecting generic type : Wildfly 8.2.0.Final

jboss,cdi,wildfly,wildfly-8,weld
We are facing weird injection issues in Widfly due to CDI changes. We have interface public interface Command<I, O> { } and many classes implement this interface like this public class ApproveUserRequests implements Command<ApproveUserRequestsRequest, List<String>> { } Application listener classes likes to get list of all classes available and uses...

Where are unpacked the files from a war with Wildfly

jboss7.x,wildfly
Usig Jboss or Wildfly, I can drop a myapp.war WAR file in the deployments/ folder, or unzip it and create a myapp.war/ directory (notice the weird .war extension for a directory). With the later, I can edit my html and jsp files, and the server will respond accordingly. But where...

how to see actual body sent from restassured

jax-rs,wildfly,rest-assured
I have created a jax-rs rest api and tested it with rest-assured. All tests are green. Now I am trying to create an html/js front end for it. My problem is I do not know how my json objects should look like to be accepted by my rest api. Thanks...

Wildfly not starting a deployable war file

gradle,spring-boot,war,wildfly
I have a Spring Boot application that uses Spring Integration to do some SFTP polling... I am trying to follow this guide to package a jar file and deploy it as a war file to a wildfly 8.2 application server. I am using a gradle plugin that only allows the...

reach local WildFly server over LAN

java,java-ee,network-programming,wildfly
So my firewall is OFF and my standalone.xml contains <interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <any-ipv4-address/> </interface> <interface name="unsecure"> <inet-address value="${jboss.bind.address.unsecure:192.168.56.1}"/> </interface> </interfaces> Running netstat gives C:\Users\Ram>netstat -an | find "8080" TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING TCP...

How can i receive messages through an MDB remotely in Wildfly?

java-ee,wildfly,hornetq,message-driven-bean
I've got two Wildfly servers running on different machines, one of which will be sending JMS messages to the other. I've created a simple test application that seems to be sending messages but the other side is not receiving. In fact it's already complaining that it can't connect: 14:17:21,188 WARN...

Restrict access to WildFly web console for non-local connections

jboss,wildfly
I have troubles finding a reference for allowing access to server console from local connections only. Is there configurable option / best practice for this? Preferably without disabling web interface or involving OS / network options for this.

deploying ejb-module for ObjectDB fails: PersistenceProvider not found

java,maven,ejb,wildfly,objectdb
I have two almost identical projects (both created with maven, both very simple) where one deploys without any problems, the other gives me a PersistenceException: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'com.objectdb.jpa.Provider' not found And I just don't see what I am missing here. The working project is web application. I got it...

org.jboss.as.server.deployment.DeploymentUnitProcessingException: Apache CXF library detected in ws endpoint deployment

eclipse,web-services,cxf,wildfly,ws-security
I am using Eclipse juno and WildFly 8.2 and try to deploy soap web services with ws-security. This is my ref site. https://docs.jboss.org/author/display/JBWS/WS-Security#WS-Security-Authenticationandauthorization Deployment is ok! But the problem seems to be the client of eclipse. I made some jsp codes with eclipse ide <%@ page import="javax.xml.ws.BindingProvider"%> <%@ page import="javax.xml.namespace.QName"%>...

How do I make sure that the domain is up and the CLI is connected to its controller?

batch-file,jboss,server,wildfly
I'm new to JBoss.How do I make sure that the domain is up and the CLI is connected to its controller ? When I run jboss-cli.bat, and tried to connect its connecting and showing: [[email protected]:9990 /] That is, it is running in standalone mode. Now my doubt is that ,...

MBean of Hornetq is not exposed in WildFly

jmx,wildfly,hornetq
Although here it is described that JMX is enabled by default in HornetQ, I do not see any MBeans in jconsole, after connectin to the process of WildFly. What do I miss? WildFly 8.2.0.Final HornetQ 2.4.5.Final (here are all component versions in WildFyl 8.2.0.Final) ...