facebook

external deploy issues

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #276611 Reply

    Robert Byrne
    Member

    Background:
    I setup an ME deployment for my web app and deployed a war.
    I run an Ant build to deploy / overwrite the the old war.
    I set Ant debug=”on” debuglevel=”lines, vars, source”. //can give the whole line if necessary.
    Break points work in java.

    2 issues:
    1) Variables do not resolve at runtime. I have tried mouse over, right click -> inspect, and watches, none of which have worked.

    2) JSP source not found. In my Ant script I unpack a folder containing all the JSP’s into the root directory of the web application. I would guess ME’s looking for the JSP’s where they were deployed by ME but they are not there anymore. ME would have deployed the folder I unpacked.
    — What is more disturbing however is, if I were to create new JSP files, would I have to run an ME build each time?

    Any help would be great.

    Thanks,
    -Robert

    #276643 Reply

    Riyad Kalla
    Member

    I setup an ME deployment for my web app and deployed a war.
    I run an Ant build to deploy / overwrite the the old war.

    Why create the deployment from MyEclipse if you need the Ant deployment instead? Or why use Ant if you can use MyEclipse? (Just curious)

    1) Variables do not resolve at runtime. I have tried mouse over, right click -> inspect, and watches, none of which have worked.

    In the Java code? Which app server are you using? Which version of Java are you using to start it? Are you starting it from inside MyEclipse or from the command line?

    2) JSP source not found. In my Ant script I unpack a folder containing all the JSP’s into the root directory of the web application. I would guess ME’s looking for the JSP’s where they were deployed by ME but they are not there anymore. ME would have deployed the folder I unpacked.
    — What is more disturbing however is, if I were to create new JSP files, would I have to run an ME build each time?

    I actually don’t quite understand the question here… so let me explain how the MyEclipse debugger works:

    1. When you start your app server from MyEclipse, it hooks the server to the ME debugger.
    2. When a breakpoint is hit in your JSP pages (or Java classes), the application server will send back what line in the class file was hit along with a source-mapping back to the actual source line. MyEclipse debugger will take that source map and resolve it to a real location in your source, then break at that point and open the editor if necessary.

    NOTE: For #2 to work with Web Projects, MyEclipse needs to be working with a Web Project that it can map JSP source lines back to. This means a Web Project with a properly configured Web Root directory, as this is the base dir MyEclipse will use when resolving paths that come back from the app server.

    If you are debugging a plain Java project, or some custom laid out project (like a Maven-managed project or the like), MyEclipse isn’t going to be able to resolve those source mapping instructions for you and give you a “source not found” error instead.

    #276669 Reply

    Robert Byrne
    Member

    Why create the deployment from MyEclipse if you need the Ant deployment instead? Or why use Ant if you can use MyEclipse? (Just curious)

    I thought I needed ME to be externally deployed for the debugger to work. Are you saying that I don’t?

    In the Java code? Which app server are you using? Which version of Java are you using to start it? Are you starting it from inside MyEclipse or from the command line?

    Yes, this problem occurs in the java class. I am using Resin 2.0.24 and JDK1.5.0_12. I start the the server in debug mode from the servers view in ME. And like I said, the breaks are working, just no resolve on values.

    I actually don’t quite understand the question here

    I was trying to say that I received “source not found” when having a break in my jsp file and that I’m afraid the mapping may be off. But it didn’t come out right so let me rephrase.

    If I use Ant to copy “project_root/jsp/*” to “project_root/build” will ME be able to map those JSP files once I pack “project_root/build” into a war file and deploy? I could deploy it as an ear if that would make a difference.

    And you may ask why I do this but the truth is I have inherited this situation in the form of a CVS project.

    Thanks,
    -Robert

    #276704 Reply

    Riyad Kalla
    Member

    I thought I needed ME to be externally deployed for the debugger to work. Are you saying that I don’t?

    I don’t understand your question… Section 7 here covers how to work with Web Projects in MyEclipse… all packaging and deployment and debugging is handled for you, you shouldn’t need Ant: http://www.myeclipseide.com/documentation/quickstarts/webprojects/

    I am using Resin 2.0.24

    Ahhh, Resin 2 doesn’t support the JSR-45 debugging spec, that’s why debugging won’t work with that app sever.

    If I use Ant to copy “project_root/jsp/*” to “project_root/build” will ME be able to map those JSP files once I pack “project_root/build” into a war file and deploy? I could deploy it as an ear if that would make a difference.

    MyEclipse only maps your deployed project back to the project internally and it’s Web Root directory. If you have /jsp set as your Web Root directory for your web project, and are copying it to /build, no MyEclipse won’t map /build back to /jsp.

    I think it would be a good idea if you went through the tutorial I linked you above to get a better idea of how MyEclipse works.

    #276724 Reply

    Robert Byrne
    Member

    I’m sorry, I meant Resin-3.0.24. The debugger should work with resin 3 right?

    thanks
    -Robert

    #276770 Reply

    Riyad Kalla
    Member

    Robert,
    Would you be able to install Resin 3.1 and try your exact same app with it and see if JSP debugging works? The reason I ask is because we had issues with the source-map getting returned by Resin 3.0.x that made JSP debugging not work or flaky. It was supposidly fixed in later releases of 3.0.x, but who knows.

    If you would try with Resin 3.1 and everything suddenly worked without changing, then atleast we would know it’s a server issue.

    #276804 Reply

    Robert Byrne
    Member

    That’s a good idea. I’ll get back to you on this.

    Thanks,
    -Robert

    #277503 Reply

    Robert Byrne
    Member

    Sorry I’m just getting back to you, but wanted to tell you that java debugging is working with Resin 3.1.3.

    Thanks for your help,
    -Robert

    #277513 Reply

    Riyad Kalla
    Member

    Robert I’m glad it’s working, thanks for letting us know.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: external deploy issues

You must be logged in to post in the forum log in