Jetty asking for webdefault.xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty asking for webdefault.xml

Saeid
hi guys!
I have a single-module , struts2 appfuse project in the Intellij IDEA. but i'm getting the following error whenever running command mvn jetty:run ::::

[INFO] Starting jetty 6.1.9 ...
[INFO] jetty-6.1.9

[WARNING] Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@1bc767e{/,D:\...\prj\src\main\webapp}
java.io.FileNotFoundException: D:\...\prj\src\main\resources\webdefault.xml (The system cannot find the file specified)

my jetty plugin:
--------------
<plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.9</version>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                    <scanTargetPatterns>
                        <scanTargetPattern>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <excludes>
                                <exclude>**/*.jsp</exclude>
                            </excludes>
                            <includes>
                                <include>**/*.properties</include>
                                <include>**/*.xml</include>
                            </includes>
                        </scanTargetPattern>
                    </scanTargetPatterns>
                    <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
                </configuration>
            </plugin>


Any Suggestion?

Reply | Threaded
Open this post in threaded view
|

Re: Jetty asking for webdefault.xml

David Whitehurst
Saeid:

My Jetty plugin snippet in the pom.xml file is this:

<plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.14.v20131031</version>
                <configuration>
                    <webApp>
                        <contextPath>/</contextPath>
                    </webApp>
                </configuration>
            </plugin>

I don’t specify the file webdefault.xml .  If Maven can’t find the file then you need to verify if the file truly exists. I’ve never heard of the file but the error is being given to you because Maven cannot find the file at the location that’s specified in the pom.xml. Verify that the plugin is configured correctly and then if the file is still needed, you’ll need to determine what the file is for and how you can create this file or get a copy somewhere.  It has “default” in the name and that means the file is probably common. A basic example of the file should be available online somewhere. Check at the Jetty website. Find the file and place it in the configured location.

David
 

On Oct 22, 2014, at 4:41 AM, Saeid <[hidden email]> wrote:

hi guys!
I have a *single-module* , *struts2* appfuse project in the *Intellij IDEA*.
but i'm getting the following error whenever running command *mvn jetty:run*
::::

[INFO] Starting jetty 6.1.9 ...
[INFO] jetty-6.1.9

[WARNING] Failed startup of context
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@1bc767e{/,D:\...\prj\src\main\webapp}
java.io.FileNotFoundException:
D:\...\prj\src\main\resources\*webdefault.xml* (The system cannot find the
file specified)

my jetty plugin:
--------------
<plugin>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>maven-jetty-plugin</artifactId>
               <version>6.1.9</version>
               <configuration>
                   <contextPath>/</contextPath>
                   <scanIntervalSeconds>3</scanIntervalSeconds>
                   <scanTargetPatterns>
                       <scanTargetPattern>
                           <directory>src/main/webapp/WEB-INF</directory>
                           <excludes>
                               <exclude>**/*.jsp</exclude>
                           </excludes>
                           <includes>
                               <include>**/*.properties</include>
                               <include>**/*.xml</include>
                           </includes>
                       </scanTargetPattern>
                   </scanTargetPatterns>

<webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
               </configuration>
           </plugin>


Any Suggestion?





--
View this message in context: http://appfuse.547863.n4.nabble.com/Jetty-asking-for-webdefault-xml-tp4657354.html
Sent from the AppFuse - Dev mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Jetty asking for webdefault.xml

Saeid
Dear Friend!
thanks for answering, but i'm getting another error when correcting the previous one as follow:

[INFO] Starting jetty 6.1.9 ...
[INFO] jetty-6.1.9
[INFO] No Transaction manager found - if your webapp requires one, please configure one.
[INFO] Initializing Spring root WebApplicationContext

09:36:28,348 ERROR ContextLoader:215 - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/xfire-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xfire-servlet.xml]

....

Do you have another suggestion ,please?
thanks in advance!!!