Hi Michael (& Peter), Instructions for setting up DSpace debugging in NetBeans are available on our wiki:
https://wiki.duraspace.org/display/DSPACE/IDE+Integration+-+DSpace+and+NetBeans#IDEIntegration-DSpaceandNetBeans-DebugDSpaceWebAppusingTomcatIntegration See specifically the stuff under the *third* bullet point. To get everything working right, you must set the "dspace.dir" property (for Dspace 3 and above) or "dspace.config" (for DSpace 1.8.x and below). It's a one time configuration, but you need to perform it on each Webapp you want to debug (XMLUI, JSPUI, etc.) - Tim On 5/31/2013 7:21 PM, Peter Dietz wrote: > Hi Michael. > > I've never actually solved that part of development. So I end up > creating a folder/symlink with that exact parameter looking string, and > store my Dspace. Cfg in there. ${dspace.dir} > > Not ideal, but it let's me keep on going. > > Lately, instead of using IDE assisted debugging with breakpoints and > variable inspection, I just have a script named respace that rebuilds > Dspace. My computer is fast enough that rebuilding is only a minute so > it's become tolerable. It probably helps that I've already lived an > entire lifetime in the debugger, and know all of the Dspace classes and > variables. > > Good luck > > On May 31, 2013 6:15 PM, "Michael" <michael_lastu...@sil.org > <mailto:michael_lastu...@sil.org>> wrote: > > I have been successful in setting up NetBeans/Maven/Postgres/Tomcat/git > on a windows 2003 dev server to navigate, edit and compile our custom > version of DSpace 1.8.4. Debugging is another issue. > > I'm trying to get it to do the same on my win7 development computer > running NetBeans "internal" Tomcat server (with the hope that I can more > easily figure out how to debug on that computer). Seems all is well > except xmlui fails to start. > > I "run" from the DSpace-xml-ui (Manakin):: Webapp... project and tomcat > fails to load the dspace configuration file that it is looking for. > Here's the top part of my Apache Tomcat Log: > > May 31, 2013 4:52:06 PM org.apache.catalina.core.StandardContext > listenerStart > SEVERE: Exception sending context initialized event to listener instance > of class org.dspace.app.util.DSpaceContextListener > java.lang.IllegalStateException: Cannot load configuration: > > file:/C:/Program%20Files/Apache%20Software%20Foundation/Apache%20Tomcat%207.0.34/bin/$%7Bdspace.dir%7D/config/dspace.cfg > at > > org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:943) > at > > org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:100) > at > > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) > at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) > at > > org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657) > at > > org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.io.FileNotFoundException: C:\Program Files\Apache > Software Foundation\Apache Tomcat > 7.0.34\bin\${dspace.dir}\config\dspace.cfg (The system cannot find the > path specified) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.<init>(FileInputStream.java:120) > at java.io.FileInputStream.<init>(FileInputStream.java:79) > at > > sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) > at > > sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) > at java.net.URL.openStream(URL.java:1010) > at > > org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:921) > ... 15 more > > The path C:\Program Files\Apache Software Foundation\Apache Tomcat > 7.0.34\bin\${dspace.dir}\config\dspace.cfg looks like a url with a > parameter, not an actual file path. Note "bin" has no subfolders. > Shouldn't ${dspace.dir} have been resolved to "C:\dspace"? Even if it > was, it would still be wrong as a path. > > I believe Tim Donohoe uses Netbeans to debug DSpace and I'm extremely > jealous! > > Does anyone know how this path gets built and what setting or code I > need to change? > > Just for the record, I followed (mostly ;-) the instructions for using > netbeans with DSpace. Our mods are new java classes with only a couple > of small changes to the original code base, so I'm thinking if someone > got debugging to work on their projects, it should work for us too. > > > > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Dspace-devel mailing list > Dspace-devel@lists.sourceforge.net > <mailto:Dspace-devel@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/dspace-devel > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > > > > _______________________________________________ > Dspace-devel mailing list > Dspace-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/dspace-devel > ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Dspace-devel mailing list Dspace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-devel