我正在使用maven驱动的应用程序,它在glassfish中运行bean。现在我想注入我的bean,因此我需要一个beans.xml。但是当我将文件放入META-INF目录时,我在部署时遇到错误:
Information: WELD-000900 SNAPSHOT
Apr 27, 2014 10:49:07 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.parser.JAXPParser : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:07 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.parser.XSOMParser$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:08 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.parser.XSOMParser : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:08 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.ComponentNameFunction : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:15 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.ContextClassloaderLocal$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:25 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.ContextClassloaderLocal : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:26 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.DeferedCollection$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:26 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.DeferedCollection : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:27 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.DomAnnotationParserFactory$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:27 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.DomAnnotationParserFactory$AnnotationParserImpl : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:33 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.DomAnnotationParserFactory : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:43 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.NameGetter : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:49:54 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.SimpleTypeSet : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:06 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.TypeClosure : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:16 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.TypeSet$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:27 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.TypeSet$2 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:38 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.TypeSet : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:49 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.util.XSFunctionFilter : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:50:59 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.visitor.XSTermFunctionWithParam : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:51:10 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.visitor.XSWildcardVisitor : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:51:21 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
Warnung: Error while trying to load Bean Class com.sun.xml.internal.xsom.XmlString$1 : java.lang.OutOfMemoryError: PermGen space
Apr 27, 2014 10:51:33 AM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry
我已经尝试增加可用内存,但这没有用:
export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=1G"
有什么想法吗?
这是poms(这个项目中有模块):