Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Classpath error with m2e-wtp

Have looked under
<workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps.
There is one dir for each of my webapps. For webapp A everything is
ok, for webapp B WEB-INF/lib is almost empty - there is only one jar,
and that jar is a another module in the project (there is total of 5
modules, of which two are webapps).

I have looked at the .classpath files for these two modules, and there
is some differences. I will try to edit those and se what happends...

.classpath for webapp A:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
	<classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/resources"/>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
	<classpathentry excluding="**" kind="src"
output="target/test-classes" path="src/test/resources"/>
	<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
	<classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container"/>
	<classpathentry kind="output" path="target/classes"/>
</classpath>

.classpath for webapp B:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
	<classpathentry excluding="**" kind="src" output="target/classes"
path="src/main/resources"/>
	<classpathentry excluding="**" kind="src" output="target/classes"
path="target/generated-sources/axis2/wsdl2code/resources"/>
	<classpathentry excluding="**" kind="src" output="target/classes"
path="target/generated-sources/axis2/wsdl2code/src"/>
	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
	<classpathentry excluding="**" kind="src"
output="target/test-classes" path="src/main/webapp/WEB-INF"/>
	<classpathentry excluding="**" kind="src"
output="target/test-classes" path="src/test/resources"/>
	<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
                <attributes>
                        <attribute
name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
                </attributes>
        </classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>


>Can you look under the depoyed folder of tomcat and check if the content matches what maven package produces?
>It is possibly located under <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/<serverid>/wtpwebapps
>
>regards,
>
>Fred Bricon


>>2011/4/28 Fredrik Tuomas <fredrik.tuomas@xxxxxxxxx>
>>Hi
>>I have a multi-module maven project where 2 projects are Spring web
>>applications. I try to run these from within Eclipse on a Tomcat
>>server. I haven't found much m2e-specific documentation on this, but I
>>have tried to follow the general WTP documentation that exists.
>>
>>I have created a "Server" in Eclipse and chosen what modules should be
>>deployed, everything seems correct, but when i start the server I get
>>errors:
>>
>>Error configuring application listener of class
>>org.springframework.web.context.ContextLoaderListener
>>java.lang.ClassNotFoundException:
>>org.springframework.web.context.ContextLoaderListener
>>
>>There seems to be a problem with the classpath. Anyone have an idea of
>>how I may fix it?
>>
>>Eclipse Java EE IDE for Web Developers.
>>Version: Helios Service Release 2
>>Build id: 20110218-0911
>>
>>m2e - Maven Integration for Eclipse
>>(Incubation)    0.13.0.201104271504     org.eclipse.m2e.feature.feature.group
>>Maven Integration for WTP
>>(Optional)      0.13.0.201104280310     org.maven.ide.eclipse.wtp.feature.feature.group
>>
>>/ Fredrik Tuomas
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top