problem with missing resources

13 views
Skip to first unread message

huherto

unread,
Oct 15, 2007, 4:24:26 PM10/15/07
to gwt-maven
When I test with the remote call the spring-servlet.xml file is not
found. I think something is missing so the resources are not copied to
the webapp.

This is the information:

---------------------- Stacktrace -------------
[WARN] StandardContext[]StandardWrapper.Throwable
org.springframework.beans.factory.BeanDefinitionStoreException:
IOException parsing XML document from ServletContext resource [/WEB-
INF/spring-servlet.xml]; nested exception is
java.io.FileNotFoundException: Could not open ServletContext resource
[/WEB-INF/spring-servlet.xml]
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
320)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
290)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:
131)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:
147)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:
124)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:
92)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:
101)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:
389)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
324)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:
332)
Caused by: java.io.FileNotFoundException: Could not open
ServletContext resource [/WEB-INF/spring-servlet.xml]
at
org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:
99)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
307)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:
290)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:
131)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:
147)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:
124)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:
92)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:
101)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:
389)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
324)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:
332)

------------- pom.xml----------------------
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.autozone</groupId>
<artifactId>online_sandbox</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>o2plus</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>gwt-maven</id>
<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>o2plus</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>com.totsp.gwt</groupId>
<artifactId>maven-googlewebtoolkit2-plugin</artifactId>
<version>2.0-beta</version>
<configuration>
<logLevel>DEBUG</logLevel>
<runTarget>com.autozone.o2plus.MainApp/MainApp.html</
runTarget>
<compileTargets><value>com.autozone.o2plus.MainApp</value></
compileTargets>
</configuration>
<executions>
<execution>
<goals>
<!-- Commented out as work around bug #59 in plugin
<goal>compile</goal -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>1.4.60</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.4.60</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1_3</version>
</dependency>
</dependencies>
</project>

--------------------- The output of "mvn
gwt:gwt"------------------------------
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'gwt'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building o2plus
[INFO] task-segment: [gwt:gwt]
[INFO]
----------------------------------------------------------------------------
[INFO] Preparing gwt:gwt
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Assembling webapp online_sandbox in c:\humberto\proys\o2plus
\target\o2plus
[INFO] Copy webapp webResources to c:\humberto\proys\o2plus\target
\o2plus
[INFO] Generating war c:\humberto\proys\o2plus\target\o2plus.war
[INFO] Building war: c:\humberto\proys\o2plus\target\o2plus.war
[INFO] [gwt:gwt]
Using classpath: C:\humberto\proys\o2plus\src\main\java;C:\humberto
\proys\o2plus\classes;C:\humberto\proys\o2plus\target\cla
sses;C:\humberto\.m2\repository\log4j\log4j\1.2.12\log4j-1.2.12.jar;C:
\humberto\.m2\repository\commons-logging\commons-loggi
ng\1.1\commons-logging-1.1.jar;C:\humberto\.m2\repository\cglib\cglib
\2.1_3\cglib-2.1_3.jar;C:\humberto\.m2\repository\org\s
pringframework\spring\2.0.7\spring-2.0.7.jar;C:\humberto\.m2\repository
\com\google\gwt\gwt-user\1.4.60\gwt-user-1.4.60.jar;C
:\humberto\.m2\repository\logkit\logkit\1.0.1\logkit-1.0.1.jar;C:
\humberto\.m2\repository\com\google\gwt\gwt-servlet\1.4.60\
gwt-servlet-1.4.60.jar;C:\humberto\.m2\repository\asm\asm
\1.5.3\asm-1.5.3.jar;C:\humberto\.m2\repository\avalon-framework\av
alon-framework\4.1.3\avalon-framework-4.1.3.jar;C:\apps\gwt-
windows-1.4.60;C:\apps\gwt-windows-1.4.60\gwt-dev-windows.jar;C:
\humberto\proys\o2plus\src\main\resources
dir=C:\humberto\proys\o2plus\target
cmd[0]=c:\Program Files\Java\jdk1.6.0_02\jre\bin\java
cmd[1]=-cp
cmd[2]=C:\humberto\proys\o2plus\src\main\java;C:\humberto\proys\o2plus
\classes;C:\humberto\proys\o2plus\target\classes;C:\hu
mberto\.m2\repository\log4j\log4j\1.2.12\log4j-1.2.12.jar;C:\humberto
\.m2\repository\commons-logging\commons-logging\1.1\com
mons-logging-1.1.jar;C:\humberto\.m2\repository\cglib\cglib
\2.1_3\cglib-2.1_3.jar;C:\humberto\.m2\repository\org\springframe
work\spring\2.0.7\spring-2.0.7.jar;C:\humberto\.m2\repository\com
\google\gwt\gwt-user\1.4.60\gwt-user-1.4.60.jar;C:\humberto
\.m2\repository\logkit\logkit\1.0.1\logkit-1.0.1.jar;C:\humberto
\.m2\repository\com\google\gwt\gwt-servlet\1.4.60\gwt-servle
t-1.4.60.jar;C:\humberto\.m2\repository\asm\asm\1.5.3\asm-1.5.3.jar;C:
\humberto\.m2\repository\avalon-framework\avalon-frame
work\4.1.3\avalon-framework-4.1.3.jar;C:\apps\gwt-windows-1.4.60;C:
\apps\gwt-windows-1.4.60\gwt-dev-windows.jar;C:\humberto\
proys\o2plus\src\main\resources
cmd[3]=-Dcatalina.base=c:\humberto\proys\o2plus\target\tomcat
cmd[4]=com.google.gwt.dev.GWTShell
cmd[5]=-gen
cmd[6]=.generated
cmd[7]=-logLevel
cmd[8]=DEBUG
cmd[9]=-style
cmd[10]=OBF
cmd[11]=-out
cmd[12]=c:\humberto\proys\o2plus\target\o2plus
cmd[13]=-port
cmd[14]=8888
cmd[15]=com.autozone.o2plus.MainApp/MainApp.html

huherto

unread,
Oct 15, 2007, 4:39:04 PM10/15/07
to gwt-maven
I think that according to this configuration the application is
supposed to be in "C:\humberto\proys\o2plus\target\o2plus". But how do
we tell tomcat to look in there?

Reply all
Reply to author
Forward
0 new messages