Using weblogic.jspc

We are trying to use weblogic.jspc for precompiling the jsps in our application. Following the ANT task for doing the same.
          <target name="runJspc" depends="runAssembler">
               <path id="jspc.path.id">
                    <path refid="class.path"/>
                    <fileset dir="${weblogic.gws.app}/APP-INF">
                         <include name="**/*.jar"/>
                    </fileset>
               </path>     
          <java classname="weblogic.jspc" fork="yes" failonerror="yes">
                    <classpath refid="jspc.path.id"/>
                    <arg line="-webapp ${weblogic.gws.app}/web -compiler ${javac.exec} -classpath ${gws.cl} -compileAll -d ${weblogic.gws.app}/web/WEB-INF/classes -depend -k -keepgenerated -verbose -verboseJavac"/>
               </java>
          </target>
          For some reason, this target runs forever, without printing any logs or anthing. It simply hangs at "runJspc :".
          To dig into details, I modified the target as follows :
          <target name="runJspc" depends="prepare">
          <path id="jspc.path.id">
          <path refid="class.path"/>
          <fileset dir="${weblogic.gws.app}/APP-INF">
          <include name="**/*.jar"/>
          </fileset>
          <pathelement path="${weblogic.gws.app}/web/WEB-INF"/>
          </path>
          <java classname="weblogic.jspc" fork="yes" failonerror="yes">
          <classpath refid="jspc.path.id"/>
          <arg line="-d ${weblogic.gws.app}/web/WEB-INF/classes -classpath ${gws.cl} -compiler ${javac.exec}" />
          <arg value="-k" />
          <arg value="-compileAll" />
          <arg value="-depend" />
          <arg value="-verboseJavac" />
          <arg value="${weblogic.gws.app}/web/retail/jsp_app/home/ft_home.jsp"/>
          <jvmarg line="-Xms512m"/>
          <jvmarg line="-Xmx512m"/>
          </java>
          </target>
          Now it throws below error & stops.
          runJspc:
          [java] [jspc] warning: expected file /WEB-INF/web.xml not found, tag libraries cannot be resolved.
          [java] <Apr 14, 2005 11:49:19 AM PDT> <Warning> <HTTP> <BEA-101181> <Could not find web.xml under WEB-INF in the doc root: ..>
          Is there any way to resolve one of the above two problems ?

Hi Arun,
          It seems that in the second ant target, you decide to compile just a single jsp, while in the first you were trying to compile the complete jsps in a application.
          But in the second target, you forgot to mention -docroot / -webapp target. As a result, the specific error!!.
          To actually debug the first target, try running the program first on commandline , using weblogic.jspc directly passing the arguments.
          This way , you would have a better control over the target, and may be able to isolate the issue easily.

Similar Messages

  • Problem using weblogic.jspc with wls6.1

              I've got this error using weblogic.jspc on jsp that works fine with the compiler
              of 5.1, is this a bug?
              java.lang.NullPointerException
              at weblogic.management.Admin.getServer(Admin.java:1252)
              at weblogic.servlet.internal.dd.ServletEntityResolver.initServerMBean(ServletEntityResolver.java:69)
              at weblogic.servlet.internal.dd.ServletEntityResolver.resolveEntity(ServletEntityResolver.java:94)
              at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:749)
              at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:566)
              at weblogic.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1139)
              at weblogic.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2215)
              at weblogic.apache.xerces.framework.XMLDocumentScanner.access$0(Compiled
              Code)
              at weblogic.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(Compiled
              Code)
              at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
              Code)
              at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
              at weblogic.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:175)
              at weblogic.servlet.internal.dd.DescriptorLoader.parse(DescriptorLoader.java:311)
              at weblogic.servlet.internal.dd.DescriptorLoader.initializeWebXml(DescriptorLoader.java:327)
              at weblogic.servlet.internal.dd.DescriptorLoader.initialize(DescriptorLoader.java:242)
              at weblogic.servlet.internal.dd.DescriptorLoader.<init>(DescriptorLoader.java:176)
              at weblogic.servlet.internal.dd.DescriptorLoader.loadDescriptor(DescriptorLoader.java:396)
              at weblogic.jspc.runBodyInternal(Compiled Code)
              at weblogic.jspc.runBody(jspc.java:169)
              at weblogic.utils.compiler.Tool.run(Tool.java:79)
              at weblogic.jspc.main(Compiled Code)
              --------------- nested within: ------------------
              weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exception:
              [java.lang.NullPointerException]
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Error.<init>(Error.java:50)
              at weblogic.utils.NestedError.<init>(NestedError.java:24)
              

    Please post your full description. I can't see what you're replying to (must
              be too old).
              Alex
              "Gregory Chazalon" <[email protected]> wrote in message
              news:3c7383a8$[email protected]..
              > I've got te same problem (NullPointerException at the same line code in
              the same class). The most disturbing is that the weblogic.jspc works fine
              with wl6.1 SP2 but fails with wl6.1 SP1.
              >
              > Do you have a solution ? Can I download a CRXXXX.jar that fixes it ?
              >
              > I will appreciate any help.
              >
              

  • 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
              > >> > ----------------------------------------------------------
              >
              

  • Problem when using weblogic.jspc from an IDE

    I am trying to call JSPC from an IDE (as part of an Eclipse Builder). To optimize performance I want to avoid to spwan a new process. So I am trying to call weblogic.jspc's main method directly from the IDE. Everything works fine for simple simple pages.
              But when the page refers to a tag library with a tag providing a TagExtraInfo class, weblogic.jspc complains about the class not extending the TagExtraInfo base class although it does:
              Errors encountered while compiling 'D:\vrp-localdeploy\applications\wot\WOT' :
              Translation of /rentalcar/tiles/i18n/CarCapacityView.jsp failed: (line 17): Error in using tag library uri='/tags/i18n' prefix='i18n': For tag 'bundle', extra info class 'org.apache.taglibs.i18n.BundleTEI' does not extend javax.servlet.jsp.tagext.TagExtraInfo
              I could not figure out what exactly causes the problem. Using exactly the same settings workes just fine.
              Any suggestions?

    The full stack trace reads as follows:
              <p>
              Errors encountered while compiling 'D:\vrp-localdeploy\applications\wot\WOT' :
              <p>
              Translation of /common/include/i18n/definitions.inc failed: (line 17): Error in using tag library uri='/tags/i18n' prefix='i18n': For tag 'bundle', extra info class 'org.apache.taglibs.i18n.BundleTEI' does not extend javax.servlet.jsp.tagext.TagExtraInfo
              <br>
                   at weblogic.jspc.runJspc(jspc.java:559)
                   at weblogic.jspc.runBodyInternal(jspc.java:410)
                   at weblogic.jspc.runBody(jspc.java:319)
                   at weblogic.utils.compiler.Tool.run(Tool.java:146)
                   at weblogic.utils.compiler.Tool.run(Tool.java:103)
                   at weblogic.jspc.main(jspc.java:708)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.compileJSP(PresentationBuilder.java:1173)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.checkResource(PresentationBuilder.java:718)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder$PresentationDeltaVisitor.visit(PresentationBuilder.java:102)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:77)
                   at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.incrementalBuild(PresentationBuilder.java:1268)
                   at tui.vrp.tools.presentation.builder.PresentationBuilder.build(PresentationBuilder.java:677)
                   at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:593)
                   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
                   at org.eclipse.core.runtime.Platform.run(Platform.java:783)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:168)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:202)
                   at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:231)
                   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
                   at org.eclipse.core.runtime.Platform.run(Platform.java:783)
                   at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:234)
                   at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:253)
                   at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:282)
                   at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:139)
                   at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:200)
                   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
              <p>
              Unfortunately it doesn't really give any real reason - it is a general piece of code in jspc to report problems.
              <p>
              But I dug a lot bit deeper into the code and realized that the original problem is a ClassCastException in line 1290 of class StandardTagLib, which reads as follows:
              <p>
                   tagextrainfo = (TagExtraInfo)Beans.instantiate(classloader, s3);
              <p>
              This looks quite obvious that the class named by s3 simply is no extension of TagExtraInfo, but unfortunately the only class with that name being referenced by the class path does extend this class. I wondered what the problem might be and came up with the following answer:
              <p>
              The class of the bean instantiated by Beans.instantiate extends a class with the name "javax.servlet.jsp.tagext.TagExtraInfo" which is cast to another class with exactly <b>the same name, but a different class loader</b>. Since neither of the class loaders is parent of the other one, both classes are not considered being the same class although they have the same name. Sounds weird, but exactly this is the problem!
              <p>
              Where does it come from and why it works fine when the tool is executed in a separate thread or on the console?
              <p>
              From my understanding the problem is caused in line 395 of the class weblogic.jspc:
              <p>
                   GenericClassLoader genericclassloader = new GenericClassLoader(classpathclassfinder);
              <p>
              This line of code creates a class loader not knowing a parent class loader by which the class weblogic.jspc was loaded. All classes weblogic.jspc is using or calling will be loader by either the same or a parent class loader - this is important to understand. Since TagExtraInfo is directly referenced by StandardTagLib one instance of the class object (the object of type class) will be generated and linked when the class StandardTagLib is instantiated for the first time by the class loader which loaded weblogic.jspc (or by its parent). This is consequence which can not be avoided.
              <p>
              But now look at line 1290 of class StandardTagLib: It explicitly requests the class to be loaded by the GenericClassLoader instantiated in line 395 of the class weblogic.jspc. This class loader, off course, is not aware of the same class just being loaded by another class loader since it has no knowledge of it. It simply creates a fresh copy of the class object, which only differs in the reference to the class loader which created this class object.
              <p>
              Actually, I figured that the following line of code replacing the upper one, would resolve the problem:
              <p>
              GenericClassLoader genericclassloader = new GenericClassLoader(classpathclassfinder, this.getClass().getClassLoader());
              <p>
              Doing this, the GenericClassLoader would know its logical parent by reference and would implicitly - thanks to the implementation of java.lang.ClassLoader - try to find the class using its parent first, would find a valid class, and hence use the same instance of the class object instantiated by the parent class loader. The problem would be solved.
              <p>
              It works fine in the console or under a running application server, because they will always have the weblogic jar in their system class path. ClassLoaders not having a parent are implied to have the system class loader as their parent - the piece of code does work in this case.
              <p>
              Under Eclipse this is no option, off course. We would restrain us to exactly this version of the APIs used by the weblogic version in the system class path.
              <p>
              I was trying to patch this myself by extending weblogic.jspc by my own class to pass on a proper class loader knowing its parent, and I was sort of successful: The problem disappeared. But I can't gain exactly what I am looking for, because the method runJspc with four parameters (around line 447) of weblogic.jspc is private to the class and its public brother always passes true to this method as the fourth parameter - causing jspc to recompile all JSPs instead of just the requested ones.
              <p>
              Everything refers to WL81SP3.
              <p>
              That's were I got stuck currently. I have read some postings about this problem in the internet - some dating far back into the history. So, I have the impression that there have been some folks around with the same problem. I think the patch I suggested does not any harm and I could simply use jspc in my builder without any problems.
              <p>
              Regards,
              <p>
              Elmar Schwarz

  • Precompiling JSPs using weblogic.jspc

    Hello,
    My question has more to do with getting the Weblogic precompiler to understand <%@ include file="myFilejsp" %> directives.
    Test scenario:
    In our application, we have used a common JSP page say 'commonJSP' as a header and have included 'commonJSP' in all our other JSP pages.
    Suppose my commonJSP is like this:
    <%
    String hello= "Hello";
    %>
    and suppose my index.jsp is like this
    <%@ include file="commonJSP" %>
    <%
    System.out.println(hello);
    %>
    Now when I serve index.jsp to clients it compiles correctly because the commonJSP is included in the source before compiling.
    HOWEVER, when precompiling the JSPs in my web application using the <java weblogic.jspc ..> tag in my ant build file, I am getting errors on compiling index.jsp that 'hello' cannot be resolved.
    When using the WebLogic JSP compiler, is there any way to tell the compiler to not treat JSP pages as individual 'servlet' classes but look at the 'big picture'?

    Anybody ?

  • Error Using weblogic.jspc --- java.lang.ExceptionInInitializerError

    Hi,
              I am trying to use the weblogic.jspc compiler to pre-compile my jsp
              files so that I can verify that they compile w/o having to visit the
              page. I am using Weblogic 4.5.1. I am encountering the following
              error:
              java.lang.ExceptionInInitializerError
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Error.<init>(Compiled Code)
              at java.lang.LinkageError.<init>(Compiled Code)
              at java.lang.ExceptionInInitializerError.<init>(Compiled Code)
              at java.beans.Beans.instantiate(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.processBeanTag(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.mXML_OPEN_USEBEAN(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.mXML_THING(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.mTOKEN(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.nextToken(Compiled Code)
              at weblogic.servlet.jsp.JspLexer.parse(Compiled Code)
              at weblogic.servlet.jsp.JspParser.doit(Compiled Code)
              at weblogic.servlet.jsp.JspParser.parse(Compiled Code)
              at weblogic.servlet.jhtmlc.Jhtml2Java$Output.setSourceFile(Compiled
              Code)
              at weblogic.servlet.jhtmlc.Jhtml2Java.outputs(Compiled Code)
              at weblogic.utils.compiler.CodeGenerator.generate(Compiled Code)
              at weblogic.jhtmlc.runBody(Compiled Code)
              at weblogic.jspc.runBody(Compiled Code)
              at weblogic.utils.compiler.Tool.run(Compiled Code)
              at weblogic.jspc.main(Compiled Code)
              Have any of you seen this? Can you tell me what I am doing wrong
              (Classpath, etc.)?
              Any and all help would be greatly appreciated.
              The command line I am using is:
              java -verbose -classpath
              $CLASSPATH:/apps/weblogic/license:/apps/weblogic/classes:/apps/weblogic/lib/weblogicaux.jar
              weblogic.jspc -d $HOME/weblogic/myserver/classfiles/examples
              100-Welcome.jsp
              Regards,
              Richard
              

    Fixed with a patch CR0737797 and CR062538 for the 6.1 sp3 source line
              Prasanna Yalam

  • How to use weblogic.jspc -J option

    Can anyone give me an example on how to use the
              weblogic.jspc -J option? Specifically, I want
              my "-compilerclass" to use a system property
              which will be specified on the command line.
              For example:
              java ... weblogic.jspc ... -compilerclass MyCompilerClass -Dmy.text="hello world"
              or something to that effect.
              Gary F.
              Fast Track Systems, Inc.
              

    -J only seems to work for -X-style arguments to the VM, i.e. you can say
              "-Jms64m".
              -compiler has been broken for a while (see my other post in this group on
              that).
              anders
              "Gary Fong" <[email protected]> wrote in message
              news:[email protected]..
              > Can anyone give me an example on how to use the
              > weblogic.jspc -J option? Specifically, I want
              > my "-compilerclass" to use a system property
              > which will be specified on the command line.
              >
              > For example:
              >
              > java ... weblogic.jspc ... -compilerclass
              MyCompilerClass -Dmy.text="hello world"
              >
              > or something to that effect.
              > --
              > Gary F.
              > Fast Track Systems, Inc.
              

  • Java.io.IOException using weblogic.jspc

    I've seen a number of similar questions on this but no answers. Can
              anyone provide some insight?
              I have a JSP containing a custom tag library that compiles and executes
              successfully when deployed as a war file under wls 5.1 sp8 but running
              the weblogic.jspc compiler from the command line produces a
              java.io.IOException: cannot resolve '/WEB-INF/tlds/struts-template.tld'
              into a valid tag library.
              The web.xml file includes:
              <taglib>
              <taglib-uri>/WEB-INF/tlds/struts-template.tld</taglib-uri>
              <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location>
              </taglib>
              The command I'm using is:
              java -Dweblogic.home=/opt/weblogic
              weblogic.jspc
              -d /home/wmeier/java/StrutsTemplate/build/jsp
              -docroot /home/wmeier/java/StrutsTemplate/web
              -contextPath StrutsTemplate
              -encoding default
              -keepgenerated
              -g
              introduction.jsp
              I can get the jsp compiler to work when I change the taglib uri
              declaration from
              <%@ taglib uri='/WEB-INF/tlds/struts-template.tld'...
              to
              <%@ taglib uri='/tlds/struts-template.tld'
              This modified uri also works as a war file under WebLogic but fails
              under the Tomcat 3.2 reference implementation.
              Does anyone have any ideas how I can get the compiler to work without
              hacking the taglib uri?
              Thanks,
              Bill Meier
              

    CeciNEstPasUnProgrammeur wrote:
    Hm, well... the API docs say for non-existing files you get an IllegalArgumentException, and IOException is for "no application registered" or "application won't start"...
    Just a guess: is the firewall blocking the execution?I don't think it is a fire wall issue since everything runs on the same machine (the file is created and invoked on the same machine)
    Any other ideas?

  • How to specify encoding=gb2312 when using weblogc.jspc?

    Hi,
              I have tried to compile jsp pages using weblogic.jspc, but found out
              that I can not get the same result as compiling on the fly.
              When compiling on the fly, I can find these in the generated java source:
              out = pageContext.getOut();
              ((weblogic.servlet.jsp.JspWriterImpl)out).setEncoding("gb2312");
              response.setHeader("Content-Type", "text/html; charset=gb2312");
              HttpSession session = request.getSession(true);
              But when compiling with weblogic.jspc, I can only find these:
              out = pageContext.getOut();
              HttpSession session = request.getSession(true);
              In my weblogic.properties file, I have this:
              weblogic.httpd.initArgs.*.jsp=\
              pageCheckSeconds=2,\
              compileCommand=c:/jdk1.3/bin/javac.exe,\
              workingDir=c:/Develop/weblogic/myserver/classfiles,\
              keepgenerated=true,\
              encoding=gb2312,\
              verbose=true
              And the command line to compile manually is:
              java weblogic.jspc -verbose -verboseJavac -compiler
              c:\jdk1.3\bin\javac.exe -d ../classfiles -keepgenerated -encoding "gb2312"
              MY_JSP_NAME.jsp
              That seems to be caused by that weblogic.jspc can not get encoding parameter
              correctly,
              can anybody tell me why?
              

    term is not a http address, but a directory address. So, you have to specify the path on the server:
    term=c:\oracle\forms90\.....

  • Weblogic.jspc munging the package name

    I am precompiling the JSPs during our build using weblogic.jspc but I find
              that it is
              munging the package names when it generates the .java file.
              For example, instead of the expected package name:
              jsp_servlet._envoy._administration._config
              I get:
              jsp_servlet._d.__46__46_.__46__46_._envoy._src._jsp._envoy._administration._
              config;
              How can I get the compiler to not munge the names? Why is it doing this?
              (I'm using weblogic 5.1 sp 6)
              Thanks,
              Dhananjay
              [email protected]
              

              Get WLS 5.1, SP10
              Did you specify the file name like
              ../../../envoy/administration/config.jsp ?
              Don't.
              Mike
              "Dhananjay Ragade" <[email protected]> wrote:
              >I am precompiling the JSPs during our build using weblogic.jspc but I
              >find
              >that it is
              >munging the package names when it generates the .java file.
              >
              >For example, instead of the expected package name:
              > jsp_servlet._envoy._administration._config
              >I get:
              >
              >jsp_servlet._d.__46__46_.__46__46_._envoy._src._jsp._envoy._administration._
              >config;
              >
              >How can I get the compiler to not munge the names? Why is it doing this?
              >(I'm using weblogic 5.1 sp 6)
              >
              >Thanks,
              >Dhananjay
              >[email protected]
              >
              >
              >
              >
              

  • Weblogic.jspc outofmemory error while compiling jsps using ant in eclipse

    Hi all,
    I am trying to execute this target in my ant build:
         <target name="jspc">
              <java classname="weblogic.jspc" fork="yes">
                   <arg line="-verbose -verboseJavac -compileAll -webapp ${project.jsp.dir} -d ${project.jsp.class.dir}" />
                   <classpath>
                        <pathelement path="${classpath}" />
                   </classpath>
         </java>
         </target>
    I am getting the following error:
    [java] Error: [jspc]: 0 file(s) failed:
    [java] [Compilation errors : ]
    [java] The system is out of resources.
    [java] Consult the following stack trace for details.
    [java] java.lang.OutOfMemoryError
    [java] at weblogic.jspc.doCompile(jspc.java:861)
    [java] at weblogic.jspc.runJspc(jspc.java:654)
    [java] at weblogic.jspc.runBodyInternal(jspc.java:412)
    [java] at weblogic.jspc.runBody(jspc.java:319)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:192)
    I am using weblogic 8.1, eclipse3.1, java1.4.1.
    Can some one please help me with this issue?
    thanks in advance.

    --> some error on posting please refer to the next post...
    From the error logs we can trace it out to the web project's Build.xml file ....I was getting a similar error and by commenting out the following lines in the web project's Build.xml I am able to run the build script correctly and get a EAR file. The lines are
    <!--
    <assemble
    moduleDir="${generated.module.root}"
    moduleName="${project.name}"
    srcOutputDir="${assembly.src}"
    appRootDir="${ear.root}">
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.WebAppAssemblyContext$Factory" />
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.AppAssemblyContext$Factory" />
    <classpath refid="assembly.classpath" />
    <fileset dir="${project.dir}">
    <include name="**/*.controls.properties" />
    </fileset>
    </assemble>
         -->
    Please check it now, also if any one can let us know the function or role played by the above lines it would be great. Also if there would be any future or unseen problems by commenting out these lines please do let us know...
    Thanks
    -MiM
    Edited by prodigymonish83 at 10/22/2007 5:56 AM

  • Wls 8.1 sp2: weblogic.jspc complains about struts-html tags

              Hi,
              I am trying to compile jsps with weblogic.jspc, which use struts' html tags. However,
              the compilation fails with the following message:
              [java] Translation of /views/viewPageBody.jsp failed: (line 3): Error in using
              tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              has no setter method corresponding to TLD declared attribute 'server', (JSP 1.1
              spec, 5.4.1)
              I opened the BaseTag class from the struts jar and found the setter exists for
              the attribute 'server' of html tld. So does the property 'server'. The property
              'server' is a string and the parameter in the setter is a string. I read about
              the jspc errors in wls 8.1 about the setter parameter being of different type
              than the property. However, that is not the case here. I tried using both Sun's
              and BEA's jdk. None of them help. Btw, there is another attribute mentioned in
              the html tld, which is 'target'. The compiler doesn't complain yet about this.:(
              Also, I happened to compile other apps which have struts logic tags.
              My environment:
              OS: Win2k sp3
              WLS: 8.1 sp2
              JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              without any mention supports only ant 1.5.3.)
              I would appreciate any help in this regard.
              Thanks,
              Abbas
              

              What version of Struts are you trying to use?
              Are you certain you're not encountering a different instance of that class in
              an unexpected location in your classpath?
              "Abbas" <[email protected]> wrote:
              >
              >Hi,
              >I am trying to compile jsps with weblogic.jspc, which use struts' html
              >tags. However,
              >the compilation fails with the following message:
              >
              >[java] Translation of /views/viewPageBody.jsp failed: (line 3): Error
              >in using
              >tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              >has no setter method corresponding to TLD declared attribute 'server',
              >(JSP 1.1
              >spec, 5.4.1)
              >
              >I opened the BaseTag class from the struts jar and found the setter exists
              >for
              >the attribute 'server' of html tld. So does the property 'server'. The
              >property
              >'server' is a string and the parameter in the setter is a string. I read
              >about
              >the jspc errors in wls 8.1 about the setter parameter being of different
              >type
              >than the property. However, that is not the case here. I tried using
              >both Sun's
              >and BEA's jdk. None of them help. Btw, there is another attribute mentioned
              >in
              >the html tld, which is 'target'. The compiler doesn't complain yet about
              >this.:(
              >Also, I happened to compile other apps which have struts logic tags.
              >
              >
              >My environment:
              >OS: Win2k sp3
              >WLS: 8.1 sp2
              >JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              >Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              >without any mention supports only ant 1.5.3.)
              >
              >I would appreciate any help in this regard.
              >
              >Thanks,
              >
              >Abbas
              

  • Weblogic jspc

    Hi,
    Version: Weblogic 8.1 SP3.
    OS: Sun Solaris.
    I have a requirement wherein I need to be able to compile a jsp as part of a batch job. I read the docs at http://e-docs.bea.com/wls/docs81/jsp/reference.html#65756/ and was hoping to use the java weblogic.jspc command.
    However I am always thrown the "Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/jspc".
    I am not certain what I am doing wrong. Would appreciate any help. Do I have to modify the CLASSPATH settings in startweblogic.sh for this?
    One other question. (this I can answer by trial and error if I get the answer to above..)
    Do I have to include the CLASSPATH which I have already specified in startweblogic.sh when I use the java weblogic.jspc command?
    Thanks a ton.
    Shikhar

    It's me again... Now I am running into a different issues... have posted the command executed and the output.. Any help is appreciated...
    Thanks
    Shikhar
    C:\bea\user_projects\domains\demodomain>java -Dweblogic.jsp.windows.caseSensitiv
    e=true -classpath C:\bea\weblogic81\server\lib\weblogic.jar; weblogic.jspc -verb
    oseJspc C:\bea\user_projects\domains\demodomain\demo\stage\Vignette_Portal\porta
    l.war\global1\jsp\alertsEmail.jsp
    [jspc] warning: expected file /WEB-INF/web.xml not found, tag libraries cannot
    be resolved.
    <Oct 20, 2005 12:10:56 PM CDT> <Warning> <HTTP> <BEA-101181> <Could not find web
    .xml under WEB-INF in the doc root: ..>
    [jspc] parsing /demo/stage/Vignette_Portal/portal.war/global1/jsp/alertsEmail.js
    p:
    [jspc] parsed .\demo\stage\Vignette_Portal\portal.war\global1\jsp\alertsEmail.js
    p in 1002 ms.
    [jspc] generated java file C:\bea\user_projects\domains\demodomain\__alertsEmail
    .java
    [jspc] Invoking the compiler with -encoding UTF-8
    Compiler class: 'com.sun.tools.javac.Main', not found
    java.lang.ClassNotFoundException: com.sun.tools.javac.Main
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvo
    ker.java:406)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
    328)
    at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
    336)
    at weblogic.jspc.doCompile(jspc.java:823)
    at weblogic.jspc.runJspc(jspc.java:632)
    at weblogic.jspc.runBodyInternal(jspc.java:410)
    at weblogic.jspc.runBody(jspc.java:319)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.jspc.main(jspc.java:708)
    Error: [jspc]: 0 file(s) failed:
    Exception in thread "main"
    [Compilation errors : ]
    at weblogic.jspc.doCompile(jspc.java:839)
    at weblogic.jspc.runJspc(jspc.java:632)
    at weblogic.jspc.runBodyInternal(jspc.java:410)
    at weblogic.jspc.runBody(jspc.java:319)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.jspc.main(jspc.java:708)
    java.lang.Exception: [Compilation errors : ]
    at weblogic.jspc.doCompile(jspc.java:842)
    at weblogic.jspc.runJspc(jspc.java:632)
    at weblogic.jspc.runBodyInternal(jspc.java:410)
    at weblogic.jspc.runBody(jspc.java:319)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.jspc.main(jspc.java:708)
    C:\bea\user_projects\domains\demodomain>

  • Compile command weblogic.jspc

    G'day,
              I am trying to manually compile a jsp in windows nt using the "java
              weblogic.jspc" command.
              However, I get the error "classdef not found" or something similiar.
              My question is, where do I find the weblogic.jspc class so that I can
              add it to my PATH ??
              Any help would be appreciated
              Cheers
              Glenn Torepe
              

              If you installed a service pack, make sure the weblogic510sp*.jar in front of the CLASSPATH.
              Jong
              Dimitri Rakitine <[email protected]> wrote:
              >Run setEnv.cmd (ot setEnv.sh) script from your
              >weblogic home directory.
              >
              >Ian Grosvenor <[email protected]> wrote:
              >> G'day,
              >
              >> I am trying to manually compile a jsp in windows nt using the "java
              >> weblogic.jspc" command.
              >
              >> However, I get the error "classdef not found" or something similiar.
              >
              >> My question is, where do I find the weblogic.jspc class so that I can
              >> add it to my PATH ??
              >
              >> Any help would be appreciated
              >
              >> Cheers
              >
              >> Glenn Torepe
              >
              >Dimitri
              

  • Weblogic.jspc problems

    I have a quick question I want to set up jspc to run from my ide (I use Kawa).
              Its pretty simple to do and has worked great until 5.0 came out.
              I'm using :
              <pre>
              c:\jdk1.3\bin\java -cp
              c:\weblogic\lib\weblogic510sp5.jar;c:\weblogic\classes;c:\weblogic\lib\weblogicaux.jar%classpath%
              weblogic.jspc -verbose -verboseJavac -docroot
              c:/weblogic/myserver/public_html/4c/site -d C:\weblogic\myserver\servletclasses
              -keepgenerated -classpath
              c:\weblogic\lib\weblogic510sp5.jar;c:\weblogic\classes;%classpath%
              c:\weblogic\myserver\public_html\4c\site\Join\Join.jsp
              reports:
              [jspc] parsing C:\weblogic\myserver\public_html\4c\site\Join\Join.jsp: [jspc]
              parsed C:\weblogic\myserver\public_html\4c\site\Join\Join.jsp in 1833 ms. [jspc]
              generated java file
              C:\weblogic\myserver\servletclasses\jsp_servlet\_join\_join.java, invoking java
              compiler: Exec failed .. exiting Process Exit...
              </pre>
              When there are no problems, it still works, however if there are errors I get:
              Exec failed .. exiting Process Exit...
              Any clues?
              Thanks.
              Russell
              

    I have a quick question I want to set up jspc to run from my ide (I use Kawa).
              Its pretty simple to do and has worked great until 5.0 came out.
              I'm using :
              <pre>
              c:\jdk1.3\bin\java -cp
              c:\weblogic\lib\weblogic510sp5.jar;c:\weblogic\classes;c:\weblogic\lib\weblogicaux.jar%classpath%
              weblogic.jspc -verbose -verboseJavac -docroot
              c:/weblogic/myserver/public_html/4c/site -d C:\weblogic\myserver\servletclasses
              -keepgenerated -classpath
              c:\weblogic\lib\weblogic510sp5.jar;c:\weblogic\classes;%classpath%
              c:\weblogic\myserver\public_html\4c\site\Join\Join.jsp
              reports:
              [jspc] parsing C:\weblogic\myserver\public_html\4c\site\Join\Join.jsp: [jspc]
              parsed C:\weblogic\myserver\public_html\4c\site\Join\Join.jsp in 1833 ms. [jspc]
              generated java file
              C:\weblogic\myserver\servletclasses\jsp_servlet\_join\_join.java, invoking java
              compiler: Exec failed .. exiting Process Exit...
              </pre>
              When there are no problems, it still works, however if there are errors I get:
              Exec failed .. exiting Process Exit...
              Any clues?
              Thanks.
              Russell
              

Maybe you are looking for

  • Deployment OBIEE10g on UNIX HP-UX

    Hi Guys, I have the following case, and i want your help. I have developed OBI repository on Windows 32-bit, and i upload the repository on UNIX server HP-UX 64-bit, when i tried to access BI Answer, and try to retrieve a simple report, i meet the fo

  • Photoshop - Known Issues

    I know there are some, but I can't find the list... Here's my list: Photoshop CS3 on Vista Home Premium 1. When holding down the shift key and clicking near the edge of the screen with a paint/clone/repair brush, the screen jumps to another area of t

  • Calling PL\SQL procedures

    What's the best way to invoke a PL\SQL procedure using Java? I am hoping to use the values passed from the JSP into the database for computations but don't know how to call the procedure after the commit. Any ideas? Thanks a lot!

  • Retrieving AttributeSet from PlainDocument

    In looking at the composition of javax.swing.text.Element and the Document and AttributeSet interfaces - it appears as if I should be able to retrieve an AttributeSet that was assigned to a particular location when a string is inserted into a Documen

  • Special Character For Equipment Number

    Hi Experts, Need a solution  to provide equipment number with special charater  System does not support with internal & external number range for special character. Thannks... Ramesh