Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Need help in deploying war file in virgo(Getting exception while accessing the rest based service)
Need help in deploying war file in virgo [message #714023] Tue, 09 August 2011 16:02 Go to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
I have created a spring mvc osgi bundle which is essentially a rest based service provider. While accessing the service I am getting following exception which I am not able to solve.

org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'contextClass'; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext]
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:62)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:119)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.eclipse.virgo.web.tomcat.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:29)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:662)


This means there is some problem with servlet initiation. I am not sure how to solve this. FYI here is web.xml file content


<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>Business Logic Layer</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:*context.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>DataAPI</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:*servlet.xml</param-value>
</context-param>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DataAPI</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
Re: Need help in deploying war file in virgo [message #714024 is a reply to message #714023] Tue, 09 August 2011 16:06 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Did you add

Import-Package: org.eclipse.virgo.web.dm


to your bundle MANIFEST.MF?

Can you post you MANIFEST.MF file also?
Re: Need help in deploying war file in virgo [message #714026 is a reply to message #714024] Tue, 09 August 2011 16:14 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
I added this to manifest file now I am getting following exception

org.springframework.context.ApplicationContextException: Fatal initialization error in servlet with name 'DataAPI': custom WebApplicationContext class [org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext] is not of type ConfigurableWebApplicationContext
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:407)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.eclipse.virgo.web.tomcat.ApplicationNameTrackingValve.invoke(ApplicationNameTrackingValve.java:29)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:662)


And this is my manifest file


Manifest-Version: 1.0
Export-Package: com.org.my.data.bll.external.controllers;uses:=
"com.org.my.data.bll.external.response,com.org.my.data.
common.external.dto,com.org.my.data.common.external.exception"
,com.org.my.data.bll.external.response;uses:="com.org.my.data.common.external.exception,com.org.my.data.common.extern
al.interfaces,javax.xml.bind.annotation.adapters",com.org.my.d
ata.bll.internal.controllers;uses:="com.org.my.data.bll.extern
al.controllers,com.org.my.data.bll.external.response,com.click
able.pro.data.common.external.dto,com.org.my.data.common.exter
nal.exception,com.org.my.data.common.external.interfaces,org.s
pringframework.stereotype,org.springframework.web.bind.annotation",co
m.org.my.data.bll.internal.response;uses:="com.org.my.d
ata.bll.external.response,com.org.my.data.common.external.exce
ption,com.org.my.data.common.external.interfaces,javax.xml.bin
d.annotation,org.codehaus.jackson.map,org.codehaus.jackson.type,org.s
pringframework.http,org.springframework.http.converter"
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-ManifestVersion: 2
Import-Package: com.org.my.data.common.e
xternal.adapters.jaxb,com.org.my.data.common.external.dto,com.
org.my.data.common.external.exception,com.org.my.data.c
ommon.external.interfaces,javax.xml.bind.annotation,javax.xml.bind.an
notation.adapters,org.codehaus.jackson,org.codehaus.jackson.map,org.c
odehaus.jackson.map.type,org.codehaus.jackson.type,org.springframewor
k.http,org.springframework.http.converter,org.springframework.stereot
ype,org.springframework.util,org.springframework.web.bind.annotation,
org.springframework.web.servlet.mvc.annotation,org.springframework.we
b.servlet.view,org.springframework.web.servlet.view.json,org.eclipse.virgo.web.dm;version="[2.0.0, 3.0.0)"
Bundle-SymbolicName: bll
Re: Need help in deploying war file in virgo [message #714053 is a reply to message #714026] Tue, 09 August 2011 17:27 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Are you running on Virgo 2 or 3?

First, fix your web.xml to split up <context-param/> into 2 and also <init-param/>

<?xml version="1.0" encoding="UTF-8"?>
<web-app>
    <display-name>Business Logic Layer</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <context-param>
        <param-name>contextClass</param-name>
        <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
    </context-param>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:*context.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>DataAPI</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextClass</param-name>
            <param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
        </init-param>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:*servlet.xml</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>DataAPI</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
</web-app>


Second, if that does not fix it.

Try this, modify your bundlor template to include following:

Import-Template: .... (what ever you have here)
Import-Package: org.eclipse.virgo.web.dm
Import-Library: org.springframework.spring
Excluded-Imports: org.springframework.*


This is more than you need, but lets try to figure out if you are missing an import that something down the line depends on and because of that causes an issue.

Usually anytime you want to use spring with namespaces - bundlor will not pickup transitive import dependencies. So start with a library and trim from there.

Regards,
Dmitry
Re: Need help in deploying war file in virgo [message #714442 is a reply to message #714053] Wed, 10 August 2011 14:20 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
Hi Dmitry
First of all thanks a lot for giving me the directions. It was helpful. I have added import statements as you suggested and modified the web.xml file but as of now I am getting 404 error once I try to access my rest service. I am again reproducing Manifest.Mf and Web.xml file below. I am using Spring 3.0.5 and Virgo 3.0.0.RC2

Manifest.mf


Manifest-Version: 1.0
Export-Package: com.org.prod.data.bll.external.controllers;uses:=
"com.org.prod.data.bll.external.response,com.org.prod.data.
common.external.dto,com.org.prod.data.common.external.exception"
,com.org.prod.data.bll.external.response;uses:="com.org.pr
o.data.common.external.exception,com.org.prod.data.common.extern
al.interfaces,javax.xml.bind.annotation.adapters",com.org.prod.d
ata.bll.internal.controllers;uses:="com.org.prod.data.bll.extern
al.controllers,com.org.prod.data.bll.external.response,com.click
able.prod.data.common.external.dto,com.org.prod.data.common.exter
nal.exception,com.org.prod.data.common.external.interfaces,org.s
pringframework.stereotype,org.springframework.web.bind.annotation",co
m.org.prod.data.bll.internal.response;uses:="com.org.prod.d
ata.bll.external.response,com.org.prod.data.common.external.exce
ption,com.org.prod.data.common.external.interfaces,javax.xml.bin
d.annotation,org.codehaus.jackson.map,org.codehaus.jackson.type,org.s
pringframework.http,org.springframework.http.converter"
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-ManifestVersion: 2
Import-Library: org.springframework.spring
Import-Package: com.org.prod.data.common.external.adapters.jaxb,com.org.prod.data.common.external.dto,com.
org.prod.data.common.external.exception,com.org.prod.data.c
ommon.external.interfaces,javax.xml.bind.annotation,javax.xml.bind.an
notation.adapters,org.codehaus.jackson,org.codehaus.jackson.map,org.c
odehaus.jackson.map.type,org.codehaus.jackson.type,org.springframewor
k.http,org.springframework.http.converter,org.springframework.util,
org.springframework.web.servlet.mvc.annotation,org.springframework.we
b.servlet.view,org.springframework.web.servlet.view.json,org.eclipse.virgo.web.dm,org.springframe
work.beans.factory.annotation;version="[3.0, 3.1)",org.springframewor
k.stereotype;version="[3.0, 3.1)",org.springframework.web.bind.annota
tion;version="[3.0, 3.1)"
Excluded-Imports: org.springframework.*
Bundle-Symb
olicName: bll


Web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<display-name>Business Logic Layer</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:*context.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>DataAPI</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:*servlet.xml</param-value>
</init-param>
<init-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DataAPI</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapp
ing>
</web-app>


and servlet file is

<beans>

<context:component-scan base-package="com.org.prod.data" />
<!-- Configures the @Controller prodgramming model -->
<mvc:annotation-driven />
<!-- To enable @RequestMapping prodcess on type level and method level -->
<bean
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" />
<bean
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<prodperty name="messageConverters">
<list>
<ref bean="jsonConverter" />
</list>
</prodperty>
</bean>

<bean id="jsonConverter"
class="com.org.prod.data.bll.internal.response.MyMappingJacksonHttpMessageConverter">
<prodperty name="supportedMediaTypes" value="application/json" />
<prodperty name="objectMapper" ref="jaxbJacksonObjectMapper" />
<prodperty name="prefixJson" value="true"></prodperty>
<prodperty name="prefixJsonString" value="while(1);"></prodperty>
</bean>
<bean
class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<prodperty name="order" value="1" />
<prodperty name="mediaTypes">
<map>
<entry key="json" value="application/json" />
</map>
</prodperty>
<prodperty name="defaultViews">
<list>
<bean
class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
<prodperty name="objectMapper" ref="jaxbJacksonObjectMapper" />
</bean>
</list>
</prodperty>
</bean>
<bean id="methodHandlerExceptionResolver"
class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver">
<prodperty name="messageConverters">
<list>
<ref bean="jsonConverter" />
</list>
</prodperty>
</bean>
<bean id="jaxbJacksonObjectMapper"
class="com.org.prod.data.common.external.adapters.jaxb.JaxbJacksonObjectMapper">
<
/bean>
</beans>
Re: Need help in deploying war file in virgo [message #714449 is a reply to message #714442] Wed, 10 August 2011 14:40 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
You might need to take a look in the logs if there is an error generated or you are hitting an unmapped controller.

Try to increase logging level for your code and spring mvc in config/serviceability.xml.

Because this is a web-app you should get a log file in serviceability/logs/${your-bsn-name} directory.

Glad you got beyond CNF.

Regards,
Dmitry

p.s. Please use [ code ][ / code ] when including code samples. It is just easier to read.
Re: Need help in deploying war file in virgo [message #714515 is a reply to message #714449] Wed, 10 August 2011 17:29 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
In log file I am getting page not found.I am not sure if this is problem with dispatcherservlet configuration or with controller mapping. [I am kinda new to java spring world as I have been using .net in the past].

Thanks,
Pradeep
Re: Need help in deploying war file in virgo [message #714562 is a reply to message #714515] Wed, 10 August 2011 21:08 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Pradeep, Not knowing how your app is set-up and what kind of controllers and methods annotations you have there - it is hard to say why you get 404.

What you might want to do is to add logging for "org.springframework.web" in log config and examine an output.

In config/serviceability.xml add following:

<logger level="DEBUG" additivity="false" name="org.springframework.web">
		<appender-ref ref="SIFTED_LOG_FILE" />
</logger>


look in the log output. Spring can be terribly verbose, so you can bring down the level to INFO vs. DEBUG

Regards,
Dmitry
Re: Need help in deploying war file in virgo [message #714900 is a reply to message #714562] Thu, 11 August 2011 17:44 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
Hi Dmitry,

As per Virgo documentation we can deploy a standard war file without any change. But I am not finding it that way. Before solving the previous problem I posted I want to understand fundamentals correctly. So I created a simple HelloWorld application in spring mvc using maven archetype provided. When I deploy the war helloworld.war on tomcat7 it is working absolutely fine. But when I deploy the same mvc in pickup directory of virgo tomcat server I am getting exception during bundle starting which is java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener.

So I am curious to know if there is anything need to be done before one deploy standard spring war on Virgo like creating a MANIFEST-INF folder parallel to WEB-INF folder and adding Manifest.mf file in it. If this is true that means I also need to import required bundles and packages. But then this means I am not able to deploy same war in standard tomcat and Virgo both without any change. I am attaching my sample for your reference(Removed dependent jars from lib to reduce size)

sorry for bugging you again and again.

Regards,
Pradeep

PS: few more data points.
After I got this exception while starting bundle I added a manifest file myself having following details...
Manifest-Version: 1.0
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-ManifestVersion: 2
Import-Library: org.springframework.spring
Bundle-SymbolicName: abc


After this I am getting 404 for all requests without any exception.

[Updated on: Thu, 11 August 2011 17:51]

Report message to a moderator

Re: Need help in deploying war file in virgo [message #714903 is a reply to message #714900] Thu, 11 August 2011 17:49 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Can you attach your sample app?

What version of virgo are you using? 2.x or 3.x?
There was a slight change in how Virgo deals with plain war files between 2 and 3.

Dmitry
Re: Need help in deploying war file in virgo [message #714904 is a reply to message #714903] Thu, 11 August 2011 17:52 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
I am using Virgo 3.0.0RC2
Re: Need help in deploying war file in virgo [message #714918 is a reply to message #714904] Thu, 11 August 2011 18:46 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Pradeep,

Here is a working simplest possible spring web-mvc app with maven build file (attached).

I quickly looked over your config - and you have a ton of dependencies and Roo in there. Probably too much stuff to start with. Smile

Regards,
Dmitry
Re: Need help in deploying war file in virgo [message #714929 is a reply to message #714918] Thu, 11 August 2011 19:03 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Another thing that might have got you is the change in M6.

See here: http://www.eclipse.org/virgo/download/release-notes/3.0.0.M06.php
Look for : Backward Incompatible Change to WAB Support

If you also package all of the dependencies in WEB-INF/lib - than it is possible that container will pick them up from there vs. using imports. Just an FYI.

Dmitry

[Updated on: Thu, 11 August 2011 19:04]

Report message to a moderator

Re: Need help in deploying war file in virgo [message #714939 is a reply to message #714929] Thu, 11 August 2011 20:14 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
Hi Dmitry,

Thank you very much for your help. With some modifications in your sample(adding maven dependency for mvc and web) I was able to run it on Tomcat7. Now when I dropped the same war in Virgo, bundle starting failed with same exception. Please note that I did set WABHeaders to defaulted but my manifest.mf file was blank. Now once I added following content in manifest.mf it worked like charm

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-ManifestVersion: 2
Import-Library: org.springframework.spring
Bundle-ClassPath: .,WEB-INF/classes,WEB-INF/lib
Web-ContextPath: sampletest


Therefore key findings are...

you can not directly use the normal war file in virgo. You must have MANIFEST.MF file in MANIFEST-INF folder at top level with predefined headers
and you must import spring library even though might be having it in lib folder (If I remove the import-library statement from my manifest it starts failing again). I am not sure how it will behave in case of other library dependency i.e. import-package/library is required or it can read it from lib directly.

One more bug - In admin console once I go to artifacts view of the web bundle I see import-packages as 0 which should not be the case.

I was talking to <halcyon918> on virgo #irc. He helped me a lot in between.

Let me know if you would like me to file above findings as bug or otherwise.

Thanks again,
Regard,
Pradeep



Re: Need help in deploying war file in virgo [message #714944 is a reply to message #714939] Thu, 11 August 2011 20:33 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Can you check if the war that you deploy have any of the spring jar in the WEB-INF/lib?

If you do - might want to rip them out.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
                </configuration>
            </plugin>


There also was an email today on dev list about the WABHeaders not working. I actually never tried to drop a plain war on virgo - was always doing some osgi stuff in there.

Also having a bank manifest - could be a symptom of Maven. Maven will override manifest with a default generated one if you do not do:

1. http://maven.apache.org/shared/maven-archiver/examples/manifestFile.html ( same goes for war plugin)
2. Run bundlor on the packaged artifact - bundlor will re-write manifest.mf
3. Use maven-bundle-plugin (http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-2.3.5/doc/site/index.html)

Would you mind attaching changes that you made to the pom file of the example that I provided?
I would like to see the issue at work.

Regards,
Dmitry

p.s. Sorry missed you on the irc. I am there to, but need a better irc client - something with notifications Smile
Re: Need help in deploying war file in virgo [message #715001 is a reply to message #714944] Fri, 12 August 2011 03:44 Go to previous messageGo to next message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
Hi Dmitry,

Yes I do have spring jars in lib. I added following dependencies in the pom.xml
   <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>${spring.version}</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${spring.version}</version>
</dependency>


And modified web.xml url pattern

<servlet-mapping>
        <servlet-name>app</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>


I have already given the MANIFEST.MF file. Let me know if you face any issue in running the sample.

Thank You,
Pradeep
Re: Need help in deploying war file in virgo [message #715171 is a reply to message #715001] Fri, 12 August 2011 15:29 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Pradeep,

I did a bit more digging. Apparently there are 2 versions of org.eclipse.virgo.web.properties. One in config and one in repository/ext. You need to modify the one in repository/ext.
It is used by the org.eclipse.virgo.web.tomcat.plan and the one in config is ignored. The moral of the story is - Virgo WILL deploy plan war files as long as proper configuration is provided in the proper place.



<plan name="org.eclipse.virgo.web.tomcat" version="3.0.0" scoped="false" atomic="false"
                xmlns="http://www.eclipse.org/virgo/schema/plan"
				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
				xsi:schemaLocation="
				        http://www.eclipse.org/virgo/schema/plan 
				        http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">

        <artifact type="configuration" name="org.eclipse.virgo.web"/>
        <artifact type="bundle" name="org.eclipse.gemini.web.core" version="[2.0, 3.0)"/>
        <artifact type="bundle" name="org.eclipse.gemini.web.tomcat" version="[2.0, 3.0)"/>
        <artifact type="bundle" name="org.eclipse.virgo.web.core" version="[3.0, 4.0)"/>
        <artifact type="bundle" name="org.eclipse.virgo.web.dm" version="[3.0, 4.0)"/>
        <artifact type="bundle" name="org.eclipse.virgo.web.tomcat.support" version="[3.0, 4.0)"/>
</plan>
Re: Need help in deploying war file in virgo [message #718347 is a reply to message #715171] Wed, 24 August 2011 03:46 Go to previous message
Pradeep  is currently offline Pradeep
Messages: 9
Registered: August 2011
Junior Member
Let me try it out once more. Will update you. Thanks a lot.
Previous Topic:Enabling Bundlor after migration to Virgo IDE
Next Topic:Fail to start STS embedded Virgo
Goto Forum:
  


Current Time: Sun Oct 26 01:56:13 GMT 2014

Powered by FUDForum. Page generated in 0.03667 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software