Response times within applications WebSphere Process Server goes down after a while working
I see a degradation in response times within myapplications. After a server restart, response times are acceptable. However, after some time, which depends on the workload on the system, the response times degrade and the server has to be restarted to return to good performance.
1 answer
-
answered 2022-05-03 13:33
Gary DeVal
Are you monitoring the Java heap usage with verbose garbage collection (GC) logs?
The behavior you describe can happen if the heap has enough free space after a restart, then gradually fills with long-lived objects as the workload runs. This may be caused by the heap simply being too small, or the application may have a memory leak, using heap and not releasing it for collection when the associated work is completed. When there is not enough free heap space, the application work slows down because the JVM spends excessive time running GC.
You can learn more about Java GC troubleshooting in our documentation https://www.eclipse.org/openj9/docs/vgclog/
You can also open a support case to get assistance from WebSphere/Java troubleshooting experts, if you have a support arrangement with IBM.
do you know?
how many words do you know
See also questions close to this topic
-
Read each name in Array list to create seperate object for
I have a file that has student names, age, and an id number. I have a student class that holds the everything above for each student object. I stored all the names, id numbers. and age separately in an array list. Now im trying to assign the info to create a student object.
public class Student { private String lName; private int idNumber; private int age; public Student() { lName = ""; idNumber = 0; age = 0; } public Student(String l, int i, int a) { lName = l; idNumber = i; age = a; } public void setName(String last) { lName = last; } public String getName() { return lName; } public void setIdNum(int num) { idNumber = num; } public int getIdNum() { return idNumber; } public void setAge(int a) { age = a; } public int getAge() { return age; } }
My Text File looks something like this: This info is stored in parallel array lists. I don't quite get how to implement this into an object to pass it into my second contractor method.
Josh 2134 19 Smith 5256 21 Rogers 9248 19 Andrew 7742 20
Here's what I've tried;
public static void main(String[] args) { String file = "studentData.txt"; Scanner reader = new Scanner(file); ArrayList<String> lastNames = lNames(file); ArrayList<Integer> idNumbers = idNum(file); ArrayList<Integer> ageList = ages(file); Scanner input = new Scanner(System.in); Student s1 = new Student(); // confused about how to implement this constructor with the textile info for (int i = 0; i<idNumbers.size(); i++) { Student user = new Student(lastNames.get(i), idNumbers.get(i), ageList.get(i)); } //user enters idNumber to display age System.out.println("Enter ID Number"); //exception handling to be added int idNum = input.nextInt(); for (int i = 0; i<idNumbers.size(); i++) { if (idNum == idNumbers.get(i)) { s1.setAge(ageList.get(i)); System.out.println(s1.getAge()); } } }
-
Using EdittextPreference for Goto search
sorry for my poor English. I want to use EditTextPreference in my bottom nav like the pic below, ![screenshot][1]
I have recycleview xml in my project with in many sub cardview layouts(which is scrollable) and I want to create item in the bottom nav which is called "Goto". When the "Goto" item is clicked i want it to pop-up like the screenshot. And when user enters a number(according to the cardviews i.e if the number of cardview is 40 user must enter 1-40) I want to search the cardview by its ID. Thank you and I hope u got it, If u have any questions let me know [1]: https://i.stack.imgur.com/grK8P.jpg
My xml format look like this. As you see in the blow since the cardviews are huge in number it is not cool to scroll all the way down that is why i need Goto item in the bottom nav to search it by its ID when the user click number in the EditTextPreference as u see in the screenshot. i.e The screenshot is not from my app
<LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> <LinearLayout> <androidx.cardview.widget.CardView> <RealtiveLayout> <Textview/> <RealtiveLayout> </androidx.cardview.widget.CardView> </LinearLayout> .. .. .. .. many more..
-
How to get remaining time of the day in java?
I would like to calculate the time remaining for next day 00:00:00 from the current date time.
For e.g. time difference between 2
022-05-07T05:49:41.883807900Z
and2022-05-08T00:00:00Z
Expected answer:
18:10:19
or 65419 (in seconds).How can I achieve this with efficiently using java 8?
-
LinkageError: loading constraint violation when overriding method javax/xml/stream/XMLInputFactory.createXMLEventReader
I'm upgrading an application that's hosted on WebSphere 9 running IBM JDK 8 from Spring 4.0.3 to 5.3.18. While doing so I updated the project's Jackson, Woodstox, and Stax2 dependencies to their latest versions. The application builds, but on startup while converting an XML string to JSON this error occurs:
java.lang.LinkageError: loading constraint violation when overriding method "javax/xml/stream/XMLInputFactory.createXMLEventReader(Ljavax/xml/transform/Source;)Ljavax/xml/stream/XMLEventReader;" during creation of class "com/ctc/wstx/stax/WstxInputFactory": loader "com/ibm/ws/classloader/CompoundClassLoader@c586bf67" of class "com/ctc/wstx/stax/WstxInputFactory" and loader "com/ibm/oti/vm/BootstrapClassLoader@8a89d546" of class "javax/xml/stream/XMLInputFactory" have different types for the method signature at java.lang.ClassLoader.defineClassImpl(Native Method) ~[?:2.9 (11-06-2019)] at java.lang.ClassLoader.defineClassInternal(ClassLoader.java:397) ~[?:2.9 (11-06-2019)] at java.lang.ClassLoader.defineClass(ClassLoader.java:358) ~[?:2.9 (11-06-2019)] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154) ~[?:1.8.0] at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:876) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [f5021945.01]] at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:754) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [f5021945.01]] at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:622) ~[com.ibm.ws.runtime.jar:WAS90.SERV1 [f5021945.01]] at java.lang.ClassLoader.loadClass(ClassLoader.java:871) ~[?:2.9 (11-06-2019)] at java.lang.Class.forNameImpl(Native Method) ~[?:2.9 (11-06-2019)] at java.lang.Class.forName(Class.java:403) ~[?:2.9 (11-06-2019)] at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:381) ~[?:1.8.0] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:415) ~[?:1.8.0] at java.util.ServiceLoader$1.next(ServiceLoader.java:491) ~[?:1.8.0] at javax.xml.stream.FactoryFinder.findServiceProvider(Unknown Source) ~[?:?] at javax.xml.stream.FactoryFinder.find(Unknown Source) ~[?:?] at javax.xml.stream.XMLInputFactory.newFactory(Unknown Source) ~[?:?] at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:115) ~[jackson-dataformat-xml-2.13.2.jar:2.13.2] at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:101) ~[jackson-dataformat-xml-2.13.2.jar:2.13.2] at com.fasterxml.jackson.dataformat.xml.XmlFactory.<init>(XmlFactory.java:85) ~[jackson-dataformat-xml-2.13.2.jar:2.13.2] at com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:127) ~[jackson-dataformat-xml-2.13.2.jar:2.13.2]
I don't understand the cause of this error. Earlier on in the upgrade I ran into different LinkageErrors that were resolved by removing dependencies which are no longer used by Jackson (jsr173_api, stax-api, and wstx-asl) but I have been unable to resolve this one.
-
Maven: how to mitigate mvn "fileNameMapping has been removed ... use outputFileMapping instead"
using mvn install I get the error message "fileNameMapping has been removed with version 3.0.0 but you are still using it...".
First of all, I am not using "fileNameMapping" anywhere, but I might use some pom which in turn might use it.
First question: How do I find the pom which does this? And second question: When does that kick in anyway? Documentation (https://maven.apache.org/plugins-archives/maven-ear-plugin-2.6/examples/customize-file-name-mapping.html) says that my project has the same artifactId for different groups. How can this be? The artifact id is unique, or what does the word "group" mean in this case?
-
Unable to Recognise the error and what to do to solve it
A system exception occurred during an invocation on EJB MarketSaleSessionBean, method: public epsilon.ejb.transferBeans.MarketSaleHeaderTransferBean com.synapse.entity.facadebeans.MarketSaleSessionBean.actionMSNew(epsilon.ejb.transferBeans.MarketOrderHeaderTransferBean) throws epsilon.ejb.Notification.Exceptions.BPCouponSeriesNotFoundException,epsilon.ejb.Notification.Exceptions.BPMinimumPurchaseValueNotMet,epsilon.ejb.Notification.Exceptions.BPInvalidStateException,epsilon.ejb.Notification.Exceptions.BPWalletNotFoundException,epsilon.ejb.Notification.Exceptions.BPUserAccountDoesNotExistException,java.text.ParseException,javax.naming.NamingException,epsilon.ejb.Notification.Exceptions.BPInsufficientWalletBalanceException,epsilon.ejb.Notification.Exceptions.BPInvalidWalletException,epsilon.ejb.Notification.Exceptions.BPProgrammeSubscriptionNotFound,epsilon.ejb.Notification.Exceptions.BPValidPromotionsNotFoundException,epsilon.ejb.Notification.Exceptions.PromotionBudgetExhaustedException,epsilon.ejb.Notification.Exceptions.BPInvalidStateException Warning: javax.ejb.EJBException at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:752) at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:702) at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4566) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2074) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044) at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:212) at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:79) at com.sun.proxy.$Proxy306.actionMSNew(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
insert values in entitybean then persist the entity beans. add collection to entitybean then it shows the error in MSL.setMarketSaleHeader(_MSH); em.persist(MSL); _MSH.setMarketSaleLineCollection(MSLList); MSLList.add(MSL); em.persist(_MSH); System.out.println("MARKETSALEHEADER###########" + _MSH); } RPMResponseBean rpmResBean = processMarketSale(_MSH); its shows _MSH entity bean is unknown source
-
JNDI Lookup for EJB failed. Naming exception: WFNAM00004: Name "appName/ejbModuleName/ejb/abc/xyz/RemoteInterfaceName" is not found
I have a maven project "appName"and inside that i have few maven modules along with an EJB module.
appName ejbModuleName ejbmodule abc xyz and then Bean classes
JNDI Lookup for EJB failed. Naming exception: WFNAM00004: Name "appName/ejbModuleName/ejb/abc/xyz/RemoteInterfaceName" is not found
appName.namespace.jndiprefix=java:ejb/appName/ejbModuleName/ appName.namespace.contextfactory=org.wildfly.naming.client.WildFlyInitialContextFactory appName.namespace.providerUrl=remote+http://localhost:9080
I am deploying application on Jboss EAP 7.
Can someone please help me understand, if i am using correct jndi prefix (java:ejb/) or should i use only ejb:
Also, not sure how /ejb is getting added in ejb name. Thanks.
-
form-data request, with okHttp3
I'm trying to make a request where I pass some parameters in the Body, as shown in the image.
Example:
Key: file[], Value: "xml", Content-Type: application/xml Key: query, Value: {"boxe/File": false}, Content-Type: application/xml
I'm getting a Bad Request error, I think my code isn't right. Follow how it is being done
RequestBody requestBody = new MultipartBody.Builder() .setType(MultipartBody.FORM) .addFormDataPart("file[]", xml, RequestBody.create(null, "application/xml")) .addFormDataPart("query", "{\"boxe/File\": false}", RequestBody.create(null, "application/xml")) .build(); Request request = new Request.Builder().url(endPoint).addHeader("x-integration-key", integrationKey) .addHeader("Authorization", "Bearer " + token) .post(requestBody).build();
-
constructor is undefined in jsp project
I create a object of Login in JSP file and when I run this code it is giving me error that unable to compile class for JSP and on line 18 it shows Login constructor is undefined. I also import the Login class I don't know where I am going wrong Can you please help me in this one please
Error I get:
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [18] in the jsp file: [/jsp/login.jsp] The constructor Login(String, String, String) is undefined 15: String email = request.getParameter("email"); 16: String password = request.getParameter("password"); 17: String userRole = request.getParameter("desig"); 18: new Login(email, password, userRole); 19: out.println("email: "+email); 20: out.println("password: "+password); 21: out.println("userRole: "+userRole);
Login.jsp file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import = "com.classes.Login"%> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Login.jsp</title> </head> <body> <% // fetching the data from login form String email = request.getParameter("email"); String password = request.getParameter("password"); String userRole = request.getParameter("desig"); new Login(email, password, userRole); out.println("email: "+email); out.println("password: "+password); out.println("userRole: "+userRole); %> </body> </html>
Login.java File
package com.classes; public class Login { String email; String password; String userRole; public Login(String email,String password,String userRole) { this.email = email; this.password = password; this.userRole = userRole; showData(); new Database(); } public void showData() { System.out.println("email: "+this.email); System.out.println("password: "+this.password); System.out.println("userRole: "+this.userRole); } }
-
Running Open-Liberty as a non root user
We are trying to run an Open Liberty on a Red Hat server 7.9, however, the service will not start.
Systemd script which is starting the application is giving the following message:
OPENLP.service - IBM WebSphere Application Server Loaded: loaded (/etc/systemd/system/OPENLP.service; enabled; vendor preset: disabled) Active: active (exited) since Wed 2022-05-04 20:09:10 +04; 8min ago Process: 38704 ExecStop=/etc/init.d/OPENLPNode.sh stop (code=exited, status=0/SUCCESS) Process: 38731 ExecStart=/etc/init.d/OPENLPNode.sh start (code=exited, status=0/SUCCESS) Main PID: 38731 (code=exited, status=0/SUCCESS) May 04 20:09:10 linux-c java[38743]: IBM Java[38743]: JVMDUMP032I JVM requested Java dump using '/tmp/javacore.20220504.200910.38743.0002.txt' in response to an event May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP030W Cannot write dump to file //javacore.20220504.200910.38743.0002.txt: Permission denied May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP032I JVM requested Java dump using '/tmp/javacore.20220504.200910.38743.0002.txt' in response to an event May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP010I Java dump written to /tmp/javacore.20220504.200910.38743.0002.txt May 04 20:09:10 linux-c java[38743]: IBM Java[38743]: JVMDUMP032I JVM requested Snap dump using '//Snap.20220504.200910.38743.0003.trc' in response to an event May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP032I JVM requested Snap dump using '//Snap.20220504.200910.38743.0003.trc' in response to an event May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP030W Cannot write dump to file //Snap.20220504.200910.38743.0003.trc: Permission denied May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP010I Snap dump written to /tmp/Snap.20220504.200910.38743.0003.trc May 04 20:09:10 linux-c OPENLPNode.sh[38731]: JVMDUMP013I Processed dump event "traceassert", detail "". May 04 20:09:10 linux-c systemd[1]: Started IBM WebSphere Application Server.
Any idea as to what might be causing the above?
Regards, Nick Baldacchino