You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Richard Jones <fu...@gmail.com> on 2007/10/23 06:53:49 UTC

Debugging Roller in Eclipse

Hi,

I've been customizing Roller for a while now, and just wanted to know
if it's possible to set-up Roller to be debuggable in Eclipse.  I've
got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
can use the Eclipse built-in debugger, but I've never been able to get
Roller using it.  Just wanted to know whether to continue trying to
get this working, or if it's not possible.

Thanks in advance for your help.

Cheers,

Richard

Re: Debugging Roller in Eclipse

Posted by Leon Messerschmidt <le...@lonelyplanet.com.au>.
Hi Richard,

I usually use a remote debugger, which seems to work pretty well with
roller:

http://www.eclipsezone.com/eclipse/forums/t53459.html

~ Leon

On Tue, 2007-10-23 at 11:53 +0700, Richard Jones wrote:
> Hi,
> 
> I've been customizing Roller for a while now, and just wanted to know
> if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> can use the Eclipse built-in debugger, but I've never been able to get
> Roller using it.  Just wanted to know whether to continue trying to
> get this working, or if it's not possible.
> 
> Thanks in advance for your help.
> 
> Cheers,
> 
> Richard

______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.

Re: Debugging Roller in Eclipse

Posted by Leon Messerschmidt <le...@lonelyplanet.com.au>.
Hi Richard,

I think I already suggested remote debugger ;-)

~ Leon

On Wed, 2007-10-24 at 17:26 +0700, Richard Jones wrote:
> Hi,
> 
> I've been trying to get Roller debuggable in Eclipse as described in
> this thread by Adib.  I've got a simple servlet project working using
> the same method, but when it comes to Roller I can't get it deployed.
> 
> I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
> problem deploying Roller as a Tomcat webapp on its own, but getting it
> deployed and debuggable through Eclipse is a different matter.  I have
> set-up 'Dynamic Web Project' and followed the steps as provided by
> Adib, but when I go to run/debug the application in Eclipse, Tomcat
> fails to deploy the webapp.  The roller.log reads:
> 
> 
> ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
> ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
> configuring application listener of class
> org.apache.roller.ui.core.RollerContext
> java.lang.NullPointerException
>         at java.util.Properties$LineReader.readLine(Properties.java:365)
>         at java.util.Properties.load(Properties.java:293)
>         at org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3713)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
> 
> 
> If any Roller + Eclipse developers out there have any suggestions...
> it would be greatly appreciated.
> 
> Cheers,
> 
> Richard
> 
> 
> On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> > Many thanks guys!
> >
> > I'm going for Adib's method and I'm some making progress (although the
> > 15 minutes past a long time ago ;-)   I will post again when I either
> > get it working or give-up and have a question.
> >
> > Thanks again.
> >
> > - Richard
> >
> >
> > On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > > Hi Richard,
> > >
> > > I have done all my customization to Roller in Eclipse, including debug. You
> > > should be able to get setup in about 15 minutes. Here is how I did it.
> > >
> > > Environment:
> > >   - Eclipse Europa, with web tooling
> > >   - Tomcat 6.0.13
> > >   - postgres 8.2.4
> > >   - windows xp
> > >   - roller 3.1
> > >
> > > Steps to create the setup.
> > >
> > > 1. Create Dynamic Web Project in Eclipse
> > >
> > > 2. from the roller unzip dir copy webapp\roller\* into WebContent in Eclipse
> > >
> > > 3. Create a source folder called resources
> > >
> > > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > > folder. This way you can make changes to .properties files and eclipse will
> > > put them automatically into WEB-INF\classes
> > >
> > > 5.Create a source folder for your code, and put your customizations there.
> > > In my case I have only added models and changed some tags in roller for
> > > example the calendar tag to change the arrow buttons on it. My favourite
> > > method is to link the roller jars into the roller sources eclipse can do
> > > easily, that way you can navigate through the roller code easisly via
> > > eclipse shortcuts. Once I can navigate the code out I create my own models
> > > in my own packages which don't interfer with roller, that way I don't have
> > > to touch and recompile the roller intself.
> > >
> > > 6. If you want to make more major changes to roller, I would delete the
> > > roller specific jar files from WEB-INF\lib and then unzip the source code
> > > into a normal eclipse source folder, then hack on it as much as you want.
> > >
> > > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > > local database
> > >
> > > 8. Right click on the projcet > Run AS > Server Application and you will be
> > > able to do debugging, hot code replace and all other great stuff you are
> > > used to doing with roller.
> > >
> > > hope this helps you
> > > Adib
> > >
> > > -----Original Message-----
> > > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > > Sent: Monday, October 22, 2007 9:54 PM
> > > To: dev@roller.apache.org
> > > Subject: Debugging Roller in Eclipse
> > >
> > > Hi,
> > >
> > > I've been customizing Roller for a while now, and just wanted to know
> > > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > > can use the Eclipse built-in debugger, but I've never been able to get
> > > Roller using it.  Just wanted to know whether to continue trying to
> > > get this working, or if it's not possible.
> > >
> > > Thanks in advance for your help.
> > >
> > > Cheers,
> > >
> > > Richard
> > >
> > >
> > >
> >

______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.

Re: Debugging Roller in Eclipse

Posted by Dave <sn...@gmail.com>.
I would suggest that you start the Java VM that runs Roller, then
"attach" to it with the Eclipse debugger. Works great in Netbeans ;-)

- Dave



On 10/24/07, Richard Jones <fu...@gmail.com> wrote:
> Hi,
>
> I've been trying to get Roller debuggable in Eclipse as described in
> this thread by Adib.  I've got a simple servlet project working using
> the same method, but when it comes to Roller I can't get it deployed.
>
> I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
> problem deploying Roller as a Tomcat webapp on its own, but getting it
> deployed and debuggable through Eclipse is a different matter.  I have
> set-up 'Dynamic Web Project' and followed the steps as provided by
> Adib, but when I go to run/debug the application in Eclipse, Tomcat
> fails to deploy the webapp.  The roller.log reads:
>
>
> ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
> ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
> configuring application listener of class
> org.apache.roller.ui.core.RollerContext
> java.lang.NullPointerException
>         at java.util.Properties$LineReader.readLine(Properties.java:365)
>         at java.util.Properties.load(Properties.java:293)
>         at org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3713)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
>
>
> If any Roller + Eclipse developers out there have any suggestions...
> it would be greatly appreciated.
>
> Cheers,
>
> Richard
>
>
> On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> > Many thanks guys!
> >
> > I'm going for Adib's method and I'm some making progress (although the
> > 15 minutes past a long time ago ;-)   I will post again when I either
> > get it working or give-up and have a question.
> >
> > Thanks again.
> >
> > - Richard
> >
> >
> > On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > > Hi Richard,
> > >
> > > I have done all my customization to Roller in Eclipse, including debug. You
> > > should be able to get setup in about 15 minutes. Here is how I did it.
> > >
> > > Environment:
> > >   - Eclipse Europa, with web tooling
> > >   - Tomcat 6.0.13
> > >   - postgres 8.2.4
> > >   - windows xp
> > >   - roller 3.1
> > >
> > > Steps to create the setup.
> > >
> > > 1. Create Dynamic Web Project in Eclipse
> > >
> > > 2. from the roller unzip dir copy webapp\roller\* into WebContent in Eclipse
> > >
> > > 3. Create a source folder called resources
> > >
> > > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > > folder. This way you can make changes to .properties files and eclipse will
> > > put them automatically into WEB-INF\classes
> > >
> > > 5.Create a source folder for your code, and put your customizations there.
> > > In my case I have only added models and changed some tags in roller for
> > > example the calendar tag to change the arrow buttons on it. My favourite
> > > method is to link the roller jars into the roller sources eclipse can do
> > > easily, that way you can navigate through the roller code easisly via
> > > eclipse shortcuts. Once I can navigate the code out I create my own models
> > > in my own packages which don't interfer with roller, that way I don't have
> > > to touch and recompile the roller intself.
> > >
> > > 6. If you want to make more major changes to roller, I would delete the
> > > roller specific jar files from WEB-INF\lib and then unzip the source code
> > > into a normal eclipse source folder, then hack on it as much as you want.
> > >
> > > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > > local database
> > >
> > > 8. Right click on the projcet > Run AS > Server Application and you will be
> > > able to do debugging, hot code replace and all other great stuff you are
> > > used to doing with roller.
> > >
> > > hope this helps you
> > > Adib
> > >
> > > -----Original Message-----
> > > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > > Sent: Monday, October 22, 2007 9:54 PM
> > > To: dev@roller.apache.org
> > > Subject: Debugging Roller in Eclipse
> > >
> > > Hi,
> > >
> > > I've been customizing Roller for a while now, and just wanted to know
> > > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > > can use the Eclipse built-in debugger, but I've never been able to get
> > > Roller using it.  Just wanted to know whether to continue trying to
> > > get this working, or if it's not possible.
> > >
> > > Thanks in advance for your help.
> > >
> > > Cheers,
> > >
> > > Richard
> > >
> > >
> > >
> >
>

RE: Debugging Roller in Eclipse

Posted by Adib Saikali <ad...@programmingmastery.com>.
Hi Richard,

Looks like roller is not able to find the properties files you are getting
an excetion in java.util.properties this would indicate to me that perphaps
the .proprties files are not being copied into the WEB-INF classes
directory.

Look in the .metadata\.plugins\org.eclipse.wst.server.core you should find
some temp directoris there, this is where eclipse will put the .class files
and other project resources. Search in there to see if roller.properties is
there. 

I highly recommend you upgrade to Eclipse 3.3 its much better than 3.2.  

Adib  

-----Original Message-----
From: Richard Jones [mailto:fudgemonday@gmail.com] 
Sent: Wednesday, October 24, 2007 3:26 AM
To: dev@roller.apache.org
Subject: Re: Debugging Roller in Eclipse

Hi,

I've been trying to get Roller debuggable in Eclipse as described in
this thread by Adib.  I've got a simple servlet project working using
the same method, but when it comes to Roller I can't get it deployed.

I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
problem deploying Roller as a Tomcat webapp on its own, but getting it
deployed and debuggable through Eclipse is a different matter.  I have
set-up 'Dynamic Web Project' and followed the steps as provided by
Adib, but when I go to run/debug the application in Eclipse, Tomcat
fails to deploy the webapp.  The roller.log reads:


ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)
ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
configuring application listener of class
org.apache.roller.ui.core.RollerContext
java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:365)
        at java.util.Properties.load(Properties.java:293)
        at
org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3713)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)


If any Roller + Eclipse developers out there have any suggestions...
it would be greatly appreciated.

Cheers,

Richard


On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> Many thanks guys!
>
> I'm going for Adib's method and I'm some making progress (although the
> 15 minutes past a long time ago ;-)   I will post again when I either
> get it working or give-up and have a question.
>
> Thanks again.
>
> - Richard
>
>
> On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > Hi Richard,
> >
> > I have done all my customization to Roller in Eclipse, including debug.
You
> > should be able to get setup in about 15 minutes. Here is how I did it.
> >
> > Environment:
> >   - Eclipse Europa, with web tooling
> >   - Tomcat 6.0.13
> >   - postgres 8.2.4
> >   - windows xp
> >   - roller 3.1
> >
> > Steps to create the setup.
> >
> > 1. Create Dynamic Web Project in Eclipse
> >
> > 2. from the roller unzip dir copy webapp\roller\* into WebContent in
Eclipse
> >
> > 3. Create a source folder called resources
> >
> > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > folder. This way you can make changes to .properties files and eclipse
will
> > put them automatically into WEB-INF\classes
> >
> > 5.Create a source folder for your code, and put your customizations
there.
> > In my case I have only added models and changed some tags in roller for
> > example the calendar tag to change the arrow buttons on it. My favourite
> > method is to link the roller jars into the roller sources eclipse can do
> > easily, that way you can navigate through the roller code easisly via
> > eclipse shortcuts. Once I can navigate the code out I create my own
models
> > in my own packages which don't interfer with roller, that way I don't
have
> > to touch and recompile the roller intself.
> >
> > 6. If you want to make more major changes to roller, I would delete the
> > roller specific jar files from WEB-INF\lib and then unzip the source
code
> > into a normal eclipse source folder, then hack on it as much as you
want.
> >
> > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > local database
> >
> > 8. Right click on the projcet > Run AS > Server Application and you will
be
> > able to do debugging, hot code replace and all other great stuff you are
> > used to doing with roller.
> >
> > hope this helps you
> > Adib
> >
> > -----Original Message-----
> > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > Sent: Monday, October 22, 2007 9:54 PM
> > To: dev@roller.apache.org
> > Subject: Debugging Roller in Eclipse
> >
> > Hi,
> >
> > I've been customizing Roller for a while now, and just wanted to know
> > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > can use the Eclipse built-in debugger, but I've never been able to get
> > Roller using it.  Just wanted to know whether to continue trying to
> > get this working, or if it's not possible.
> >
> > Thanks in advance for your help.
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
>


Re: Debugging Roller in Eclipse

Posted by Richard Jones <fu...@gmail.com>.
Thanks Adib,

I think I've found the problem with Eclipse crashing.  I'm using 64
bit java and the 64 bit version of Eclipse... after reading some
articles on the web it appears that a lot of people are having
problems with this combination and recommend using both 32 bit java
and 32 Eclipse.  Having just installed both, Eclipse + Tomcat +
Debugging are running smoothly and using very little resources.

Thanks again for all your help.

Regards,

Richard


On 26/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> Great good to hear that you have it running. I have never had the problem
> with running out of memory on eclipse. However, I have only used Eclipse on
> windows.
>
> When you debug an app eclipse will launch a JVM for the app seperate from
> the JVM that is running Eclipse. So are you runnig out memory in the JVM
> runnig Eclipse or the JVM runnig your app.
>
> If you are running out of memory in the Eclipse JVM check your command line
> angs I have always made typos and thought I had given it more memory when I
> had a typo and it was running with the default memory. If you want you can
> run the JVM with -XX:-PrintGCDetails to see how often the GC is kikcing in
> and what is causing you to run out of memory
> http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
>
> For the tomact config under installed runtimes there should be a drop down
> list to select which JRE to launch tomact with, if you click on the
> propreties for the JRE you can specify the command line options the JVM that
> eclipse uses to launch roller, and of course also specify the
> -XX:-PrintGCDetails to get output on GC activity.
>
> If none of the above two steps works, I would search the Eclipse forums to
> check if SWT on linux is leaking memory.
>
> Cheers
> Adib
>
>
> -----Original Message-----
> From: Richard Jones [mailto:fudgemonday@gmail.com]
> Sent: Thursday, October 25, 2007 8:55 PM
> To: dev@roller.apache.org
> Subject: Re: Debugging Roller in Eclipse
>
> Many thanks again for the replies...  I've now got Roller Debugging
> using the built-in Eclipse debugger as set-out by Adib.
>
> Here's what I had to do:
>
> 1. Build Roller
> 2. Create a new 'Dynamic Web Project'
> 3. Copy from Roller 'build/webapp/*' into the 'WebContent' directory.
> 4. Create a 'resources' source folder.
> 5. Move 'WebContent/WEB-INF/classes/*' in the 'resources' source folder.
> 6. Copy from Roller 'src/*' into the 'src' folder.
> 7. Copy from Roller 'build/compile/business/*' into the 'src' folder.
> 8. Copy from Roller 'build/compile/web/*' into the 'src' folder.
> 9. Remove 'WebContent/WEB-INF/lib/roller-*.jar'.
> 10. Create a simple 'context.xml' file in 'WebContent/META-INF/' with
> the database connection string.
> 11. Run using 'Debug on Server' (and set-up the necessary Tomcat server).
>
> That's seem to have done it, however...  on my system when I run the
> Roller in Debug mode it is incredibly slow and will always end-up
> crashing Eclipse (not so good).  I've made sure both Eclipse and
> Tomcat are using the Sun JDK (1.5).  I've also tried playing around
> with the memory allocation for both Eclipse and Tomcat.  I have 2GB to
> play with and whatever I do, Eclipse ends-up crashing.  I'm running
> Ubuntu 7.04 (dual AMD-64).  When debugging Roller in Eclipse, both
> CPU's will be maxed-out and whatever memory I've allocated will be
> eaten up by Eclipse.   Any ideas anyone?  If it's a matter of getting
> some more memory I'll go and buy it now, but before I do I wanted to
> ask here.
>
> Thanks again.
>
> - Richard
>
> On 25/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > Hi Richard,
> >
> > I looked at the code in roller 3.1 and the code that is broken is
> indicated
> > with --> below.
> >
> > version.properties is located in roller-business.jar file, the stack trace
> > tell me that the eclipse tomcat launcher does not have roller-business.jar
> > in the classpath.  a couple of things to check
> >
> > 1) Do you have roller-business.jar in WebContent\WEB-INF\lib ?
> > 2) do a clean build and publish of the server
> >
> > I don't like to do remote debugging and have not had to do it since
> Eclipse
> > 2.2 I prefer to setup my projects in way that is optimized to work with
> > Eclipse, which for me is the best IDE I have ever used. I love the fact
> that
> > I don't have to run a script, or hit a button to compile my code.
> >
> >  public RollerContext() {
> >         super();
> >
> >         Properties props = new Properties();
> >         try {
> >    -->
> > props.load(getClass().getResourceAsStream("/version.properties"));
> >         } catch (IOException e) {
> >             mLogger.error("version.properties not found", e);
> >         }
> >
> >         mVersion = props.getProperty("ro.version", "UNKNOWN");
> >         mBuildTime = props.getProperty("ro.buildTime", "UNKNOWN");
> >         mBuildUser = props.getProperty("ro.buildUser", "UNKNOWN");
> >     }
> >
> >
> >
> > -----Original Message-----
> > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > Sent: Wednesday, October 24, 2007 3:26 AM
> > To: dev@roller.apache.org
> > Subject: Re: Debugging Roller in Eclipse
> >
> > Hi,
> >
> > I've been trying to get Roller debuggable in Eclipse as described in
> > this thread by Adib.  I've got a simple servlet project working using
> > the same method, but when it comes to Roller I can't get it deployed.
> >
> > I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
> > problem deploying Roller as a Tomcat webapp on its own, but getting it
> > deployed and debuggable through Eclipse is a different matter.  I have
> > set-up 'Dynamic Web Project' and followed the steps as provided by
> > Adib, but when I go to run/debug the application in Eclipse, Tomcat
> > fails to deploy the webapp.  The roller.log reads:
> >
> >
> > ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
> > installing application listeners due to previous error(s)
> > ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
> > configuring application listener of class
> > org.apache.roller.ui.core.RollerContext
> > java.lang.NullPointerException
> >         at java.util.Properties$LineReader.readLine(Properties.java:365)
> >         at java.util.Properties.load(Properties.java:293)
> >         at
> > org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
> >         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> >         at
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> > sorImpl.java:39)
> >         at
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> > torAccessorImpl.java:27)
> >         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> >         at java.lang.Class.newInstance0(Class.java:350)
> >         at java.lang.Class.newInstance(Class.java:303)
> >         at
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> > 3713)
> >         at
> > org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
> >         at
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> >         at
> > org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
> >         at
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
> >         at
> > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> >         at
> > org.apache.catalina.core.StandardService.start(StandardService.java:448)
> >         at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
> >         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> >         at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:585)
> >         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
> >         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> > ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
> > installing application listeners due to previous error(s)
> >
> >
> > If any Roller + Eclipse developers out there have any suggestions...
> > it would be greatly appreciated.
> >
> > Cheers,
> >
> > Richard
> >
> >
> > On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> > > Many thanks guys!
> > >
> > > I'm going for Adib's method and I'm some making progress (although the
> > > 15 minutes past a long time ago ;-)   I will post again when I either
> > > get it working or give-up and have a question.
> > >
> > > Thanks again.
> > >
> > > - Richard
> > >
> > >
> > > On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > > > Hi Richard,
> > > >
> > > > I have done all my customization to Roller in Eclipse, including
> debug.
> > You
> > > > should be able to get setup in about 15 minutes. Here is how I did it.
> > > >
> > > > Environment:
> > > >   - Eclipse Europa, with web tooling
> > > >   - Tomcat 6.0.13
> > > >   - postgres 8.2.4
> > > >   - windows xp
> > > >   - roller 3.1
> > > >
> > > > Steps to create the setup.
> > > >
> > > > 1. Create Dynamic Web Project in Eclipse
> > > >
> > > > 2. from the roller unzip dir copy webapp\roller\* into WebContent in
> > Eclipse
> > > >
> > > > 3. Create a source folder called resources
> > > >
> > > > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > > > folder. This way you can make changes to .properties files and eclipse
> > will
> > > > put them automatically into WEB-INF\classes
> > > >
> > > > 5.Create a source folder for your code, and put your customizations
> > there.
> > > > In my case I have only added models and changed some tags in roller
> for
> > > > example the calendar tag to change the arrow buttons on it. My
> favourite
> > > > method is to link the roller jars into the roller sources eclipse can
> do
> > > > easily, that way you can navigate through the roller code easisly via
> > > > eclipse shortcuts. Once I can navigate the code out I create my own
> > models
> > > > in my own packages which don't interfer with roller, that way I don't
> > have
> > > > to touch and recompile the roller intself.
> > > >
> > > > 6. If you want to make more major changes to roller, I would delete
> the
> > > > roller specific jar files from WEB-INF\lib and then unzip the source
> > code
> > > > into a normal eclipse source folder, then hack on it as much as you
> > want.
> > > >
> > > > 7. In WebContent\META-INF put a tomcat context.xml which points to
> your
> > > > local database
> > > >
> > > > 8. Right click on the projcet > Run AS > Server Application and you
> will
> > be
> > > > able to do debugging, hot code replace and all other great stuff you
> are
> > > > used to doing with roller.
> > > >
> > > > hope this helps you
> > > > Adib
> > > >
> > > > -----Original Message-----
> > > > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > > > Sent: Monday, October 22, 2007 9:54 PM
> > > > To: dev@roller.apache.org
> > > > Subject: Debugging Roller in Eclipse
> > > >
> > > > Hi,
> > > >
> > > > I've been customizing Roller for a while now, and just wanted to know
> > > > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > > > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > > > can use the Eclipse built-in debugger, but I've never been able to get
> > > > Roller using it.  Just wanted to know whether to continue trying to
> > > > get this working, or if it's not possible.
> > > >
> > > > Thanks in advance for your help.
> > > >
> > > > Cheers,
> > > >
> > > > Richard
> > > >
> > > >
> > > >
> > >
> >
> >
> >
>
>
>

RE: Debugging Roller in Eclipse

Posted by Adib Saikali <ad...@programmingmastery.com>.
Great good to hear that you have it running. I have never had the problem
with running out of memory on eclipse. However, I have only used Eclipse on
windows. 

When you debug an app eclipse will launch a JVM for the app seperate from
the JVM that is running Eclipse. So are you runnig out memory in the JVM
runnig Eclipse or the JVM runnig your app. 

If you are running out of memory in the Eclipse JVM check your command line
angs I have always made typos and thought I had given it more memory when I
had a typo and it was running with the default memory. If you want you can
run the JVM with -XX:-PrintGCDetails to see how often the GC is kikcing in
and what is causing you to run out of memory
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp 

For the tomact config under installed runtimes there should be a drop down
list to select which JRE to launch tomact with, if you click on the
propreties for the JRE you can specify the command line options the JVM that
eclipse uses to launch roller, and of course also specify the
-XX:-PrintGCDetails to get output on GC activity. 

If none of the above two steps works, I would search the Eclipse forums to
check if SWT on linux is leaking memory. 

Cheers
Adib 


-----Original Message-----
From: Richard Jones [mailto:fudgemonday@gmail.com] 
Sent: Thursday, October 25, 2007 8:55 PM
To: dev@roller.apache.org
Subject: Re: Debugging Roller in Eclipse

Many thanks again for the replies...  I've now got Roller Debugging
using the built-in Eclipse debugger as set-out by Adib.

Here's what I had to do:

1. Build Roller
2. Create a new 'Dynamic Web Project'
3. Copy from Roller 'build/webapp/*' into the 'WebContent' directory.
4. Create a 'resources' source folder.
5. Move 'WebContent/WEB-INF/classes/*' in the 'resources' source folder.
6. Copy from Roller 'src/*' into the 'src' folder.
7. Copy from Roller 'build/compile/business/*' into the 'src' folder.
8. Copy from Roller 'build/compile/web/*' into the 'src' folder.
9. Remove 'WebContent/WEB-INF/lib/roller-*.jar'.
10. Create a simple 'context.xml' file in 'WebContent/META-INF/' with
the database connection string.
11. Run using 'Debug on Server' (and set-up the necessary Tomcat server).

That's seem to have done it, however...  on my system when I run the
Roller in Debug mode it is incredibly slow and will always end-up
crashing Eclipse (not so good).  I've made sure both Eclipse and
Tomcat are using the Sun JDK (1.5).  I've also tried playing around
with the memory allocation for both Eclipse and Tomcat.  I have 2GB to
play with and whatever I do, Eclipse ends-up crashing.  I'm running
Ubuntu 7.04 (dual AMD-64).  When debugging Roller in Eclipse, both
CPU's will be maxed-out and whatever memory I've allocated will be
eaten up by Eclipse.   Any ideas anyone?  If it's a matter of getting
some more memory I'll go and buy it now, but before I do I wanted to
ask here.

Thanks again.

- Richard

On 25/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> Hi Richard,
>
> I looked at the code in roller 3.1 and the code that is broken is
indicated
> with --> below.
>
> version.properties is located in roller-business.jar file, the stack trace
> tell me that the eclipse tomcat launcher does not have roller-business.jar
> in the classpath.  a couple of things to check
>
> 1) Do you have roller-business.jar in WebContent\WEB-INF\lib ?
> 2) do a clean build and publish of the server
>
> I don't like to do remote debugging and have not had to do it since
Eclipse
> 2.2 I prefer to setup my projects in way that is optimized to work with
> Eclipse, which for me is the best IDE I have ever used. I love the fact
that
> I don't have to run a script, or hit a button to compile my code.
>
>  public RollerContext() {
>         super();
>
>         Properties props = new Properties();
>         try {
>    -->
> props.load(getClass().getResourceAsStream("/version.properties"));
>         } catch (IOException e) {
>             mLogger.error("version.properties not found", e);
>         }
>
>         mVersion = props.getProperty("ro.version", "UNKNOWN");
>         mBuildTime = props.getProperty("ro.buildTime", "UNKNOWN");
>         mBuildUser = props.getProperty("ro.buildUser", "UNKNOWN");
>     }
>
>
>
> -----Original Message-----
> From: Richard Jones [mailto:fudgemonday@gmail.com]
> Sent: Wednesday, October 24, 2007 3:26 AM
> To: dev@roller.apache.org
> Subject: Re: Debugging Roller in Eclipse
>
> Hi,
>
> I've been trying to get Roller debuggable in Eclipse as described in
> this thread by Adib.  I've got a simple servlet project working using
> the same method, but when it comes to Roller I can't get it deployed.
>
> I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
> problem deploying Roller as a Tomcat webapp on its own, but getting it
> deployed and debuggable through Eclipse is a different matter.  I have
> set-up 'Dynamic Web Project' and followed the steps as provided by
> Adib, but when I go to run/debug the application in Eclipse, Tomcat
> fails to deploy the webapp.  The roller.log reads:
>
>
> ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
> ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
> configuring application listener of class
> org.apache.roller.ui.core.RollerContext
> java.lang.NullPointerException
>         at java.util.Properties$LineReader.readLine(Properties.java:365)
>         at java.util.Properties.load(Properties.java:293)
>         at
> org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39)
>         at
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at
>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 3713)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
>
>
> If any Roller + Eclipse developers out there have any suggestions...
> it would be greatly appreciated.
>
> Cheers,
>
> Richard
>
>
> On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> > Many thanks guys!
> >
> > I'm going for Adib's method and I'm some making progress (although the
> > 15 minutes past a long time ago ;-)   I will post again when I either
> > get it working or give-up and have a question.
> >
> > Thanks again.
> >
> > - Richard
> >
> >
> > On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > > Hi Richard,
> > >
> > > I have done all my customization to Roller in Eclipse, including
debug.
> You
> > > should be able to get setup in about 15 minutes. Here is how I did it.
> > >
> > > Environment:
> > >   - Eclipse Europa, with web tooling
> > >   - Tomcat 6.0.13
> > >   - postgres 8.2.4
> > >   - windows xp
> > >   - roller 3.1
> > >
> > > Steps to create the setup.
> > >
> > > 1. Create Dynamic Web Project in Eclipse
> > >
> > > 2. from the roller unzip dir copy webapp\roller\* into WebContent in
> Eclipse
> > >
> > > 3. Create a source folder called resources
> > >
> > > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > > folder. This way you can make changes to .properties files and eclipse
> will
> > > put them automatically into WEB-INF\classes
> > >
> > > 5.Create a source folder for your code, and put your customizations
> there.
> > > In my case I have only added models and changed some tags in roller
for
> > > example the calendar tag to change the arrow buttons on it. My
favourite
> > > method is to link the roller jars into the roller sources eclipse can
do
> > > easily, that way you can navigate through the roller code easisly via
> > > eclipse shortcuts. Once I can navigate the code out I create my own
> models
> > > in my own packages which don't interfer with roller, that way I don't
> have
> > > to touch and recompile the roller intself.
> > >
> > > 6. If you want to make more major changes to roller, I would delete
the
> > > roller specific jar files from WEB-INF\lib and then unzip the source
> code
> > > into a normal eclipse source folder, then hack on it as much as you
> want.
> > >
> > > 7. In WebContent\META-INF put a tomcat context.xml which points to
your
> > > local database
> > >
> > > 8. Right click on the projcet > Run AS > Server Application and you
will
> be
> > > able to do debugging, hot code replace and all other great stuff you
are
> > > used to doing with roller.
> > >
> > > hope this helps you
> > > Adib
> > >
> > > -----Original Message-----
> > > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > > Sent: Monday, October 22, 2007 9:54 PM
> > > To: dev@roller.apache.org
> > > Subject: Debugging Roller in Eclipse
> > >
> > > Hi,
> > >
> > > I've been customizing Roller for a while now, and just wanted to know
> > > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > > can use the Eclipse built-in debugger, but I've never been able to get
> > > Roller using it.  Just wanted to know whether to continue trying to
> > > get this working, or if it's not possible.
> > >
> > > Thanks in advance for your help.
> > >
> > > Cheers,
> > >
> > > Richard
> > >
> > >
> > >
> >
>
>
>


Re: Debugging Roller in Eclipse

Posted by Richard Jones <fu...@gmail.com>.
Many thanks again for the replies...  I've now got Roller Debugging
using the built-in Eclipse debugger as set-out by Adib.

Here's what I had to do:

1. Build Roller
2. Create a new 'Dynamic Web Project'
3. Copy from Roller 'build/webapp/*' into the 'WebContent' directory.
4. Create a 'resources' source folder.
5. Move 'WebContent/WEB-INF/classes/*' in the 'resources' source folder.
6. Copy from Roller 'src/*' into the 'src' folder.
7. Copy from Roller 'build/compile/business/*' into the 'src' folder.
8. Copy from Roller 'build/compile/web/*' into the 'src' folder.
9. Remove 'WebContent/WEB-INF/lib/roller-*.jar'.
10. Create a simple 'context.xml' file in 'WebContent/META-INF/' with
the database connection string.
11. Run using 'Debug on Server' (and set-up the necessary Tomcat server).

That's seem to have done it, however...  on my system when I run the
Roller in Debug mode it is incredibly slow and will always end-up
crashing Eclipse (not so good).  I've made sure both Eclipse and
Tomcat are using the Sun JDK (1.5).  I've also tried playing around
with the memory allocation for both Eclipse and Tomcat.  I have 2GB to
play with and whatever I do, Eclipse ends-up crashing.  I'm running
Ubuntu 7.04 (dual AMD-64).  When debugging Roller in Eclipse, both
CPU's will be maxed-out and whatever memory I've allocated will be
eaten up by Eclipse.   Any ideas anyone?  If it's a matter of getting
some more memory I'll go and buy it now, but before I do I wanted to
ask here.

Thanks again.

- Richard

On 25/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> Hi Richard,
>
> I looked at the code in roller 3.1 and the code that is broken is indicated
> with --> below.
>
> version.properties is located in roller-business.jar file, the stack trace
> tell me that the eclipse tomcat launcher does not have roller-business.jar
> in the classpath.  a couple of things to check
>
> 1) Do you have roller-business.jar in WebContent\WEB-INF\lib ?
> 2) do a clean build and publish of the server
>
> I don't like to do remote debugging and have not had to do it since Eclipse
> 2.2 I prefer to setup my projects in way that is optimized to work with
> Eclipse, which for me is the best IDE I have ever used. I love the fact that
> I don't have to run a script, or hit a button to compile my code.
>
>  public RollerContext() {
>         super();
>
>         Properties props = new Properties();
>         try {
>    -->
> props.load(getClass().getResourceAsStream("/version.properties"));
>         } catch (IOException e) {
>             mLogger.error("version.properties not found", e);
>         }
>
>         mVersion = props.getProperty("ro.version", "UNKNOWN");
>         mBuildTime = props.getProperty("ro.buildTime", "UNKNOWN");
>         mBuildUser = props.getProperty("ro.buildUser", "UNKNOWN");
>     }
>
>
>
> -----Original Message-----
> From: Richard Jones [mailto:fudgemonday@gmail.com]
> Sent: Wednesday, October 24, 2007 3:26 AM
> To: dev@roller.apache.org
> Subject: Re: Debugging Roller in Eclipse
>
> Hi,
>
> I've been trying to get Roller debuggable in Eclipse as described in
> this thread by Adib.  I've got a simple servlet project working using
> the same method, but when it comes to Roller I can't get it deployed.
>
> I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
> problem deploying Roller as a Tomcat webapp on its own, but getting it
> deployed and debuggable through Eclipse is a different matter.  I have
> set-up 'Dynamic Web Project' and followed the steps as provided by
> Adib, but when I go to run/debug the application in Eclipse, Tomcat
> fails to deploy the webapp.  The roller.log reads:
>
>
> ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
> ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
> configuring application listener of class
> org.apache.roller.ui.core.RollerContext
> java.lang.NullPointerException
>         at java.util.Properties$LineReader.readLine(Properties.java:365)
>         at java.util.Properties.load(Properties.java:293)
>         at
> org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 3713)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:448)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
> ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
> installing application listeners due to previous error(s)
>
>
> If any Roller + Eclipse developers out there have any suggestions...
> it would be greatly appreciated.
>
> Cheers,
>
> Richard
>
>
> On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> > Many thanks guys!
> >
> > I'm going for Adib's method and I'm some making progress (although the
> > 15 minutes past a long time ago ;-)   I will post again when I either
> > get it working or give-up and have a question.
> >
> > Thanks again.
> >
> > - Richard
> >
> >
> > On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > > Hi Richard,
> > >
> > > I have done all my customization to Roller in Eclipse, including debug.
> You
> > > should be able to get setup in about 15 minutes. Here is how I did it.
> > >
> > > Environment:
> > >   - Eclipse Europa, with web tooling
> > >   - Tomcat 6.0.13
> > >   - postgres 8.2.4
> > >   - windows xp
> > >   - roller 3.1
> > >
> > > Steps to create the setup.
> > >
> > > 1. Create Dynamic Web Project in Eclipse
> > >
> > > 2. from the roller unzip dir copy webapp\roller\* into WebContent in
> Eclipse
> > >
> > > 3. Create a source folder called resources
> > >
> > > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > > folder. This way you can make changes to .properties files and eclipse
> will
> > > put them automatically into WEB-INF\classes
> > >
> > > 5.Create a source folder for your code, and put your customizations
> there.
> > > In my case I have only added models and changed some tags in roller for
> > > example the calendar tag to change the arrow buttons on it. My favourite
> > > method is to link the roller jars into the roller sources eclipse can do
> > > easily, that way you can navigate through the roller code easisly via
> > > eclipse shortcuts. Once I can navigate the code out I create my own
> models
> > > in my own packages which don't interfer with roller, that way I don't
> have
> > > to touch and recompile the roller intself.
> > >
> > > 6. If you want to make more major changes to roller, I would delete the
> > > roller specific jar files from WEB-INF\lib and then unzip the source
> code
> > > into a normal eclipse source folder, then hack on it as much as you
> want.
> > >
> > > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > > local database
> > >
> > > 8. Right click on the projcet > Run AS > Server Application and you will
> be
> > > able to do debugging, hot code replace and all other great stuff you are
> > > used to doing with roller.
> > >
> > > hope this helps you
> > > Adib
> > >
> > > -----Original Message-----
> > > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > > Sent: Monday, October 22, 2007 9:54 PM
> > > To: dev@roller.apache.org
> > > Subject: Debugging Roller in Eclipse
> > >
> > > Hi,
> > >
> > > I've been customizing Roller for a while now, and just wanted to know
> > > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > > can use the Eclipse built-in debugger, but I've never been able to get
> > > Roller using it.  Just wanted to know whether to continue trying to
> > > get this working, or if it's not possible.
> > >
> > > Thanks in advance for your help.
> > >
> > > Cheers,
> > >
> > > Richard
> > >
> > >
> > >
> >
>
>
>

RE: Debugging Roller in Eclipse

Posted by Adib Saikali <ad...@programmingmastery.com>.
Hi Richard,

I looked at the code in roller 3.1 and the code that is broken is indicated
with --> below.

version.properties is located in roller-business.jar file, the stack trace
tell me that the eclipse tomcat launcher does not have roller-business.jar
in the classpath.  a couple of things to check

1) Do you have roller-business.jar in WebContent\WEB-INF\lib ?
2) do a clean build and publish of the server 

I don't like to do remote debugging and have not had to do it since Eclipse
2.2 I prefer to setup my projects in way that is optimized to work with
Eclipse, which for me is the best IDE I have ever used. I love the fact that
I don't have to run a script, or hit a button to compile my code. 

 public RollerContext() {
        super();
        
        Properties props = new Properties();
        try {
   -->
props.load(getClass().getResourceAsStream("/version.properties"));
        } catch (IOException e) {
            mLogger.error("version.properties not found", e);
        }
        
        mVersion = props.getProperty("ro.version", "UNKNOWN");
        mBuildTime = props.getProperty("ro.buildTime", "UNKNOWN");
        mBuildUser = props.getProperty("ro.buildUser", "UNKNOWN");
    }

 

-----Original Message-----
From: Richard Jones [mailto:fudgemonday@gmail.com] 
Sent: Wednesday, October 24, 2007 3:26 AM
To: dev@roller.apache.org
Subject: Re: Debugging Roller in Eclipse

Hi,

I've been trying to get Roller debuggable in Eclipse as described in
this thread by Adib.  I've got a simple servlet project working using
the same method, but when it comes to Roller I can't get it deployed.

I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
problem deploying Roller as a Tomcat webapp on its own, but getting it
deployed and debuggable through Eclipse is a different matter.  I have
set-up 'Dynamic Web Project' and followed the steps as provided by
Adib, but when I go to run/debug the application in Eclipse, Tomcat
fails to deploy the webapp.  The roller.log reads:


ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)
ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
configuring application listener of class
org.apache.roller.ui.core.RollerContext
java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:365)
        at java.util.Properties.load(Properties.java:293)
        at
org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3713)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)


If any Roller + Eclipse developers out there have any suggestions...
it would be greatly appreciated.

Cheers,

Richard


On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> Many thanks guys!
>
> I'm going for Adib's method and I'm some making progress (although the
> 15 minutes past a long time ago ;-)   I will post again when I either
> get it working or give-up and have a question.
>
> Thanks again.
>
> - Richard
>
>
> On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > Hi Richard,
> >
> > I have done all my customization to Roller in Eclipse, including debug.
You
> > should be able to get setup in about 15 minutes. Here is how I did it.
> >
> > Environment:
> >   - Eclipse Europa, with web tooling
> >   - Tomcat 6.0.13
> >   - postgres 8.2.4
> >   - windows xp
> >   - roller 3.1
> >
> > Steps to create the setup.
> >
> > 1. Create Dynamic Web Project in Eclipse
> >
> > 2. from the roller unzip dir copy webapp\roller\* into WebContent in
Eclipse
> >
> > 3. Create a source folder called resources
> >
> > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > folder. This way you can make changes to .properties files and eclipse
will
> > put them automatically into WEB-INF\classes
> >
> > 5.Create a source folder for your code, and put your customizations
there.
> > In my case I have only added models and changed some tags in roller for
> > example the calendar tag to change the arrow buttons on it. My favourite
> > method is to link the roller jars into the roller sources eclipse can do
> > easily, that way you can navigate through the roller code easisly via
> > eclipse shortcuts. Once I can navigate the code out I create my own
models
> > in my own packages which don't interfer with roller, that way I don't
have
> > to touch and recompile the roller intself.
> >
> > 6. If you want to make more major changes to roller, I would delete the
> > roller specific jar files from WEB-INF\lib and then unzip the source
code
> > into a normal eclipse source folder, then hack on it as much as you
want.
> >
> > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > local database
> >
> > 8. Right click on the projcet > Run AS > Server Application and you will
be
> > able to do debugging, hot code replace and all other great stuff you are
> > used to doing with roller.
> >
> > hope this helps you
> > Adib
> >
> > -----Original Message-----
> > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > Sent: Monday, October 22, 2007 9:54 PM
> > To: dev@roller.apache.org
> > Subject: Debugging Roller in Eclipse
> >
> > Hi,
> >
> > I've been customizing Roller for a while now, and just wanted to know
> > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > can use the Eclipse built-in debugger, but I've never been able to get
> > Roller using it.  Just wanted to know whether to continue trying to
> > get this working, or if it's not possible.
> >
> > Thanks in advance for your help.
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
>


RE: How does roller compute $url.absoluteSite

Posted by Adib Saikali <ad...@programmingmastery.com>.
Thank you I think I will be setting an absolute URL tonight.  

-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, October 29, 2007 1:16 PM
To: dev@roller.apache.org
Subject: Re: How does roller compute $url.absoluteSite

On 10/29/07, Adib Saikali <ad...@programmingmastery.com> wrote:
> Thanks Dave, that was very helpful, I think I have solved the problem it
may
> have been related to some issues with DNS and my tomcat configuration, I
> have moved servers again and problem appears to have gone away.
>
> Is it a roller best practice to setup the absoulte URL propert? Can you
give
> an example of what situations you should set it up under?

Here is an example: If visitors to your site come via both
www.example.com and example.com and you prefer the example.com, then
you might want to set the absolute URL to http://example.com/ to
ensure that all links that Roller generates use the same URL.

- Dave


Re: How does roller compute $url.absoluteSite

Posted by Dave <sn...@gmail.com>.
On 10/29/07, Adib Saikali <ad...@programmingmastery.com> wrote:
> Thanks Dave, that was very helpful, I think I have solved the problem it may
> have been related to some issues with DNS and my tomcat configuration, I
> have moved servers again and problem appears to have gone away.
>
> Is it a roller best practice to setup the absoulte URL propert? Can you give
> an example of what situations you should set it up under?

Here is an example: If visitors to your site come via both
www.example.com and example.com and you prefer the example.com, then
you might want to set the absolute URL to http://example.com/ to
ensure that all links that Roller generates use the same URL.

- Dave

RE: How does roller compute $url.absoluteSite

Posted by Adib Saikali <ad...@programmingmastery.com>.
Thanks Dave, that was very helpful, I think I have solved the problem it may
have been related to some issues with DNS and my tomcat configuration, I
have moved servers again and problem appears to have gone away.

Is it a roller best practice to setup the absoulte URL propert? Can you give
an example of what situations you should set it up under?

Thanks
Adib
-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, October 29, 2007 7:42 AM
To: dev@roller.apache.org
Subject: Re: How does roller compute $url.absoluteSite

This should give you the value set in the database.
   select value from roller_properties where name='site.absoluteurl'

If the value is not set in the database, then Roller determines the
site URL by examining the requestURL that comes from the first request
that hits the system.

- Dave


On 10/28/07, Adib Saikali <ad...@programmingmastery.com> wrote:
> Hello Roller Developers,
>
> I am wondering how $url.absoluteSite works in roller 3.1. I have a strange
> bug on my roller implementation which I have tracked down to
> $url.absoluteSite not working correctly, but I have not been able to find
> why.
>
> How the problem shows up:
>
> 1. on my site $url.absoluteSite keeps returning test.sereneambition.com
> rather than www.sereneambition.com for a while I ran the roller 3.1 on
> test.sereneambiton.com while I was testing it but now that I have switched
> to production it still shows up. for example, when I log in as admin all
the
> URLs to the roller site show up as test.sereneambition.com,
>
>
> So far I have done the following.
>
> 1. Searched all the data in the database for test.sereneambition.com. I
did
> this by doing a pg_dump and then doing a search on the dump, so I know
that
> I searched all tables.
>
> 2. I turned on debug on the org.apache.roller.ui.core.filters.InitFilter
and
> the debug file shown that the filter was calculating the site
> $url.absoluteSite correctly
>
> 3. As I was reading various sources I got to the following method
> RollerRuntimeConfig.getAbsoluteContextURL() and ended searching my whole
> generated war file to see if site.absoluteurl is set to anything and I did
> not change it from the defaults.
>
>  public static String getAbsoluteContextURL() {
>
>         // db prop takes priority if it exists
>         String absURL = getProperty("site.absoluteurl");
>         if(absURL != null && absURL.trim().length() > 0) {
>             return absURL;
>         }
>
>         return absoluteContextURL;
>     }
>
> So how does this method work how does the db prop take priority. Is the
> absolute URL somehow encoded in the database so that when I searched for
it
> did not show up. What could cause it to consistently return
> test.sereneambition.com jut because I created the blog on a test server
that
> was hosted on that url?
>
> Any help is appreciated
> Adib
>
>


Re: How does roller compute $url.absoluteSite

Posted by Dave <sn...@gmail.com>.
This should give you the value set in the database.
   select value from roller_properties where name='site.absoluteurl'

If the value is not set in the database, then Roller determines the
site URL by examining the requestURL that comes from the first request
that hits the system.

- Dave


On 10/28/07, Adib Saikali <ad...@programmingmastery.com> wrote:
> Hello Roller Developers,
>
> I am wondering how $url.absoluteSite works in roller 3.1. I have a strange
> bug on my roller implementation which I have tracked down to
> $url.absoluteSite not working correctly, but I have not been able to find
> why.
>
> How the problem shows up:
>
> 1. on my site $url.absoluteSite keeps returning test.sereneambition.com
> rather than www.sereneambition.com for a while I ran the roller 3.1 on
> test.sereneambiton.com while I was testing it but now that I have switched
> to production it still shows up. for example, when I log in as admin all the
> URLs to the roller site show up as test.sereneambition.com,
>
>
> So far I have done the following.
>
> 1. Searched all the data in the database for test.sereneambition.com. I did
> this by doing a pg_dump and then doing a search on the dump, so I know that
> I searched all tables.
>
> 2. I turned on debug on the org.apache.roller.ui.core.filters.InitFilter and
> the debug file shown that the filter was calculating the site
> $url.absoluteSite correctly
>
> 3. As I was reading various sources I got to the following method
> RollerRuntimeConfig.getAbsoluteContextURL() and ended searching my whole
> generated war file to see if site.absoluteurl is set to anything and I did
> not change it from the defaults.
>
>  public static String getAbsoluteContextURL() {
>
>         // db prop takes priority if it exists
>         String absURL = getProperty("site.absoluteurl");
>         if(absURL != null && absURL.trim().length() > 0) {
>             return absURL;
>         }
>
>         return absoluteContextURL;
>     }
>
> So how does this method work how does the db prop take priority. Is the
> absolute URL somehow encoded in the database so that when I searched for it
> did not show up. What could cause it to consistently return
> test.sereneambition.com jut because I created the blog on a test server that
> was hosted on that url?
>
> Any help is appreciated
> Adib
>
>

How does roller compute $url.absoluteSite

Posted by Adib Saikali <ad...@programmingmastery.com>.
Hello Roller Developers,

I am wondering how $url.absoluteSite works in roller 3.1. I have a strange
bug on my roller implementation which I have tracked down to
$url.absoluteSite not working correctly, but I have not been able to find
why.

How the problem shows up:

1. on my site $url.absoluteSite keeps returning test.sereneambition.com
rather than www.sereneambition.com for a while I ran the roller 3.1 on
test.sereneambiton.com while I was testing it but now that I have switched
to production it still shows up. for example, when I log in as admin all the
URLs to the roller site show up as test.sereneambition.com, 


So far I have done the following.

1. Searched all the data in the database for test.sereneambition.com. I did
this by doing a pg_dump and then doing a search on the dump, so I know that
I searched all tables.

2. I turned on debug on the org.apache.roller.ui.core.filters.InitFilter and
the debug file shown that the filter was calculating the site
$url.absoluteSite correctly 

3. As I was reading various sources I got to the following method
RollerRuntimeConfig.getAbsoluteContextURL() and ended searching my whole
generated war file to see if site.absoluteurl is set to anything and I did
not change it from the defaults.

 public static String getAbsoluteContextURL() {
        
        // db prop takes priority if it exists
        String absURL = getProperty("site.absoluteurl");
        if(absURL != null && absURL.trim().length() > 0) {
            return absURL;
        }
        
        return absoluteContextURL;
    }
    
So how does this method work how does the db prop take priority. Is the
absolute URL somehow encoded in the database so that when I searched for it
did not show up. What could cause it to consistently return
test.sereneambition.com jut because I created the blog on a test server that
was hosted on that url?

Any help is appreciated 
Adib 


Re: Debugging Roller in Eclipse

Posted by Richard Jones <fu...@gmail.com>.
Hi,

I've been trying to get Roller debuggable in Eclipse as described in
this thread by Adib.  I've got a simple servlet project working using
the same method, but when it comes to Roller I can't get it deployed.

I'm using Roller 3.1, Eclipse 3.2 and Tomcat 5.5 on Ubuntu.  I have no
problem deploying Roller as a Tomcat webapp on its own, but getting it
deployed and debuggable through Eclipse is a different matter.  I have
set-up 'Dynamic Web Project' and followed the steps as provided by
Adib, but when I go to run/debug the application in Eclipse, Tomcat
fails to deploy the webapp.  The roller.log reads:


ERROR 2007-10-24 17:12:00,824 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)
ERROR 2007-10-24 17:14:44,385 StandardContext:listenerStart - Error
configuring application listener of class
org.apache.roller.ui.core.RollerContext
java.lang.NullPointerException
        at java.util.Properties$LineReader.readLine(Properties.java:365)
        at java.util.Properties.load(Properties.java:293)
        at org.apache.roller.ui.core.RollerContext.<init>(RollerContext.java:91)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3713)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
ERROR 2007-10-24 17:14:44,393 StandardContext:listenerStart - Skipped
installing application listeners due to previous error(s)


If any Roller + Eclipse developers out there have any suggestions...
it would be greatly appreciated.

Cheers,

Richard


On 23/10/2007, Richard Jones <fu...@gmail.com> wrote:
> Many thanks guys!
>
> I'm going for Adib's method and I'm some making progress (although the
> 15 minutes past a long time ago ;-)   I will post again when I either
> get it working or give-up and have a question.
>
> Thanks again.
>
> - Richard
>
>
> On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> > Hi Richard,
> >
> > I have done all my customization to Roller in Eclipse, including debug. You
> > should be able to get setup in about 15 minutes. Here is how I did it.
> >
> > Environment:
> >   - Eclipse Europa, with web tooling
> >   - Tomcat 6.0.13
> >   - postgres 8.2.4
> >   - windows xp
> >   - roller 3.1
> >
> > Steps to create the setup.
> >
> > 1. Create Dynamic Web Project in Eclipse
> >
> > 2. from the roller unzip dir copy webapp\roller\* into WebContent in Eclipse
> >
> > 3. Create a source folder called resources
> >
> > 4. Move the contents of WebContent\WEB-INF\classes into the resources
> > folder. This way you can make changes to .properties files and eclipse will
> > put them automatically into WEB-INF\classes
> >
> > 5.Create a source folder for your code, and put your customizations there.
> > In my case I have only added models and changed some tags in roller for
> > example the calendar tag to change the arrow buttons on it. My favourite
> > method is to link the roller jars into the roller sources eclipse can do
> > easily, that way you can navigate through the roller code easisly via
> > eclipse shortcuts. Once I can navigate the code out I create my own models
> > in my own packages which don't interfer with roller, that way I don't have
> > to touch and recompile the roller intself.
> >
> > 6. If you want to make more major changes to roller, I would delete the
> > roller specific jar files from WEB-INF\lib and then unzip the source code
> > into a normal eclipse source folder, then hack on it as much as you want.
> >
> > 7. In WebContent\META-INF put a tomcat context.xml which points to your
> > local database
> >
> > 8. Right click on the projcet > Run AS > Server Application and you will be
> > able to do debugging, hot code replace and all other great stuff you are
> > used to doing with roller.
> >
> > hope this helps you
> > Adib
> >
> > -----Original Message-----
> > From: Richard Jones [mailto:fudgemonday@gmail.com]
> > Sent: Monday, October 22, 2007 9:54 PM
> > To: dev@roller.apache.org
> > Subject: Debugging Roller in Eclipse
> >
> > Hi,
> >
> > I've been customizing Roller for a while now, and just wanted to know
> > if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> > got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> > can use the Eclipse built-in debugger, but I've never been able to get
> > Roller using it.  Just wanted to know whether to continue trying to
> > get this working, or if it's not possible.
> >
> > Thanks in advance for your help.
> >
> > Cheers,
> >
> > Richard
> >
> >
> >
>

Re: Debugging Roller in Eclipse

Posted by Richard Jones <fu...@gmail.com>.
Many thanks guys!

I'm going for Adib's method and I'm some making progress (although the
15 minutes past a long time ago ;-)   I will post again when I either
get it working or give-up and have a question.

Thanks again.

- Richard


On 23/10/2007, Adib Saikali <ad...@programmingmastery.com> wrote:
> Hi Richard,
>
> I have done all my customization to Roller in Eclipse, including debug. You
> should be able to get setup in about 15 minutes. Here is how I did it.
>
> Environment:
>   - Eclipse Europa, with web tooling
>   - Tomcat 6.0.13
>   - postgres 8.2.4
>   - windows xp
>   - roller 3.1
>
> Steps to create the setup.
>
> 1. Create Dynamic Web Project in Eclipse
>
> 2. from the roller unzip dir copy webapp\roller\* into WebContent in Eclipse
>
> 3. Create a source folder called resources
>
> 4. Move the contents of WebContent\WEB-INF\classes into the resources
> folder. This way you can make changes to .properties files and eclipse will
> put them automatically into WEB-INF\classes
>
> 5.Create a source folder for your code, and put your customizations there.
> In my case I have only added models and changed some tags in roller for
> example the calendar tag to change the arrow buttons on it. My favourite
> method is to link the roller jars into the roller sources eclipse can do
> easily, that way you can navigate through the roller code easisly via
> eclipse shortcuts. Once I can navigate the code out I create my own models
> in my own packages which don't interfer with roller, that way I don't have
> to touch and recompile the roller intself.
>
> 6. If you want to make more major changes to roller, I would delete the
> roller specific jar files from WEB-INF\lib and then unzip the source code
> into a normal eclipse source folder, then hack on it as much as you want.
>
> 7. In WebContent\META-INF put a tomcat context.xml which points to your
> local database
>
> 8. Right click on the projcet > Run AS > Server Application and you will be
> able to do debugging, hot code replace and all other great stuff you are
> used to doing with roller.
>
> hope this helps you
> Adib
>
> -----Original Message-----
> From: Richard Jones [mailto:fudgemonday@gmail.com]
> Sent: Monday, October 22, 2007 9:54 PM
> To: dev@roller.apache.org
> Subject: Debugging Roller in Eclipse
>
> Hi,
>
> I've been customizing Roller for a while now, and just wanted to know
> if it's possible to set-up Roller to be debuggable in Eclipse.  I've
> got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
> can use the Eclipse built-in debugger, but I've never been able to get
> Roller using it.  Just wanted to know whether to continue trying to
> get this working, or if it's not possible.
>
> Thanks in advance for your help.
>
> Cheers,
>
> Richard
>
>
>

RE: Debugging Roller in Eclipse

Posted by Adib Saikali <ad...@programmingmastery.com>.
Hi Richard,

I have done all my customization to Roller in Eclipse, including debug. You
should be able to get setup in about 15 minutes. Here is how I did it.

Environment:
  - Eclipse Europa, with web tooling 
  - Tomcat 6.0.13
  - postgres 8.2.4
  - windows xp
  - roller 3.1 

Steps to create the setup.

1. Create Dynamic Web Project in Eclipse 

2. from the roller unzip dir copy webapp\roller\* into WebContent in Eclipse

3. Create a source folder called resources 

4. Move the contents of WebContent\WEB-INF\classes into the resources
folder. This way you can make changes to .properties files and eclipse will
put them automatically into WEB-INF\classes

5.Create a source folder for your code, and put your customizations there.
In my case I have only added models and changed some tags in roller for
example the calendar tag to change the arrow buttons on it. My favourite
method is to link the roller jars into the roller sources eclipse can do
easily, that way you can navigate through the roller code easisly via
eclipse shortcuts. Once I can navigate the code out I create my own models
in my own packages which don't interfer with roller, that way I don't have
to touch and recompile the roller intself.

6. If you want to make more major changes to roller, I would delete the
roller specific jar files from WEB-INF\lib and then unzip the source code
into a normal eclipse source folder, then hack on it as much as you want. 

7. In WebContent\META-INF put a tomcat context.xml which points to your
local database 

8. Right click on the projcet > Run AS > Server Application and you will be
able to do debugging, hot code replace and all other great stuff you are
used to doing with roller. 

hope this helps you
Adib 

-----Original Message-----
From: Richard Jones [mailto:fudgemonday@gmail.com] 
Sent: Monday, October 22, 2007 9:54 PM
To: dev@roller.apache.org
Subject: Debugging Roller in Eclipse

Hi,

I've been customizing Roller for a while now, and just wanted to know
if it's possible to set-up Roller to be debuggable in Eclipse.  I've
got various (simpler) Java/Struts/Tomcat projects in Eclipse which I
can use the Eclipse built-in debugger, but I've never been able to get
Roller using it.  Just wanted to know whether to continue trying to
get this working, or if it's not possible.

Thanks in advance for your help.

Cheers,

Richard