[
https://jira.jboss.org/jira/browse/JBAS-6518?page=com.atlassian.jira.plug...
]
Adrian Brock updated JBAS-6518:
-------------------------------
Component/s: VFS
(was: ClassLoading)
Assignee: Ales Justin (was: Scott M Stark)
This looks to be an issue with the isLeaf() handling for the nested ejb.jar in
AbstractStructureDeployer.addClassPath()
// Add the manifest locations
if (includeRootManifestCP && isLeaf(entry) == false)
{
try
{
VFSUtils.addManifestLocations(entry, paths);
}
When the path has spaces in it, it is not processing the META-INF/MANIFEST.MF
because isLeaf() is returning true and so it is not adding the lib.jar to the Class-Path.
When it works (no spaces):
2009-02-17 19:09:34,421 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure]
(HDScanner) Added context org.jboss.deployers.vfs.spi.structure.StructureCon
text@f93d2d from doNothing.ear
2009-02-17 19:09:34,422 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure]
(HDScanner) Added classpath entry ejb.jar for ejb.jar from DelegatingHandler
@30747724[path=doNothing.ear
context=file:/home/ejort/development/jboss-5.0/build/output/jboss-5.0.1.GA/server/default/deploy/
real=file:/home/ejort/development/jboss-
5.0/build/output/jboss-5.0.1.GA/server/default/deploy/doNothing.ear]
Addition of lib.jar
2009-02-17 19:09:34,422 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure]
(HDScanner) Added classpath entry lib.jar for lib.jar from DelegatingHandler
@30747724[path=doNothing.ear
context=file:/home/ejort/development/jboss-5.0/build/output/jboss-5.0.1.GA/server/default/deploy/
real=file:/home/ejort/development/jboss-
5.0/build/output/jboss-5.0.1.GA/server/default/deploy/doNothing.ear]
When it doesn't work (with a space in the path)
2009-02-17 18:46:06,912 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure]
(main) Added context org.jboss.deployers.vfs.spi.structure.StructureContext@
1e5e323 from doNothing.ear
2009-02-17 18:46:06,913 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure]
(main) Added classpath entry ejb.jar for ejb.jar from DelegatingHandler@3601
806[path=doNothing.ear
context=file:/home/ejort/development/jboss-5.0/build/Program%20Files/jboss-5.0.1.GA/server/default/deploy/
real=file:/home/ejort/development/jbo
ss-5.0/build/Program%20Files/jboss-5.0.1.GA/server/default/deploy/doNothing.ear]
Spaces in path cause deployment to fail
---------------------------------------
Key: JBAS-6518
URL:
https://jira.jboss.org/jira/browse/JBAS-6518
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: VFS
Affects Versions: JBossAS-5.0.0.GA
Environment: Windows XP, JDK 1.5.0_16
Reporter: Rostyslav Smirnov
Assignee: Ales Justin
Attachments: doNothing.ear, sources.jar
When deploying a simple EAR containing an EJB JAR and a library JAR, exception gets
thrown during deployment if path to JBoss directory contains a space character:
07:49:32,924 ERROR [AbstractKernelController] Error installing to PostClassLoader:
name=vfszip:/C:/Program%20Files/jboss-5.0.0.GA/server/default/deploy/doNothing.ear
state=ClassLoader mode=Manual requ
iredState=PostClassLoader
org.jboss.deployers.spi.DeploymentException: Error during deploy:
vfszip:/C:/Program%20Files/jboss-5.0.0.GA/server/default/deploy/doNothing.ear/ejb.jar
at
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoClassDefFoundError: main/DoNothing
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:62)
at
org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:509)
at
org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:469)
at java.security.AccessController.doPrivileged(Native Method)
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:467)
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:444)
at
org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
at
org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
at
org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
at
org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
at
org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
at
org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:256)
at
org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:735)
at
org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:378)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at
org.jboss.metadata.process.processor.ejb.jboss.SetDefaultLocalBusinessInterfaceProcessor.process(SetDefaultLocalBusinessInterfaceProcessor.java:114)
at
org.jboss.metadata.process.chain.ejb.jboss.JBossMetaDataProcessorChain.process(JBossMetaDataProcessorChain.java:115)
at
org.jboss.ejb3.deployers.Ejb3MetadataProcessingDeployer.deploy(Ejb3MetadataProcessingDeployer.java:128)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
... 19 more
Steps to reproduce:
1) Extract jboss-5.0.0.GA.zip to a location containing a space in its path (ex.
C:\Program Files\)
2) Deploy doNothing.ear
3) Start up the server, deployment will fail with the aforementioned exception
After moving jboss-5.0.0.GA folder to a location that does not contain a space in
it's path (ex. C:\) deployment completes successfully.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira