Websphere ResRefListImpl initializeIsolationLevel RuntimeError problem

I came across this strange error, which baffled me for ages, but was simple to fix. I had duplicate resource references in web.xml and binding files. com.ibm.ws.exception.RuntimeError at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:328) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268) at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536) at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413) at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152) at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536) at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413) at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:287) at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)

Read More »

Setting the build-level in Websphere Application Server (WAS)

In the MANIFEST.MF file in the ear, you will need to set the follwing property Implementation-Version: 4.23.0.1 In ANT you can use this <manifest file=”MANIFEST.MF”> <attribute name=”Implementation-Version” value=”${version} ${TODAY}”/> </manifest> If you use Hudson/Jenkins, then you can place the build version from Hudson/Jenkins with this <manifest file=”MANIFEST.MF”> <attribute name=”Implementation-Version” value=”${BUILD_NUMBER}”/> </manifest>

Read More »

Loading up and using MessageBundles

Create your messages_en.properties with your messages as a key value pair greeting_hello=Hello {0} Now in code use the following ResourceBundle resourceBundle= PropertyResourceBundle.getBundle(“messages_en.properties”); String message = resourceBundle.getString(“greeting_hello”); MessageFormat messageFormat = new MessageFormat(message); String formattedMessage = messageFormat.format(“Markzi”); System.out.println(formattedMessage); This will print out Hello Markzi

Read More »

ParseException when parsing time

Came across this when trying to parse a time. DateFormat timeFormat = DateFormat.getTimeInstance(); timeFormat.parse(“11:23:00”): Caused by: java.text.ParseException: Unparseable date: “11:23:00” at java.text.DateFormat.parse(DateFormat.java:347) Solution was a simple one. Set the style and locale on the DateFormat DateFormat timeFormat = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.UK); timeFormat.parse(“11:23:00”):

Read More »