You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jamshed Katta <ja...@wwindia.com> on 2011/05/13 08:38:44 UTC

Problem when web app is built via Maven

Problem with Maven Dependency.



Hello All,

This is in reference to my earlier post
http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

When i dont build via maven and export the project as a war ( I use Eclipse
for J2EE ) and deploy it to Jboss6 via its admin console it runs fine,
whereas if i build via maven using mvn clean install and copy the war built
by maven to my /deploy directory (Jboss) i get the following error

2011-05-10 14:41:57,509 INFO 
[org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner)
deploy, ctxPath=/UltimateSMS-1
2011-05-10 14:41:57,681 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/UltimateSMS-1]]
(HDScanner) Error configuring application listener of class
com.sun.faces.config.ConfigureListener: java.lang.ClassNotFoundException:
com.sun.faces.config.ConfigureListener
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
[:1.6.0_20]
        at java.security.AccessController.doPrivileged(Native Method)
[:1.6.0_20]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
[:1.6.0_20] 

And the deployment of war fails.

Heres a section of my pom

		<dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                        <version>2.5</version>
                        <type>jar</type>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-j2ee</artifactId>
                        <version>4.0.2</version>
                        <type>jar</type>
                        <scope>compile</scope>
                </dependency>
		<dependency>
                        <groupId>javax</groupId>
                        <artifactId>javaee-web-api</artifactId>
                        <version>6.0</version>
                </dependency>

No where in my web.xml have a configured a faces listener and it doesnot
have any references to JSF

P.S:  My project is a simple JSP/Servlet J2EE project with no references to
JSF what so ever
I use JDK 1.6 and Maven -> Apache Maven 3.0.3  
I have narrowed down the error and i think the problem is in my pom.xml


Please Advise.
Thanks



--
View this message in context: http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built-via-Maven-tp4392340p4392340.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem when web app is built via Maven

Posted by Rafael Vanderlei <ra...@gmail.com>.
Make sure your web components (like jsps, js, css, images, etc) are under
src/main/webapp folder.
If you're not using the standard folder, you may try to configure maven war
plugin to inform the folder you are using. Check [1] to understande how to
configure it (it's the warSourceDirectory tag).

[1] http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

On Wed, May 18, 2011 at 3:41 AM, Jamshed Katta <ja...@wwindia.com>wrote:

> Hey Curtis,
>
> Thanks for your reply.
>
> I used Beyond Compare, and found out that there is s difference between the
> war generated by the normal method and the war generated via maven (The war
> generated in the first case works.)
> The war that maven generates has just 2 folders WEB-INF and META-INF and no
> traces of JSPs whatsoever javascript etc, it only has class files. while
> the
> normal build has all the files (JSPs ) and folders. Whats happening ?
>
>
> Warm Regards,
> Jamshed
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built-via-Maven-tp4392340p4405753.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Problem when web app is built via Maven

Posted by Jamshed Katta <ja...@wwindia.com>.
Hey Curtis,

Thanks for your reply.

I used Beyond Compare, and found out that there is s difference between the
war generated by the normal method and the war generated via maven (The war
generated in the first case works.) 
The war that maven generates has just 2 folders WEB-INF and META-INF and no
traces of JSPs whatsoever javascript etc, it only has class files. while the
normal build has all the files (JSPs ) and folders. Whats happening ?


Warm Regards,
Jamshed 

--
View this message in context: http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built-via-Maven-tp4392340p4405753.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Problem when web app is built via Maven

Posted by "Yanko, Curtis" <cu...@uhc.com>.
Can you use a tool like Beyond Compare to compare the two WAR files?
That should identify the difference and point you to what needs to be
configured in Maven.

________________________________

Curt Yanko | Continuous Integration Services | UnitedHealth Group IT 
Making IT Happen, one build at a time, 600 times a day
 

> -----Original Message-----
> From: Jamshed Katta [mailto:jamshed.katta@wwindia.com] 
> Sent: Friday, May 13, 2011 2:39 AM
> To: users@maven.apache.org
> Subject: Problem when web app is built via Maven
> 
> Problem with Maven Dependency.
> 
> 
> 
> Hello All,
> 
> This is in reference to my earlier post
> http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
> 
> When i dont build via maven and export the project as a war ( 
> I use Eclipse for J2EE ) and deploy it to Jboss6 via its 
> admin console it runs fine, whereas if i build via maven 
> using mvn clean install and copy the war built by maven to my 
> /deploy directory (Jboss) i get the following error
> 
> 2011-05-10 14:41:57,509 INFO
> [org.jboss.web.tomcat.service.deployers.TomcatDeployment] 
> (HDScanner) deploy, ctxPath=/UltimateSMS-1 2011-05-10 
> 14:41:57,681 ERROR 
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost
> ].[/UltimateSMS-1]]
> (HDScanner) Error configuring application listener of class
> com.sun.faces.config.ConfigureListener: 
> java.lang.ClassNotFoundException:
> com.sun.faces.config.ConfigureListener
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> [:1.6.0_20]
>         at java.security.AccessController.doPrivileged(Native 
> Method) [:1.6.0_20]
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> [:1.6.0_20] 
> 
> And the deployment of war fails.
> 
> Heres a section of my pom
> 
> 		<dependency>
>                         <groupId>javax.servlet</groupId>
>                         <artifactId>servlet-api</artifactId>
>                         <version>2.5</version>
>                         <type>jar</type>
>                         <scope>compile</scope>
>                 </dependency>
>                 <dependency>
>                         <groupId>jboss</groupId>
>                         <artifactId>jboss-j2ee</artifactId>
>                         <version>4.0.2</version>
>                         <type>jar</type>
>                         <scope>compile</scope>
>                 </dependency>
> 		<dependency>
>                         <groupId>javax</groupId>
>                         <artifactId>javaee-web-api</artifactId>
>                         <version>6.0</version>
>                 </dependency>
> 
> No where in my web.xml have a configured a faces listener and 
> it doesnot have any references to JSF
> 
> P.S:  My project is a simple JSP/Servlet J2EE project with no 
> references to JSF what so ever I use JDK 1.6 and Maven -> 
> Apache Maven 3.0.3 I have narrowed down the error and i think 
> the problem is in my pom.xml
> 
> 
> Please Advise.
> Thanks
> 
> 
> 
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Problem-when-web-app-is-built
> -via-Maven-tp4392340p4392340.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org