I'm using Eclipse Galileo (Build id: 20100218-1602) with JBoss EAP 4.3 Runtime and jdk1.6.0_29.
I added my resources to the server and then do a "Full Publish" of my resources. The state goes from "Republished" to "Synchronized" and everything seems to be well.
I right-click my server, click on "Start". An error occurs during the start.
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@cac31a84 { url=file:*repository*/server/default/deploy/*project*_srv_mod_vin_int.war/ }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: URL file:*repository*/server/default/deploy/*project*_srv_mod_vin_int.war/ deployment failed
state: FAILED
watch: file:*repository*/server/default/deploy/*project*_srv_mod_vin_int.war/WEB-INF/web.xml
altDD: null
lastDeployed: 1448379140991
lastModified: 1448378977301
mbeans:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.web.deployment:war=*project*_srv_mod_vin_int.war,id=->893183356
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:*repository*/server/default/deploy/*project*_srv_mod_vin_int.war/ deployment failed
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.web.deployment:war=*project*_srv_mod_vin_int.war,id=-893183356
State: FAILED
Reason: org.jboss.deployment.DeploymentException: URL file:*repository*/server/default/deploy/*project*_srv_mod_vin_int.war/ deployment failed
While going up in the eclipse console log, I find the following exception:
[24 nov. 2015 16:32:21,538] - [ERROR] - [THREAD main] - org.springframework.web.context.ContextLoader[org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:353)] - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:fmwk-application-context_module_service.xml]
Offending resource: class path resource [application-context_module_service.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [fmwk-application-context_module_service.xml]; nested exception is java.io.FileNotFoundException: class path resource [fmwk-application-context_module_service.xml] cannot be opened because it does not exist
The file application-context_module_service.xml has a reference to fmwk-application-context_module_service.xml :
<import resource="classpath:fmwk-application-context_module_service.xml" />
The file fmwk-application-context_module_service.xml does exist in my project.
After doing some research on my server in the repository server\\default\\deploy\\ project _srv_mod_vin_int.war\\WEB-INF\\lib I discover that one of my jar files, project _srv_mod_vin_framework.jar , the one who contains normally the file fmwk-application-context_module_service.xml has a 0 Ko size.
At this state, I replaced the 0 Ko jar file by a correct jar file got from my maven task (right click and "Export" is good also) and it works. But, I would like to understand what is happening here, why I'm publishing a 0 Ko jar file and what I could do to not have to do this trick
So, after that, I go into my workspace into the .metadata.plugins\\org.jboss.ide.eclipse.as.core\\JBoss_EAP_4.3_Runtime_Server1300265697099\\log file and I find an exception:
!SESSION 2015-11-24 15:13:39.287
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_29
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
!ENTRY org.jboss.ide.eclipse.as.core 0 33685505 2015-11-24 16:29:37.364
!MESSAGE 595 files modified in module *project*_srv_mod_vin_int
!ENTRY org.jboss.ide.eclipse.as.core 0 33685505 2015-11-24 16:29:37.588
!MESSAGE 276 files modified in module *project*_srv_mod_vin_services
!ENTRY org.jboss.ide.eclipse.as.core 4 33685506 2015-11-24 16:29:37.596
!MESSAGE Full publish failed for module *project*_srv_mod_vin_framework
!SUBENTRY 1 org.jboss.ide.eclipse.as.core 4 33685513 2015-11-24 16:29:37.596
!MESSAGE unable to assemble module *project*_srv_mod_vin_framework
!STACK 0
java.util.zip.ZipException: ZIP file must have at least one entry
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)
at org.jboss.ide.eclipse.as.core.server.xpl.ModulePackager.finished(ModulePackager.java:59)
at org.jboss.ide.eclipse.as.core.publishers.PublishUtil.packModuleIntoJar(PublishUtil.java:234)
at org.jboss.ide.eclipse.as.core.publishers.JstPublisher.fullPublish(JstPublisher.java:121)
at org.jboss.ide.eclipse.as.core.publishers.JstPublisher.publishModule(JstPublisher.java:93)
at org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod.publishModule(LocalPublishMethod.java:71)
at org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior.publishModule(DeployableServerBehavior.java:65)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:949)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1039)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:872)
at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:708)
at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:2731)
at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:278)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
I think I get the ZipException
because something went wrong before and I've nothing to put into my archive file ?
Then I go to .metadata.plugins\\org.eclipse.wst.server.core\\publish\\publish.dat
Into this file, I find the mention of application-context_module_service.xml but not fmwk-application-context_module_service.xml .
The point of not finding it is because I've a similar project, built on the same architecture, which has those same .xml files. This one is published correctly and the publish.dat do have the mention of fmwk-application-context_module_service.xml .
There is no differences between the two projects on fmwk-application-context_module_service.xml references.
Does anyone can help me on this ? I did some research on eventual log files inside the .metadata repository that could tell exactly what is the error encountered and why my published jar has a size of 0 Ko but I don't find anything more than what I exposed here. I can't go further this publish.dat file.
I would be very thankful if you can give me a little tip or help about this. Thank you.
Finally found the origin of the error. It was in the .settings/org.eclipse.wst.common.component.
After a merge, this file lost the <wb-module></wb-module>
and <wb-ressource></wb-ressource>
I reverted the file to an older version and it works well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.