Application Development Notes: Tips and Tricks

LC_ALL Exception = javax.resource.spi.ResourceAllocationExceptionSource = com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnectionprobeid = 299Stack Dump = javax.resource.spi.ResourceAllocationException: DSRA8100E: Unable to get a XAConnection from the DataSource. with SQL State : XJ041 SQL Code : 40000    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1578) LC_ALL is the way to fix. Before executing the Java application. export LC_ALL=en_US.UTF-8 https://stackoverflow.com/a/9894836/1873438http://db.apache.org/derby/docs/10.5/tools/ctools1004764.html#ctools1004764__rtoolsijtools91283https://stackoverflow.com/questions/55673886/what-is-the-difference-between-c-utf-8-and-en-us-utf-8-locales Multi-module Javadocs where Search doesn’t resolve the context properly <additionalJOption>–no-module-directories</additionalJOption>or<additionalOption>–no-module-directories</additionalOption> Search will generate which avoid the <undefined>, and use the root folder. https://stackoverflow.com/questions/52326318/maven-javadoc-search-redirects-to-undefined-url Gatsby with the Carbon Theme The IBM project I work on uses Carbon Theme with Gatsby […]

Random EAR Projects

I had a similar experience and ran across https://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/1.1.0 . m2e-wtp can also be disabled via the m2e.wtp.activation>false in the Maven section of your project pom;xml. I create a new workspace and cloned a fresh copy of my code in a temp directory. I then updated the parent pom.xml with the following: <properties><m2e.wtp.activation>false</m2e.wtp.activation><m2e.jaxrs.activation>false</m2e.jaxrs.activation><m2e.jpa.activation>false</m2e.jpa.activation><m2e.jsf.activation>false</m2e.jsf.activation><m2e.cdi.activation>true</m2e.cdi.activation></properties> I then […]

Lessons Learned for 20-SEPT-2019

XStream Illegal Reflective Access If you are compiling with AdoptOpenJDK 11, you might hit –  “Illegal reflective access” com.thoughtworks.xstream.converters.collections.TreeMapConverter If your build and your dependencies don’t show xstream in it, check your plugins:mvn dependency:resolve-plugins -f fhir-parent/pom.xml | grep -B20 -i xst[INFO] Plugin Resolved: maven-war-plugin-3.2.3.jar[INFO] Plugin Dependency Resolved: maven-plugin-api-3.0.jar[INFO] Plugin Dependency Resolved: maven-core-3.0.jar[INFO] Plugin Dependency Resolved: […]

Sonarcube – Maven and Docker analysis

SonarLint is one tool I gravitate towards – inline analysis of my code in Eclipse.  I have finally broken down and investigated using Sonarcube with maven – the heavy weight tool for evaluating code.  It’s exciting. You need to pull your sonarqube docker. You can find more details at https://hub.docker.com/_/sonarqube/?tab=description :~/my-repo$ docker pull sonarqube Using […]

Changing a Keystore and Key’s Password

Create a list of keystores cat << EOF > keystore-list.txttestTruststore.jkstestKeystore.jksEOF Iterate over the list to check status and process for KEYSTORE in `cat keystore-list.txt`do echo $KEYSTORE[ ! -f $KEYSTORE ] && echo NOT VAL=”`cat $KEYSTORE | wc -l`”[ ${VAL} -eq “1” ] && echo NOT_RIGHT# show the private key / trust key keytool -keystore $KEYSTORE […]

EAR Projects Generated for JavaEE Import

Importing my project into Eclipse, I found so many additional EAR projects were being generated. To stop this feature, I went to Eclipse > Preference > Maven > Java EE Integration and unchecked Enable Java EE Configuration. I removed the cached EAR projects (deleting from disk) and removed the regular projects, and imported again.  Voila…. […]