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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > Sent: Thursday, October 25, 2007 8:55 PM > To: [email protected] > 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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > > Sent: Wednesday, October 24, 2007 3:26 AM > > To: [email protected] > > 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > > > > Sent: Monday, October 22, 2007 9:54 PM > > > > To: [email protected] > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > >
