这些 java 错误的原因可能是什么?

发布于 2024-12-16 00:06:16 字数 3429 浏览 1 评论 0原文

有谁知道这些 java 错误的原因是什么?

java版本应该是1.4.1_05。这与仁科有关。

"VM Thread" prio=5 tid=0x00B8EF28 nid=0x5f8 runnable 
"VM Periodic Task Thread" prio=10 tid=0x00CF4CF8 nid=0x648 waiting on condition 
"Suspend Checker Thread" prio=10 tid=0x00CF5760 nid=0x64c runnable 
<Nov 17, 2011 1:41:46 PM GMT+08:00> <Error> <HTTP> <BEA-101017> <[ServletContext(id=21840659,name=PORTAL,context-path=)] Root cause of ServletException.
java.lang.OutOfMemoryError: unable to create new native thread
                at java.lang.Thread.start(Native Method)
                at bea.jolt.NwHdlr.start_threads(NwHdlr.java:1982)
                at bea.jolt.NwHdlr.openConnection(NwHdlr.java:879)
                at bea.jolt.CMgr.connect(CMgr.java:71)
                at bea.jolt.JoltSession.logon(JoltSession.java:246)
                at bea.jolt.JoltSession.<init>(JoltSession.java:125)
                at psft.pt8.net.JoltSessionWrapper.<init>(JoltSessionWrapper.java:67)
                at psft.pt8.net.JoltSessionPool.createConnection(JoltSessionPool.java:373)
                at psft.pt8.net.JoltSessionPool.getJoltSession(JoltSessionPool.java:220)
                at psft.pt8.net.NetSession.getJoltSession(NetSession.java:484)
                at psft.pt8.net.NetReqRepSvc.sendRequest(NetReqRepSvc.java:526)
                at psft.pt8.net.NetService.requestService(NetService.java:141)
                at psft.pt8.net.NetReqRepSvc.requestService(NetReqRepSvc.java:328)
                at psft.pt8.net.NetSession.connect(NetSession.java:269)
                at psft.pt8.net.NetSession.<init>(NetSession.java:203)
                at psft.pt8.jb.JBEntry.connectWithBlob(JBEntry.java:720)
                at psft.pt8.jb.JBEntry.connect(JBEntry.java:654)
                at psft.pt8.auth.PSAuthenticator.authenticate(PSAuthenticator.java:546)
                at psft.pt8.psreports.onLogin(psreports.java:216)
                at psft.pt8.psreports.onAction(psreports.java:321)
                at psft.pt8.psreports.service(psreports.java:181)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
                at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
                at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                at psft.pt8.psfilter.doFilter(psfilter.java:71)
                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6372)
                at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
                at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
                at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3643)
                at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>

Does any1 have any idea what could be the cause of these java errors?

The java version should be 1.4.1_05. This is related to PeopleSoft.

"VM Thread" prio=5 tid=0x00B8EF28 nid=0x5f8 runnable 
"VM Periodic Task Thread" prio=10 tid=0x00CF4CF8 nid=0x648 waiting on condition 
"Suspend Checker Thread" prio=10 tid=0x00CF5760 nid=0x64c runnable 
<Nov 17, 2011 1:41:46 PM GMT+08:00> <Error> <HTTP> <BEA-101017> <[ServletContext(id=21840659,name=PORTAL,context-path=)] Root cause of ServletException.
java.lang.OutOfMemoryError: unable to create new native thread
                at java.lang.Thread.start(Native Method)
                at bea.jolt.NwHdlr.start_threads(NwHdlr.java:1982)
                at bea.jolt.NwHdlr.openConnection(NwHdlr.java:879)
                at bea.jolt.CMgr.connect(CMgr.java:71)
                at bea.jolt.JoltSession.logon(JoltSession.java:246)
                at bea.jolt.JoltSession.<init>(JoltSession.java:125)
                at psft.pt8.net.JoltSessionWrapper.<init>(JoltSessionWrapper.java:67)
                at psft.pt8.net.JoltSessionPool.createConnection(JoltSessionPool.java:373)
                at psft.pt8.net.JoltSessionPool.getJoltSession(JoltSessionPool.java:220)
                at psft.pt8.net.NetSession.getJoltSession(NetSession.java:484)
                at psft.pt8.net.NetReqRepSvc.sendRequest(NetReqRepSvc.java:526)
                at psft.pt8.net.NetService.requestService(NetService.java:141)
                at psft.pt8.net.NetReqRepSvc.requestService(NetReqRepSvc.java:328)
                at psft.pt8.net.NetSession.connect(NetSession.java:269)
                at psft.pt8.net.NetSession.<init>(NetSession.java:203)
                at psft.pt8.jb.JBEntry.connectWithBlob(JBEntry.java:720)
                at psft.pt8.jb.JBEntry.connect(JBEntry.java:654)
                at psft.pt8.auth.PSAuthenticator.authenticate(PSAuthenticator.java:546)
                at psft.pt8.psreports.onLogin(psreports.java:216)
                at psft.pt8.psreports.onAction(psreports.java:321)
                at psft.pt8.psreports.service(psreports.java:181)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
                at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
                at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                at psft.pt8.psfilter.doFilter(psfilter.java:71)
                at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6372)
                at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
                at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
                at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3643)
                at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

原野 2024-12-23 00:06:16

您为线程堆栈的可用内存创建了太多线程。您可以减少创建的线程数量,或减少(慷慨的)默认值的默认堆栈大小。 -XX:ThreadStackSize=128 将使其变为 128KB。当然,如果堆栈太少,如果您有特别深的方法调用,您可能会遇到 StackOverflowError(呵呵)。

由于您必须创建大量线程(数千个)才能使用默认堆栈大小来实现此目的,因此我的直觉表明您最好的解决方案是#1。您的应用程序中不需要数千个线程。

You're creating too many threads for the memory available for thread stacks. You can reduce the number of threads you create, or decrease their default stack size from the (generous) default. -XX:ThreadStackSize=128 would make it 128KB. Of course, too little stack and you may hit StackOverflowError (heh) if you have a particularly deep method call.

Since you have to make a lot of threads (thousands) to hit this with a default stack size, my gut says your best solution is #1. You don't need thousands of threads in your app.

意犹 2024-12-23 00:06:16

直接原因是您的 JVM 内存不足,无法为新线程创建堆栈。

根本原因更难确定:

  • 应用程序可能不必要地或浪费地创建线程。

  • 应用程序可能在重新部署时泄漏线程。

  • 线程可能会阻塞 I/O(例如读取套接字)并且永远不会返回。

  • 自定义线程池中可能存在导致线程丢失的错误。

  • 新堆栈所需的内存可能已被其他事物用完;例如,通过堆或内存映射文件或 JNI 代码的非堆分配。

  • 等等...

调整线程堆栈大小是一个短期内可能有效的创可贴解决方案。但从长远来看,您需要找出真正导致问题的原因。

您应该首先配置 JVM 在 OOME 上创建转储文件,然后使用事后转储分析器查看是否有任何线索;例如,许多线程处于意外状态。

The immediate cause is that your JVM has run out of memory to create stacks for new threads.

The root cause is harder to determine:

  • The application could be creating threads unnecessarily or wastefully.

  • The application could be leaking threads on a redeployment.

  • Threads could be blocking in I/O (e.g. reading a socket) and never coming back.

  • There could be bugs in a custom thread pool that causes threads to be lost.

  • The memory that you need for new stacks could have been used up by other things; e.g. by the heap or in memory mapped files or non-heap allocation by JNI code.

  • And so on ...

Tweaking the thread stack size is a bandaid solution that might work in the short term. But in the long term you need to find out what is actually causing the problem.

You should could start by configuring the JVM to create an dump file on OOME, and use the post mortem dump analyser to see if there are any clues; e.g. lots of threads in unexpected states.

滥情哥ㄟ 2024-12-23 00:06:16

此错误消息通常意味着您的系统已耗尽启动线程所需的资源。通常这是堆栈的内存。

Java 1.4.1 于 2002 年 9 月发布。也许您的系统需要升级(可能是使用的硬件或软件版本)

This error message usually means your system has run out of a resource required to start a thread. Usually this is memory for the stack.

Java 1.4.1 was released in Sep 2002. Perhaps your system needs upgrading (possibly the hardware used or software versions)

怪异←思 2024-12-23 00:06:16

java.lang.OutOfMemoryError 可能是由于应用程序的可用内存引起的,也可能是由于应用程序中的内存泄漏引起的。检查相关线程链接

JVM分配各个线程内存空间称为线程栈。默认值取决于操作系统和 JVM。您可以尝试通过设置 -Xss 选项来分配分配给线程的内存,也可以尝试减少分配给堆内存 -Xmx 选项的空间。查看本文了解 JVM 调优链接

java.lang.OutOfMemoryError can be caused due to available memory to your application or it can be also caused due to memory leaks in your application. Check related thread link

JVM allocates each thread memory space called thread stack. Default value depends on what OS and JVM. You can try allocating memory allocated to thread by setting -Xss option and also try reducing space allocated to heap memory -Xmx option. Check this article for JVM Tuning link.

失眠症患者 2024-12-23 00:06:16

嗯,

java.lang.OutOfMemoryError: unable to create new native thread

这么说的话,看来你的内存不够了。可能是旧线程没有被杀死,所以越来越多,直到内存已满?

或者,您可以增加 Java 的内存大小。

Well, it says

java.lang.OutOfMemoryError: unable to create new native thread

so it seems that you don't have enough memory. It might be that old threads don't get killed off, so there come more and more and more untill memory is full?

Alternatively, you could increase the memory size of Java.

倾听心声的旋律 2024-12-23 00:06:16
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.util.Scanner;

/**
 *
 * @author smart
 */
public class JavaApplication1 {


    public static void main(String[] args) {

        String cname;
        double quantity, price, dp, total, dv, finaltotal;

        Scanner S=new Scanner(System.in); 


        System.out.println("please enter clientname");

        cname=S . nextLine();
        System.out.println("please enter quantity");
        quantity=S . nextDouble();
        System.out.println("please enter price");
        price=S . nextDouble();
        System.out.println("please enter discount percentage");
        dp=S . nextDouble();

        total=S . nextDouble();
        dv=S . nextDouble();
        finaltotal=S . nextDouble();

        total= quantity+price;
        dv= price-dp;
        finaltotal=total*dv;

        System.out.println(total);

        System.out.println(dv);

        System.out.println(finaltotal);           
    }   
}
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.util.Scanner;

/**
 *
 * @author smart
 */
public class JavaApplication1 {


    public static void main(String[] args) {

        String cname;
        double quantity, price, dp, total, dv, finaltotal;

        Scanner S=new Scanner(System.in); 


        System.out.println("please enter clientname");

        cname=S . nextLine();
        System.out.println("please enter quantity");
        quantity=S . nextDouble();
        System.out.println("please enter price");
        price=S . nextDouble();
        System.out.println("please enter discount percentage");
        dp=S . nextDouble();

        total=S . nextDouble();
        dv=S . nextDouble();
        finaltotal=S . nextDouble();

        total= quantity+price;
        dv= price-dp;
        finaltotal=total*dv;

        System.out.println(total);

        System.out.println(dv);

        System.out.println(finaltotal);           
    }   
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文