Saturday 24 June 2023

A trip to Tucson

 It was during the holiday season in December 2022 and what could be more fun than meeting the old college friends. Planned a humble trip to Tucson after the birthday parties in Phoenix, Tucson is a beautiful city with a lively downtown lined with lots of eateries and restaurants. For dinner stepped into a Mexican restaurant that had a cozy environment with live music. Since it was the holiday season, the roads are lit up with colorful and vibrant lights everywhere, of course, a good spot for selfie clicks.

Mexican restaurant in downtown

Selfie Time during Christmas decorations


Since it is a one-day trip to Tucson, we planned to keep it simple without stressing too much and added Colossal cave and Pima Air & space Museum. We planned for these two places one after breakfast and one after lunch. The combination of these two places is very interesting, in the Colossal Cave we can get mesmerized by nature on its natural formations and in the Pima Air Museum, we can witness the technological heights human has reached over time.

In the Colossal Cave, we can even enjoy playing music on the rocks, we can tap the rock with small wooden blocks and can hear beautiful music.

Lantern light tour in Colossal Cave


In a few aircraft even we can get inside a take-a-peek view of it, the museum also houses a few video games which all age groups can enjoy, a souvenir shop, and more. They have guided tours as well in tram vehicles every 30 mins or 1 hour which would be more informative as the guide will be explaining the history of each of the aircraft.

Inside the Fighter aircraft


Guided tour vehicle


If looking for a nice Indian restaurant nearby then definitely Sher-e-Punjab is a place to try. It has a wide variety of options and has a very good Indian flavor of spices and masala





Thursday 23 March 2023

javax.xml.bind::jaxb-api not working in JDK17

 When you are trying to update the JDK version 8 or 11 to JDK 17 and if you are using javax.xml.bind::jaxb-api then you will see the below error during the startup of the application

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not \"opens java.lang\" to unnamed module @5e922278\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)\n\tat 

the root cause is that the javax.xml.bind::jaxb-api is trying to use internal java API using reflection and the support is stopped from JDK16 due to the introduction of the "Strongly encapsulate JDK internals by default" feature.

Recommendation: The recommendation is to move away/upgrade the libraries that use reflection to load java internal classes

And the correct alternate for javax.xml.bind::jaxb-api is jakarta.xml.bind::jakarta.xml.bind-api

Or another way to resolve this is to add this java startup arguments option --add-opens=java.base/java.lang=ALL-UNNAMED

Interesting study material: https://blogs.oracle.com/javamagazine/post/a-peek-into-java-17-continuing-the-drive-to-encapsulate-the-java-runtime-internals


mvn flatten:flatten

The flatten plugin from maven helps to remove any development-specific element, build specific element or environment-specific elements in the pom file and prepares a pom file that can be published and can be consumed by other

https://www.mojohaus.org/flatten-maven-plugin/

Command to execute it

mvn flatten:clean flatten:flatten

After the execution, we can find the flattened pom file in the same location where original pom file was and with the name .flattened-pom.xml