0

OutOfMemoryError在 JBoss AS 7.2 中部署 OSGi/Blueprint 包时,我遇到了一个奇怪的问题。如果我启动 JBoss 时部署目录中存在某些捆绑包,则会导致此错误 - 但只能相互结合使用。

在我当前的设置中,我有四个捆绑包 - 我们称它们A为 、B和. 并且相互依赖但不相互依赖,它们都使用我也部署的各种外部库。如果和恰好与JBoss 启动时的其中之一一起部署,那么一切似乎都可以正常部署,但如果两者和都存在,我会得到以下堆栈跟踪:CDABCDCDABAB

16:42:30 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jbosgi.PersistentBundles.RESOLVE: org.jboss.msc.service.StartException in service jbosgi.PersistentBundles.RESOLVE: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.lang.String.substring(String.java:1939) [rt.jar:1.6.0_45]
        at java.util.StringTokenizer.nextToken(StringTokenizer.java:335) [rt.jar:1.6.0_45]
        at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:911)
        at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:957)
        at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:957)
        at org.apache.felix.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:696)
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:188)
        at org.jboss.osgi.resolver.felix.StatelessResolver.resolve(StatelessResolver.java:56)
        at org.jboss.osgi.framework.internal.ResolverImpl.resolveAndApply(ResolverImpl.java:137)
        at org.jboss.osgi.framework.internal.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:366)
        at org.jboss.osgi.framework.spi.BootstrapBundlesResolve.start(BootstrapBundlesResolve.java:127)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
        ... 3 more

16:42:30 ERROR [stderr] java.lang.OutOfMemoryError: Java heap space
16:42:30 ERROR [stderr]         at java.util.LinkedList.listIterator(LinkedList.java:667)
16:42:30 ERROR [stderr]         at java.util.AbstractList.listIterator(AbstractList.java:284)
16:42:30 ERROR [stderr]         at java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:222)
16:42:30 ERROR [stderr]         at org.jboss.sun.net.httpserver.ServerImpl$ServerTimerTask.run(ServerImpl.java:849)
16:42:30 ERROR [stderr]         at java.util.TimerThread.mainLoop(Timer.java:512)
16:42:30 ERROR [stderr]         at java.util.TimerThread.run(Timer.java:462)

稍后

16:42:40 INFO  [org.jboss.as.controller] JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jbosgi.PersistentBundles.COMPLETE (missing) dependents: [service jboss.deployment.unit."com.springsource.org.jgroups-2.2.8.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.aopalliance-1.0.0.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.objectweb.asm-1.5.3.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.hibernate-3.3.1.GA.jar".CONFIGURE_MODULE, JBAS014799: ... and 54 more ]
JBAS014777:   Services which failed to start:      service jbosgi.PersistentBundles.RESOLVE: org.jboss.msc.service.StartException in service jbosgi.PersistentBundles.RESOLVE: Failed to start service

(此处列出的所有库之前都已成功部署,尽管我无法检查“54 more”是什么,以及它们是否都存在)

我在这里完全不知所措。什么可能导致这种行为?我从哪里开始故障排除?

4

0 回答 0