ClassNotFoundException / NoClassDefFoundError occurs randomly after startup in JBoss EAP 5.x?

Solution Verified - Updated -

Issue

  • A NoClassDefFoundError randomly occurs after an application is running for longer than 30 minutes. The NoClassDefFoundError is thrown even when one class tries to load another class that is packaged in the same jar. There are symlinks in the JBoss path.

  • There are random NoClassDefFoundError exceptions on classes which are in a jar in the JBoss lib directory after the server has been running for some time.

  • There is a directory, not part of JBoss, that contains applications deployed with twiddle or the admin console. Some time after deployment, NoClassDefFoundErrors are thrown on application classes.

  • The JBoss deploy directory is placed over NFS and hot deployment is disabled. If the deployment is replaced by a newer version, the instances that were started using the old version will fail to access resource files.

2012-06-13 14:37:45,915 INFO  [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.2 (build: SVNTag=JBPAPP_5_1_2 date=201111102209)] Started in 32s:533ms
2012-06-13 14:40:34,469 WARN  [org.jboss.system.server.profileservice.hotdeploy.HDScanner] (HDScanner) Failed to add deployment: vfszip:/NotBackedUp/jboss-all/jboss-eap-5.1.2/jboss-as/server/production_hdscan/deploy/mytest.ear/
org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(mytest.ear)
    at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
    at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:85)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1001)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:437)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:387)
    at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:297)
    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:385)
    at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Error determining structure: mytest.ear
    at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:307)
    at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73)
    at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196)
    at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221)
    at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
  • I get the following error under consistent high load in my webservice client. Note I have symlinks in my JBoss installation:
java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
    at java.util.HashMap$EntryIterator.next(HashMap.java:834)
    at java.util.HashMap$EntryIterator.next(HashMap.java:832)
    at org.jboss.util.TimedCachePolicy.getValidKeys(TimedCachePolicy.java:364)
    at org.jboss.virtual.plugins.cache.IterableTimedVFSCache.findContext(IterableTimedVFSCache.java:65)
    at org.jboss.virtual.plugins.cache.CombinedVFSCache.findContext(CombinedVFSCache.java:116)
    at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getFile(DefaultVFSRegistry.java:148)
    at org.jboss.virtual.spi.registry.VFSRegistry.getFile(VFSRegistry.java:124)
    at org.jboss.virtual.protocol.AbstractVFSHandler.openConnection(AbstractVFSHandler.java:71)
    at java.net.URL.openConnection(URL.java:945)
    at java.net.URL.openStream(URL.java:1010)
    at org.jboss.ws.metadata.config.JBossWSConfigFactory.getNamespaceURI(JBossWSConfigFactory.java:128)
    at org.jboss.ws.metadata.config.JBossWSConfigFactory.parse(JBossWSConfigFactory.java:82)
    at org.jboss.ws.metadata.config.JBossWSConfigFactory.getConfig(JBossWSConfigFactory.java:151)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.initEndpointConfigMetaData(EndpointMetaData.java:891)
    at org.jboss.ws.metadata.umdm.EndpointMetaData.initEndpointConfig(EndpointMetaData.java:873)
    at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:285)
    at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:295)
    at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:222)
    at javax.xml.ws.Service.getPort(Service.java:141)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content