Jump to content

Run "jasperserver project" AS Server in Eclipse


olegsp

Recommended Posts

Hi,

 

I want to debug some processes and that is why want to integrate jaspersever in eclipse. I build jasperserver from the command line and can run it from my tomcat and all is fine. Now I want to create project in eclipse. I tried to create DynamicWeb project in eclipse and import all sources of jasperser. There was no errors in java code, but there was to many errors in .jsp files. I can run it as server :) But there is not all functionality, for example LOGOUT button not exist :)

If I import the build like existed project, then it is a MAVEN project and I dont know how to make it work like a server :( But maven's commands are working! Who know how to RUN AS SERVER jasperserver project please help :)

Oleg.

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

I just bring my app server up with debug settings and use the ide to attach the debugger to the app server.

I have been using netbeans and that works ok for the most part.  There are a couple of jars that I have to resort to maven build because I havent taken the time to integrate aspectj into the build.

 

Link to comment
Share on other sites

I am really not sure what you need.

I am using tomcat 5.5 on windows.  I copied the startup.bat file in the tomcat\bin directory to startup_debug.bat.

I then modified the line that read call "%EXECUTABLE%" start %CMD_LINE_ARGS% to be:

call "%EXECUTABLE%" jpda run %CMD_LINE_ARGS%

I setup netbeans projects for the various jaspeserver jar files I wanted to debug.  I found it easier to copy all the jars from the jasperserver/WEB-INF/lib folder to one place so that I could use those jars for the compile dependencies.

Once you build the jar you want to debug, replace the newly built jar with the one in your web-inf/lib folder.

(jasperserver-war-3.1.0.jar for example) .

Then bring up tomcat using the startup_debug.bat file .  This will launch tomcat with hooks for debugging.

Then in netbeans, you can use the debug menu item to attach the debugger to the running tomcat.  I am sure you can do something similar in eclipse.

Set you breakpoints and just use the browser or whatever client you want that hits the jasperserver webapp.

Hope this helps.

 

Link to comment
Share on other sites

The way I've been running JasperServer in Eclipse is to run Tomcat as a plain old Java app (that's what it is, after all!).

I start out with a project based on the JasperServer source code directory. I am usually running pro, so I have a pro and CE project, with the CE project as a dependency of the Pro.

I create a debug configuration (Run/Debug configs...) for Tomcat (I'm running 6.0.18) and enter settings in the tabs like so:

Main tab:

  • set project to my pro project
  • set main class to the Tomcat main (org.apache.catalina.startup.Bootstrap)

Arguments tab:

Program arguments: start

VM arguments (these can vary; the catalina.* args will depend on your Tomcat base dir):

-Xmx800M -Xms128m -Xss2m  -XX:PermSize=32m  -XX:MaxPermSize=200m 
-XX:+UseConcMarkSweepGC  -XX:+CMSClassUnloadingEnabled
-Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl
-Djavax.xml.soap.SOAPConnectionFactory=org.apache.axis.soap.SOAPConnectionFactoryImpl
-Djavax.xml.soap.SOAPFactory=org.apache.axis.soap.SOAPFactoryImpl
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
-Dcom.sun.management.jmxremote
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file="e:/install/apache-tomcat-6.0.18/conf/logging.properties"  -Djava.endorsed.dirs="e:/install/apache-tomcat-6.0.18\common\endorsed"
-Dcatalina.base="e:/install/apache-tomcat-6.0.18"
-Dcatalina.home="e:/install/apache-tomcat-6.0.18"
-Djava.io.tmpdir="e:/install/apache-tomcat-6.0.18\temp"
-Djs.license.directory="e:/projects/pro/license/src/main/resources"

JVM: use any version 6 JVM

Classpath:

  • <tomcat home>/bin/bootstrap.jar
  • <jdk home>/lib/tools.jar (this is the compiler you need for jsp's)

Source:

You need to make sure your project's in there, along with any other source you'd like to attach.

 

There is some trickery in setting up the JasperServer project itself, but once you get that, you should be able to run tomcat on it.

Good luck!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...