Where dump is dumped, using HeapDumpOnOutOfMemoryError parameter for JBoss

Here’s what Oracle’s documentation has to say: By default the heap dump is created in a file called java_pid.hprof in the working directory of the VM, as in the example above. You can specify an alternative file name or directory with the -XX:HeapDumpPath= option. For example -XX:HeapDumpPath=/disk2/dumps will cause the heap dump to be generated … Read more

Receive an HTTP 400 error if %2F is part of the GET URL in JBOSS

Finally figured out the cause of this (both for JBoss and Apache). Both applications intentionally reject URIs with an encoded slash (%2F for / and %5C for \) to prevent possible security vulnerabilities. Links: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0450 http://securitytracker.com/id/1018110 (Look at section 4. Solution) And here are the instructions they provide for enabling this behavior in JBoss: Note: … Read more

Jboss 7 war deployment failed

Well I tried deleting the log file, it helped at the beginning but then I got the error again. The proper solution is as following: Go to Jboss_installation_dir\standalone\configuration and find the file standalone.xml. Change the following line: <subsystem xmlns=”urn:jboss:domain:deployment-scanner:1.0″> <deployment-scanner scan-interval=”5000″ relative-to=”jboss.server.base.dir” path=”deployments” /> </subsystem> into: <subsystem xmlns=”urn:jboss:domain:deployment-scanner:1.0″> <deployment-scanner scan-interval=”5000″ relative-to=”jboss.server.base.dir” path=”deployments” deployment-timeout=”1000″ /> </subsystem> … Read more

Wildfly and auto reconnect to the database

This working on Wildfly 8.1: <datasource jta=”true” jndi-name=”java:jboss/datasources/xxxdb” pool-name=”xxxxDB” enabled=”true” use-ccm=”false”> <connection-url>jdbc:mysql://localhost:3306/xxxdb?autoReconnect=true&amp;amp;useUnicode=true&amp;amp;characterEncoding=UTF-8</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <driver>mysql-connector-java-5.1.26-bin.jar</driver> <security> <user-name>xxxuser</user-name> <password>xxxpassword</password> </security> <validation> <check-valid-connection-sql>select 1</check-valid-connection-sql> <validate-on-match>false</validate-on-match> <background-validation>true</background-validation> <background-validation-millis>10000</background-validation-millis> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>

Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad?

Whilst you can use the old “select 1 from dual” trick, the downside with this is that it issues an extra query each and every time you borrow a connection from the pool. For high volumes, this is wasteful. JBoss provides a special connection validator which should be used for Oracle: <valid-connection-checker-class-name> org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker </valid-connection-checker-class-name> This … Read more

Are there any reasons why h2 database shouldn’t be used in production?

The main reasons not to use H2 (or HSQLDB, or Derby) for production are: Probability of critical bugs: compared to the ‘big’ databases Oracle, IBM DB 2, MS SQL Server, MySQL, PostgreSQL, the Java databases are relatively new and therefore possibly not as stable (have bugs). Please note this is true for all newer products, … Read more

Deploying a Jersey webapp on Jboss AS 7

it has already been mentioned in this post : https://community.jboss.org/message/744530#744530 , you can just ask the resteasy module to not scan for other JAX RS implementations in your webapp; just add this to your web.xml : <context-param> <param-name>resteasy.scan</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>resteasy.scan.providers</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>resteasy.scan.resources</param-name> <param-value>false</param-value> </context-param> worked fine for me

Upgrade JSF / Mojarra in JBoss AS / EAP / WildFly

The below procedure applies to JBoss AS 7.2+, JBoss EAP 6.1+, and JBoss WildFly 8+ and assumes that you’ve full control over the server installation and configuration. This upgrades the server-wide default JSF version: Download the individual Mojarra API and impl files (and thus not the single javax.faces.jar file). Current latest 2.1.x version is 2.1.29 … Read more

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