JSP Compiler and CLASSPATH

 

hi
          what u can do is add the classpath where ur beans are in pre_classes
          variable in startweblogic.bat file
          this way it works fine for us.
          Parag B.Bhagwat
          Olga Penina <[email protected]> wrote in message
          news:[email protected]...
          > I don't have this problem (in WL 4.5.1 at least)
          >
          > My servlets AND my beans are in weblogic.httpd.servlet.classpath
          >
          > Olga
          >
          > Developer <[email protected]> wrote in message
          > news:[email protected]...
          > > I have set the weblogic.httpd.servlet.classpath properties to the
          > > following directory: c:\weblogic\myserver\servlets. In addition to
          > > Servlets I have a number of JavaBeans that I use within my JSP pages.
          > > However, when WebLogic compiles my JSP pages it fails to find the beans
          > > located in the weblogic.httpd.servlet.classpath. To fix the problem I
          > > have to do away with the reloadable servlet classpath and put everything
          > > in the system classpath. This means I need to restart the server
          > > everytime and bean or servlet changes.
          > >
          > > Has anyone else run into this problem? I've worked with WebSphere and
          > > J/Run, and both products support this capability.
          > >
          > > Thanks,
          > >
          > > Thomas McAlees
          > > ObjectFrame Technologies, Inc.
          > > [email protected]
          > >
          > >
          > >
          >
          >
          

Similar Messages

  • JSP Compiler and ClassCastException

     

    Have been using JDK1.2.2 from sun since day one and I've been seeing
              ClassCastException since day 1 too.
              Don't think it had anything to do with the compiler.
              "Jun Ying" <[email protected]> wrote in message
              news:[email protected]...
              > I noticed something that might be causing the ClassCastException and has
              not
              > been mentioned: the compiler that is used for jspc. I remember seeing a
              few
              > people mentioning extra classes in the workDir (ie, the bean class that is
              > being used). This is caused by using a smart compiler such as jikes or
              sj.
              > While those compilers will get you more speed for newly modified jsp's,
              they
              > resolve dependencies and recompile all the referenced classes. The result
              > is that the bean class gets recompiled and put into workDir. So no matter
              > where you put the workDir, you end up getting a new copy of the bean class
              > file, which is reloaded by the classloader that loads the newly compiled
              > JSP. That copy of the class file is considered "different" from the one
              > from the normal system classpath or the weblogic.class.path. Thus the
              > ClassCastException. So if you see java classes other than the jsp's in
              the
              > workDir, make sure you are using javac from the sun jdk. So to answer
              > Anish's question, WebLogic is not sticking a copy of the bean class.
              > Rather, it's the java compiler that you are using.
              >
              > Jun Ying
              > Meritsoft, Inc
              >
              >
              > "Michael Boudreau" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello,
              > >
              > > Well we ran into the same problem here at my company, and we have been
              > > pulling our hair out. I was reading through the jsp 1.1 spec, and
              > > thought I might try using the <jsp:useBean ...> tag instead of the <%@
              > > page import ...> tag. After careful inspection of the resulting .java
              > > file, I found that the <jsp:useBean ...> tag does not put insert any
              > > import statements, but simply declares the bean with the fully
              > > qualified package name. I am sure that this is not new news to anyone;
              > > however, the class cast exception went away (knock on wood, cross
              > > fingers, whatever).
              > >
              > > Basically, my statement looked like this:
              > > <jsp:useBean id="beanname" type="com.company.Class" scope="session" />
              > >
              > > My question is: is there something that I am missing or have not
              > > thought of? Because so far, this "seems" to be working, but I have
              > > been reading posts that say this does not work.
              > >
              > > Oh, one last quick note to BEA. While I was looking at the
              > > generated .java file from the jsp file, I found that weblogic's jspc is
              > > still generating getValue and setValue methods for HttpSession....
              > > which has been deprecated as of the servlet 2.2 spec.
              > >
              > > Michael
              > >
              > >
              > >
              > >
              > > Anish Parvataneni wrote:
              > >
              > > > Hi,
              > > >
              > > > I have a JSP which uses two different classes. Whenever, I change the
              > > > JSP and save it to recompile, there is a ClassCastException. ( I store
              > > > them in the session and load them) . Thats common ! The solution to
              this
              > > > as per documentation is to get rid of the classes in the workingDir of
              > > > JSP. However, I can find ONLY ONE of the classes in the workingDir. I
              > > > delete that class and the JSP works. I change the JSP , problem
              recurrs.
              > > >
              > > > 1. Why does weblogic stick a copy of the class in the workingDir,
              > > > everytime the JSP compiles, although it is available in the weblogic
              > > > classpath ?
              > > > 2. Why is it happening to only one of the classes I use in the JSP ?
              > > > 3. How can I make sure that this class is not available in the
              > > > workingDir, other than deleting it EVERYTIME.
              > > >
              > > > Thanks
              > > > Anish
              > >
              >
              >
              

  • Html comment in JSP compiled and rendered in NW7.3?

    Hi,
    We are updateing from EP NW7.0 to NW7.3 and are facing a strange issue with html comment (<!-- -->) in JSP files. It seems as in 7.3 html comment is compiled and rendered but of course does not work.
    Is this correct or is it a bug?
    Thanks,
    Stefan

    Hi,
    We are updateing from EP NW7.0 to NW7.3 and are facing a strange issue with html comment (<!-- -->) in JSP files. It seems as in 7.3 html comment is compiled and rendered but of course does not work.
    Is this correct or is it a bug?
    Thanks,
    Stefan

  • EAR and long CLASSPATH at JSP compilation time

              Hi all,
              we have an EAR-packaged application with over 260 jars (mainly
              EJB) that is deployed to a managed server WL6.1SP3(AIX). Then
              we hit a JSP page of this app. and Weblogic generates the
              adecuate .java file that is passed as an argument to a forked
              process for the javac compiler with a CLASSPATH that is more
              than 22KB!! of length because of the EAR classloader schema
              (it must include all the jars of the EJB level).
              The problem is that the EAR deployment in WL6.1 generates a fixed and very long
              path for every jar that it is composed of:
              $WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
              /wlap#####/ejbjarname.jar
              and the invoke of the compiler fails with argument too long.
              We can control the EJB jar name, EARNAME, WL_HOME
              and DOMAIN to shorten the CLASSPATH, but that is not enough
              giving that the fixed part of the PATH is very long, for example:
              with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
              you get:
              /w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar: that is
              68 chars * 260 jars = more than 17KB only with the
              EJB part of the CLASSPATH (plus the standard SYSTEM CLASSPATH
              and WARS CLASSPATH.)
              As workarounds we can:
              1.- Use an "pseudo exploded" EAR with EJBREMOTE and EJBHOME in clientclasses path
              with every jar and war by their own. Not very
              clean and we've lost the benefits of EAR deployment.
              2.- Consolidate a bunch of EJB in every jar. More administrative
              tasks (common xml descriptors:ejb-jar.xml,...) and less isolation
              between developer teams.
              3.- Consolidate at functionality level (source) a bunch of EJB
              in a few one. :(
              4.- Precompile every JSP outside of WEBLOGIC and generate
              the corresponding class and entries at web.xml and weblogic.xml
              5.- ...?
              or maybe:
              6.- configure this very long directory of deployment
              to a shorter deployer choosen and use relative paths.
              Is this possible? :)
              PacoG.
              

    You may try to use JSP compiler class. Please specify 'compilerclass'
              option in weblogic.xml. This option specifies name of a Java compiler
              that is executed in WebLogic Servers's virtual machine. (Used in place of
              an executable compiler such as javac or sj.)
              Please see
              http://e-docs.bea.com/wls/docs61/webapp/weblogic_xml.html#jsp-descriptor.
              Paco Garcia wrote:
              > oops!
              >
              > >$WL_HOME/./config/DOMAIN/applications/.wl_notdelete_EARNAME
              > >/wlap#####/ejbjarname.jar
              >
              > >with DOMAIN=DOM1, WL_HOME=W, ejbjar name=EJB1, EARNAME=EAR1
              > >you get:
              > >/w/./config/DOM1/applications/.wl_notdelete_EAR1/wlap#####/EJB1.jar:
              >
              > please read SERVERNAME instead of EARNAME
              >
              > PacoG.
              Regards,
              Ann
              Developer Relations Engineer
              BEA Support
              

  • URGENT: sp6 and JSP compiling/classpath problem?

    Hi,
              We installed sp6 on our production site a little over a week and started
              seeing this problem on our logs with regards to any JSP with an include tag,
              such as:
              <%@ include file="/inc/insideHeadTag.jsp" %>
              INTERMITTENTLY, we will get the following error in the page on the client
              side at runtime:
              < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
              found -- >
              I grepped this newsgroup and noticed a previous unanswered post of the same
              nature, "Static compiles do not seem to include JSP's". Except in our case,
              this problem also manifest for dynamic JSP compiles, happens sporatically,
              and only started with sp6.
              Bug???
              Gene Chuang
              Join Kiko.com!
              

              Just to clarify - I'm not from BEA, I'm from EA - short a letter.
              As far as I know, there is no synchronization between WL instances in a cluster regarding the
              the compiling of JSPs. So when you start up two WL instances that share the same workingDir,
              and each WL instances gets a hit on your shiny new index.jsp, they both need to compile it. So the first
              one compiles it and writes index.class, the second does the same, overwriting the first _index.class,
              possibly at the same time that the first instance is trying to load _index.class into memory. And you
              get a mysterious 'class not found' error. Not likely, but possible.
              "Gene Chuang" <[email protected]> wrote:
              >Hmm, interesting... I thought Weblogic strongly recommends clustered
              >servers sharing the same file system?
              >
              >So you're saying the system-wide, cluster and node specific directories can
              >reside on the shared drive, but workingDirs should reside on local drives?
              >
              >--
              >Gene Chuang
              >Join Kiko.com!
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Make sure that your WLS instances are NOT sharing the workingDir. If two
              >instances
              >> try to compile the same JSP at the same time, bad things can happen.
              >>
              >> Mike
              >>
              >> "Gene Chuang" <[email protected]> wrote:
              >> >Hi Jong,
              >> >
              >> >Thanks for the reply; but I wish the solution is as simple as that.
              >Yes,
              >> >my .jsps are in the proper directory. They have been working properly
              >for
              >> >the past 6 months, since we were running WL 4.5.1. Only when I switched
              >to
              >> >WL 5.1 sp6 did this bug start showing up. Plus, like I said in my
              >original
              >> >post, this bug is sporatic. SOMETIMES the included jsp is found by
              >Weblogic
              >> >and the includer jsp compiles correctly; other times it isn't found and
              >the
              >> >includer jsp leaves a gap! What's going on?
              >> >
              >> >We are running clustered web servers in Solaris 2.7 with a shared file
              >> >system. This sporatic behavior may be because some nodes aren't working
              >> >properly???
              >> >
              >> >--
              >> >Gene Chuang
              >> >Join Kiko.com!
              >> >
              >> >"Jong Lee" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> "Gene Chuang" <[email protected]> wrote:
              >> >> >Hi,
              >> >> >
              >> >> >We installed sp6 on our production site a little over a week and
              >started
              >> >> >seeing this problem on our logs with regards to any JSP with an
              >include
              >> >tag,
              >> >> >such as:
              >> >> I assumed insideHeadTag.jsp is in
              >> >> YOUR_DOCUMENT_ROOT/inc/insideHeadTag.jsp
              >> >>
              >> >> if you haven't read the spec of relative URI please do so:
              >> >> jsp spec 1.1 - section 2.5.2
              >> >>
              >> >> Jong
              >> >>
              >> >> >
              >> >> > <%@ include file="/inc/insideHeadTag.jsp" %>
              >> >> >
              >> >> >INTERMITTENTLY, we will get the following error in the page on the
              >client
              >> >> >side at runtime:
              >> >> >
              >> >> > < ! -- cannot include file '/inc/insideHeadTag.jsp', resource not
              >> >> >found -- >
              >> >> >
              >> >> >I grepped this newsgroup and noticed a previous unanswered post of the
              >> >same
              >> >> >nature, "Static compiles do not seem to include JSP's". Except in our
              >> >case,
              >> >> >this problem also manifest for dynamic JSP compiles, happens
              >> >sporatically,
              >> >> >and only started with sp6.
              >> >> >
              >> >> >Bug???
              >> >> >
              >> >> >Gene Chuang
              >> >> >Join Kiko.com!
              >> >> >
              >> >> >
              >> >> >
              >> >>
              >> >
              >> >
              >>
              >
              >
              

  • Urgent Solution needed--Problem in JSP compilation with JDK 1.5 and JDK 1.6

    Hi,
    I m using JDK 1.5 and Tomcat 5.0 the problem is that after starting server when I m going to access my application at that time instead of displaying HomePage it directly display the blank page on screen.
    After analyzing tomcat log I have found that there was a problem with JSP page compilation.
    The exception logged in Tomcat Log is given below
    An error occurred at line: 1 in the generated java file
    The type Collection is not generic; it cannot be parameterized with arguments <? extends E>
    Stacktrace:
    *     at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)*
    *     at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)*
    *     at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)*
    *     at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)*
    *     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)*
    *     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)*
    *     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)*
    *     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)*
    *     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)*
    *     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:447)*
    *     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)*
    *     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)*
    *     at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)*
    *     at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)*
    *     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)*
    *     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)*
    *     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)*
    *     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)*
    *     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)*
    *     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)*
    *     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)*
    *     at java.lang.Thread.run(Thread.java:619)*
    After getting this kind of error I have analyzed my code furhter then I came to know that there was problem with static include tag.
    In my jsp page I have used following line which is the main cause of error
    <%@ include file="top.jsp" %>If I ommit this line then it is working properly.
    Instead of static include I have used jsp:include also.
    Still I m getting same problem.
    We have to migrated from JDK 1.5 to 1.6 and Tomcat 5.0.28 to 6.0.14, still same problem is there.
    We have tried a lot but didnt get success to overcome this problem.
    If anybody having any solution then ur each reply will be appreciated.
    Thanks in advance..........!!!!!!!
    Edited by: JBOSS2000 on Jan 15, 2008 9:29 AM

    Hi "mshanu" and "amit" Thanks for ur replies Here I m posting the code of "top.jsp"........!!!!
    <%@ page errorPage="errordisplay.jsp"%>
    <table cellpadding="0"
           cellspacing="0"  height=50 width=780>
           <tbody>
             <tr class="header">
               <td class="logo"><IMG SRC="assets/Logo.gif" BORDER=0 ALIGN=top></td>
               <td align="right"><span class="applicationtitle"><%@ include file="/contents/logo.htm" %></span><br>
               <span class="companyname"><%@ include file="/contents/companyname.htm" %></span></td>
             </tr>
            </tbody>
    </table>To include top.jsp I have tried
    <jsp:include page="top.jsp" flush="true">
    </jsp:include>
             AND       
    <%@ include file="top.jsp"%>but none of this worked.
    If I remove the include then It is working properly.
    But I need inluded file too so that I am wondoring for the solution.
    This problem seems very wiered to me. I dont know why it is happening.
    This problem is started only when I used the TOMCAT 6.14.
    Is it the bug of TOMCAT 6.14 or What somebody Plz help.
    I got stuck here.........!!!!!!!!!!
    It doesn't seem any problem with top.jsp. As per my thinking the problem is there in include due to that it doesn't compile the JSP page in Tomcat 6.0.
    Earlier I am having same code running on the Tomcat 5.0.28 and JDK 1.5.0.
    But problem occured when I have used Tomcat 6.x...!!

  • Compiling and running jsp-code on the fly.

    I am intending to use jsp as a report engine. The 'templates' should be jsp-code stored in the db, loaded and executed as if they where inside a plain jsp-file in the application. I cannot write new files on the file system since this is prohibited on the production env - so I would like to compile and execute the jsp-code directly in memory.
    Was hoping this could be done with the jee standard stack.
    Does anybode know how to to this, if possible?

    If you just want to run java applications, you just need the JRE: J2SE 5.0 JRE
    If you want to compile java source code, you need the JDK: J2SE 5.0 JDK
    It includes also the JRE. Recommended is also the J2SE 5.0 Documentation that contains the javadoc API that describes all the Java classes.
    To start develeoping I recommend the Java Tutorial: http://java.sun.com/docs/books/tutorial/

  • Weblogic 9 and JSP compiler errors

    Hello everyone,
              I am having problems with my Jsps in my EAR file deployed on WL 9.0.
              I have a Jsp called upms.jsp that contains the following code snippets:
              After my import statements, I have some code that creates a resource bundle that accesses a properties file:
               <%!
                   ResourceBundle bundle = null;
                   public void jspInit() {
                   bundle = ResourceBundle.getBundle("conf.properties");
              %>
              I get an error from the above code:
              upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
                        import="java.util.ResourceBundle"
              ^----------------------^
              I am totally clueless as to what that error means.
              Next I declare a bean I use in the jsp:          
                   <jsp:useBean
                        id="userPrefsManagerBean"
              class="controllers.beans.UserPreferencesManagerBean"
                   scope="session">
                   </jsp:useBean>
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              I get these errors from the above portion:
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain fields.
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found '.' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
                   <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              Has anyone encountered these before?
              This jsp worked perfectly well when I deployed my EAR file on JBoss...no such luck using Weblogic.
              Is there something I am missing here? I appreciate any help.
              Cheers, :-)
              M.

    Mildred,
              Two suggestions:
              1) use option weblogic.jspc's "-keepgenerated", you can keep the generated
              servlet's source code.
              Please paste it here.
              2) Can you create a simple reproducer(e.g. a war), and put it here, so that
              we can debug it and give more clues.
              To reproduce your issue, I write a simple a simple
              UserPreferencesManagerBean classs below :
              package controllers.beans;
              public class UserPreferencesManagerBean {
              private int p1;
              public void setP1(int p)
              p1 = p;
              public int getP1()
              return p1;
              But it works(oh, I run it under 910MP1).
              We cannot tell too much without your further information
              Thanks
              Leon
              <Mildred A> wrote in message news:[email protected]...
              I am still fighting with this issue.. Dang!
              I don't know what to change in my JSP because the WL JSP compiler errors are
              so out there..
              Here is the first portion of the JSP file:
              <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
              session="true"
              pageEncoding="ISO-8859-1"
              import="java.util.ArrayList"
              import="java.util.HashSet"
              import="java.util.Date"
              import="java.util.Collections"
              import="java.util.ResourceBundle"
              %>
              <%!
              ResourceBundle bundle = null;
              public void jspInit() {
              bundle = ResourceBundle.getBundle("conf.properties");
              %>
              <jsp:useBean
              id="userPrefsManagerBean"
              class="controllers.beans.UserPreferencesManagerBean"
              scope="session">
              </jsp:useBean>
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              Below is the error I get from this section alone (after precompiling):
              upms.jsp:3:11: 'try' statement has neither 'catch' nor 'finally' clause
              import="java.util.ArrayList"
              ^-----------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
              fields.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: The qualifier of this name is a package, which cannot contain
              fields.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found '.' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found 'class' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected <identifier> (found ')' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Expression expected (found 'catch' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Illegal use of an expression as a statement.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ) (found '__ee' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Illegal use of an expression as a statement.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected ; (found ')' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: No variable or field with this name could be found at this
              location.
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              upms.jsp:27:3: Syntax error: expected } (found 'EOF' instead)
              <jsp:setProperty name="userPrefsManagerBean" property="*" />
              ^-------------^
              Can anyone see what I am doing wrong here? ?:| ?:|
              Cheers,
              M

  • Java compilation and running within jsp page

    hi,
    i need of a jsp page that has a textarea in which the java coding are entered and this coding is compiled and executed. The execution result is printed.
    Please guide me.

    I don't think you can invoke java compiler or run time environment at client side (browser). Even if you use applet, i think you will not be able to do it at client side. Moreover, though java virtual machine will be available in your target user's browser, but you should not expect a java compiler in users machine.
    I have seen exam sites where they have added java code compilation and execution ability. To achieve this you can do:
    1. In your JSP page use text area where user can edit java code.
    2. Provide two buttons - 'Compile' and 'Run'.
    3. On click of 'Compile' send the code to server side. In server machine create a file in a temporary location in disk and save the code content received from client.
    4. Invoke 'javac' command (as a separate process) to compile the java class created in step 3. This process will give you error/output back which you can send back to user.
    5. In case of 'Run' you must first invoke above mentioned 'Compile' service and then another service ('Run') to actually run you java class. You can build 'Run' service in similar way.
    Here you challenge would be managing multiple client requests (to compile and run java class) at the same time.
    Code to compile and run java classes:
    import java.io.*;
    * A class to compile and run java classes.
    * @author Mrityunjoy Saha
    public class JavaProcessor{
         public static void main(String[] args){
              // Option 1 to compile and option 2 to run.
              int option=1;
              if(args.length > 0){
                   option=Integer.parseInt(args[0]);
              JavaProcessor p=new JavaProcessor();
              if(option==1){
                   p.compile();
              } else {
                   p.run();
         public void run(){
              String file="FoodTest";
              String directory="C:/Users/mrityunjoy_saha/Documents/Test";     
              executeCommand("java", directory, file);
         public void compile(){
              String file="FoodTest.java";
              String directory="C:/Users/mrityunjoy_saha/Documents/Test";     
              executeCommand("javac", directory, file);
         public void executeCommand(String command, String directory, String file){
              try{
                   String[] envp=null;
                   // Make sure that you have done Java setup in your machine.
                   // To test this try invoking javac command in command prompt.
                   Process p=Runtime.getRuntime().exec(command+" "+file,envp,new File(directory));
                   BufferedReader errorStream=new BufferedReader(new InputStreamReader(p.getErrorStream()));
                   String readData="";
                   while((readData=errorStream.readLine())!=null){
                        System.out.println(readData);
                   BufferedReader outStream=new BufferedReader(new InputStreamReader(p.getInputStream()));
                   readData="";
                   while((readData=outStream.readLine())!=null){
                        System.out.println(readData);
              catch(IOException ioe){
                   ioe.printStackTrace();
    }Thanks,
    Mrityunjoy

  • Set path and classpath in ANT

    by using ANT, how can set the JDK path and classpath..
    jdk version exists in the : C:\Program Files\Java\jdk1.6.0
    This is the build.xml that i need to modify!
    -Do i need to have a serperate JAVA_HOME variable?
    <?xml version="1.0"?>
    <!--
    Build file for 'Chat Client'
    Version: $Revision: 4.10 $ $Date: 2003/05/28 $
    Author:  Rajat Gupta
    -->
    <project name="Chat" default="jar" basedir=".">
       <!-- ================================================================== -->
       <!-- Initialization of all property settings                            -->
       <!-- ================================================================== -->
       <target name="init">
          <property name="appname"        value="chat"   />
          <property name="src.dir"        value="src"               />
          <property name="lib.dir"        value="lib"              />
          <property name="build.dir"      value="Chat"            />
          <property name="build.compiler" value="classic"          />
       </target>
       <!-- ================================================================== -->
       <!-- Makes sure the needed directory structure is in place              -->
       <!-- ================================================================== -->
       <target name="prepare" depends="init">
          <mkdir dir="${lib.dir}" />
          <mkdir dir="${lib.dir}/META-INF" />
          <mkdir dir="${build.dir}" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the web part of the application                     -->
       <!-- ================================================================== -->
       <target name="classes" depends="prepare">
          <javac srcdir="${src.dir}/oracle/otnsamples/oc4jjms"
                 destdir="${lib.dir}"
                 includes="**" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the complete J2EE application (both web and EJB)    -->
       <!-- ================================================================== -->
       <target name="j2ee-meta-inf" depends="classes, prepare">
          <copy file="${src.dir}/META-INF/application-client.xml"
                tofile="${lib.dir}/META-INF/application-client.xml" />
          <copy file="${src.dir}/images/oralogo.gif"
                tofile="${lib.dir}/oralogo.gif" />
       </target>
       <target name="jar" depends="j2ee-meta-inf">
       <jar jarfile="${build.dir}/${appname}.jar"
           basedir="${lib.dir}" manifest="${src.dir}/META-INF/MANIFEST.MF"/>
          <delete dir="${lib.dir}" />
       </target>
    </project>Message was edited by:
    jugp

    [url ='http://www.jguru.com/forums/home.jsp?topic=Ant']answer here

  • I'm trying to run a .jsp page and all I get is the following error. Thoughts?

    Running Coldfusion 8 / JRun 4 updater 7 / Coldfusion 8 hotfix
    2.
    I'm trying to run a .jsp page and all I get is the following
    error. Thoughts?
    Could not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    jrunx.compiler.JavaCompiler$NoCompilerFoundException: Could
    not invoke Java compiler, please make sure jikesw is in
    I:\JRun4/bin or put a JDK bin directory in your path.
    at
    jrunx.compiler.JavaCompiler.outProcessCompile(JavaCompiler.java:474)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:132)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:100)
    at jrun.jsp.Translator.compilePage(Translator.java:176)
    at jrun.jsp.Translator.translate(Translator.java:254)
    at jrun.jsp.Translator.translate(Translator.java:101)
    at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:707)
    at jrun.jsp.JSPServlet.translate(JSPServlet.java:125)
    at jrun.jsp.JSPServlet.service(JSPServlet.java:113)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    You're right, that ws another fix I tried. There is no fix fo
    rthe issue described, but it still seems like an old issue. My
    class paths are short. Here is my jvm.config (pretty standard):
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    java.home=I:/JRun4/jre
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 2) ../jre
    # 3) registry (windows only)
    # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    # Arguments to VM
    java.args=-server -Xmx1000m -Dsun.io.useCanonCaches=false
    -XX:MaxPermSize=256m -XX:+UseParallelGC
    -Dcoldfusion.rootDir={application.home}/
    # commas will be converted to platform specific separator and
    the result will be passed
    # as -Djava.ext.dirs= to the VM
    java.ext.dirs={jre.home}/lib/ext
    # where to find shared libraries
    java.library.path={application.home}/lib,{application.home}/servers/cfusion/cfusion-ear/cf usion-war/WEB-INF/cfusion/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/W EB-INF/cfusion/jintegra/bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB -INF/cfusion/jintegra/bin/international
    system.path.first=false
    # set the current working directory - useful for Windows to
    control
    # the default search path used when loading DLLs since it
    comes
    # before system directory, windows directory and PATH
    java.user.dir={application.home}/../lib
    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/lib

  • JSP compiler obfuscates generated servlet debug line numbers

              Here's something that's been baffling me for a couple of days now.
              When WebLogic parses a JSP into servlet Java source, and then compiles the Java
              source into a class, it seems to perform a further step to obfuscate debug line
              numbers in the _jspService method. This converts the debug line numbers from Java
              source code line numbers into JSP line numbers.
              At first sight, this may appear to be useful- it means that when an exception
              is thrown then it references a line number in the original JSP rather than one
              in the generated servlet. However, it actually makes life more difficult when
              you consider included JSPs.
              Suppose you have a file loginresult.jsp, which uses @include to include a header.jsp
              and footer.jsp, both of which contain dynamic content. When WebLogic converts
              line numbers, it ignores the JSP that the code came from, so this causes a many-to-one
              mapping of line numbers. When an error occurs, the exception will tell you the
              line number that it came from, but it won't tell you which JSP caused it. The
              many-to-one mapping ensures a loss of information- and no way of retrieving the
              real line numbers.
              This is an even bigger nuisance when trying to debug JSPs- the debugger hops around
              in the generated servlet file without giving any clue as to whereabouts it really
              is in the code.
              My question is: is there any way of switching off this post-processor behaviour?
              One obvious way would be to locate the WebLogic class that does this post-processing,
              stub it out and run WebLogic with this class higher up in the classpath. But that's
              a last resort.
              Secondly, would there be any other impact in turning off this behaviour? Do other
              parts of WebLogic rely on this?
              Thanks in advance,
              Kevin.
              

    Actually, this option turns line-number table replacement on and off, for example,
              with jsp like this:
              test.jsp
              <%
              throw new Exception();
              %>
              and weblogic.xml:
              <!DOCTYPE weblogic-web-app PUBLIC "-//BEA
              Systems, Inc.//DTD Web Application 7.0//EN"
              "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
              <weblogic-web-app>
              <jsp-descriptor>
              <jsp-param>
              <param-name>debug</param-name>
              <param-value>true</param-value>
              </jsp-param>
              </jsp-descriptor>
              </weblogic-web-app>
              the stacktrace looks like this (note line number 2 - this is JSP line number):
              java.lang.Exception
              at jsp_servlet.__test._jspService(test.jsp:2)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:376)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
              and with debug option turned off:
              <!DOCTYPE weblogic-web-app PUBLIC "-//BEA
              Systems, Inc.//DTD Web Application 7.0//EN"
              "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
              <weblogic-web-app>
              <jsp-descriptor>
              <jsp-param>
              <param-name>debug</param-name>
              <param-value>false</param-value>
              </jsp-param>
              </jsp-descriptor>
              </weblogic-web-app>
              exception stacktrace looks like this (note that line number now is from generated .java file):
              java.lang.Exception
              at jsp_servlet.__test._jspService(__test.java:87)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:376)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
              Kevin Thomas <[email protected]> wrote:
              > But this isn't useful, as you don't know which JSP the line number is referring
              > to! (did it come from the main JSP, or one of the files that it included?)
              > Turning debug off is not an answer- because that will lose other useful information
              > that is useful to the debugger.
              > Kevin.
              > "Dimitri I. Rakitine" <[email protected]> wrote:
              >>Actually, this is useful when you want to debug .jsp's and not generated
              >>..java files. Did you try setting 'debug' jsp-param in the weblogic.xml
              >>to
              >>false? I think it turns class postprocessing on and off.
              >>
              >>Kevin Thomas <[email protected]> wrote:
              >>
              >>> Here's something that's been baffling me for a couple of days now.
              >>
              >>> When WebLogic parses a JSP into servlet Java source, and then compiles
              >>the Java
              >>> source into a class, it seems to perform a further step to obfuscate
              >>debug line
              >>> numbers in the _jspService method. This converts the debug line numbers
              >>from Java
              >>> source code line numbers into JSP line numbers.
              >>
              >>> At first sight, this may appear to be useful- it means that when an
              >>exception
              >>> is thrown then it references a line number in the original JSP rather
              >>than one
              >>> in the generated servlet. However, it actually makes life more difficult
              >>when
              >>> you consider included JSPs.
              >>
              >>> Suppose you have a file loginresult.jsp, which uses @include to include
              >>a header.jsp
              >>> and footer.jsp, both of which contain dynamic content. When WebLogic
              >>converts
              >>> line numbers, it ignores the JSP that the code came from, so this causes
              >>a many-to-one
              >>> mapping of line numbers. When an error occurs, the exception will tell
              >>you the
              >>> line number that it came from, but it won't tell you which JSP caused
              >>it. The
              >>> many-to-one mapping ensures a loss of information- and no way of retrieving
              >>the
              >>> real line numbers.
              >>
              >>> This is an even bigger nuisance when trying to debug JSPs- the debugger
              >>hops around
              >>> in the generated servlet file without giving any clue as to whereabouts
              >>it really
              >>> is in the code.
              >>
              >>> My question is: is there any way of switching off this post-processor
              >>behaviour?
              >>> One obvious way would be to locate the WebLogic class that does this
              >>post-processing,
              >>> stub it out and run WebLogic with this class higher up in the classpath.
              >>But that's
              >>> a last resort.
              >>
              >>> Secondly, would there be any other impact in turning off this behaviour?
              >>Do other
              >>> parts of WebLogic rely on this?
              >>
              >>> Thanks in advance,
              >>
              >>> Kevin.
              >>
              >>--
              >>Dimitri
              >>
              Dimitri
              

  • JSP compilation errors in weblogic 6.1

              I'm getting these JSP compilation errors in weblogic 6.1 on Solaris. Please help.
              Full compiler error(s):
              error: Invalid class file format:
              ^
              /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              eb/_jsp/_event/__eventForm.java:34: Class
              com.ford.redherring.model.PropertiesAttributesModel not found in import.
              import com.ford.redherring.model.PropertiesAttributesModel; <file://[>
              /web/jsp/event/eventForm.jsp; Line: 64]
              ^
              /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              eb/_jsp/_event/__eventForm.java:38: Class com.ford.redherring.util.DialogHeader
              not found in import.
              import com.ford.redherring.util.DialogHeader; <file://[> /web/jsp/event/eventForm.jsp;
              Line: 68]
              ^
              /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              eb/_jsp/_event/__eventForm.java:39: Class com.ford.redherring.util.DialogFooter
              not found in import.
              import com.ford.redherring.util.DialogFooter; <file://[> /web/jsp/event/eventForm.jsp;
              Line: 69]
              ^
              /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              eb/_jsp/_event/__eventForm.java:40: Class com.ford.redherring.model.DDContainer
              not found in import.
              import com.ford.redherring.model.DDContainer; <file://[> /web/jsp/event/eventForm.jsp;
              Line: 70]
              ^
              /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              eb/_jsp/_event/__eventForm.java:41: Class
              com.ford.redherring.model.DDValidationModel not found in import.
              import com.ford.redherring.model.DDValidationModel; <file://[>
              /web/jsp/event/eventForm.jsp; Line: 71]
              

    This appears to be a CLASSPATH problem (you are missing references to
              'com.ford.redherring.model.*' and 'com.ford.redherring.util.*'). The
              CLASSPATH may be set in the server startup script. Hope this helps.
              Wade.
              "Katri Alur" <[email protected]> wrote in message news:<[email protected]>...
              > I'm getting these JSP compilation errors in weblogic 6.1 on Solaris. Please help.
              >
              > ----------------------------------------------------------------------------
              > ----
              > Full compiler error(s):
              > error: Invalid class file format:
              >
              >
              > ^
              > /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              > tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              > eb/_jsp/_event/__eventForm.java:34: Class
              > com.ford.redherring.model.PropertiesAttributesModel not found in import.
              > import com.ford.redherring.model.PropertiesAttributesModel; <file://[>
              > /web/jsp/event/eventForm.jsp; Line: 64]
              > ^
              > /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              > tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              > eb/_jsp/_event/__eventForm.java:38: Class com.ford.redherring.util.DialogHeader
              > not found in import.
              > import com.ford.redherring.util.DialogHeader; <file://[> /web/jsp/event/eventForm.jsp;
              > Line: 68]
              > ^
              > /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              > tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              > eb/_jsp/_event/__eventForm.java:39: Class com.ford.redherring.util.DialogFooter
              > not found in import.
              > import com.ford.redherring.util.DialogFooter; <file://[> /web/jsp/event/eventForm.jsp;
              > Line: 69]
              > ^
              > /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              > tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              > eb/_jsp/_event/__eventForm.java:40: Class com.ford.redherring.model.DDContainer
              > not found in import.
              > import com.ford.redherring.model.DDContainer; <file://[> /web/jsp/event/eventForm.jsp;
              > Line: 70]
              > ^
              > /opt/projects/redherring/beahome/wlserver6.1/config/mydomain/applica
              > tions/.wlnotdelete/WEB-INF/_tmp_war_myserver_myserver_redherring/jsp_servlet/_w
              > eb/_jsp/_event/__eventForm.java:41: Class
              > com.ford.redherring.model.DDValidationModel not found in import.
              > import com.ford.redherring.model.DDValidationModel; <file://[>
              > /web/jsp/event/eventForm.jsp; Line: 71]
              

  • Newbie:  jsp compile error w/ tomcat 5.0.19

    Hello there, this is my first time try to write something in jsp/ servlets, and i encounter a minor installation problem:
    using mdk linux with j2sdk1.4.2 (locate at /usr/local/), tomcat is also locate at /usr/local.
    I am able to see HelloServlet.java, and HelloWorld.html at http://localhost:8080/servlet/HelloServlet
    and http://localhost:8080/testing/HelloWorld.html
    but i'm unable to see HelloWorld.jsp at http://localhost:880/HellowWorld.jsp (my HelloWorld.html and HellowWorld.jsp are locate at the same dir)
    here's are the things i added in my /etc/profile so far:
    CATALINA_HOME="/usr/local/Tomcat"
    export CATALINA_HOME
    JAVA_HOME="/usr/local/j2sdk1.4.2"
    export JAVA_HOME
    JavaPath="/usr/local/j2sdk1.4.2/bin"
    export JavaPath
    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    export PKG_CONFIG_PATH
    CLASSPATH=$CLASSPATH:/usr/local/Tomcat/common/lib/servlet-api.jar:/usr/local/Tomcat/
    common/lib/jsp-api.jar:/home/allen/programming/j2ee/:./
    export CLASSPATH
    when do java -verison, i see:
    [root@localhost local]# java -version
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
    when start tomcat, i got:
    [root@localhost bin]# ./startup.sh
    Using CATALINA_BASE: /usr/local/Tomcat
    Using CATALINA_HOME: /usr/local/Tomcat
    Using CATALINA_TMPDIR: /usr/local/Tomcat/temp
    Using JAVA_HOME: /usr/local/j2sdk1.4.2
    i thought i did everything that was told, yet i can't see jsp page on my browser, while i can see servlets and html,
    thank you for your time in advance ^_^

    sorry, it was a typo, yea...it was for http://localhost:8080/testing/Hello.jsp
    this morning, i copied "tool.jar" from j2sdk1.4.2 to my /usr/local/tomcat/common/lib, restarted, fire it up again using "./catalina.sh" just to see where the problems came from, and here's where the compile error occue:
    Compile failed; see the compiler error output for details.
            at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:978)
            at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:799)
            at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:387)
            at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
            at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
            at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
            at java.lang.Thread.run(Thread.java:534)
    Mar 16, 2005 7:28:37 AM org.apache.jasper.compiler.Compiler generateClass
    SEVERE: Env: Compile: javaFileName=/usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_//org/apache/jsp/testing/Hello_jsp.java
        classpath=/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/classes/:/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/lib/catalina-root.jar:/usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_:/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/classes/:/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/lib/catalina-root.jar:/usr/local/jakarta-tomcat-5.0.19/shared/classes/:/usr/local/jakarta-tomcat-5.0.19/common/classes/:/usr/local/jakarta-tomcat-5.0.19/common/endorsed/xercesImpl.jar:/usr/local/jakarta-tomcat-5.0.19/common/endorsed/xmlParserAPIs.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/ant.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-collections.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-dbcp-1.1.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-el.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-pool-1.1.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/jasper-compiler.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/jasper-runtime.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/jmx.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/jsp-api.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-common.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-factory.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-java.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-resources.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/servlet-api.jar:/usr/local/jakarta-tomcat-5.0.19/common/lib/tools.jar:/usr/local/j2sdk1.4.2/lib/tools.jar:/usr/local/jakarta-tomcat-5.0.19/bin/bootstrap.jar:/usr/local/jakarta-tomcat-5.0.19/bin/commons-logging-api.jar:/usr/local/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar:/usr/local/j2sdk1.4.2/jre/lib/ext/dnsns.jar:/usr/local/j2sdk1.4.2/jre/lib/ext/ldapsec.jar:/usr/local/j2sdk1.4.2/jre/lib/ext/localedata.jar
        cp=/usr/local/j2sdk1.4.2/lib/tools.jar:/usr/local/Tomcat/bin/bootstrap.jar:/usr/local/Tomcat/bin/commons-logging-api.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/classes
        cp=/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/lib/catalina-root.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_
        cp=/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/classes
        cp=/usr/local/jakarta-tomcat-5.0.19/webapps/ROOT/WEB-INF/lib/catalina-root.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/shared/classes
        cp=/usr/local/jakarta-tomcat-5.0.19/common/classes
        cp=/usr/local/jakarta-tomcat-5.0.19/common/endorsed/xercesImpl.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/endorsed/xmlParserAPIs.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/ant.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-collections.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-dbcp-1.1.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-el.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/commons-pool-1.1.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/jasper-compiler.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/jasper-runtime.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/jmx.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/jsp-api.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-common.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-factory.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-java.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/naming-resources.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/servlet-api.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/common/lib/tools.jar
        cp=/usr/local/j2sdk1.4.2/lib/tools.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/bin/bootstrap.jar
        cp=/usr/local/jakarta-tomcat-5.0.19/bin/commons-logging-api.jar
        cp=/usr/local/j2sdk1.4.2/jre/lib/ext/sunjce_provider.jar
        cp=/usr/local/j2sdk1.4.2/jre/lib/ext/dnsns.jar
        cp=/usr/local/j2sdk1.4.2/jre/lib/ext/ldapsec.jar
        cp=/usr/local/j2sdk1.4.2/jre/lib/ext/localedata.jar
        work dir=/usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_
        extension dir=/usr/local/j2sdk1.4.2/jre/lib/ext
        srcDir=/usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_
        include=org/apache/jsp/testing/Hello_jsp.java
    Mar 16, 2005 7:28:37 AM org.apache.jasper.compiler.Compiler generateClass
    SEVERE: Error compiling file: /usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_//org/apache/jsp/testing/Hello_jsp.java     [javac] Compiling 1 source file
        [javac] /usr/local/jakarta-tomcat-5.0.19/work/Catalina/localhost/_/org/apache/jsp/testing/Hello_jsp.java:48: cannot resolve symbol
        [javac] symbol  : class Data
        [javac] location: package util
        [javac]       out.print( new java.util.Data() );
        [javac]                               ^
        [javac] 1 error
    Mar 16, 2005 7:32:34 AM org.apache.jasper.compiler.Compiler generateClass
    looking over the compiler error, it seems to me tomcat is able to recongize /usr/local/j2sdk1.4 's location. which i assume it implied JAVA_HOME and CLASSPATH are setup correctly.
    Dunno why it just won't display jsp pages and kept saying compiler error...
    thank you for helping

  • Runtime error after successful compile and link with cl.exe

    Finally, got the configuration for cl.exe and link.exe right and got a successful compile and link to produce a dll. Then ran the main method of my Java class. The main method calls the constructor, and loading the class runs the static block which loads the native dll. I get one of those error files of the type hs_err_pid4064.log. The file is as follows:
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (0xe06d7363), pid=4064, tid=3576
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [kernel32.dll+0x12aeb]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x00395800): JavaThread "main" [_thread_in_native, id=3576, stack(0x003b0000,0x00400000)]
    siginfo: ExceptionCode=0xe06d7363, ExceptionInformation=0x19930520 0x003fdf14 0x02de7b04
    Registers:
    EAX=0x003fde4c, EBX=0x00000000, ECX=0x00000000, EDX=0x02f80600
    ESP=0x003fde48, EBP=0x003fde9c, ESI=0x003fdedc, EDI=0x003fdedc
    EIP=0x7c812aeb, EFLAGS=0x00000206
    Top of Stack: (sp=0x003fde48)
    0x003fde48: 02de1de0 e06d7363 00000001 00000000
    0x003fde58: 7c812aeb 00000003 19930520 003fdf14
    0x003fde68: 02de7b04 02e80087 003fdf14 003fdf28
    0x003fde78: 02e99500 00000039 003fde70 00000039
    0x003fde88: 003fdec8 02e81a50 02eabf00 003fdf14
    0x003fde98: 003fdf28 003fdedc 02dce583 e06d7363
    0x003fdea8: 00000001 00000003 003fded0 02a72388
    0x003fdeb8: 00000000 e06d7363 00000001 00000000
    Instructions: (pc=0x7c812aeb)
    0x7c812adb: 8d 7d c4 f3 a5 5f 8d 45 b0 50 ff 15 10 15 80 7c
    0x7c812aeb: 5e c9 c2 10 00 85 ff 0f 8e 36 93 ff ff 8b 55 fc
    Stack: [0x003b0000,0x00400000], sp=0x003fde48, free space=311k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [kernel32.dll+0x12aeb]
    C [summarizer37.dll+0x1e583]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x02a66000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3108, stack(0x02d10000,0x02d60000)]
    0x02a58000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2488, stack(0x02cc0000,0x02d10000)]
    0x02a56c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=2508, stack(0x02c70000,0x02cc0000)]
    0x02a56000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3720, stack(0x02c20000,0x02c70000)]
    0x02a51800 JavaThread "Finalizer" daemon [_thread_blocked, id=2968, stack(0x02bd0000,0x02c20000)]
    0x02a4d400 JavaThread "Reference Handler" daemon [_thread_blocked, id=600, stack(0x02b80000,0x02bd0000)]
    =>0x00395800 JavaThread "main" [_thread_in_native, id=3576, stack(0x003b0000,0x00400000)]
    Other Threads:
    0x02a4c000 VMThread [stack: 0x02b30000,0x02b80000] [id=2528]
    0x02a67000 WatcherThread [stack: 0x02d60000,0x02db0000] [id=1604]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 195K [0x22960000, 0x22a60000, 0x22e40000)
    eden space 896K, 21% used [0x22960000, 0x22990c38, 0x22a40000)
    from space 64K, 0% used [0x22a40000, 0x22a40000, 0x22a50000)
    to space 64K, 0% used [0x22a50000, 0x22a50000, 0x22a60000)
    tenured generation total 4096K, used 0K [0x22e40000, 0x23240000, 0x26960000)
    the space 4096K, 0% used [0x22e40000, 0x22e40000, 0x22e40200, 0x23240000)
    compacting perm gen total 12288K, used 22K [0x26960000, 0x27560000, 0x2a960000)
    the space 12288K, 0% used [0x26960000, 0x269658c8, 0x26965a00, 0x27560000)
    ro space 8192K, 66% used [0x2a960000, 0x2aeb0e10, 0x2aeb1000, 0x2b160000)
    rw space 12288K, 52% used [0x2b160000, 0x2b7b04c8, 0x2b7b0600, 0x2bd60000)
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jdk1.6.0_06\bin\javaw.exe
    0x7c900000 - 0x7c9af000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f6000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000      C:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x7e410000 - 0x7e4a1000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f59000      C:\WINDOWS\system32\GDI32.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dac0000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\client\jvm.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x6d320000 - 0x6d328000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d820000 - 0x6d82c000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\verify.dll
    0x6d3c0000 - 0x6d3df000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\java.dll
    0x6d860000 - 0x6d86f000      C:\Program Files\Java\jdk1.6.0_06\jre\bin\zip.dll
    0x10000000 - 0x10006000      D:\Servers\SummarizerServer\native\jsummarizer.dll
    0x02db0000 - 0x02df2000      D:\Servers\SummarizerServer\native\summarizer37.dll
    0x02e00000 - 0x02f6d000      D:\Servers\SummarizerServer\native\platform37.dll
    0x4a800000 - 0x4a893000      D:\Servers\SummarizerServer\native\icuuc30.dll
    0x4ad00000 - 0x4b52d000      D:\Servers\SummarizerServer\native\icudt30.dll
    0x5b860000 - 0x5b8b5000      C:\WINDOWS\system32\NETAPI32.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\msvcrt.dll
    VM Arguments:
    jvm_args: -Djava.library.path=native
    java_command: com.sra.pipeline.servers.summarizer.JSummarizer
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06
    CLASSPATH=.;C:\Program Files\Java\jre1.6.0_06\lib\ext\QTJava.zip
    PATH=D:\Servers\SummarizerServer\native;C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT
    USERNAME=Jim Jones
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 7, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 3
    CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 2 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 1048032k(245796k free), swap 2521804k(1060880k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE (1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1
    time: Mon Sep 01 15:22:10 2008
    elapsed time: 0 seconds
    The dll I'm wrapping is C++ VC++ compiled.
    Would like to know what I do to trouble-shoot this error and hope to fix it?
    Jim

    Using Java print statement was able to show that the my JNI dll was being loaded and that the problem was in the first call to one of my JNI functions. Then by using "DebugBreak()" in that function and gradually moving it down line by line through the function was able to isolate the line causing the problem. Unfortunately it is the line where I call a function from the dll I'm wrapping. See newer thread.

Maybe you are looking for