What are the possible AOP use cases?

I can give you two examples where we use it: Automatically registering objects in JMX for remote management. If a class is annotated with our @AutoRegister annotation, we have an aspect that watches for new instantiations of that class and registers them in JMX automatically. Audit logging (the gold standard AOP use case). Its a … Read more

org.hibernate.AssertionFailure: null id in entry (don’t flush the Session after an exception occurs)

The exception: org.hibernate.AssertionFailure: null id in entry (don’t flush the Session after an exception occurs) Tells us that the session exception has happened before the point where this org.hibernate.AssertionFailure is thrown. To be exact, the org.hibernate.AssertionFailure is thrown when the session.flush() is happening, not the point where the error ocurred. The above is a fact, … Read more

How to change default port 8080 in WildFly

In your standalone.xml file, look for this element: <socket-binding-group name=”standard-sockets” default-interface=”public” port-offset=”${jboss.socket.binding.port-offset:0}”> The port-offset attribute lets you modify all the ports wildfly uses, by adding the number you specify. For example, the default value is 0, which means that http port will be 8080, remoting 4447, etc. If you use ${jboss.socket.binding.port-offset:100}, http port will be … Read more

Keycloak 8: User with username ‘admin’ already added

Just to clarify the other answers. I had the same issue. What helped for me was: stop all containers comment out the two relevant lines version: “3” services: keycloak: image: quay.io/keycloak/keycloak:latest environment: # KEYCLOAK_USER: admin # KEYCLOAK_PASSWORD: pass … start all containers; wait until keycloak container has successfully started stop all containers, again comment back … Read more

JBoss debugging in Eclipse

You mean remote debug JBoss from Eclipse ? From Configuring Eclipse for Remote Debugging: Set the JAVA_OPTS variable as follows: set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS% or: JAVA_OPTS=”-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS” In the Debug frame, select the Remote Java Application node. In the Connection Properties, specify localhost as the Host and specify the Port as … Read more

JBoss AS 7: How to clean up tmp?

As you know JBoss is a purely filesystem based installation. To install you simply unzip a file and thats it. Once you install a certain folder structure is created by default and as you run the JBoss instance for the first time, it creates additional folders for runtime operation. For comparison here is the structure … Read more

How to use BOM file with Maven?

A bom is a so called bill of materials – it bundles several dependencies to assure that the versions will work together. JBoss has boms for many of it’s projects, including Arquillian and the JBoss AS itself. There is an explanation of the bom usage in the maven docs – it is hidden well below. … Read more

Error starting jboss server

Looks like a bug that occurs with certain specific combinations of JRE and OS versions (see https://jira.jboss.org/jira/browse/JBAS-6981). Basically, the JBoss config is relying on reflection to return constructors in a certain order, and in some cases this order is different, causing the exception. Did you change your JRE version when you reinstalled, say from 1.6.0_17 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)