10:52:01,968 ERROR JobRunShell:225 - Job DEFAULT.jobtask threw an unhandled Exception: 
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.zonny.service.UserService_UserServicePort_Client] failed; nested exception is java.lang.OutOfMemoryError: PermGen space
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:269)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.axis2.jaxws.description.impl.ParameterDescriptionImpl.<init>(ParameterDescriptionImpl.java:92)
at org.apache.axis2.jaxws.description.impl.OperationDescriptionImpl.createParameterDescriptions(OperationDescriptionImpl.java:706)
at org.apache.axis2.jaxws.description.impl.OperationDescriptionImpl.setSEIMethod(OperationDescriptionImpl.java:590)
at org.apache.axis2.jaxws.description.impl.EndpointInterfaceDescriptionImpl.updateWithSEI(EndpointInterfaceDescriptionImpl.java:387)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.buildEndpointDescriptionFromWSDL(EndpointDescriptionImpl.java:1088)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.buildDescriptionHierachy(EndpointDescriptionImpl.java:1029)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:256)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:208)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:453)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:303)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:177)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:542)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:466)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.zonny.service.UserService_Service.getUserServicePort(UserService_Service.java:63)
at com.zonny.service.UserService_UserServicePort_Client.execute(UserService_UserServicePort_Client.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
10:52:01,984 ERROR ErrorLogger:2337 - Job (DEFAULT.jobtask threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.zonny.service.UserService_UserServicePort_Client] failed; nested exception is java.lang.OutOfMemoryError: PermGen space]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'execute' on target class [class com.zonny.service.UserService_UserServicePort_Client] failed; nested exception is java.lang.OutOfMemoryError: PermGen space
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:269)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
... 1 more
我用的是spring定时器1.8.4版,调用后一直报内存溢出

解决方案 »

  1.   

    使用jdk自带的 jvisualVM查看一下。jvisualVM使用方法自己搜索一下吧
      

  2.   

    定时器执行任务时内存溢出,要好好检查一下,是任务的问题还是jvm的PermGen本身分配得不够
      

  3.   

    内存不够?
    确认代码无误后调整jvm PermGen块内存大小! 
      

  4.   

    是不是你service没有初始化?
    ApplicationContext context = new ClassPathXmlApplicationContext("application.xml");
    AnnounceService announceService = (AnnounceService)context.getBean("announceService");
    这样初始化试试呢
      

  5.   

    版本问题估计仍旧是表面原因,换了版本之后PermGen是不是默认更大