0

I'm having problems migrating from jboss 4.2.1 to jboss 5.1.0

This is the exception i got when I try to deploy my .ear file

    WARN  [Scanner] could not read entries
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    at java.util.zip.ZipFile.<init>(ZipFile.java:148)
    at org.jboss.seam.deployment.Scanner.handleArchive(Scanner.java:151)
    at org.jboss.seam.deployment.Scanner.scan(Scanner.java:132)
    at org.jboss.seam.deployment.NamespaceScanner.getPackages(NamespaceScanner.java:39)
    at org.jboss.seam.init.Initialization.addNamespaces(Initialization.java:787)
    at org.jboss.seam.init.Initialization.create(Initialization.java:85)
    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)

and so the error is larger than that.

It says is a WARN but it doesn't unzip the .ear/.war files and of course it doesn't deploy anything.

I've checked the file isn't corrupt. Any help would be apreciated. Thanks & cheers

skaffman
  • 398,947
  • 96
  • 818
  • 769
Ron
  • 2,215
  • 3
  • 22
  • 30
  • Are you using hot-deployment? In other words, are you dropping the EAR into a running server's `deploy` directory? – skaffman Dec 03 '10 at 15:39
  • nop! I already check that. I restart the server and get the same error. It is not trying to deploy a part of the ear when is uncompletly copied because when the server starts, the .ear is already there – Ron Dec 03 '10 at 15:55

2 Answers2

2

This is caused by spring's context:component-scan feature incompatibility with JBoss5 Virtual File System (VFS). There's a lib (called snowdrop, provided by JBoss) you can drop into the project that contains a VFS-enabled application context implementation.

You can find it here - http://www.jboss.org/snowdrop

Lajcik
  • 306
  • 1
  • 2
  • 10
  • Where does Spring come into this? There's no mention of Spring anywhere in the question. – skaffman Dec 03 '10 at 15:44
  • True, but I bet this is the cause. I had the exact same problem not long ago. It's a pretty obscure and misleading error, however the snowdrop documentation explicitly states to look out for it. – Lajcik Dec 03 '10 at 15:52
  • in fact, we are no using Spring at all. That library is just a fix for Spring as I read. Please tell me if i'm wrong – Ron Dec 03 '10 at 15:57
  • Yeah, if you're not using spring then something else is wrong. However it might still be a good lead - I would check the code for resource scanning calls - ClassLoader.getResources() etc. You can use snowdrop to replace those with vfs enabled lookups. – Lajcik Dec 03 '10 at 16:06
  • There's a bunch of other ideas here http://stackoverflow.com/questions/646322/jboss5-cannot-deploy-due-to-java-util-zip-zipexception-error-in-opening-zip-fil – Lajcik Dec 03 '10 at 16:15
  • I already read that post and tried some of the solutions there without success :( I'll check it again just in case I've missed something. If something works, I'll re post-it here. Still, if someone resolve it please let me know – Ron Dec 03 '10 at 16:21
0

Problem solved. It was a couple of libraries out of date of the seam framework. Apparently they changed some things from seam version for jboss4 to jboss5.

Just update seam libraries and thats all.

Thanks everybody for your interest. Hope my solution helps others Cheers

Ron
  • 2,215
  • 3
  • 22
  • 30