Return to Jive Software

Skip navigation
2,962 Views 13 Replies Last post: Oct 7, 2008 11:06 AM by todd.west RSS
arlene.slocum Novice 7 posts since
Jul 3, 2008
Currently Being Moderated

Sep 22, 2008 12:26 PM

Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

I am new to these environments so I apologize if terminology is not all there. I am trying to set up a debug environment for Clearspace running under TomCat on my dev box. I am using Eclipse as my IDE.

 

I am running all this on a Windows XP box with 2G RAM.

Clearspace 2.5

Eclipse 3.4

Tomcat 6.0 server is running embedded in Eclipse

Maven2 plugin for builds

 

I can build clearspace plugin jars with no problem. I am trying to set this environment so I can do debugging. I followed instructions posted in other discussions. I tried to set up the TomCat server for debugging. It has the following JVM arguments:

 

-Dcatalina.base="C:\Program Files\Apache Software Foundation\Tomcat 6.0" -Dcatalina.home="C:\Program Files\Apache Software Foundation\Tomcat 6.0" -Dwtp.deploy="C:\Program Files\Apache Software Foundation\Tomcat 6.0\wtpwebapps" -Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed"
-Djive.ws.disabled=true
-Xdebug
-Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m

 

When I try to start this server it hangs and never starts even if I set a long timeout. If I set up the server like below with no debug options it works fine:

 

-Dcatalina.base="C:\Program Files\Apache Software Foundation\Tomcat 6.0" -Dcatalina.home="C:\Program Files\Apache Software Foundation\Tomcat 6.0" -Dwtp.deploy="C:\Program Files\Apache Software Foundation\Tomcat 6.0\wtpwebapps" -Djava.endorsed.dirs="C:\Program Files\Apache Software Foundation\Tomcat 6.0\endorsed"
-Djive.ws.disabled=true
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m

 

Here is the console log so you can see where it hangs. BTW the CPU maxes at 100% while this runs:

 

Listening for transport dt_shmem at address: 8000
Sep 22, 2008 2:06:16 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_07\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\DOIM;C:\Program Files\Tumbleweed\Desktop Validator\;C:\PROGRA~1\GRADKE~1\DBSIGN~1\lib;C:\Program Files\GRADKE~1\DBSIGN~1\lib;C:\Program Files\GRADKE~1\DBSIGN~1\lib;C:\Program Files\ActivCard\ActivCard Gold\Resources;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\ApproveIt\ThirdParty\Bin\;C:\Program Files\ApproveIt\;C:\Program Files\ActivIdentity\ActivClient\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Downloads\Maven\apache-maven-2.0.9\bin
Sep 22, 2008 2:06:16 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 22, 2008 2:06:16 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 668 ms
Sep 22, 2008 2:06:16 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 22, 2008 2:06:16 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Sep 22, 2008 2:06:16 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive clearspace_community.war
Sep 22, 2008 2:06:18 PM com.jivesoftware.community.JiveGlobals getSetupProperties
INFO: jiveHome set from jive_init.xml to: C:\Program Files\Apache Software Foundation\jiveHome
14:06:18,888 [main] INFO init  - jiveHome set to C:\Program Files\Apache Software Foundation\jiveHome
Setting logging threshold to ERROR
2008-09-22 14:06:20.779 Oracle Coherence 3.3.1/389 <Info> (thread=main, member=n/a): Loaded operational configuration from resource "jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/clearspace_community/WEB-INF/lib/coherence.jar!/tangosol-coherence.xml"
2008-09-22 14:06:20.795 Oracle Coherence 3.3.1/389 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/clearspace_community/WEB-INF/lib/coherence.jar!/tangosol-coherence-override-prod.xml"
2008-09-22 14:06:20.795 Oracle Coherence 3.3.1/389 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/clearspace_community/WEB-INF/lib/clearspace_community-2.5.0.rc.jar!/tangosol-coherence-override.xml"

Oracle Coherence Version 3.3.1/389
Enterprise Edition: Production mode
Copyright (c) 2000-2007 Oracle. All rights reserved.

2008-09-22 14:06:20.966 Oracle Coherence EE 3.3.1/389 <Info> (thread=main, member=n/a): Loaded cache configuration from resource "file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/clearspace_community/WEB-INF/classes/coherence-cache-config.xml"
Sep 22, 2008 2:06:21 PM com.jivesoftware.community.license.ClearspaceLicenseManager init
SEVERE: The "jive.license" license file was not found, evaluation mode will be used
Sep 22, 2008 2:06:21 PM com.jivesoftware.community.license.ClearspaceLicenseManager initialize
INFO: Using license information from local property (jive_startup.xml)
Sep 22, 2008 2:06:21 PM com.jivesoftware.community.license.ClearspaceLicenseManager initialize
WARNING: Initialization with a license file has failed, initializing in evaluation mode.
Sep 22, 2008 2:06:21 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Sep 22, 2008 2:07:26 PM com.jivesoftware.community.license.ClearspaceLicenseManager init
WARNING: Already initialized, call destroy()

Any help would be greatly appreciated.

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Sep 22, 2008 5:34 PM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi Arlene,

 

I have a few possible options here that might help speed things up. I should mention however that debugging will take a long time, you will just need to wait for quite a while.

 

Try adding the following options to your JVM Arguments:

 

-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true

-server

 

 

Let me know how that works out. Thanks!

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Sep 23, 2008 2:26 PM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi,

 

You really shouldn't copy the server directory from the JDK to the JRE, you should just use the JDK instead. Please try this and let me know if it resolves any of your issues. Thanks.

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Sep 23, 2008 2:31 PM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi again,

 

Also, another part of your issue is that you changed JVM arguments. Specifically you changed this:

 

-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

 

to this:

 

-Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=8000

 

 

 

I believe that you should be using dt_socket. Thanks.

 

-Todd

seth Intermediate 1,211 posts since
Feb 12, 2008
Currently Being Moderated
Sep 24, 2008 3:10 PM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi Arlene,

 

I've never done remote debugging with the embedded tomcat, but with a standard tomcat, it's like this:

 

I create a "debug.cmd" batch script to start tomcat for me:

SET JAVA_HOME=c:\path\to\jdk

 

SET JAVA_OPTS=-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -Xmx512m -Dlog.debug.enabled=true

SET JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

 

 

CD c:\path\to\tomcat

CALL bin\catalina.bat jpda start

 

Then I connect the remote debugger in Eclipse to localhost:8000.

 

The embedded tomcat server should be more or less the same.

 

The JDWP error sounds like it's related to this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6476706, and should be nothing to worry about. Setting the JAVA_HOME explicitly to the JDK may correct the issue.

 

Regards,

Seth

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Sep 25, 2008 2:30 PM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi Arlene,

 

Thanks for the write-up! I am happy to hear that you were able to get everything up and running. Please let me know if you have any further questions.

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 3, 2008 8:06 AM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi Arlene,

 

It looks like eclipse is unable to find the source of the auth file for whatever reason. A quick search turned up a few results in google, this one seems to be a similar issue to what you are seeing as well as a possible fix:

 

http://coding.derkeiler.com/Archive/Java/comp.lang.java.softwaretools/2004-09/0032.html

 

 

Please let me know if that works for you. Thanks!

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 7, 2008 9:50 AM in response to: Todd West
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Hi Arlene,

 

I haven't heard from you in a while so I am just checking back in to see if you were able to move past this issue. Thanks!

 

-Todd

todd.west Jive Employee 15,926 posts since
Jul 14, 2008
Currently Being Moderated
Oct 7, 2008 11:06 AM in response to: Arlene Slocum
Re: Debugging Clearspace 2.5 running under Tomcat 6.0 using Eclipse

Great, glad to hear you were able to get up and running. Thanks for the update too!

 

-Todd

More Like This

  • Retrieving data ...

Bookmarked By (0)

To better serve our customers we have included functionality to automatically follow up on a case after it has been idle for more than 5 days, and then auto close after an additional 3 days of inactivity. Choose No to acknowledge that this case will remain idle for longer than 5 days.
Making cases public allows other customers to learn from the solution of the case. It can also be used to gain feedback from others in the community. Ask our Support Engineers for more info, but we encourage you to make your cases public.