You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Eric Gulatee <er...@gmail.com> on 2010/04/14 06:31:55 UTC

IVYDE, Eclipse 3.5 & WTP

All,

I've constantly had problems getting my dependencies declared in ivy to be
published to the tomcat server.
Before you answer just add the JavaEE module dep, I have already done
that...

When I check my .metadata where the WebApp is being published, I don't see a
lib directory under WEB-INF.

I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.


Any thoughts?  Any way to debug this?
I tried a few options:

ivy with all confs
Wiped our my tomcat, forced a republish...  No effect.


To prove I didn't miss the JavaEE module dep:
Here's my .classpath

?xml version="1.0" encoding="UTF-8"?>
> <classpath>
>         <classpathentry kind="src" output="target/classes"
> path="src/main/java"/>
>         <classpathentry kind="src" path="src/test/resources"/>
>         <classpathentry kind="src" output="target/test-classes"
> path="src/test/java"/>
>         <classpathentry kind="src" path="src/main/antlr3"/>
>         <classpathentry excluding="**" kind="src" output="target/classes"
> path="src/main/resources"/>
>         <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>         <classpathentry kind="con"
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
>                 <attributes>
>                         <attribute
> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>                 </attributes>
>         </classpathentry>
>         <classpathentry kind="output" path="target/classes"/>
> </classpath>
>


Tomcat is complaining about a spring web context class..

SEVERE: Error configuring application listener of class
org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener


However...

I do have spring-web-....  listed as a dep/jar in ivy.xml
And the jar does have the missing class...

package org.springframework.web.context;
>
> import javax.servlet.ServletContextEvent;
> import javax.servlet.ServletContextListener;
>
> /**
>  * Bootstrap listener to start up and shut down Spring's root {@link
> WebApplicationContext}.
>  * Simply delegates to {@link ContextLoader} as well as to {@link
> ContextCleanupListener}.
>  *
>  * <p>This listener should be registered after
>  * {@link org.springframework.web.util.Log4jConfigListener}
>  * in <code>web.xml</code>, if the latter is used.
>  *
>  * @author Juergen Hoeller
>  * @since 17.02.2003
>  * @see org.springframework.web.util.Log4jConfigListener
>  */
> public class ContextLoaderListener extends ContextLoader implements
> ServletContextListener {
>
>

As I said, I do a few cleans, have wiped out the server.  changed
workspace.  Issue remains the same...

I never do see WEB-INF/lib get created under the appropriate directory under
.metadata in my workspace.


Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
I have had this flaky behaviour before where publish wouldn't always
publish...  It did work eventually...  [After cleans, Destroy servers,
change workspace]

Cheers,
Eric G.

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Tim Brown <tp...@gmail.com>.
BTW, you can disregard my confs.  We're leveraging them to handle concurrent
runtimes (Websphere or Tomcat), separation of test artifacts from runtime
code, etc.

~T

On Wed, Apr 14, 2010 at 3:38 PM, Tim Brown <tp...@gmail.com> wrote:

> We actually have this working.  Had the same issue, but I don't recall
> exactly what the cause was. (it's been a while)
>
> I'll dig into my current setup and see how it differs, perhaps we can sort
> it out.
>
> I'm running OSX, Galileo SR2, but with Ivy 2.2.x-local-20091117220235 and
> IvyDE 2.1.0.200911161501-hudson-79.
>
> Yes, that's a trunk release.  It was for a bug fix, but I don't remember
> which :(.  It's' been stable for us (>100 developers) for months now.
>
> My .classpath entry for Ivy is slightly different:
> <classpathentry exported="true" kind="con"
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=tomcat-runtime,runtime&amp;acceptedTypes=jar,tomcat-war,tomcat-aar&amp;resolveInWorkspace=true">
>     <attributes>
>       <attribute name="" value="/WEB-INF/lib"/>
>       <attribute name="org.eclipse.jst.component.dependency"
> value="/WEB-INF/lib"/>
>     </attributes>
>   </classpathentry>
>
> I also have the Dyanamic Web module and Java facets set on my [war]
> project.
>
> When I resolve I can expand the Ivy lib reference, revealing resolved
> workspace projects and jars.
>
> Deploying to Tomcat 6 via WTP works as expected.
>
>
> ~Tim
>
> On Tue, Apr 13, 2010 at 9:31 PM, Eric Gulatee <er...@gmail.com>wrote:
>
>> All,
>>
>> I've constantly had problems getting my dependencies declared in ivy to be
>> published to the tomcat server.
>> Before you answer just add the JavaEE module dep, I have already done
>> that...
>>
>> When I check my .metadata where the WebApp is being published, I don't see
>> a
>> lib directory under WEB-INF.
>>
>> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>>
>>
>> Any thoughts?  Any way to debug this?
>> I tried a few options:
>>
>> ivy with all confs
>> Wiped our my tomcat, forced a republish...  No effect.
>>
>>
>> To prove I didn't miss the JavaEE module dep:
>> Here's my .classpath
>>
>> ?xml version="1.0" encoding="UTF-8"?>
>> > <classpath>
>> >         <classpathentry kind="src" output="target/classes"
>> > path="src/main/java"/>
>> >         <classpathentry kind="src" path="src/test/resources"/>
>> >         <classpathentry kind="src" output="target/test-classes"
>> > path="src/test/java"/>
>> >         <classpathentry kind="src" path="src/main/antlr3"/>
>> >         <classpathentry excluding="**" kind="src"
>> output="target/classes"
>> > path="src/main/resources"/>
>> >         <classpathentry kind="con"
>> >
>> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>> >         <classpathentry kind="con"
>> >
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
>> >                 <attributes>
>> >                         <attribute
>> > name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>> >                 </attributes>
>> >         </classpathentry>
>> >         <classpathentry kind="output" path="target/classes"/>
>> > </classpath>
>> >
>>
>>
>> Tomcat is complaining about a spring web context class..
>>
>> SEVERE: Error configuring application listener of class
>> org.springframework.web.context.ContextLoaderListener
>> java.lang.ClassNotFoundException:
>> org.springframework.web.context.ContextLoaderListener
>>
>>
>> However...
>>
>> I do have spring-web-....  listed as a dep/jar in ivy.xml
>> And the jar does have the missing class...
>>
>> package org.springframework.web.context;
>> >
>> > import javax.servlet.ServletContextEvent;
>> > import javax.servlet.ServletContextListener;
>> >
>> > /**
>> >  * Bootstrap listener to start up and shut down Spring's root {@link
>> > WebApplicationContext}.
>> >  * Simply delegates to {@link ContextLoader} as well as to {@link
>> > ContextCleanupListener}.
>> >  *
>> >  * <p>This listener should be registered after
>> >  * {@link org.springframework.web.util.Log4jConfigListener}
>> >  * in <code>web.xml</code>, if the latter is used.
>> >  *
>> >  * @author Juergen Hoeller
>> >  * @since 17.02.2003
>> >  * @see org.springframework.web.util.Log4jConfigListener
>> >  */
>> > public class ContextLoaderListener extends ContextLoader implements
>> > ServletContextListener {
>> >
>> >
>>
>> As I said, I do a few cleans, have wiped out the server.  changed
>> workspace.  Issue remains the same...
>>
>> I never do see WEB-INF/lib get created under the appropriate directory
>> under
>> .metadata in my workspace.
>>
>>
>> Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
>> I have had this flaky behaviour before where publish wouldn't always
>> publish...  It did work eventually...  [After cleans, Destroy servers,
>> change workspace]
>>
>> Cheers,
>> Eric G.
>>
>
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Matt Benson <gu...@gmail.com>.
Oh, hell, guys--I didn't even think about posting this yesterday, but
a new developer to our team found a workaround that seems to prod WTP
into recognizing the need to republish.  In the EE Module Dependencies
configuration for your web project, select some other open project as
a dependency, click 'Apply', then de-select it and click 'Apply'
again.  Now your Ivy deps should be published as proper.  YMMV, but
it's been working like a charm for us!

-Matt

On 4/22/10, Eric Gulatee <er...@gmail.com> wrote:
> Tim,
>
> I updated my version of IVyDE, and remove the retrieve to
> src/main/webapp/WEB-INF/lib.
> Didn't seem to do it for Tomcat...  (I need to double check)
>
> I have left it with the retrieve to src/main/webapp/WEB-INF/lib which works
> for me.
>
> All,  thank you very much for your responses.  That was making me crazy...
> Sometimes it worked, other times it didn't...
>
> Cheers,
> Eric G.
>
>
> On Wed, Apr 14, 2010 at 6:38 PM, Tim Brown <tp...@gmail.com> wrote:
>
>> We actually have this working.  Had the same issue, but I don't recall
>> exactly what the cause was. (it's been a while)
>>
>> I'll dig into my current setup and see how it differs, perhaps we can sort
>> it out.
>>
>> I'm running OSX, Galileo SR2, but with Ivy 2.2.x-local-20091117220235 and
>> IvyDE 2.1.0.200911161501-hudson-79.
>>
>> Yes, that's a trunk release.  It was for a bug fix, but I don't remember
>> which :(.  It's' been stable for us (>100 developers) for months now.
>>
>> My .classpath entry for Ivy is slightly different:
>> <classpathentry exported="true" kind="con"
>>
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=tomcat-runtime,runtime&amp;acceptedTypes=jar,tomcat-war,tomcat-aar&amp;resolveInWorkspace=true">
>>    <attributes>
>>      <attribute name="" value="/WEB-INF/lib"/>
>>       <attribute name="org.eclipse.jst.component.dependency"
>> value="/WEB-INF/lib"/>
>>    </attributes>
>>  </classpathentry>
>>
>> I also have the Dyanamic Web module and Java facets set on my [war]
>> project.
>>
>> When I resolve I can expand the Ivy lib reference, revealing resolved
>> workspace projects and jars.
>>
>> Deploying to Tomcat 6 via WTP works as expected.
>>
>>
>> ~Tim
>>
>> On Tue, Apr 13, 2010 at 9:31 PM, Eric Gulatee <eric.gulatee@gmail.com
>> >wrote:
>>
>> > All,
>> >
>> > I've constantly had problems getting my dependencies declared in ivy to
>> be
>> > published to the tomcat server.
>> > Before you answer just add the JavaEE module dep, I have already done
>> > that...
>> >
>> > When I check my .metadata where the WebApp is being published, I don't
>> see
>> > a
>> > lib directory under WEB-INF.
>> >
>> > I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>> >
>> >
>> > Any thoughts?  Any way to debug this?
>> > I tried a few options:
>> >
>> > ivy with all confs
>> > Wiped our my tomcat, forced a republish...  No effect.
>> >
>> >
>> > To prove I didn't miss the JavaEE module dep:
>> > Here's my .classpath
>> >
>> > ?xml version="1.0" encoding="UTF-8"?>
>> > > <classpath>
>> > >         <classpathentry kind="src" output="target/classes"
>> > > path="src/main/java"/>
>> > >         <classpathentry kind="src" path="src/test/resources"/>
>> > >         <classpathentry kind="src" output="target/test-classes"
>> > > path="src/test/java"/>
>> > >         <classpathentry kind="src" path="src/main/antlr3"/>
>> > >         <classpathentry excluding="**" kind="src"
>> output="target/classes"
>> > > path="src/main/resources"/>
>> > >         <classpathentry kind="con"
>> > >
>> >
>> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>> > >         <classpathentry kind="con"
>> > >
>> >
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
>> > >                 <attributes>
>> > >                         <attribute
>> > > name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>> > >                 </attributes>
>> > >         </classpathentry>
>> > >         <classpathentry kind="output" path="target/classes"/>
>> > > </classpath>
>> > >
>> >
>> >
>> > Tomcat is complaining about a spring web context class..
>> >
>> > SEVERE: Error configuring application listener of class
>> > org.springframework.web.context.ContextLoaderListener
>> > java.lang.ClassNotFoundException:
>> > org.springframework.web.context.ContextLoaderListener
>> >
>> >
>> > However...
>> >
>> > I do have spring-web-....  listed as a dep/jar in ivy.xml
>> > And the jar does have the missing class...
>> >
>> > package org.springframework.web.context;
>> > >
>> > > import javax.servlet.ServletContextEvent;
>> > > import javax.servlet.ServletContextListener;
>> > >
>> > > /**
>> > >  * Bootstrap listener to start up and shut down Spring's root {@link
>> > > WebApplicationContext}.
>> > >  * Simply delegates to {@link ContextLoader} as well as to {@link
>> > > ContextCleanupListener}.
>> > >  *
>> > >  * <p>This listener should be registered after
>> > >  * {@link org.springframework.web.util.Log4jConfigListener}
>> > >  * in <code>web.xml</code>, if the latter is used.
>> > >  *
>> > >  * @author Juergen Hoeller
>> > >  * @since 17.02.2003
>> > >  * @see org.springframework.web.util.Log4jConfigListener
>> > >  */
>> > > public class ContextLoaderListener extends ContextLoader implements
>> > > ServletContextListener {
>> > >
>> > >
>> >
>> > As I said, I do a few cleans, have wiped out the server.  changed
>> > workspace.  Issue remains the same...
>> >
>> > I never do see WEB-INF/lib get created under the appropriate directory
>> > under
>> > .metadata in my workspace.
>> >
>> >
>> > Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
>> > I have had this flaky behaviour before where publish wouldn't always
>> > publish...  It did work eventually...  [After cleans, Destroy servers,
>> > change workspace]
>> >
>> > Cheers,
>> > Eric G.
>> >
>>
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Eric Gulatee <er...@gmail.com>.
Tim,

I updated my version of IVyDE, and remove the retrieve to
src/main/webapp/WEB-INF/lib.
Didn't seem to do it for Tomcat...  (I need to double check)

I have left it with the retrieve to src/main/webapp/WEB-INF/lib which works
for me.

All,  thank you very much for your responses.  That was making me crazy...
Sometimes it worked, other times it didn't...

Cheers,
Eric G.


On Wed, Apr 14, 2010 at 6:38 PM, Tim Brown <tp...@gmail.com> wrote:

> We actually have this working.  Had the same issue, but I don't recall
> exactly what the cause was. (it's been a while)
>
> I'll dig into my current setup and see how it differs, perhaps we can sort
> it out.
>
> I'm running OSX, Galileo SR2, but with Ivy 2.2.x-local-20091117220235 and
> IvyDE 2.1.0.200911161501-hudson-79.
>
> Yes, that's a trunk release.  It was for a bug fix, but I don't remember
> which :(.  It's' been stable for us (>100 developers) for months now.
>
> My .classpath entry for Ivy is slightly different:
> <classpathentry exported="true" kind="con"
>
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=tomcat-runtime,runtime&amp;acceptedTypes=jar,tomcat-war,tomcat-aar&amp;resolveInWorkspace=true">
>    <attributes>
>      <attribute name="" value="/WEB-INF/lib"/>
>       <attribute name="org.eclipse.jst.component.dependency"
> value="/WEB-INF/lib"/>
>    </attributes>
>  </classpathentry>
>
> I also have the Dyanamic Web module and Java facets set on my [war]
> project.
>
> When I resolve I can expand the Ivy lib reference, revealing resolved
> workspace projects and jars.
>
> Deploying to Tomcat 6 via WTP works as expected.
>
>
> ~Tim
>
> On Tue, Apr 13, 2010 at 9:31 PM, Eric Gulatee <eric.gulatee@gmail.com
> >wrote:
>
> > All,
> >
> > I've constantly had problems getting my dependencies declared in ivy to
> be
> > published to the tomcat server.
> > Before you answer just add the JavaEE module dep, I have already done
> > that...
> >
> > When I check my .metadata where the WebApp is being published, I don't
> see
> > a
> > lib directory under WEB-INF.
> >
> > I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
> >
> >
> > Any thoughts?  Any way to debug this?
> > I tried a few options:
> >
> > ivy with all confs
> > Wiped our my tomcat, forced a republish...  No effect.
> >
> >
> > To prove I didn't miss the JavaEE module dep:
> > Here's my .classpath
> >
> > ?xml version="1.0" encoding="UTF-8"?>
> > > <classpath>
> > >         <classpathentry kind="src" output="target/classes"
> > > path="src/main/java"/>
> > >         <classpathentry kind="src" path="src/test/resources"/>
> > >         <classpathentry kind="src" output="target/test-classes"
> > > path="src/test/java"/>
> > >         <classpathentry kind="src" path="src/main/antlr3"/>
> > >         <classpathentry excluding="**" kind="src"
> output="target/classes"
> > > path="src/main/resources"/>
> > >         <classpathentry kind="con"
> > >
> >
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
> > >         <classpathentry kind="con"
> > >
> >
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
> > >                 <attributes>
> > >                         <attribute
> > > name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> > >                 </attributes>
> > >         </classpathentry>
> > >         <classpathentry kind="output" path="target/classes"/>
> > > </classpath>
> > >
> >
> >
> > Tomcat is complaining about a spring web context class..
> >
> > SEVERE: Error configuring application listener of class
> > org.springframework.web.context.ContextLoaderListener
> > java.lang.ClassNotFoundException:
> > org.springframework.web.context.ContextLoaderListener
> >
> >
> > However...
> >
> > I do have spring-web-....  listed as a dep/jar in ivy.xml
> > And the jar does have the missing class...
> >
> > package org.springframework.web.context;
> > >
> > > import javax.servlet.ServletContextEvent;
> > > import javax.servlet.ServletContextListener;
> > >
> > > /**
> > >  * Bootstrap listener to start up and shut down Spring's root {@link
> > > WebApplicationContext}.
> > >  * Simply delegates to {@link ContextLoader} as well as to {@link
> > > ContextCleanupListener}.
> > >  *
> > >  * <p>This listener should be registered after
> > >  * {@link org.springframework.web.util.Log4jConfigListener}
> > >  * in <code>web.xml</code>, if the latter is used.
> > >  *
> > >  * @author Juergen Hoeller
> > >  * @since 17.02.2003
> > >  * @see org.springframework.web.util.Log4jConfigListener
> > >  */
> > > public class ContextLoaderListener extends ContextLoader implements
> > > ServletContextListener {
> > >
> > >
> >
> > As I said, I do a few cleans, have wiped out the server.  changed
> > workspace.  Issue remains the same...
> >
> > I never do see WEB-INF/lib get created under the appropriate directory
> > under
> > .metadata in my workspace.
> >
> >
> > Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
> > I have had this flaky behaviour before where publish wouldn't always
> > publish...  It did work eventually...  [After cleans, Destroy servers,
> > change workspace]
> >
> > Cheers,
> > Eric G.
> >
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Tim Brown <tp...@gmail.com>.
We actually have this working.  Had the same issue, but I don't recall
exactly what the cause was. (it's been a while)

I'll dig into my current setup and see how it differs, perhaps we can sort
it out.

I'm running OSX, Galileo SR2, but with Ivy 2.2.x-local-20091117220235 and
IvyDE 2.1.0.200911161501-hudson-79.

Yes, that's a trunk release.  It was for a bug fix, but I don't remember
which :(.  It's' been stable for us (>100 developers) for months now.

My .classpath entry for Ivy is slightly different:
<classpathentry exported="true" kind="con"
path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=tomcat-runtime,runtime&amp;acceptedTypes=jar,tomcat-war,tomcat-aar&amp;resolveInWorkspace=true">
    <attributes>
      <attribute name="" value="/WEB-INF/lib"/>
      <attribute name="org.eclipse.jst.component.dependency"
value="/WEB-INF/lib"/>
    </attributes>
  </classpathentry>

I also have the Dyanamic Web module and Java facets set on my [war] project.

When I resolve I can expand the Ivy lib reference, revealing resolved
workspace projects and jars.

Deploying to Tomcat 6 via WTP works as expected.


~Tim

On Tue, Apr 13, 2010 at 9:31 PM, Eric Gulatee <er...@gmail.com>wrote:

> All,
>
> I've constantly had problems getting my dependencies declared in ivy to be
> published to the tomcat server.
> Before you answer just add the JavaEE module dep, I have already done
> that...
>
> When I check my .metadata where the WebApp is being published, I don't see
> a
> lib directory under WEB-INF.
>
> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>
>
> Any thoughts?  Any way to debug this?
> I tried a few options:
>
> ivy with all confs
> Wiped our my tomcat, forced a republish...  No effect.
>
>
> To prove I didn't miss the JavaEE module dep:
> Here's my .classpath
>
> ?xml version="1.0" encoding="UTF-8"?>
> > <classpath>
> >         <classpathentry kind="src" output="target/classes"
> > path="src/main/java"/>
> >         <classpathentry kind="src" path="src/test/resources"/>
> >         <classpathentry kind="src" output="target/test-classes"
> > path="src/test/java"/>
> >         <classpathentry kind="src" path="src/main/antlr3"/>
> >         <classpathentry excluding="**" kind="src" output="target/classes"
> > path="src/main/resources"/>
> >         <classpathentry kind="con"
> >
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
> >         <classpathentry kind="con"
> >
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
> >                 <attributes>
> >                         <attribute
> > name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> >                 </attributes>
> >         </classpathentry>
> >         <classpathentry kind="output" path="target/classes"/>
> > </classpath>
> >
>
>
> Tomcat is complaining about a spring web context class..
>
> SEVERE: Error configuring application listener of class
> org.springframework.web.context.ContextLoaderListener
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener
>
>
> However...
>
> I do have spring-web-....  listed as a dep/jar in ivy.xml
> And the jar does have the missing class...
>
> package org.springframework.web.context;
> >
> > import javax.servlet.ServletContextEvent;
> > import javax.servlet.ServletContextListener;
> >
> > /**
> >  * Bootstrap listener to start up and shut down Spring's root {@link
> > WebApplicationContext}.
> >  * Simply delegates to {@link ContextLoader} as well as to {@link
> > ContextCleanupListener}.
> >  *
> >  * <p>This listener should be registered after
> >  * {@link org.springframework.web.util.Log4jConfigListener}
> >  * in <code>web.xml</code>, if the latter is used.
> >  *
> >  * @author Juergen Hoeller
> >  * @since 17.02.2003
> >  * @see org.springframework.web.util.Log4jConfigListener
> >  */
> > public class ContextLoaderListener extends ContextLoader implements
> > ServletContextListener {
> >
> >
>
> As I said, I do a few cleans, have wiped out the server.  changed
> workspace.  Issue remains the same...
>
> I never do see WEB-INF/lib get created under the appropriate directory
> under
> .metadata in my workspace.
>
>
> Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
> I have had this flaky behaviour before where publish wouldn't always
> publish...  It did work eventually...  [After cleans, Destroy servers,
> change workspace]
>
> Cheers,
> Eric G.
>

RE: IVYDE, Eclipse 3.5 & WTP

Posted by Kirby Files <Kf...@masergy.com>.
I have no personal experience with using WTP, but can add a general
caution about Ivy and Windows.

Don't launch/debug any applications from a staging-lib or deploy
directory (that is, using ivy:retrieve to populate WEB-INF/lib, and then
testing using those jars in your classpath). Eclipse on Windows can and
will lock jars during execution.

Instead use ivy:cacheclasspath to populate the classpath for any build
steps, and IvyDE classpath container (also uses cache) for launch/debug
configurations. That will allow your ivy:retrieve task to WEB-INF/lib to
be free of any locked jars.

Windows exclusive locking is a PITA; I don't experience any of these
problems on Linux.

I have no idea if any of this is relevant to your setup, but I just
thought I'd pass it along.

Thanks,
---
Kirby Files
Software Architect
Masergy Communications
kfiles@masergy.com

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@gmail.com] 
Sent: Wednesday, April 14, 2010 10:23 AM
To: ivy-user@ant.apache.org
Subject: Re: IVYDE, Eclipse 3.5 & WTP

Just to confirm you're not crazy.  I and my coworkers often have to  
shake and pummel Eclipse to get it to publish stuff.  I unfortunately  
still have never taken the plunge into the RT world of Eclipse +  
IvyDE to figure out what is going on.  One item of interest:  a  
colleague of mine did find a JIRA report against STS or Spring IDE  
(can't remember which, but... what's the difference?) that accounts  
for failures to delete old cached artifacts when resolving projects.   
It seems STS is responsible for locking the cached jars, the only  
remedy for which, AFAIK, is to shut down Eclipse.  There's no logic  
to this leap, but it does make me wonder if STS could be responsible  
for this as well... (for our part we're stuck using STS for its  
TCServer support)

$0.02,
Matt

On Apr 13, 2010, at 11:31 PM, Eric Gulatee wrote:

> All,
>
> I've constantly had problems getting my dependencies declared in  
> ivy to be
> published to the tomcat server.
> Before you answer just add the JavaEE module dep, I have already done
> that...
>
> When I check my .metadata where the WebApp is being published, I  
> don't see a
> lib directory under WEB-INF.
>
> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>
>
> Any thoughts?  Any way to debug this?
> I tried a few options:
>
> ivy with all confs
> Wiped our my tomcat, forced a republish...  No effect.
>
>
> To prove I didn't miss the JavaEE module dep:
> Here's my .classpath
>
> ?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>>         <classpathentry kind="src" output="target/classes"
>> path="src/main/java"/>
>>         <classpathentry kind="src" path="src/test/resources"/>
>>         <classpathentry kind="src" output="target/test-classes"
>> path="src/test/java"/>
>>         <classpathentry kind="src" path="src/main/antlr3"/>
>>         <classpathentry excluding="**" kind="src" output="target/ 
>> classes"
>> path="src/main/resources"/>
>>         <classpathentry kind="con"
>> path="org.eclipse.jdt.launching.JRE_CONTAINER/ 
>> org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>         <classpathentry kind="con"
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/? 
>> ivyXmlPath=ivy.xml&amp;confs=*">
>>                 <attributes>
>>                         <attribute
>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>                 </attributes>
>>         </classpathentry>
>>         <classpathentry kind="output" path="target/classes"/>
>> </classpath>
>>
>
>
> Tomcat is complaining about a spring web context class..
>
> SEVERE: Error configuring application listener of class
> org.springframework.web.context.ContextLoaderListener
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener
>
>
> However...
>
> I do have spring-web-....  listed as a dep/jar in ivy.xml
> And the jar does have the missing class...
>
> package org.springframework.web.context;
>>
>> import javax.servlet.ServletContextEvent;
>> import javax.servlet.ServletContextListener;
>>
>> /**
>>  * Bootstrap listener to start up and shut down Spring's root {@link
>> WebApplicationContext}.
>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>> ContextCleanupListener}.
>>  *
>>  * <p>This listener should be registered after
>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>  * in <code>web.xml</code>, if the latter is used.
>>  *
>>  * @author Juergen Hoeller
>>  * @since 17.02.2003
>>  * @see org.springframework.web.util.Log4jConfigListener
>>  */
>> public class ContextLoaderListener extends ContextLoader implements
>> ServletContextListener {
>>
>>
>
> As I said, I do a few cleans, have wiped out the server.  changed
> workspace.  Issue remains the same...
>
> I never do see WEB-INF/lib get created under the appropriate  
> directory under
> .metadata in my workspace.
>
>
> Any thoughts?  I don't think I'm doing anything silly/obviously  
> wrong...
> I have had this flaky behaviour before where publish wouldn't always
> publish...  It did work eventually...  [After cleans, Destroy servers,
> change workspace]
>
> Cheers,
> Eric G.


Re: IVYDE, Eclipse 3.5 & WTP

Posted by Matt Benson <gu...@gmail.com>.
Just to confirm you're not crazy.  I and my coworkers often have to  
shake and pummel Eclipse to get it to publish stuff.  I unfortunately  
still have never taken the plunge into the RT world of Eclipse +  
IvyDE to figure out what is going on.  One item of interest:  a  
colleague of mine did find a JIRA report against STS or Spring IDE  
(can't remember which, but... what's the difference?) that accounts  
for failures to delete old cached artifacts when resolving projects.   
It seems STS is responsible for locking the cached jars, the only  
remedy for which, AFAIK, is to shut down Eclipse.  There's no logic  
to this leap, but it does make me wonder if STS could be responsible  
for this as well... (for our part we're stuck using STS for its  
TCServer support)

$0.02,
Matt

On Apr 13, 2010, at 11:31 PM, Eric Gulatee wrote:

> All,
>
> I've constantly had problems getting my dependencies declared in  
> ivy to be
> published to the tomcat server.
> Before you answer just add the JavaEE module dep, I have already done
> that...
>
> When I check my .metadata where the WebApp is being published, I  
> don't see a
> lib directory under WEB-INF.
>
> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>
>
> Any thoughts?  Any way to debug this?
> I tried a few options:
>
> ivy with all confs
> Wiped our my tomcat, forced a republish...  No effect.
>
>
> To prove I didn't miss the JavaEE module dep:
> Here's my .classpath
>
> ?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>>         <classpathentry kind="src" output="target/classes"
>> path="src/main/java"/>
>>         <classpathentry kind="src" path="src/test/resources"/>
>>         <classpathentry kind="src" output="target/test-classes"
>> path="src/test/java"/>
>>         <classpathentry kind="src" path="src/main/antlr3"/>
>>         <classpathentry excluding="**" kind="src" output="target/ 
>> classes"
>> path="src/main/resources"/>
>>         <classpathentry kind="con"
>> path="org.eclipse.jdt.launching.JRE_CONTAINER/ 
>> org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>         <classpathentry kind="con"
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/? 
>> ivyXmlPath=ivy.xml&amp;confs=*">
>>                 <attributes>
>>                         <attribute
>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>                 </attributes>
>>         </classpathentry>
>>         <classpathentry kind="output" path="target/classes"/>
>> </classpath>
>>
>
>
> Tomcat is complaining about a spring web context class..
>
> SEVERE: Error configuring application listener of class
> org.springframework.web.context.ContextLoaderListener
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener
>
>
> However...
>
> I do have spring-web-....  listed as a dep/jar in ivy.xml
> And the jar does have the missing class...
>
> package org.springframework.web.context;
>>
>> import javax.servlet.ServletContextEvent;
>> import javax.servlet.ServletContextListener;
>>
>> /**
>>  * Bootstrap listener to start up and shut down Spring's root {@link
>> WebApplicationContext}.
>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>> ContextCleanupListener}.
>>  *
>>  * <p>This listener should be registered after
>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>  * in <code>web.xml</code>, if the latter is used.
>>  *
>>  * @author Juergen Hoeller
>>  * @since 17.02.2003
>>  * @see org.springframework.web.util.Log4jConfigListener
>>  */
>> public class ContextLoaderListener extends ContextLoader implements
>> ServletContextListener {
>>
>>
>
> As I said, I do a few cleans, have wiped out the server.  changed
> workspace.  Issue remains the same...
>
> I never do see WEB-INF/lib get created under the appropriate  
> directory under
> .metadata in my workspace.
>
>
> Any thoughts?  I don't think I'm doing anything silly/obviously  
> wrong...
> I have had this flaky behaviour before where publish wouldn't always
> publish...  It did work eventually...  [After cleans, Destroy servers,
> change workspace]
>
> Cheers,
> Eric G.


Re: IVYDE, Eclipse 3.5 & WTP

Posted by Nicolas Lalevée <ni...@hibnet.org>.
On Wednesday 14 April 2010 17:02:08 Eric Gulatee wrote:
> Nicholas,
>
> Pardon me, it was Nicholas that had the suggestion...  Gotta give credit
> where credit is due.

Nicolas actually, not Nicholas ;)

> For now I don't mind the retrieve vs using items from the cache.  If there
> are no other issues, I can live with that.

Good to know it is a working workaround, it might deserve an entry in the doc.

Nicolas

>
> Cheers,
> Eric G.
>
> On Wed, Apr 14, 2010 at 11:00 AM, Eric Gulatee 
<er...@gmail.com>wrote:
> > Matt,
> >
> > Well, your suggestion worked...  Thank you.  I basically added the
> > ivy.xml as various libs (One being a runtime).
> > Overrode the retrieve settings for the ivy(runtime) to retrieve to my
> > WEB-INF/lib and it worked.
> >
> > So, from my standpoint that's a good enough workaround so far.  Dunno
> > what other problems may lurk underneath, but so far so good  :)
> >
> > Cheers,
> > Eric Gulatee
> >
> > On Wed, Apr 14, 2010 at 10:26 AM, Matt Benson <gu...@gmail.com>wrote:
> >> On Apr 14, 2010, at 7:01 AM, Nicolas Lalevée wrote:
> >>
> >>  On Wednesday 14 April 2010 13:13:36 Eric Gulatee wrote:
> >>>> Andrew,
> >>>>
> >>>> Yeah, a few times new dependencies were not pushed even though they
> >>>> appeared in the ivy library.
> >>>> On a sad/funny side, the WAR file does contain the deps that I am
> >>>> looking
> >>>> for that seemingly don't get pushed to the WTP server.
> >>>>
> >>>> I guess I'll start using my build scripts to publish a WAR to an
> >>>> AppServer.
> >>>
> >>> I am not a WTP user, but what about making IvyDE retrieve [1] the jars
> >>> into
> >>> the WEB-INF/lib of your eclipse project, and tell WTP about the jars in
> >>> WEB-INF/lib more than about the IvyDE container ?
> >>> If your dependencies don't often change, it can be a good work around I
> >>> think.
> >>>
> >>> Nicolas
> >>>
> >>> [1]
> >>> http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/retrieve.h
> >>>tml
> >>
> >> I too have thought that retrieve might alleviate the issues, but
> >> admittedly hadn't yet tried it.  I have somewhat of a gut reaction
> >> against retrieval vs. using artifacts from cache, but I might try it
> >> sometime.
> >>
> >> -Matt
> >>
> >>>> Cheers,
> >>>> Eric G.
> >>>>
> >>>> On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn <nz...@gmail.com>
> >>>>
> >>>> wrote:
> >>>>> I'm afraid I can't help you, just piping in to say that I've got
> >>>>> basically the same problem - it doesn't always seem to publish my
> >>>>> dependencies. I'm publishing to Jetty, not Tomcat, but even so...
> >>>>>
> >>>>> And even when it does publish them, it doesn't publish any new
> >>>>> dependencies (e.g. if I build a new version (with a new filename) of
> >>>>> a dependency, it doesn't get picked up straight away - I typically
> >>>>> have to close/reopen the project for it to work). Drove me up the
> >>>>> wall to the point where I just gave up, and began using Eclipse's
> >>>>> remote debugging stuff to connect to Glassfish, and just completely
> >>>>> ignoring WTP. Yes, it means I have to undeploy/redeploy to get new
> >>>>> things picked up by Glassfish, but it beats spending hours trying to
> >>>>> get this working with WTP.
> >>>>>
> >>>>> - Andrew Thorburn
> >>>>>
> >>>>> On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee
> >>>>> <er...@gmail.com>
> >>>>>
> >>>>> wrote:
> >>>>>> All,
> >>>>>>
> >>>>>> I've constantly had problems getting my dependencies declared in ivy
> >>>>>> to
> >>>>>
> >>>>> be
> >>>>>
> >>>>>  published to the tomcat server.
> >>>>>
> >>>>>> Before you answer just add the JavaEE module dep, I have already
> >>>>>> done that...
> >>>>>>
> >>>>>> When I check my .metadata where the WebApp is being published, I
> >>>>>> don't
> >>>>>
> >>>>> see a
> >>>>>
> >>>>>  lib directory under WEB-INF.
> >>>>>
> >>>>>> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
> >>>>>>
> >>>>>>
> >>>>>> Any thoughts?  Any way to debug this?
> >>>>>> I tried a few options:
> >>>>>>
> >>>>>> ivy with all confs
> >>>>>> Wiped our my tomcat, forced a republish...  No effect.
> >>>>>>
> >>>>>>
> >>>>>> To prove I didn't miss the JavaEE module dep:
> >>>>>> Here's my .classpath
> >>>>>>
> >>>>>> ?xml version="1.0" encoding="UTF-8"?>
> >>>>>>
> >>>>>>  <classpath>
> >>>>>>
> >>>>>>>        <classpathentry kind="src" output="target/classes"
> >>>>>>> path="src/main/java"/>
> >>>>>>>        <classpathentry kind="src" path="src/test/resources"/>
> >>>>>>>        <classpathentry kind="src" output="target/test-classes"
> >>>>>>> path="src/test/java"/>
> >>>>>>>        <classpathentry kind="src" path="src/main/antlr3"/>
> >>>>>>>        <classpathentry excluding="**" kind="src"
> >>>>>
> >>>>> output="target/classes"
> >>>>>
> >>>>>  path="src/main/resources"/>
> >>>>>
> >>>>>>>        <classpathentry kind="con"
> >>>>>
> >>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER/
> >>>>> org.eclipse.jdt.internal.de
> >>>>> bug.ui.launcher.StandardVMType/J2SE-1.5"/>
> >>>>>
> >>>>>         <classpathentry kind="con"
> >>>>>
> >>>>>
> >>>>>
> >>>>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPat
> >>>>>h=iv y.xml&amp;confs=*">
> >>>>>
> >>>>>                 <attributes>
> >>>>>
> >>>>>>>                        <attribute
> >>>>>>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> >>>>>>>                </attributes>
> >>>>>>>        </classpathentry>
> >>>>>>>        <classpathentry kind="output" path="target/classes"/>
> >>>>>>> </classpath>
> >>>>>>
> >>>>>> Tomcat is complaining about a spring web context class..
> >>>>>>
> >>>>>> SEVERE: Error configuring application listener of class
> >>>>>> org.springframework.web.context.ContextLoaderListener
> >>>>>> java.lang.ClassNotFoundException:
> >>>>>> org.springframework.web.context.ContextLoaderListener
> >>>>>>
> >>>>>>
> >>>>>> However...
> >>>>>>
> >>>>>> I do have spring-web-....  listed as a dep/jar in ivy.xml
> >>>>>> And the jar does have the missing class...
> >>>>>>
> >>>>>> package org.springframework.web.context;
> >>>>>>
> >>>>>>  import javax.servlet.ServletContextEvent;
> >>>>>>
> >>>>>>> import javax.servlet.ServletContextListener;
> >>>>>>>
> >>>>>>> /**
> >>>>>>>  * Bootstrap listener to start up and shut down Spring's root
> >>>>>>> {@link WebApplicationContext}.
> >>>>>>>  * Simply delegates to {@link ContextLoader} as well as to {@link
> >>>>>>> ContextCleanupListener}.
> >>>>>>>  *
> >>>>>>>  * <p>This listener should be registered after
> >>>>>>>  * {@link org.springframework.web.util.Log4jConfigListener}
> >>>>>>>  * in <code>web.xml</code>, if the latter is used.
> >>>>>>>  *
> >>>>>>>  * @author Juergen Hoeller
> >>>>>>>  * @since 17.02.2003
> >>>>>>>  * @see org.springframework.web.util.Log4jConfigListener
> >>>>>>>  */
> >>>>>>> public class ContextLoaderListener extends ContextLoader implements
> >>>>>>> ServletContextListener {
> >>>>>>
> >>>>>> As I said, I do a few cleans, have wiped out the server.  changed
> >>>>>> workspace.  Issue remains the same...
> >>>>>>
> >>>>>> I never do see WEB-INF/lib get created under the appropriate
> >>>>>> directory
> >>>>>
> >>>>> under
> >>>>>
> >>>>>  .metadata in my workspace.
> >>>>>
> >>>>>> Any thoughts?  I don't think I'm doing anything silly/obviously
> >>>>>> wrong... I have had this flaky behaviour before where publish
> >>>>>> wouldn't always publish...  It did work eventually...  [After
> >>>>>> cleans, Destroy servers, change workspace]
> >>>>>>
> >>>>>> Cheers,
> >>>>>> Eric G.



Re: IVYDE, Eclipse 3.5 & WTP

Posted by Eric Gulatee <er...@gmail.com>.
Nicholas,

Pardon me, it was Nicholas that had the suggestion...  Gotta give credit
where credit is due.
For now I don't mind the retrieve vs using items from the cache.  If there
are no other issues, I can live with that.

Cheers,
Eric G.

On Wed, Apr 14, 2010 at 11:00 AM, Eric Gulatee <er...@gmail.com>wrote:

> Matt,
>
> Well, your suggestion worked...  Thank you.  I basically added the ivy.xml
> as various libs (One being a runtime).
> Overrode the retrieve settings for the ivy(runtime) to retrieve to my
> WEB-INF/lib and it worked.
>
> So, from my standpoint that's a good enough workaround so far.  Dunno what
> other problems may lurk underneath, but so far so good  :)
>
> Cheers,
> Eric Gulatee
>
>
>
> On Wed, Apr 14, 2010 at 10:26 AM, Matt Benson <gu...@gmail.com>wrote:
>
>>
>> On Apr 14, 2010, at 7:01 AM, Nicolas Lalevée wrote:
>>
>>  On Wednesday 14 April 2010 13:13:36 Eric Gulatee wrote:
>>>
>>>> Andrew,
>>>>
>>>> Yeah, a few times new dependencies were not pushed even though they
>>>> appeared in the ivy library.
>>>> On a sad/funny side, the WAR file does contain the deps that I am
>>>> looking
>>>> for that seemingly don't get pushed to the WTP server.
>>>>
>>>> I guess I'll start using my build scripts to publish a WAR to an
>>>> AppServer.
>>>>
>>>
>>> I am not a WTP user, but what about making IvyDE retrieve [1] the jars
>>> into
>>> the WEB-INF/lib of your eclipse project, and tell WTP about the jars in
>>> WEB-INF/lib more than about the IvyDE container ?
>>> If your dependencies don't often change, it can be a good work around I
>>> think.
>>>
>>> Nicolas
>>>
>>> [1]
>>> http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/retrieve.html
>>>
>>>
>> I too have thought that retrieve might alleviate the issues, but
>> admittedly hadn't yet tried it.  I have somewhat of a gut reaction against
>> retrieval vs. using artifacts from cache, but I might try it sometime.
>>
>> -Matt
>>
>>
>>
>>>>
>>>> Cheers,
>>>> Eric G.
>>>>
>>>> On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn <nz...@gmail.com>
>>>> wrote:
>>>>
>>>>> I'm afraid I can't help you, just piping in to say that I've got
>>>>> basically the same problem - it doesn't always seem to publish my
>>>>> dependencies. I'm publishing to Jetty, not Tomcat, but even so...
>>>>>
>>>>> And even when it does publish them, it doesn't publish any new
>>>>> dependencies (e.g. if I build a new version (with a new filename) of a
>>>>> dependency, it doesn't get picked up straight away - I typically have
>>>>> to close/reopen the project for it to work). Drove me up the wall to
>>>>> the point where I just gave up, and began using Eclipse's remote
>>>>> debugging stuff to connect to Glassfish, and just completely ignoring
>>>>> WTP. Yes, it means I have to undeploy/redeploy to get new things
>>>>> picked up by Glassfish, but it beats spending hours trying to get this
>>>>> working with WTP.
>>>>>
>>>>> - Andrew Thorburn
>>>>>
>>>>> On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee <er...@gmail.com>
>>>>>
>>>>> wrote:
>>>>>
>>>>>> All,
>>>>>>
>>>>>> I've constantly had problems getting my dependencies declared in ivy
>>>>>> to
>>>>>>
>>>>>
>>>>> be
>>>>>
>>>>>  published to the tomcat server.
>>>>>> Before you answer just add the JavaEE module dep, I have already done
>>>>>> that...
>>>>>>
>>>>>> When I check my .metadata where the WebApp is being published, I don't
>>>>>>
>>>>>
>>>>> see a
>>>>>
>>>>>  lib directory under WEB-INF.
>>>>>>
>>>>>> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>>>>>>
>>>>>>
>>>>>> Any thoughts?  Any way to debug this?
>>>>>> I tried a few options:
>>>>>>
>>>>>> ivy with all confs
>>>>>> Wiped our my tomcat, forced a republish...  No effect.
>>>>>>
>>>>>>
>>>>>> To prove I didn't miss the JavaEE module dep:
>>>>>> Here's my .classpath
>>>>>>
>>>>>> ?xml version="1.0" encoding="UTF-8"?>
>>>>>>
>>>>>>  <classpath>
>>>>>>>        <classpathentry kind="src" output="target/classes"
>>>>>>> path="src/main/java"/>
>>>>>>>        <classpathentry kind="src" path="src/test/resources"/>
>>>>>>>        <classpathentry kind="src" output="target/test-classes"
>>>>>>> path="src/test/java"/>
>>>>>>>        <classpathentry kind="src" path="src/main/antlr3"/>
>>>>>>>        <classpathentry excluding="**" kind="src"
>>>>>>>
>>>>>>
>>>>> output="target/classes"
>>>>>
>>>>>  path="src/main/resources"/>
>>>>>>>        <classpathentry kind="con"
>>>>>>>
>>>>>>
>>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER/
>>>>> org.eclipse.jdt.internal.de
>>>>> bug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>>>>
>>>>>         <classpathentry kind="con"
>>>>>>>
>>>>>>
>>>>>
>>>>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=iv
>>>>> y.xml&amp;confs=*">
>>>>>
>>>>>                 <attributes>
>>>>>>>                        <attribute
>>>>>>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>>>>>>                </attributes>
>>>>>>>        </classpathentry>
>>>>>>>        <classpathentry kind="output" path="target/classes"/>
>>>>>>> </classpath>
>>>>>>>
>>>>>>
>>>>>> Tomcat is complaining about a spring web context class..
>>>>>>
>>>>>> SEVERE: Error configuring application listener of class
>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>> java.lang.ClassNotFoundException:
>>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>>
>>>>>>
>>>>>> However...
>>>>>>
>>>>>> I do have spring-web-....  listed as a dep/jar in ivy.xml
>>>>>> And the jar does have the missing class...
>>>>>>
>>>>>> package org.springframework.web.context;
>>>>>>
>>>>>>  import javax.servlet.ServletContextEvent;
>>>>>>> import javax.servlet.ServletContextListener;
>>>>>>>
>>>>>>> /**
>>>>>>>  * Bootstrap listener to start up and shut down Spring's root {@link
>>>>>>> WebApplicationContext}.
>>>>>>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>>>>>>> ContextCleanupListener}.
>>>>>>>  *
>>>>>>>  * <p>This listener should be registered after
>>>>>>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>>>>>>  * in <code>web.xml</code>, if the latter is used.
>>>>>>>  *
>>>>>>>  * @author Juergen Hoeller
>>>>>>>  * @since 17.02.2003
>>>>>>>  * @see org.springframework.web.util.Log4jConfigListener
>>>>>>>  */
>>>>>>> public class ContextLoaderListener extends ContextLoader implements
>>>>>>> ServletContextListener {
>>>>>>>
>>>>>>
>>>>>> As I said, I do a few cleans, have wiped out the server.  changed
>>>>>> workspace.  Issue remains the same...
>>>>>>
>>>>>> I never do see WEB-INF/lib get created under the appropriate directory
>>>>>>
>>>>>
>>>>> under
>>>>>
>>>>>  .metadata in my workspace.
>>>>>>
>>>>>>
>>>>>> Any thoughts?  I don't think I'm doing anything silly/obviously
>>>>>> wrong... I have had this flaky behaviour before where publish wouldn't
>>>>>> always publish...  It did work eventually...  [After cleans, Destroy
>>>>>> servers, change workspace]
>>>>>>
>>>>>> Cheers,
>>>>>> Eric G.
>>>>>>
>>>>>
>>>
>>>
>>
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Eric Gulatee <er...@gmail.com>.
Matt,

Well, your suggestion worked...  Thank you.  I basically added the ivy.xml
as various libs (One being a runtime).
Overrode the retrieve settings for the ivy(runtime) to retrieve to my
WEB-INF/lib and it worked.

So, from my standpoint that's a good enough workaround so far.  Dunno what
other problems may lurk underneath, but so far so good  :)

Cheers,
Eric Gulatee


On Wed, Apr 14, 2010 at 10:26 AM, Matt Benson <gu...@gmail.com> wrote:

>
> On Apr 14, 2010, at 7:01 AM, Nicolas Lalevée wrote:
>
>  On Wednesday 14 April 2010 13:13:36 Eric Gulatee wrote:
>>
>>> Andrew,
>>>
>>> Yeah, a few times new dependencies were not pushed even though they
>>> appeared in the ivy library.
>>> On a sad/funny side, the WAR file does contain the deps that I am looking
>>> for that seemingly don't get pushed to the WTP server.
>>>
>>> I guess I'll start using my build scripts to publish a WAR to an
>>> AppServer.
>>>
>>
>> I am not a WTP user, but what about making IvyDE retrieve [1] the jars
>> into
>> the WEB-INF/lib of your eclipse project, and tell WTP about the jars in
>> WEB-INF/lib more than about the IvyDE container ?
>> If your dependencies don't often change, it can be a good work around I
>> think.
>>
>> Nicolas
>>
>> [1]
>> http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/retrieve.html
>>
>>
> I too have thought that retrieve might alleviate the issues, but admittedly
> hadn't yet tried it.  I have somewhat of a gut reaction against retrieval
> vs. using artifacts from cache, but I might try it sometime.
>
> -Matt
>
>
>
>>>
>>> Cheers,
>>> Eric G.
>>>
>>> On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn <nz...@gmail.com>
>>> wrote:
>>>
>>>> I'm afraid I can't help you, just piping in to say that I've got
>>>> basically the same problem - it doesn't always seem to publish my
>>>> dependencies. I'm publishing to Jetty, not Tomcat, but even so...
>>>>
>>>> And even when it does publish them, it doesn't publish any new
>>>> dependencies (e.g. if I build a new version (with a new filename) of a
>>>> dependency, it doesn't get picked up straight away - I typically have
>>>> to close/reopen the project for it to work). Drove me up the wall to
>>>> the point where I just gave up, and began using Eclipse's remote
>>>> debugging stuff to connect to Glassfish, and just completely ignoring
>>>> WTP. Yes, it means I have to undeploy/redeploy to get new things
>>>> picked up by Glassfish, but it beats spending hours trying to get this
>>>> working with WTP.
>>>>
>>>> - Andrew Thorburn
>>>>
>>>> On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee <er...@gmail.com>
>>>>
>>>> wrote:
>>>>
>>>>> All,
>>>>>
>>>>> I've constantly had problems getting my dependencies declared in ivy to
>>>>>
>>>>
>>>> be
>>>>
>>>>  published to the tomcat server.
>>>>> Before you answer just add the JavaEE module dep, I have already done
>>>>> that...
>>>>>
>>>>> When I check my .metadata where the WebApp is being published, I don't
>>>>>
>>>>
>>>> see a
>>>>
>>>>  lib directory under WEB-INF.
>>>>>
>>>>> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>>>>>
>>>>>
>>>>> Any thoughts?  Any way to debug this?
>>>>> I tried a few options:
>>>>>
>>>>> ivy with all confs
>>>>> Wiped our my tomcat, forced a republish...  No effect.
>>>>>
>>>>>
>>>>> To prove I didn't miss the JavaEE module dep:
>>>>> Here's my .classpath
>>>>>
>>>>> ?xml version="1.0" encoding="UTF-8"?>
>>>>>
>>>>>  <classpath>
>>>>>>        <classpathentry kind="src" output="target/classes"
>>>>>> path="src/main/java"/>
>>>>>>        <classpathentry kind="src" path="src/test/resources"/>
>>>>>>        <classpathentry kind="src" output="target/test-classes"
>>>>>> path="src/test/java"/>
>>>>>>        <classpathentry kind="src" path="src/main/antlr3"/>
>>>>>>        <classpathentry excluding="**" kind="src"
>>>>>>
>>>>>
>>>> output="target/classes"
>>>>
>>>>  path="src/main/resources"/>
>>>>>>        <classpathentry kind="con"
>>>>>>
>>>>>
>>>> path="org.eclipse.jdt.launching.JRE_CONTAINER/
>>>> org.eclipse.jdt.internal.de
>>>> bug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>>>
>>>>         <classpathentry kind="con"
>>>>>>
>>>>>
>>>>
>>>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=iv
>>>> y.xml&amp;confs=*">
>>>>
>>>>                 <attributes>
>>>>>>                        <attribute
>>>>>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>>>>>                </attributes>
>>>>>>        </classpathentry>
>>>>>>        <classpathentry kind="output" path="target/classes"/>
>>>>>> </classpath>
>>>>>>
>>>>>
>>>>> Tomcat is complaining about a spring web context class..
>>>>>
>>>>> SEVERE: Error configuring application listener of class
>>>>> org.springframework.web.context.ContextLoaderListener
>>>>> java.lang.ClassNotFoundException:
>>>>> org.springframework.web.context.ContextLoaderListener
>>>>>
>>>>>
>>>>> However...
>>>>>
>>>>> I do have spring-web-....  listed as a dep/jar in ivy.xml
>>>>> And the jar does have the missing class...
>>>>>
>>>>> package org.springframework.web.context;
>>>>>
>>>>>  import javax.servlet.ServletContextEvent;
>>>>>> import javax.servlet.ServletContextListener;
>>>>>>
>>>>>> /**
>>>>>>  * Bootstrap listener to start up and shut down Spring's root {@link
>>>>>> WebApplicationContext}.
>>>>>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>>>>>> ContextCleanupListener}.
>>>>>>  *
>>>>>>  * <p>This listener should be registered after
>>>>>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>>>>>  * in <code>web.xml</code>, if the latter is used.
>>>>>>  *
>>>>>>  * @author Juergen Hoeller
>>>>>>  * @since 17.02.2003
>>>>>>  * @see org.springframework.web.util.Log4jConfigListener
>>>>>>  */
>>>>>> public class ContextLoaderListener extends ContextLoader implements
>>>>>> ServletContextListener {
>>>>>>
>>>>>
>>>>> As I said, I do a few cleans, have wiped out the server.  changed
>>>>> workspace.  Issue remains the same...
>>>>>
>>>>> I never do see WEB-INF/lib get created under the appropriate directory
>>>>>
>>>>
>>>> under
>>>>
>>>>  .metadata in my workspace.
>>>>>
>>>>>
>>>>> Any thoughts?  I don't think I'm doing anything silly/obviously
>>>>> wrong... I have had this flaky behaviour before where publish wouldn't
>>>>> always publish...  It did work eventually...  [After cleans, Destroy
>>>>> servers, change workspace]
>>>>>
>>>>> Cheers,
>>>>> Eric G.
>>>>>
>>>>
>>
>>
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Matt Benson <gu...@gmail.com>.
On Apr 14, 2010, at 7:01 AM, Nicolas Lalevée wrote:

> On Wednesday 14 April 2010 13:13:36 Eric Gulatee wrote:
>> Andrew,
>>
>> Yeah, a few times new dependencies were not pushed even though they
>> appeared in the ivy library.
>> On a sad/funny side, the WAR file does contain the deps that I am  
>> looking
>> for that seemingly don't get pushed to the WTP server.
>>
>> I guess I'll start using my build scripts to publish a WAR to an  
>> AppServer.
>
> I am not a WTP user, but what about making IvyDE retrieve [1] the  
> jars into
> the WEB-INF/lib of your eclipse project, and tell WTP about the  
> jars in
> WEB-INF/lib more than about the IvyDE container ?
> If your dependencies don't often change, it can be a good work  
> around I think.
>
> Nicolas
>
> [1] http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/ 
> retrieve.html
>

I too have thought that retrieve might alleviate the issues, but  
admittedly hadn't yet tried it.  I have somewhat of a gut reaction  
against retrieval vs. using artifacts from cache, but I might try it  
sometime.

-Matt

>>
>>
>> Cheers,
>> Eric G.
>>
>> On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn  
>> <nz...@gmail.com> wrote:
>>> I'm afraid I can't help you, just piping in to say that I've got
>>> basically the same problem - it doesn't always seem to publish my
>>> dependencies. I'm publishing to Jetty, not Tomcat, but even so...
>>>
>>> And even when it does publish them, it doesn't publish any new
>>> dependencies (e.g. if I build a new version (with a new filename)  
>>> of a
>>> dependency, it doesn't get picked up straight away - I typically  
>>> have
>>> to close/reopen the project for it to work). Drove me up the wall to
>>> the point where I just gave up, and began using Eclipse's remote
>>> debugging stuff to connect to Glassfish, and just completely  
>>> ignoring
>>> WTP. Yes, it means I have to undeploy/redeploy to get new things
>>> picked up by Glassfish, but it beats spending hours trying to get  
>>> this
>>> working with WTP.
>>>
>>> - Andrew Thorburn
>>>
>>> On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee  
>>> <er...@gmail.com>
>>>
>>> wrote:
>>>> All,
>>>>
>>>> I've constantly had problems getting my dependencies declared in  
>>>> ivy to
>>>
>>> be
>>>
>>>> published to the tomcat server.
>>>> Before you answer just add the JavaEE module dep, I have already  
>>>> done
>>>> that...
>>>>
>>>> When I check my .metadata where the WebApp is being published, I  
>>>> don't
>>>
>>> see a
>>>
>>>> lib directory under WEB-INF.
>>>>
>>>> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>>>>
>>>>
>>>> Any thoughts?  Any way to debug this?
>>>> I tried a few options:
>>>>
>>>> ivy with all confs
>>>> Wiped our my tomcat, forced a republish...  No effect.
>>>>
>>>>
>>>> To prove I didn't miss the JavaEE module dep:
>>>> Here's my .classpath
>>>>
>>>> ?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>>> <classpath>
>>>>>         <classpathentry kind="src" output="target/classes"
>>>>> path="src/main/java"/>
>>>>>         <classpathentry kind="src" path="src/test/resources"/>
>>>>>         <classpathentry kind="src" output="target/test-classes"
>>>>> path="src/test/java"/>
>>>>>         <classpathentry kind="src" path="src/main/antlr3"/>
>>>>>         <classpathentry excluding="**" kind="src"
>>>
>>> output="target/classes"
>>>
>>>>> path="src/main/resources"/>
>>>>>         <classpathentry kind="con"
>>>
>>> path="org.eclipse.jdt.launching.JRE_CONTAINER/ 
>>> org.eclipse.jdt.internal.de
>>> bug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>>
>>>>>         <classpathentry kind="con"
>>>
>>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/? 
>>> ivyXmlPath=iv
>>> y.xml&amp;confs=*">
>>>
>>>>>                 <attributes>
>>>>>                         <attribute
>>>>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>>>>                 </attributes>
>>>>>         </classpathentry>
>>>>>         <classpathentry kind="output" path="target/classes"/>
>>>>> </classpath>
>>>>
>>>> Tomcat is complaining about a spring web context class..
>>>>
>>>> SEVERE: Error configuring application listener of class
>>>> org.springframework.web.context.ContextLoaderListener
>>>> java.lang.ClassNotFoundException:
>>>> org.springframework.web.context.ContextLoaderListener
>>>>
>>>>
>>>> However...
>>>>
>>>> I do have spring-web-....  listed as a dep/jar in ivy.xml
>>>> And the jar does have the missing class...
>>>>
>>>> package org.springframework.web.context;
>>>>
>>>>> import javax.servlet.ServletContextEvent;
>>>>> import javax.servlet.ServletContextListener;
>>>>>
>>>>> /**
>>>>>  * Bootstrap listener to start up and shut down Spring's root  
>>>>> {@link
>>>>> WebApplicationContext}.
>>>>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>>>>> ContextCleanupListener}.
>>>>>  *
>>>>>  * <p>This listener should be registered after
>>>>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>>>>  * in <code>web.xml</code>, if the latter is used.
>>>>>  *
>>>>>  * @author Juergen Hoeller
>>>>>  * @since 17.02.2003
>>>>>  * @see org.springframework.web.util.Log4jConfigListener
>>>>>  */
>>>>> public class ContextLoaderListener extends ContextLoader  
>>>>> implements
>>>>> ServletContextListener {
>>>>
>>>> As I said, I do a few cleans, have wiped out the server.  changed
>>>> workspace.  Issue remains the same...
>>>>
>>>> I never do see WEB-INF/lib get created under the appropriate  
>>>> directory
>>>
>>> under
>>>
>>>> .metadata in my workspace.
>>>>
>>>>
>>>> Any thoughts?  I don't think I'm doing anything silly/obviously
>>>> wrong... I have had this flaky behaviour before where publish  
>>>> wouldn't
>>>> always publish...  It did work eventually...  [After cleans,  
>>>> Destroy
>>>> servers, change workspace]
>>>>
>>>> Cheers,
>>>> Eric G.
>
>


Re: IVYDE, Eclipse 3.5 & WTP

Posted by Nicolas Lalevée <ni...@hibnet.org>.
On Wednesday 14 April 2010 13:13:36 Eric Gulatee wrote:
> Andrew,
>
> Yeah, a few times new dependencies were not pushed even though they
> appeared in the ivy library.
> On a sad/funny side, the WAR file does contain the deps that I am looking
> for that seemingly don't get pushed to the WTP server.
>
> I guess I'll start using my build scripts to publish a WAR to an AppServer.

I am not a WTP user, but what about making IvyDE retrieve [1] the jars into 
the WEB-INF/lib of your eclipse project, and tell WTP about the jars in 
WEB-INF/lib more than about the IvyDE container ?
If your dependencies don't often change, it can be a good work around I think.

Nicolas

[1] http://ant.apache.org/ivy/ivyde/history/latest-milestone/cpc/retrieve.html

>
>
> Cheers,
> Eric G.
>
> On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn <nz...@gmail.com> wrote:
> > I'm afraid I can't help you, just piping in to say that I've got
> > basically the same problem - it doesn't always seem to publish my
> > dependencies. I'm publishing to Jetty, not Tomcat, but even so...
> >
> > And even when it does publish them, it doesn't publish any new
> > dependencies (e.g. if I build a new version (with a new filename) of a
> > dependency, it doesn't get picked up straight away - I typically have
> > to close/reopen the project for it to work). Drove me up the wall to
> > the point where I just gave up, and began using Eclipse's remote
> > debugging stuff to connect to Glassfish, and just completely ignoring
> > WTP. Yes, it means I have to undeploy/redeploy to get new things
> > picked up by Glassfish, but it beats spending hours trying to get this
> > working with WTP.
> >
> > - Andrew Thorburn
> >
> > On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee <er...@gmail.com>
> >
> > wrote:
> > > All,
> > >
> > > I've constantly had problems getting my dependencies declared in ivy to
> >
> > be
> >
> > > published to the tomcat server.
> > > Before you answer just add the JavaEE module dep, I have already done
> > > that...
> > >
> > > When I check my .metadata where the WebApp is being published, I don't
> >
> > see a
> >
> > > lib directory under WEB-INF.
> > >
> > > I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
> > >
> > >
> > > Any thoughts?  Any way to debug this?
> > > I tried a few options:
> > >
> > > ivy with all confs
> > > Wiped our my tomcat, forced a republish...  No effect.
> > >
> > >
> > > To prove I didn't miss the JavaEE module dep:
> > > Here's my .classpath
> > >
> > > ?xml version="1.0" encoding="UTF-8"?>
> > >
> > >> <classpath>
> > >>         <classpathentry kind="src" output="target/classes"
> > >> path="src/main/java"/>
> > >>         <classpathentry kind="src" path="src/test/resources"/>
> > >>         <classpathentry kind="src" output="target/test-classes"
> > >> path="src/test/java"/>
> > >>         <classpathentry kind="src" path="src/main/antlr3"/>
> > >>         <classpathentry excluding="**" kind="src"
> >
> > output="target/classes"
> >
> > >> path="src/main/resources"/>
> > >>         <classpathentry kind="con"
> >
> > path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.de
> >bug.ui.launcher.StandardVMType/J2SE-1.5"/>
> >
> > >>         <classpathentry kind="con"
> >
> > path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=iv
> >y.xml&amp;confs=*">
> >
> > >>                 <attributes>
> > >>                         <attribute
> > >> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> > >>                 </attributes>
> > >>         </classpathentry>
> > >>         <classpathentry kind="output" path="target/classes"/>
> > >> </classpath>
> > >
> > > Tomcat is complaining about a spring web context class..
> > >
> > > SEVERE: Error configuring application listener of class
> > > org.springframework.web.context.ContextLoaderListener
> > > java.lang.ClassNotFoundException:
> > > org.springframework.web.context.ContextLoaderListener
> > >
> > >
> > > However...
> > >
> > > I do have spring-web-....  listed as a dep/jar in ivy.xml
> > > And the jar does have the missing class...
> > >
> > > package org.springframework.web.context;
> > >
> > >> import javax.servlet.ServletContextEvent;
> > >> import javax.servlet.ServletContextListener;
> > >>
> > >> /**
> > >>  * Bootstrap listener to start up and shut down Spring's root {@link
> > >> WebApplicationContext}.
> > >>  * Simply delegates to {@link ContextLoader} as well as to {@link
> > >> ContextCleanupListener}.
> > >>  *
> > >>  * <p>This listener should be registered after
> > >>  * {@link org.springframework.web.util.Log4jConfigListener}
> > >>  * in <code>web.xml</code>, if the latter is used.
> > >>  *
> > >>  * @author Juergen Hoeller
> > >>  * @since 17.02.2003
> > >>  * @see org.springframework.web.util.Log4jConfigListener
> > >>  */
> > >> public class ContextLoaderListener extends ContextLoader implements
> > >> ServletContextListener {
> > >
> > > As I said, I do a few cleans, have wiped out the server.  changed
> > > workspace.  Issue remains the same...
> > >
> > > I never do see WEB-INF/lib get created under the appropriate directory
> >
> > under
> >
> > > .metadata in my workspace.
> > >
> > >
> > > Any thoughts?  I don't think I'm doing anything silly/obviously
> > > wrong... I have had this flaky behaviour before where publish wouldn't
> > > always publish...  It did work eventually...  [After cleans, Destroy
> > > servers, change workspace]
> > >
> > > Cheers,
> > > Eric G.



Re: IVYDE, Eclipse 3.5 & WTP

Posted by Eric Gulatee <er...@gmail.com>.
Andrew,

Yeah, a few times new dependencies were not pushed even though they appeared
in the ivy library.
On a sad/funny side, the WAR file does contain the deps that I am looking
for that seemingly don't get pushed to the WTP server.

I guess I'll start using my build scripts to publish a WAR to an AppServer.


Cheers,
Eric G.

On Wed, Apr 14, 2010 at 3:59 AM, Andrew Thorburn <nz...@gmail.com> wrote:

> I'm afraid I can't help you, just piping in to say that I've got
> basically the same problem - it doesn't always seem to publish my
> dependencies. I'm publishing to Jetty, not Tomcat, but even so...
>
> And even when it does publish them, it doesn't publish any new
> dependencies (e.g. if I build a new version (with a new filename) of a
> dependency, it doesn't get picked up straight away - I typically have
> to close/reopen the project for it to work). Drove me up the wall to
> the point where I just gave up, and began using Eclipse's remote
> debugging stuff to connect to Glassfish, and just completely ignoring
> WTP. Yes, it means I have to undeploy/redeploy to get new things
> picked up by Glassfish, but it beats spending hours trying to get this
> working with WTP.
>
> - Andrew Thorburn
>
> On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee <er...@gmail.com>
> wrote:
> > All,
> >
> > I've constantly had problems getting my dependencies declared in ivy to
> be
> > published to the tomcat server.
> > Before you answer just add the JavaEE module dep, I have already done
> > that...
> >
> > When I check my .metadata where the WebApp is being published, I don't
> see a
> > lib directory under WEB-INF.
> >
> > I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
> >
> >
> > Any thoughts?  Any way to debug this?
> > I tried a few options:
> >
> > ivy with all confs
> > Wiped our my tomcat, forced a republish...  No effect.
> >
> >
> > To prove I didn't miss the JavaEE module dep:
> > Here's my .classpath
> >
> > ?xml version="1.0" encoding="UTF-8"?>
> >> <classpath>
> >>         <classpathentry kind="src" output="target/classes"
> >> path="src/main/java"/>
> >>         <classpathentry kind="src" path="src/test/resources"/>
> >>         <classpathentry kind="src" output="target/test-classes"
> >> path="src/test/java"/>
> >>         <classpathentry kind="src" path="src/main/antlr3"/>
> >>         <classpathentry excluding="**" kind="src"
> output="target/classes"
> >> path="src/main/resources"/>
> >>         <classpathentry kind="con"
> >>
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
> >>         <classpathentry kind="con"
> >>
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
> >>                 <attributes>
> >>                         <attribute
> >> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
> >>                 </attributes>
> >>         </classpathentry>
> >>         <classpathentry kind="output" path="target/classes"/>
> >> </classpath>
> >>
> >
> >
> > Tomcat is complaining about a spring web context class..
> >
> > SEVERE: Error configuring application listener of class
> > org.springframework.web.context.ContextLoaderListener
> > java.lang.ClassNotFoundException:
> > org.springframework.web.context.ContextLoaderListener
> >
> >
> > However...
> >
> > I do have spring-web-....  listed as a dep/jar in ivy.xml
> > And the jar does have the missing class...
> >
> > package org.springframework.web.context;
> >>
> >> import javax.servlet.ServletContextEvent;
> >> import javax.servlet.ServletContextListener;
> >>
> >> /**
> >>  * Bootstrap listener to start up and shut down Spring's root {@link
> >> WebApplicationContext}.
> >>  * Simply delegates to {@link ContextLoader} as well as to {@link
> >> ContextCleanupListener}.
> >>  *
> >>  * <p>This listener should be registered after
> >>  * {@link org.springframework.web.util.Log4jConfigListener}
> >>  * in <code>web.xml</code>, if the latter is used.
> >>  *
> >>  * @author Juergen Hoeller
> >>  * @since 17.02.2003
> >>  * @see org.springframework.web.util.Log4jConfigListener
> >>  */
> >> public class ContextLoaderListener extends ContextLoader implements
> >> ServletContextListener {
> >>
> >>
> >
> > As I said, I do a few cleans, have wiped out the server.  changed
> > workspace.  Issue remains the same...
> >
> > I never do see WEB-INF/lib get created under the appropriate directory
> under
> > .metadata in my workspace.
> >
> >
> > Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
> > I have had this flaky behaviour before where publish wouldn't always
> > publish...  It did work eventually...  [After cleans, Destroy servers,
> > change workspace]
> >
> > Cheers,
> > Eric G.
> >
>

Re: IVYDE, Eclipse 3.5 & WTP

Posted by Andrew Thorburn <nz...@gmail.com>.
I'm afraid I can't help you, just piping in to say that I've got
basically the same problem - it doesn't always seem to publish my
dependencies. I'm publishing to Jetty, not Tomcat, but even so...

And even when it does publish them, it doesn't publish any new
dependencies (e.g. if I build a new version (with a new filename) of a
dependency, it doesn't get picked up straight away - I typically have
to close/reopen the project for it to work). Drove me up the wall to
the point where I just gave up, and began using Eclipse's remote
debugging stuff to connect to Glassfish, and just completely ignoring
WTP. Yes, it means I have to undeploy/redeploy to get new things
picked up by Glassfish, but it beats spending hours trying to get this
working with WTP.

- Andrew Thorburn

On Wed, Apr 14, 2010 at 4:31 PM, Eric Gulatee <er...@gmail.com> wrote:
> All,
>
> I've constantly had problems getting my dependencies declared in ivy to be
> published to the tomcat server.
> Before you answer just add the JavaEE module dep, I have already done
> that...
>
> When I check my .metadata where the WebApp is being published, I don't see a
> lib directory under WEB-INF.
>
> I am using eclipse 3.5, MaxOSX, IVY 2.1.0 IVYDE 2.0.0 final.
>
>
> Any thoughts?  Any way to debug this?
> I tried a few options:
>
> ivy with all confs
> Wiped our my tomcat, forced a republish...  No effect.
>
>
> To prove I didn't miss the JavaEE module dep:
> Here's my .classpath
>
> ?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>>         <classpathentry kind="src" output="target/classes"
>> path="src/main/java"/>
>>         <classpathentry kind="src" path="src/test/resources"/>
>>         <classpathentry kind="src" output="target/test-classes"
>> path="src/test/java"/>
>>         <classpathentry kind="src" path="src/main/antlr3"/>
>>         <classpathentry excluding="**" kind="src" output="target/classes"
>> path="src/main/resources"/>
>>         <classpathentry kind="con"
>> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
>>         <classpathentry kind="con"
>> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&amp;confs=*">
>>                 <attributes>
>>                         <attribute
>> name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
>>                 </attributes>
>>         </classpathentry>
>>         <classpathentry kind="output" path="target/classes"/>
>> </classpath>
>>
>
>
> Tomcat is complaining about a spring web context class..
>
> SEVERE: Error configuring application listener of class
> org.springframework.web.context.ContextLoaderListener
> java.lang.ClassNotFoundException:
> org.springframework.web.context.ContextLoaderListener
>
>
> However...
>
> I do have spring-web-....  listed as a dep/jar in ivy.xml
> And the jar does have the missing class...
>
> package org.springframework.web.context;
>>
>> import javax.servlet.ServletContextEvent;
>> import javax.servlet.ServletContextListener;
>>
>> /**
>>  * Bootstrap listener to start up and shut down Spring's root {@link
>> WebApplicationContext}.
>>  * Simply delegates to {@link ContextLoader} as well as to {@link
>> ContextCleanupListener}.
>>  *
>>  * <p>This listener should be registered after
>>  * {@link org.springframework.web.util.Log4jConfigListener}
>>  * in <code>web.xml</code>, if the latter is used.
>>  *
>>  * @author Juergen Hoeller
>>  * @since 17.02.2003
>>  * @see org.springframework.web.util.Log4jConfigListener
>>  */
>> public class ContextLoaderListener extends ContextLoader implements
>> ServletContextListener {
>>
>>
>
> As I said, I do a few cleans, have wiped out the server.  changed
> workspace.  Issue remains the same...
>
> I never do see WEB-INF/lib get created under the appropriate directory under
> .metadata in my workspace.
>
>
> Any thoughts?  I don't think I'm doing anything silly/obviously wrong...
> I have had this flaky behaviour before where publish wouldn't always
> publish...  It did work eventually...  [After cleans, Destroy servers,
> change workspace]
>
> Cheers,
> Eric G.
>