0

I am trying to deploy a war to jboss 6 and i am getting the following exception that seems to envolve one of the jars in the war :webservices-rt.jar this works fine in myeclipse-tomcat, so why is jboss rejecting the war?

14:45:03,286 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfs:///C:/jboss-6/server/node01/deploy/altorweb.war state=ClassLoader mode=Manual requiredState=PostClassLoader: org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///C:/jboss-6/server/node01/deploy/altorweb.war

...

Caused by: java.lang.Error: Error visiting "/C:/jboss-6/server/node01/deploy/altorweb.war/WEB-INF/lib/webservices-rt.jar/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator$Namespace.class"
        at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:268) [jboss-classloading-vfs.jar:2.2.0.Alpha7]
        at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:407) [jboss-vfs.jar:3.0.0.CR5]
dov.amir
  • 11,489
  • 7
  • 45
  • 51
  • found a similar question , with no correct answer : http://stackoverflow.com/questions/4410017/how-to-separate-ear-classloader-and-system-classloader-in-jboss-6 – dov.amir Feb 07 '12 at 08:45

1 Answers1

1

JBossAS6's implementation of unzip is somewhat** short on functionality. Basically it is quite easy to create zip archive which will create same Error on unzipping; that is during deployment of war/ear. To avoid this error allowed file names within archive should be in cp437 encoding. Remove/rename all non-english filenames from archive.

** zip container allows only Cp437 and UTF-8 encoded filenames by specification, but it lacks functionality to enforce this rule. And unfortunately it is quite easy to break it. So it isn't strict JBossAS6 error, but it is easy to see this error on JBoss as it uses non-java-defult unziping code.

Talijanac
  • 1,087
  • 9
  • 20
  • how do i check if i have non Cp437/utf8 file names? I cant see any – dov.amir Feb 07 '12 at 12:03
  • You can't. That's the problem with zip archives. If it would be possible jboss wouldn't have this error. Usually ziping of files just dumps byte arrays of filenames within zip container producing encoding error if your filesystem has different encoding than required by zip specification. For example ziping on linux. Ant provides parameter on zip task to override this problem. Your error may or may not be the thing I am talking about but I had this error on jboss when I deployed archives with easterneuropen diacritic letters. That is how I actually found about zip encoding problems. – Talijanac Feb 07 '12 at 12:36