Create and deploy WAR into SMX
tarek_supertallal Jul 8, 2009 5:49 AMHi everyone,
I've read that we can deploy a WAR into servicemix 4 with the help of the feature called "web". Well, I've also read that we have to add some informations into the MANIFEST.MF like "Bundle-SymbolicName". It's a little bit confused for me and I'm looking for a sample of war, just one with a jsp page saying "hello" or something like this.
Is there any maven osgi artifact for a war project ??
I've developped a simple war with NetBeans, and I've added the headers in the MANIFEST but when I deploy it into smx I've the following error :
org.ops4j.lang.PreConditionException: Number of xml's was not equal to 2. Was: 1
at org.ops4j.lang.PreConditionException.validateEqualTo(PreConditionException.java:218)
at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(WebXmlObserver.java:91)
at org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.java:186)
at org.ops4j.pax.swissbox.extender.BundleWatcher.access$000(BundleWatcher.java:45)
at org.ops4j.pax.swissbox.extender.BundleWatcher$1.bundleChanged(BundleWatcher.java:127)
at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:771)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:700)
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3382)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1517)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:770)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:751)
at org.apache.servicemix.kernel.filemonitor.FileMonitor.refreshPackagesAndStartOrUpdateBundles(FileMonitor.java:549)
at org.apache.servicemix.kernel.filemonitor.FileMonitor.onFilesChanged(FileMonitor.java:299)
at org.apache.servicemix.kernel.filemonitor.FileMonitor$1.filesChanged(FileMonitor.java:151)
at org.apache.servicemix.kernel.filemonitor.Scanner.reportBulkChanges(Scanner.java:431)
at org.apache.servicemix.kernel.filemonitor.Scanner.reportDifferences(Scanner.java:327)
at org.apache.servicemix.kernel.filemonitor.Scanner.scan(Scanner.java:261)
at org.apache.servicemix.kernel.filemonitor.Scanner$1.run(Scanner.java:221)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
I'm attaching my war project. But if someone has a sample working, please send it to me in response.
Any help would be appreciated.
Regards,
Tarek
-
WebAppTest.rar 15.9 KB