JSPC compile JSP problems (Duplicate class name)

Hello,
I tried to use Ant1.5.1 to compile the JSP files.
I encountered the following problems:
if my webapp directory structure is as
$WEB_ROOT/index.jsp
$WEB_ROOT/folder1/index.jsp
I compile the JSP in Ant as following:
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath refid="run.classpath"/>
</taskdef>
<jasper2 verbose="0"
package="eric.test.jsp"
uriroot="${basedir}/myserv"
webXmlFragment="${basedir}/jsp/web.xml"
outputDir="${basedir}/jsp" />
The Jasper(JSPC) can't append the extra folder to the index_jsp.java
Both of the index.jsp that in the "ROOT" or in the "folder1" belongs to the same package "eric.test.jsp".
Therefore, when I compile the .java files, it just raised the Exception "Duplicate class declaration"
Best regards,
Eric

Hi Eric - did you manage to sort this problem out? I am trying to pre-compile my JSPs and I am having the same problem with duplicates classes.
What I don't understand is that if I don't pre-compile, and I allow Tomcat to compile the JSPs when they are accessed, it appears to create duplicate classes in the same package without any problems...?

Similar Messages

  • Duplicate class names under different multi match policies

    We've inherited an ACE SM 3.0 (A5.1a) config, where we noticed duplicate class names under different multi match policies, similar to this:
    policy-map multi-match POLICY1
       class CLASS1-cm
        loadbalance vip inservice
        loadbalance policy CLASS1-pm
        loadbalance vip icmp-reply active
    policy-map multi-match POLICY2
       class CLASS1-cm
        loadbalance vip inservice
        loadbalance policy CLASS1-pm
        loadbalance vip icmp-reply active
        appl-parameter http advanced-options HTTP-8K-HEADER
    How would the ACE know which multi match policy to use?
    Thanks.

    Hi,
    It's always first match. If if the first one satisfies the condition, we don't even look at the second. We would move on to another type. I guess below explanation would answer all your doubts.
    The term "multi-match" refers to execution semantics of the policy; In other words it depicts how the actions are executed for a given flow that matches the classifications in the policy.
    The policy has multi-match semantics because the policy allows configuring  multiple types of features like loadbalancing, NAT inspect etc; so potentially this policy can result in taking multiple actions (if multiple features are configured) for a given matching flow.
    Now given that there can be multiple classifications configured for the same feature type within the policy, the rule is that we always execute *only* the first matching action for a given feature type;
    for .eg consider the below;; just for brevity I am ommiting the exact syntax 
    of the cmds
    policy-map multi-match MYPOLICY
      class LB1
        loadbalance policy L7-1
        loadbalance vip inservice
      class NAT1
        nat dynamic 100 vlan 20
      class INSP1
        inspect http
      class LB2
        loadbalance policy L7-2
        loadbalance vip inservice
      class NAT2
        nat dynamic 200 vlan 30
    interface vlan 10
       service-policy input MYPOLICY
    please note above that there are 2 classes each with features loadbalance and 
    NAT configured and one class with inspect action; 
    For an incoming flow, we try to match and *execute* *ONLY* the action specified 
    against first matching class per feature. In otherwords, if flow matches class 
    LB1 then we will execute "loadbalance action L7-1" and we wont even try to see 
    if class LB2 matches as it is of the same feature type. Only if class LB1 does 
    not match we look at LB2.  However we continue matching other class'es since 
    they have different feature types;
    This happens for each feature type; Essentially between the class-maps of same 
    feature type think of this as first-match and across features its multiple match.
    potentially for above policy the flow can match the below possible classes:
    LB1, NAT1, INSP1
    LB2, NAT1, INSP1
    LB2, NAT2, INSP1
    LB1, NAT2, INSP1
    but the below is not possible;
    LB1, LB2, NAT1, INSP1
    LB2, NAT1, NAT2, INSP1
    you can visualize the above multi-match policy like below; (pls note that below 
    syntax is not supported and is strictly for illustration purposes only) below has 
    policy types per FEATURE and each such policy can result in ONLY ONE match/action 
    being executed;
    policy-map type SLB first-match LBPOLICY
      class LB1
        loadbalance policy L7-1
        loadbalance vip inservice
      class LB2
        loadbalance policy L7-2
        loadbalance vip inservice
    policy-map type NAT first-match NATPOLICY
      class NAT1
        nat dynamic 100 vlan 20
      class NAT2
        nat dynamic 200 vlan 30
    policy-map type inspect first-match INSPECTPOLICY
      class INSP1
        inspect http
    interface vlan 10
       service-policy input LBPOLICY
       service-policy input NATPOLICY
       service-policy input INSPECTPOLICY
    Regards,
    Kanwal
    Note: Please mark answers if they are helpful.

  • How to Compile Jsp File in Class File , Protect my JSP from outworld

    Hello Friends
    My name is chandra prakash, I'm new for u. I've develop a web based software completely in JSP, some files are also written in Java Script. This software have aprox. 40 files --> 30 in JSP + 2 in Java Script + 8 image files .
    Each JSP calls another. and run this on 58 clints machine simultaneusly. we used Oracle 9iAS as back end and Oracle9iAS web Server . Where we found less clients like 20-30 we use Tomcat 5.0 web server .Sir problem is this we don't wan't to leave our jsp source code on server.
    Is any method or third party tool by which we can convert our JSP source file in CLASS file as like real class files provide by javac.
    For this perpose we make a folder and put all files in it. Create a context on Tomcat for this folder.Create a data source for this in tomcat. Bcase this program uses Data source and connect many times to database & fetches many type of data from database. We use servlet files of tomcat for this context in WORK folder of Tomcat. and after that rename our Source file Folder. and again run our program through batch file i'm strange program runs 2-3 steps, after few times it start producing errors.
    Sir do u hava work on this field can u help me to protect this JSP source code.
    I've Use Jikes.com compiler but not get any succes, It may be i'm not using correctly .
    Pls sir give me any suggesition.
    Chandra prakash

    1. Highlight your web project or the individual file
    2. Right click
    3. Select Rebuild to build all jsp files or Make to rebuilt only changed files

  • JSP cannot load class from classpath

     

              Ken:
              I run into this problem yesterday too. I'm wondering if you have it resolved? Thank you very much!
              Lucy
              Ken Rimple <[email protected]> wrote:
              >All,
              >
              >I'm using 5.10 WLS, and have a jsp that is trying to access a class in a
              >package loaded in my java classpath. I'm using visual cafe expert
              >edition, and the class is part of the project classpath. To be safe,
              >I've also put it in the sc.ini file under CLASSPATH.
              >
              >The jsp keeps failing with the following error. Servlets I'm using
              >place these things in the HttpSession and are called before this page
              >and they work. I'm baffled, as I even tried the jspc compiler utility
              >adding the classes to the class path.
              >
              >Parsing of JSP File '/ShowResults.jsp' failed:
              >--------------------------------------------------------------------------------
              >
              > /ShowResults.jsp(4): Could not create a bean of type:
              >com.<companyname>.<software>.common.UserSession:
              >java.lang.ClassNotFoundException: class
              >com.<companyname>.<software>.common.UserSession :
              >java.lang.InstantiationException:
              >com/<companyname>/<software>/common/UserSession
              >probably occurred due to an error in /ShowResults.jsp line 4:
              ><jsp:useBean id="user_session" scope="session"
              >class="com.<companyname>.<software>.common.UserSession" />
              >--------------------------------------------------------------------------------
              >
              >(<companyname> and <software> are regular names. The file is in the
              >class path and is used by Servlets.
              >
              >It's almost as if the jsp compiler is ignoring any class paths.
              >
              >Please help if anyone has made this work. I'm stuck.
              >
              >Ken Rimple
              >
              >
              

  • Class name separated by "." eg: Line2D.Double

    Hello,
    Just starting to explore the Java2D tutorial I encounter probably a very basic problem: assigning class names. In the java.awt.geom. package I find several class names with a dot in it like "Line2D.Double". I tried just as an experiment to run an application with name "Dot.Test" . The compiler immediately points out an "{" is expected at the position of the dot. So actually I can not have a dot in a name. I am totally in the dark of this dot in class names now. Can anybody help me here.
    Thanks
    Pierre
    email: [email protected]

    The dot is probably a refrence to an inner class.
    Class test {
    class inner {
    Would be referenced by test.inner

  • Why not duplicate InnerClass name

    package1;
    public class OuterClass{
           public class InnerClass{
    public InnerClass(){
    System.out.println("THIS IS THE INNERCLASS OF THE OUTERCLASS");
    package2;
    import package1.OuterClass;
    public class ProtectedInner extends OuterClass{
    public static void main(String args[]){
    ProtectedInner p = new ProtectedInner ();
    p.method();
    public class InnerClass{   // SHOULDNT THIS INNER CLASS GIVE DUPLICATE CLASS NAME
    public InnerClass(){
    System.out.println("This in the Inner class in class ProtectedInner ");
    void method(){
         new InnerClass();
    }What happens to the above inner class in class ProtectedInner class, dosent it have to throw a duplicate class name , since OuterClass also the same class
    inner class "InnerClass" , and when extended to ProtectedInner, the InnerClass will be available automatically, now when i declare another.
    Does this InnerClass behave like a overridden method. Shouldnt it throw class declared twice.??? pls clarify..

    Please find the properly indented code
    package1;
    public class OuterClass{
           public class InnerClass
                      public InnerClass()
                            System.out.println("THIS IS THE INNERCLASS OF THE OUTERCLASS");
    package2;
    import package1.OuterClass;
    public class ProtectedInner extends OuterClass
           public static void main(String args[])
                ProtectedInner p = new ProtectedInner ();
                p.method();
           public class InnerClass{   // SHOULDNT THIS INNER CLASS GIVE DUPLICATE CLASS NAME
                 public InnerClass()
                      System.out.println("This in the Inner class in class ProtectedInner ");
                 void method()
                       new InnerClass();
    }I now hope you will be able to read it better

  • How to creat odjects with dynamivc class name

    hi i have a problem with class names. i have in my program one father class and a lot of extend classes in the father class. one of this classes is a test class. I want to create an object and the object class must be given dynamic from the keyboard and to be one of the extended classes. how i can do that

    It is possible to create an object of a class whose name is known at runtime (as above, the Class.forName() thing) but it's messy and complete overkill for what you are trying to do.
    These days when I have to distinguish a limited number of words (e.g. car, van,..) I use an enum. You can use MyEnum.valueOf(String name) to find the enum value from an input string, catch IllegalArgumentException to deal with an unmatched input.
    Try something like:
    public enum VehicleType {
        car { public Father create() { return new Car(); }},
        plane { public Father create() { return new Plane();} }.
          .. etc.
      public abstract Father create();
    try {
        Father vehicle = VehicleType.valueOf(vehicleTypeName.toLowerCase()).create();
      } catch(IllegalArgumentException ex) {
         System.out.println("Unknown type " + vehicleTypeName);
    }

  • Appending a _ in front of the jsp class name when using weblogic.jspc

     

    http://e-docs.bea.com/wls/docs60/jsp/reference.html
              java weblogic.jspc -d /weblogic/classes -keepgenerated primero.jsp
              "rb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > hi,
              >
              > i do
              >
              > java weblogic.jspc -d /weblogic/classes primero.jsp
              >
              > and it only is generated a _primero.class and do not appear
              > the .java ?
              >
              > what i do bad ?
              >
              > thanks for advance
              >
              >
              > Rodrigo Fonseca da Fonseca <[email protected]> wrote:
              > >Hi,
              > >
              > >I'm using weblogic.jspc to compile some jsp fiels. The compilation is
              > >complete and successfully, but the names of generated files .java and
              > >..class are strange.
              >
              >
              >
              > >
              > >For example, compiling a file named change_login_data.jsp, the resulting
              > >files are change95_login_95_data.java and
              > >change95_login_95_data.class. Compiling a file named buy.jsp, the
              > >resulting files are buy.java and buy.class (fine situation). Why???
              > >
              > >I'm using:
              > >
              > >java weblogic.jspc -d c:\jsp_result -classpath
              > >
              >
              >c:\weblogic\myserver\serverclasses;c:\weblogic\lib\weblogicaux.jar;c:\weblo
              gic\classes
              > >-compiler jikes.exe -J-verbose -keepgenerated -verbose
              > >change_login_data.jsp
              > >
              > >
              > >thanks
              > >Rodrigo
              > >
              > >
              > >
              > >Mark Spotswood wrote:
              > >>
              > >> The namespace for java class files is more restrictive
              > >> than for JSP files. We prepend these underscores so
              > >> that if, for example, someone names their JSP "1.jsp",
              > >> we get a class file with a legal name. We did consider
              > >> not doing this for files which started with characters
              > >> we kenw to be valid (in fact we may have put it in a
              > >> service pack), but later found that this was not sufficient
              > >> because its possible to name a jsp file something that
              > >> clashes with java keywords ("class.jsp" for example).
              > >> Rather than making the scheme even more complex,
              > >> we decided to go back to the original sheme of always
              > >> prepending the underscore.
              > >> --
              > >> mark
              > >>
              > >> Mika Moilanen wrote:
              > >>
              > >> > >>>>> "Shankar" == Shankar Roy <[email protected]> writes:
              > >> >
              > >> > Shankar> Problem seems to go away with weblogic510sp4.jar in
              compilation
              > >classpath.
              > >> > Shankar> Shankar.
              > >> >
              > >> > Shankar> Shankar Roy wrote:
              > >> >
              > >> > >> Hi,
              > >> > >> Can anyone tell why when I invoke weblogic.jspc the class file
              that
              > >is
              > >> > >> generated has a _ in front of the class name
              > >> > >>
              > >> > >> java -classpath
              > >> > >>
              >
              >/space/shankar/weblogic/lib/weblogicaux.jar:/space/shankar/weblogic/classes
              /boot:/space/shankar/weblogic/classes:/space/shankar/dev/dev/lib/activation.
              jar:/space/shankar/dev/dev/lib/classes12.zip:/space/shankar/dev/dev/lib/mail
              .jar:/space/shankar/dev/dev/lib/oroinc.jar:/usr/java/lib/classes.zip
              > >> > >> weblogic.jspc -package com.careassured.jsp -commentary login.jsp
              > >> > >>
              > >> > >> produces a class file by the name _login.class
              > >> > >>
              > >> > >> Thanks for any help pointers.
              > >> > >> Shankar.
              > >> >
              > >> > Not with WLS5.1 and weblogic510sp6.jar, we still get '_' prefixed
              > >> > classes...
              > >> >
              > >> > Actually we're suffering quite a lot because of this bug in
              > >> > weblogic.jspc. Are there any plans for fix?
              > >> >
              > >> > --
              > >> > Best Regards,
              > >> > Mika
              > >> > ----------------------------------------------------------
              > >> > [email protected] phone: +358-0-511-23587
              > >> > Nokia Networks, PO box 320, FIN-00045 NOKIA GROUP, Finland
              > >> > ----------------------------------------------------------
              >
              

  • Problems placing compiled jsp in the right directory

    I have problems placing compiled jsp in the right directory.
              - My document root is weblogic/myserver/public_html
              - My jsp's are placed in weblogic/myserver/public_html/ram/jsp.
              - My folder for placing compiled jsp is in weblogic/myserver/compiled_jsp.
              - When weblogic compiles my jsp it places them in
              weblogic/myserver/compiled_jsp/jsp_servlet/_ram/_jsp
              Now I want to compile ram1.jsp and place it in above directory. I tried the
              following but it does not place class correct.
              1: java weblogic.jspc -d C:\weblogic\myserver\compiled_jsp ram1.jsp
              **** Places the class in weblogic/myserver/compiled_jsp/jsp_servlet
              2: java weblogic.jspc -d
              C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp ram1.jsp
              C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp\jsp_servlet\_ram1.cl
              ass
              What am I doing wrong ?
              cheers Per
              

              I would try this...
              cd public_html
              java weblogic.jspc -prefix compiled_jsp ram/jsp/ram1.jsp
              I'm not sure if -prefix is the exact option - something like that - maybe package_prefix.
              As always, things work better/easier when you leave things at the default value
              (jsp_servlet).
              Mike
              "Per Lovdinger" <[email protected]> wrote:
              >I have problems placing compiled jsp in the right directory.
              >
              >- My document root is weblogic/myserver/public_html
              >- My jsp's are placed in weblogic/myserver/public_html/ram/jsp.
              >- My folder for placing compiled jsp is in weblogic/myserver/compiled_jsp.
              >
              >- When weblogic compiles my jsp it places them in
              >weblogic/myserver/compiled_jsp/jsp_servlet/_ram/_jsp
              >
              >Now I want to compile ram1.jsp and place it in above directory. I tried
              >the
              >following but it does not place class correct.
              >
              >1: java weblogic.jspc -d C:\weblogic\myserver\compiled_jsp ram1.jsp
              >**** Places the class in weblogic/myserver/compiled_jsp/jsp_servlet
              >
              >2: java weblogic.jspc -d
              >C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp ram1.jsp
              >****
              >C:\weblogic\myserver\compiled_jsp\jsp_servlet\_ram\_jsp\jsp_servlet\_ram1.cl
              >ass
              >
              >What am I doing wrong ?
              >
              >cheers Per
              >
              >
              

  • Problem with BPM workspace - Failed to compile JSP /bpmHome.jsff

    Hi
    I have instaled SOA Suite 11gR1 (11.1.1.5.0). All console woks, except bpm workspace. I have following error after login
    Incident Id: 3
    Incident Source: SYSTEM
    Create Time: Thu Sep 22 09:21:36 CEST 2011
    Problem Key: BEA-101017 [HTTP][weblogic.servlet.jsp.CompilationException]
    Application Name: OracleBPMWorkspace
    Error Message Id: BEA-101017
    Description
    Incident detected using watch rule "UncheckedException":
    Watch time:             2011-09-22 09:21:36 CEST
    Watch ServerName:       soa_server1
    Watch RuleType:         Log
    Watch Rule:             (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    Watch DomainName:       SOADomain
    Watch Data:
       DATE : 2011-09-22 09:21:36 CEST
       SERVER : soa_server1
       MESSAGE : [ServletContext@9413464[app:OracleBPMWorkspace module:/bpm/workspace path:/bpm/workspace spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@31c41d[
    GET /bpm/workspace/faces/jsf/worklist/worklist.jspx?_afrLoop=4649677285821&_afrWindowMode=0&_adf.ctrl-state=7b5s8pm1s_4 HTTP/1.1
    User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.2.13) Gecko/20101209 CentOS/3.6-2.el5.centos Firefox/3.6.13
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: pl,en-us;q=0.7,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Referer: http://localhost:8001/bpm/workspace/faces/jsf/worklist/worklist.jspx
    Cookie: JSESSIONID=XS3VT6hZBFLPZvqGZsnjQWnhgG06NTnDHMX9QY8Wbf1FvBZ4QYTK!-276213214
    ]] Root cause of ServletException.
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /bpmHome.jsff
    Exception occurred while processing '/home/kuba/Oracle/Middleware/user_projects/domains/SOADomain/servers/soa_server1/tmp/_WL_user/OracleBPMWorkspace/jx2oeu/war/bpmHome.jsff'java.lang.NullPointerException
         at weblogic.jsp.internal.jsp.JspParser.jspParse(JspParser.java:1092)
         at weblogic.jsp.internal.jsp.JspParser._parse(JspParser.java:604)
         at weblogic.jsp.internal.jsp.JspParser.parse(JspParser.java:597)
         at weblogic.jsp.internal.jsp.JspAnalyzer.parseFile(JspAnalyzer.java:104)
         at weblogic.jsp.internal.jsp.JspAnalyzer.parse(JspAnalyzer.java:92)
         at weblogic.jsp.internal.ProxySourceFile.parse(ProxySourceFile.java:106)
         at weblogic.jsp.internal.SourceFile.getAst(SourceFile.java:559)
         at weblogic.jsp.internal.SourceFile.getAst(SourceFile.java:533)
         at weblogic.jsp.internal.SourceFile.check(SourceFile.java:335)
         at weblogic.jsp.internal.ProxySourceFile.codeGen(ProxySourceFile.java:224)
         at weblogic.jsp.internal.SourceFile.codeGen(SourceFile.java:327)
         at weblogic.jsp.internal.client.ClientUtilsImpl$CodeGenJob.run(ClientUtilsImpl.java:599)
         at weblogic.jsp.internal.client.Job.performJob(Job.java:83)
         at weblogic.jsp.internal.client.ThreadPool$WorkerThread.run(ThreadPool.java:217)
         at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:226)
         at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:162)
         at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:256)
         at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:216)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:442)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:503)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at jsp_servlet._jsf._worklist.__worklist_jspx._jspx___tag27(__worklist_jspx.java:1265)
         at jsp_servlet._jsf._worklist.__worklist_jspx._jspx___tag26(__worklist_jspx.java:1232)
         at jsp_servlet._jsf._worklist.__worklist_jspx._jspx___tag14(__worklist_jspx.java:723)
         at jsp_servlet._jsf._worklist.__worklist_jspx._jspx___tag13(__worklist_jspx.java:673)
         at jsp_servlet._jsf._worklist.__worklist_jspx._jspService(__worklist_jspx.java:168)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
       SUBSYSTEM : HTTP
       USERID : <WLS Kernel>
       SEVERITY : Error
       THREAD : [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'
       MSGID : BEA-101017
       MACHINE : vm0-jpawlows.amg.net.pl
       TXID :
       CONTEXTID : 2910bfe82460a9b3:63a8fc67:1328fe13615:-8000-00000000000022a6
       TIMESTAMP : 1316676096720
    Diagnostic Dumps
    Name: jvm.threads
    Dump Files: jvm_threads13_i3.dmp
    Name: dms.metrics
    Dump Files: dms_metrics14_i3.dmp
    Name: odl.quicktrace
    Dump Files: odl_quicktrace15_i3.dmp
    Name: odl.logs
    Dump Arguments: ecid=2910bfe82460a9b3:63a8fc67:1328fe13615:-8000-00000000000022a6
    Dump Files: odl_logs16_i3.dmp
    Name: odl.logs
    Dump Arguments: timestamp=1316676096814
    Dump Files: odl_logs17_i3.dmp
    Name: wls.image
    Dump Files: diagnostic_image_soa_server1_2011_09_22_09_21_48.zipKuba

    Hi Kuba
    I guess you are getting this error in Linux Env and not Windows. Basically SOA/BPM opens lots of files (JARs and WARs) and I guess it do not close them properly. The root cause for your error is something else. Here is the fix. This should work.
    Login into the linux machine with the root user privileges. Or ask the person who have root privileges to do this. Basically you have to increase the open file limits to much bigger number like 8192.
    To change the open file limits, login as root and edit the /etc/security/limits.conf file. If the following lines are already there, just change the number to 8192. Otherwise add below 2 lines exactly. Means for all the users on this OS, the nofiles is set to 8192, instead of single user.
    * hard nofile 8192
    * soft nofile 8192
    after this, make sure to RESTART the Linux box. Otherwise changes will not get reflected.
    Login into unix box from any client and run this command and it should return 8192
    ulimit -n
    Then start the soa server and you should be all set. Let me know if this fixes your issue (I am hoping it should).
    Thanks
    Ravi Jegga

  • Problem while trying to execute Java class in JSP using  RunTime Class

    Hi,
    I want to execute a JAVA class through a JSP. For this I am using following code ....
    JSP (AAA.jsp) CODE ............
    try
    String[] cmd = new String[3];
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = "java -DPeBS_CONFIG_HOME=D:/CASLIntegration/PeBS/srcvob/PeBS/config Service_Statement_Application 22/May/2001 22/May/2003";
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1] + " " + cmd[2]);
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    catch (Throwable t)
    t.printStackTrace();
    StreamGobbler THread class Code ..........
    import java.util.*;
    import java.io.*;
    public class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    I have successfully compiled and placed the class file for the above class in JSP's servlet engine. However, when I execute the JSP through explorer Web Browser, I get following compile time error:
    An error occurred between lines: 36 and 86 in the jsp file: /casl/LocalApp/VehicleServiceStmt/AAA.jsp
    Generated servlet error:
    D:\Tomcat\work\localhost\_\casl\LocalApp\VehicleServiceStmt\AAA$jsp.java:118: No constructor matching StreamGobbler(java.io.InputStream, java.lang.String) found in class StreamGobbler.
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    ^
    An error occurred between lines: 36 and 86 in the jsp file: /casl/LocalApp/VehicleServiceStmt/AAA.jsp
    Generated servlet error:
    D:\Tomcat\work\localhost\_\casl\LocalApp\VehicleServiceStmt\AAA$jsp.java:121: No constructor matching StreamGobbler(java.io.InputStream, java.lang.String) found in class StreamGobbler.
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    I am unable to determine the reason of why the constructor which exists in the StreamGobbler Class is not recevied in JSP. If I try to write the same code in JSP as a JAVA class, keeping StreamGobler class same, the programme executes successfully.
    Please help me find solution to this at the earliest. Thanks in advance,
    Prachi

    Thanks,
    I got it working by making the constructor Public.
    -Prachi

  • Problems compiling jsp on Tomcat

    I am getting an error message when I try to run jsp files on the Tomcat server. It runs the txt files fine. Using the 8080 port. Any suggestions about what is going wrong? This is my first time to run jsp or Tomcat on this computer. Thank you. Sorry for the long error message.
    Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    error: Invalid class file format in C:\Program Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class).
    The major.minor version '49.0' is too recent for this tool to understand.
    C:\Program Files\Apache Tomcat 4.0\work\localhost\myapp\project3a$jsp.java:0: Class java.lang.
    Object not found in class javax.servlet.GenericServlet.
    package org.apache.jsp;
    ^
    2 errors, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Unknown Source)

    It looks like it is running multiple versions of Java.
    It looks like you are trying to run with java 1.5
    Check what your JAVA_HOME variable is set to
    Do you have any other versions of java installed on the machine?

  • Getting the class name from within the compiled class file

    hey!
    I was wondering (i know its possible) how to read a .class and get the name of the class. ok that made not much sense^^ so, You have a file: c:\f.class but it wont run because the file name has to be the same as the classes name, right? so how can you read the class file i guess in binary mode to receive the correct class name.
    I saw inside my f.class i have "realname.java" so i know now that the name of the class file should be realname.class, i tried ways to extract it from the class file but never had any success.
    i think i need to study english^^
    ps: i need this because i have some class files sent to me and the file names have been changed so they wont work, they only work when i open the class file in notepad and find out what its real name should be and then rename the file.
    Edited by: forgotmydamnpass on May 7, 2009 11:23 AM

    ah looks interesting, problem is i cant use it.. im prone to errors!
    import java.net.URLClassLoader;
    public class NewMain {
         * @param args the command line arguments
        public static void main(String[] args) {
            FileClassLoader loader = new FileClassLoader();
            Class clazz = loader.createclass("c:\\f.class");
            Method method = clazz.getName();
    }apparently "createclass" doesnt exist :/
    FileClassLoader = cannot find symbol
    Method = cannot find symbol

  • Problems compiling jsps using WLS6.1sp3 as Win2k service

    Two related issues:
    Issue #1:
    I'm encountering an error where the javac compiler cannot be found (when
    trying to compile jsps) when running as a Windows Service. JAVA_HOME is set
    in the profile and I'm passing in E:\bea\jdk131\bin in the extrapath
    parameter of beasvc.exe. The error I get is a file permission exception -
    unable to access (read) C:\WINNT\System32\javac. Question is - why is it
    looking there and not in JAVA_HOME? To try and isolate this, I've removed
    everything from the PATH and CLASSPATH environment variables except for
    E:\bea\jdk131\bin but to no avail.
    Issue #2:
    I've also tried hard-coding the location E:\bea\jdk131\bin\javac.exe into
    the config.xml and weblogic.xml. The error is then a file permission
    exception - unable to access (read) .\E:\bea\jdk131\bin\javac. Note the
    initial dot-slash... however, the weblogic.policy file is set to allow
    read,execute access for all files and directories below E:\bea (I've even
    tried to grant a permission to .\E:\....... but that didn't work either)
    Hope someone can help - it's been driving me nuts for a week now! What do I
    need to do to get Weblogic to find javac when running as a Windows Service?

    Hi Sudha
    Plese see the error in the starting post. Do u agree with me now? The server is looking for org.apache.jsp.techSupport_jsp class.
    Generated servlet error:
    [javac] Compiling 1 source file
    D:\MANTRA\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\M
    inEngine\localhost\JSPTechSupport\techSupport_jsp.java:
    2: cannot resolve symbol
    symbol : class TechSupportBean
    location: class org.apache.jsp.techSupport_jsp
    TechSupportBean techSupportBean = null;
    ^
    An error occurred at line: 2 in the jsp file:
    /techSupport.jsp
    Generated servlet error:
    D:\MANTRA\jboss-3.0.4_tomcat-4.1.12\tomcat-4.1.x\work\M
    inEngine\localhost\JSPTechSupport\techSupport_jsp.java:
    4: cannot resolve symbol
    symbol : class TechSupportBean
    location: class org.apache.jsp.techSupport_jsp
    techSupportBean = (TechSupportBean)
    rtBean) pageContext.getAttribute("techSupportBean",
    PageContext.APPLICATION_SCOPE);
    ^Take care.
    Hafizur Rahman
    SCJP

  • Jsp's class name

    Sorry that i'm new here.
    I want to connect the jsp and the database.
    How can i do that?
    what is the config of the system variable?
    what is the class name to invoke the driver?
    I'm using Oracle 10g in Window XP.
    and tomcat as the web server.
    THX~experts~!!

    A JDBC connection may be used as a JNDI resource.
    If the Connections-Navigator connection is DBConnection1, the corresponding datasource is jdbc/DBConnection1DS.
    1. Create a JSP page.
    2. In the web.xml of the JSP add
    <resource-ref>
    <res-ref-name>jdbc/DBConnection1DS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    3. In the JSP page obtain a connection with the datasource.
    InitialContext initialContext = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)initialContext.lookup("java:comp/env/jdbc/DBConnection1DS");
    java.sql.Connection conn = ds.getConnection();

Maybe you are looking for