[InterMine Dev] Any suggestions on this error message when creating a new list?

Joe Carlson jwcarlson at lbl.gov
Mon Jul 11 18:06:02 BST 2016



On 07/11/2016 09:02 AM, Sam Hokin wrote:
> I do not. You mean a JVM debugger? Or something that spits client-side 
> stuff out? Either way I'm all ears.

I have found this to be essential.

I work in eclipse. I know other people may like intellij or netbeans 
better, but they're not for me. So I can only give the recipe for 
eclipse but I suspect the other IDEs have similar capabilities.

First, import the intermine codebase into eclipse. It is not necessary 
to get everything absolutely perfect. I still have some places where the 
classpaths are not completely set up; but that's OK. I don't use eclipse 
to build or deploy the code. Intermine must be built with debugging 
information - check that imbuild/library.xml has <property 
name="javac.debug" value="on"/> and <property name="javac.debuglevel" 
value="lines,vars,source"/> and that the source you're looking at agrees 
with what was used to build the deployed code.

I'm using tomcat-7 on the webserver. On the server side, take whatever 
script you use for starting tomcat and define the environment variable 
JDPA_OPTS. For me I use
> export JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,address=<web 
> server host>:8069,server=y,suspend=y
(Obviously replace <web server host> with the name of your host. I'm 
using 8069 as the debug port. You can use any free port)

and start tomcat with:

>     $CATALINA_HOME/bin/catalina.sh jpda start

After you issue that command, you'll probably get a 503 response if you 
point your browser to the webapp. You need to get eclipse to connect 
first. You do not need to be on the same host as the web server.

Select Debug -> Debug Configuration -> Remote Java Application.

Enter the name of the project (Intermine), Connection Type: Standard 
(Socket Attach) The connection properties are Host: <web server host> 
and port 8069. Then click debug.

Now the web server will respond, a bit slower than normal, but certainly 
usable. Browse over the the bag creation code and set a breakpoint by 
right clicking on the line number or ctrl-shift-B. As soon as the hit 
this code, eclipse should automatically switch into the debug 
perspective and you can step through the code line by line.

Hours of fun!

Joe
>
> On 07/09/2016 01:13 PM, Joe Carlson wrote:
>> Do you know how to attach a debugger to the web app?
>>
>> Works for me. Many, many times.
>>
>> Joe



More information about the dev mailing list