-
SSH出现Caused by: java.lang.OutOfMemoryError: Java 5
[Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/addUser' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'userDAOProxy' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAOProxy' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAOProxy' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: Java heap space
Caused by: java.lang.OutOfMemoryError: Java heap space
]2008年6月22日 22:18
1个答案 按时间排序 按投票排序
-
采纳的答案
看得出来,是在Tomcat等在加载ApplicationContext过程中,由于初始的Bean过多而发生的OOM。解决方法就是给Tomcat启动加大启动内存。
[1] 如果是在Eclipse中的Tomcat启动的,在启动配置中设置一个参数
-Xmx512m 当然视你自己情况配置一个大小。
在我的Eclipse的Tomcat的Run Configuration的VM arguments的内容如下:引用-Dcatalina.base="D:\WORKSPACE\SDK-3.4\RAP\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="D:\JAVA\apache-tomcat-5.5.20" -Dwtp.deploy="D:\WORKSPACE\SDK-3.4\RAP\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="D:\JAVA\apache-tomcat-5.5.20\common\endorsed" -Xmx512m
[2] 如果直接使用Tomcat启动的,
找到tomcat\bin\catalina.bat文件,同样也是加这个启动参数。
下面是我的Tomcat的catalina.bat文件配置效果:引用set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties" -Xmx512m2008年6月22日 23:48
相关推荐
在Java应用程序运行过程中,"java.lang.OutOfMemoryError: PermGen space"错误是常见的一个问题,尤其是在使用Tomcat这样的Java应用服务器时。这个错误表明应用程序在 PermGen 区域(Permanent Generation)耗尽了...
Caused by: java.net.UnknownHostException: openapi.alipay.com
标题中的问题“scrcpy投屏 AssertionError: java.lang.reflect.InvocationTargetException”是用户在尝试使用Scrcpy时遇到的一个常见错误。这个错误通常意味着在执行某个方法时,Java运行时环境遇到了未预期的情况。...
整个系统都没有错误,但是在发布运行后,控制台上却抛出了这样的异常: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
4. **调整PermGen空间**:在Java 8之前, PermGen 区域用于存储类的元数据,如果这个区域耗尽,会出现`java.lang.OutOfMemoryError: PermGen space`错误。在Java 8中,这部分被MetaSpace取代,可通过`-XX:...
### 错误解析:Caused by: android.system.ErrnoException: write failed: ENOSPC (No space left 在Android开发过程中,可能会遇到“Caused by: android.system.ErrnoException: write failed: ENOSPC (No space ...
在Java编程中,`java.lang.ClassNotFoundException`是一个常见的运行时异常,它表示JVM尝试加载一个类时,找不到对应的.class文件。在这个特定的错误中,我们看到的是`org.apache.commons.dbcp.BasicDataSource`,这...
Android Caused by: java.lang.ClassNotFoundException解决办法 出现问题: 08-13 18:29:22.924: E/AndroidRuntime(1875): Caused by: Java.lang.ClassNotFoundException:XXXXX in loader dalvik.system....
异常:Caused by: java.lang.IllegalStateException: Method has too many Body parameters Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract ...
Caused by: java.lang.RuntimeException: javax.management.remote.JMXServerErrorException: java.lang.AssertionError: Registered more than one instance with the same objectName : com.bea:Name=wl04,Type=...
在这个特定的场景中,异常堆栈跟踪显示 `Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type`,这表明在运行时,系统无法找到`org.objectweb.asm.Type`这个类。`org.objectweb.asm` 是一个用于...
"java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver" 解决方案 [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. 解决了jsp连接 sql server 2000的问题
java.lang.NoSuchFieldError: Companion 问题的解决方案
在这个特定的场景中,异常堆栈跟踪显示了 `Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer`,这表明系统无法找到 `org.apache.commons.collections.Transformer` 类。...
在Java开发过程中,我们偶尔会遇到`java.lang.TypeNotPresentException`异常,这是一种在运行时发生的问题,通常意味着程序试图加载的类或资源不存在,导致了该异常的抛出。这种情况的出现,往往是因为编译时缺少...
Caused by: java.lang.NoClassDefFoundError: com.sun.org.apache.xml.internal.resolver.CatalogManager at com.sun.xml.ws.util.xml.XmlUtil.createEntityResolver(XmlUtil.java:266) at org.jvnet.jax_ws_...
在与银联的对接中,调试过程中报错或使用类似登入加密:java.lang.SecurityException: JCE cannot authenticate the provider BC 进行问题解决,里面包含 bcprov-jdk16-143.jar与bcprov-jdk15-135.jar与具体文件存放...