Back Forum Reply New

Spring error deploying to JBoss 5

After copying the war file to the deploy directory and starting JBoss 5.1.0GA,  the following error occurs:

Code:
19:54:14,883 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
19:54:15,000 ERROR [ContextLoader] Context initialization failed
org..beans.factory.BeanDefinitionStoreException: I/O failure during classpath scanning; nested exception is java.util.zip.ZipException: error in opening zip file
at org..context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:222)
at org..context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)
at org..context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
at org..beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org..beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org..beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org..beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)

I'm not even sure if this is a Spring problem because I'm almost certain this was running fine under JBoss 4.2.2.

Same issue...

It happened to me because a runtime exception thrown from a context listener. The stacktrace is misleading.

Hmm... how did you track it down?

In our case it happened because the Listener did some checks of the environment and the database in order to abort as early as possible. I'd suggest trying to comment out the code in the listeners and check if you get a different stacktrace. Another suggestion is to copy an expanded war because the (strange) message seems to be reported by the war quot;unzipperquot;.

While googling the issue, I also read about a problem with some versions of the JDK unable to unzip some kinds of zips, but it is unlikely.
¥
Back Forum Reply New