Solved

How to run JspCBuild.xml in WebSphere Application server 6.0.2.41

Posted on 2010-08-13
4
1,137 Views
Last Modified: 2013-12-14
i modified batchcompiler.properties.default , i was running --> ant jspc2 , i get
bash: ant: command not found

where does ant reside in websphere, how can i set classpath in websphere for ant to run ant jspc2
0
Comment
Question by:wasman
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
AdminRAM earned 500 total points
ID: 33431729
Check this link

Using Ant to automate tasks

ws_ant.sh/bat (or ws_ant on i5/OS) is a wrapper around Apache Ant that sets up a WebSphere specific environment and includes classpath, WebSphere Ant tasks, and environment variables. It allows the same command line options as Apache Ant. For example, a simple invocation of a build file named myBuildFile.xml could be called as: ws_ant.sh -f myBuildFile.xml.

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.express.doc/info/exp/ae/tovr_ant.html
0
 

Author Comment

by:wasman
ID: 33432039
Here is what my problem is i was trying compile jsp using JspBatchCompiler.sh using below command


/opt/WebSphere/AppServer/bin/JspBatchCompiler.sh -enterpriseapp.name "market" -webmodule.name "water.war" -compileToWebInf false -cell.name "popCell" -node.name "jiji12" -server.name "driod_1"
This runs for 2 hours and that is too long,

I was planning to use JspCBuild.xml and batchcompiler.properties.default, and i modified batchcompiler.properties.default with all needed values, but when i run
./ws_ant -f JspCBuild.xml jspc2, i get

Buildfile: JspCBuild.xml

jspc2:
   [wsJspC] /usr/local/fisher/WebSphere/AppServer/bin/${was.home}/bin is not a valid directory

BUILD SUCCESSFUL
Total time: 2 seconds

<test>$ ./ws_ant -f JspCBuild.xml jspc2 -verbose
Apache Ant version 1.5.4 compiled on August 12 2003
Buildfile: JspCBuild.xml
Detected Java version: 1.4 in: /opt/WebSphere/AppServer/java/jre
Detected OS: SunOS
parsing buildfile JspCBuild.xml with URI = file:/opt/WebSphere/AppServer/bin/JspCBuild.xml
Project base dir set to: /opt/WebSphere/AppServer/bin
Build sequence for target `jspc2' is [jspc2]
Complete build sequence is [jspc2, jspc3, jspc1]

jspc2:
Property ${was.home} has not been set
Property ${app.name} has not been set
Property ${webmodule.name} has not been set
dropping /opt/WebSphere/AppServer/bin/${was.home}/properties from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/bootstrap.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/j2ee.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/lmproxy.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/urlprotocols.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/properties from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/bootstrap.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/j2ee.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/lmproxy.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/urlprotocols.jar from path as it doesn't exist
   [wsJspC] Executing '/opt/WebSphere/AppServer/java/jre/bin/java' with arguments:
   [wsJspC] '-Dfile.encoding=UTF-8'
   [wsJspC] '-Dws.output.encoding=console'
   [wsJspC] '-Dcom.ibm.CORBA.ConfigURL=file:/opt/WebSphere/AppServer/profiles/market/properties/sas.client.props'
   [wsJspC] '-Dcom.ibm.SOAP.ConfigURL=file:/opt/WebSphere/AppServer/profiles/market/properties/soap.client.props'
   [wsJspC] '-Dwebsphere.lib.dir=${was.home}/lib'
   [wsJspC] '-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager'
   [wsJspC] '-Djava.util.logging.configureByServer=true'
   [wsJspC] '-Dws.ext.dirs=/opt/WebSphere/AppServer/java/lib:${was.home}//classes:${was.home}//lib:${was.home}//installedChannels:${was.home}//lib/ext:${was.home}//web/help:${was.home}//deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime'
   [wsJspC] '-Dserver.root=/opt/WebSphere/AppServer/profiles/market'
   [wsJspC] '-Dwas.install.root=${was.home}'
   [wsJspC] '-Duser.install.root=/opt/WebSphere/AppServer/profiles/market'
   [wsJspC] '-Dwas.node.name=jiji2'
   [wsJspC] '-Dwas.cell.name='
   [wsJspC] '-Dwas.repository.root=/opt/WebSphere/AppServer/profiles/market/config'
   [wsJspC] '-Dcom.ibm.itp.location=${was.home}//deploytool/itp'
   [wsJspC] '-Xmx256M'
   [wsJspC] '-classpath'
   [wsJspC] '/opt/WebSphere/AppServer/java/lib/tools.jar'
   [wsJspC] 'com.ibm.ws.bootstrap.WSLauncher'
   [wsJspC] 'com.ibm.ws.jsp.tools.JspBatchCompiler'
   [wsJspC] '-config.root.hidden'
   [wsJspC] '/opt/WebSphere/AppServer/profiles/market/config'
   [wsJspC] '-cell.name.hidden'
   [wsJspC] 'CommerceCell'
   [wsJspC] '-node.name.hidden'
   [wsJspC] 'jiji1'
   [wsJspC] '-enterpriseapp.name'
   [wsJspC] '${app.name}'
   [wsJspC] '-webmodule.name'
   [wsJspC] '${webmodule.name}'
   [wsJspC] '-forceCompilation'
   [wsJspC] 'true'
   [wsJspC] '-keepgenerated'
   [wsJspC] 'true'
   [wsJspC] '-jspCompileClasspath'
   [wsJspC] ''
   [wsJspC] '-removeTempDir'
   [wsJspC] 'true'
   [wsJspC]
   [wsJspC] The ' characters around the executable and arguments are
   [wsJspC] not part of the command.
dropping /opt/WebSphere/AppServer/bin/${was.home}/properties from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/bootstrap.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/j2ee.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/lmproxy.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/urlprotocols.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/properties from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/bootstrap.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/j2ee.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/lmproxy.jar from path as it doesn't exist
dropping /opt/WebSphere/AppServer/bin/${was.home}/lib/urlprotocols.jar from path as it doesn't exist
   [wsJspC] /opt/WebSphere/AppServer/bin/${was.home}/bin is not a valid directory

BUILD SUCCESSFUL
Total time: 2 seconds


in order to run wsant -f JspCBuild.xml,  where do i need to give all the appname, webmodule name information ?




0
 

Author Comment

by:wasman
ID: 33433339
i figured out that....my next question is what will this buy me if in enable in ibm-web-ext.xmi file instaed of running jspBatchcompiler.sh
 cat ibm-web-ext.xmi
<?xml version="1.0" encoding="UTF-8"?>
<webappext:WebAppExtension defaultErrorPage="error.jsp"
    directoryBrowsingEnabled="false" fileServingEnabled="true"
    reloadInterval="0" reloadingEnabled="true"
    serveServletsByClassnameEnabled="false" xmi:id="WebApp_ID_Ext"
    xmi:version="2.0" xmlns:webappext="webappext.xmi" xmlns:xmi="http://www.omg.org/XMI">
    <webApp href="WEB-INF/web.xml#WebApp_ID"/>
    <extendedServlets xmi:id="ServletExtension_1">
        <extendedServlet href="WEB-INF/web.xml#Servlet_1"/>
    </extendedServlets>
    <jspAttributes name="keepgenerated" value="true" xmi:id="JSPAttribute_1"/>
    <jspAttributes name="jspCompileClasspath"
        value="lib/runtime.jar lib/distexcep.jar lib/ivjejb35.jar lib/dynacache.jar" xmi:id="JSPAttribute_1142629256734"/>
    <fileServingAttributes name="file.serving.patterns.deny"
        value=" WEB-INF/* META-INF/*" xmi:id="FileServingAttributes_1"/>
</webappext:WebAppExtension>
0
 

Author Closing Comment

by:wasman
ID: 33694887
no use
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Protect jar file - windows app 2 39
Usiing_selfsigned_ssl_certificate 5 94
struts spring hibernate example 12 108
servlet example 17 10
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now