Problem Statement:
If the user is unable to connect to JasperServer using Jasperstudio, and if the user is using WebSphere as their Application Server. The below error is seen in JasperStudio:
java.lang.NullPointerException at java.base/java.text.SimpleDateFormat.<init>(Unknown Source) at java.base/java.text.SimpleDateFormat.<init>(Unknown Source) at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.getServerInfo(RestV2ConnectionJersey.java:339) at com.jaspersoft.studio.server.protocol.restv2.RestV2ConnectionJersey.connect(RestV2ConnectionJersey.java:225) at com.jaspersoft.studio.server.protocol.ProxyConnection.connect(ProxyConnection.java:118) at com.jaspersoft.studio.server.WSClientHelper.checkConnection(WSClientHelper.java:92) at com.jaspersoft.studio.server.wizard.ServerProfileWizard.connect(ServerProfileWizard.java:91) at com.jaspersoft.studio.server.wizard.ServerProfileWizard.access$1(ServerProfileWizard.java:86) at com.jaspersoft.studio.server.wizard.ServerProfileWizard$2.run(ServerProfileWizard.java:68) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Solution:
The below conditions must be met for the suggested solution:
1. Has the user applied a hotfix to their WebSphere server? That is, modified the .ear file.
2. When the user hits <THEIR_SERVER>/jasperserver-pro/rest_v2/serverInfo can they see the relevant serverInfo? If not, kindly follow the below steps:
1) Login to Websphere Admin console, i.e. https://<ipAddress>:9043/ibm/console/
2) Go to Servers->ServerTypes->Websphere application servers-><server>->Java and Process Management ->Process Definition
a. Under Additional Properties->Java Virtual Machine
b. Now, Go to Generic JVM arguments and append -Djavax.xml.bind.JAXBContext=com.sun.xml.internal.bind.v2.ContextFactory
3)Go to Applications >application Types>Webspher Enterprie application- ><server>
a. Under Detail Properties->Class loading and update detection
b. Under Class reloading options-> Check Override class reloading settings for Web and EJB modules and provide max value i.e 2147483647, suggested for Polling interval for updated files
c. Under Class loader order ->select Classes loaded with local class loader first (parent last)
d. Under WAR class loader policy >select Class loader for each WAR file in the application
4) Save the configuration and restart the Websphere server.
The above workaround must be carried out because the provided hot fix ear file deployment is not able to identify the appropriate JAXB XML Marshalling. To fix this we need to modify the class-loader and also need to configure XML marshaling through the Java parameter.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now