Building with Ant

Hi,
I try to build my application using Ant. Here is the fragment
from build.xml:
<java jar="${flex.mxmlc.jar}" fork="true">
<arg line="-file-specs ${src.dir}/${app.name}.mxml"/>
<arg line="-load-config ${flex.dist.config}"/>
</java>
When I run this, I get this error:
[java] command line: Error: default arguments may not be
interspersed with other options
[java] Use 'mxmlc -help' for information about using the
command line.
When I do not use "-load-config" option, I get following:
[java] defaults: Error: unable to open './flex-config.xml'
What is wrong?
Thanks.
.Vlad.

I wasn't able to reproduce the first error you got. But the
second error happens for me.
Somehow, invoking mxmlc.jar from a directory other than the
flex frameworks directory leads to an error where it's looking for
files relative to flex frameworks.
I got around this by specifying a dir to invoke the VM in.
i.e
<property name="flex.dir" value="c:\flex\sdk" />
<property name="flex.mxmlc.jar"
value="${flex.dir}/lib\mxmlc.jar" />
<java jar="${flex.mxmlc.jar}" dir="${flex.dir}/frameworks"
fork="true">
<arg line="-file-specs ${src.dir}/${app.name}.mxml"/>
</java>

Similar Messages

  • Problem building with ant

    Hi all,
    For some reason i get the following error message when trying to build any of the code in the j2ee tutorial.
    C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application. Choose 'close' to terminate the application
    If anyone has any ideas as to why this happens, any help would be much appreciated.
    thanks

    i'm using windows xp pro. i have actually sorted that problem out by replacing ant 1.3 with ant 1.5
    I now have another error message. When i try to run the application client with the foolowing command:
    C:\forte4j\j2sdkee1.3\bin>runclient client \examples\ears\SavingsAccountApp.ear -name SavingsAccountClient -textauth
    I get the following
    Initiating login ...
    Username = null
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Application threw an exception:java.lang.NoClassDefFoundError: SavingsAccountHome
    Unbinding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Not sure why i am getting the exception.

  • Build with ant in a new way

    Hello everyone,
    I'm not sure if the title is proper, but I have a project to upgrade to weblogic 10, along with the upgrade I'm going to enhance the build files. Currently we have 450 ant file. There are many dependencies and all build files have hardcoded paths such "c:\sourcecode ...". Our application is about 6000000 lOC. Anyway, my job is to replace these paths with properties and change some old ant tasks.
    You now imagine what I'm going to go through. Obviously, I need to edit 450 (can build tool for that) and do check in and out. Then test to make sure I didn't missed up with the dependency.
    I'm no expert in ANT but we did some evaluation to ANT, Maven, Jam and we found ANT is the best fit for our environment because we have some structuring issues.
    While working I have got this idea, however I'm not sure if it's the best, so I hope you can help here and give me your advice.
    I will create a utilityBuild.xml. This ant file will contain the entire tasks we perform in all the 450. Rest of 450 ant will perform call to this utilityBuild.xml whenever it needs to do something e.g .
    {color:#008000}<!-- Create Jar file of the classes in the ${tempdir} and then apply appc compilation on them-->{color}
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="appc"/>
    Note: UTILITYBUILD = utilityBuild.xml
    UtilityBuild.xml has this task as
    {color:#008000}<!-- Perform weblogic.appc on the given Jar file to generate the Skeleton files -->{color}
    <target name="appc" depends="jar.ejb" >
    <java classname="weblogic.appc" fork="yes">
    <sysproperty key="weblogic.home" value="${WL_HOME}"/>
    <arg line="-compiler javac ${appdir}/${jarfile}"/>
    <classpath>
    <pathelement path="$classpath"/>
    </classpath>
    </java>
    </target>
    The {color:#ff0000}*benefit*{color} of doing this is {color:#ff0000}*if we decide to use wlcompile and wlappc instead of the above we only need to change one place utilityBuild.xml*{color} . I understand that I can make a custom ant task instead of relying on the properties that's passed when calling the child ant task.
    {color:#0000ff}*For complete Source file* {color}
    UtilityBuild.xml
    <project name="SIMIS" basedir=".">
    <!-- set global properties for this build -->
    <property environment="env"/>
    <property file="gosi.properties"/>
    <target name="maketempdir" description="Create ${tempdir} directory">
    <echo message="#### S T A R T B U I L D I N G ####"/>
    <echo message="Started on ${TODAY} at ${TSTAMP}"/>
    <mkdir dir="${tempdir}"/>
    <mkdir dir="${tempdir}/META-INF"/>
    <copy todir="${tempdir}/META-INF">
    <fileset dir="${xmldir}">
    <include name="*.xml"/>
    </fileset>
    </copy>
    </target>
    <!-- Clean all build related dirs, jars and xmls -->
    <target name="cleantemp" description="Deletes ${build.dir}/** and ${dist.dir}/**." >
    <delete includeEmptyDirs="true" failonerror="false">
    <fileset dir="${clientclasses}" includes="**/*EJB.class"/>
    <fileset dir="${tempdir}" includes="**/*"/>
    </delete>
    <delete dir="${tempdir}"/>
    <echo message="#### E N D B U I L D I N G ####"/>
    </target>
    <!-- Perform weblogic.appc on the given Jar file to generate the Skeleton files -->
    <target name="appc" depends="jar.ejb" >
    <java classname="weblogic.appc" fork="yes">
    <sysproperty key="weblogic.home" value="${WL_HOME}"/>
    <arg line="-compiler javac ${appdir}/${jarfile}"/>
    <classpath>
    <pathelement path="$classpath"/>
    </classpath>
    </java>
    </target>
    <target name="jar.ejb" >
    <jar jarfile="${appdir}/${jarfile}"
    basedir="${tempdir}" update="yes">
    </jar>
    </target>
    <target name="javac">
    <javac srcdir="${sourcedir}" destdir="${destinationdir}" includes="${include}" excludes="${exclude}" classpath="${classpath}" />
    </target>
    <target name="copy" description="copy contents to directory">
    <copy todir="${todir}">
    <fileset dir="${fromdir}">
    <include name="${include}"/>
    <exnclude name="${exclude}"/>
    </fileset>
    </copy>
    </target>
    <target name="clean" description="clean contents of directory">
    <delete includeEmptyDirs="true" failonerror="false">
    <fileset dir="${cleandir}" includes="${include}" excludes="${exclude}"/>
    </delete>
    </target>
    <target name="delete" description="delete entire directory">
    <delete dir="${deletedir}"/>
    </target>
    <!-- deploy split directory application -->
    <target name="deploy"
    description="Deploy ear to WebLogic on ${wls.hostname}:${wls.port}.">
    <wldeploy
    user="${wls.username}"
    password="${wls.password}"
    adminurl="t3://${wls.hostname}:${wls.port}"
    debug="true"
    action="deploy"
    source="${appdir}/${jarfile}"
    failonerror="${failondeploy}"/>
    </target>
    </project>
    CMN_Core_Session.xml (one of the 450 files)
    <project name="default" default="build">
    <!-- Specific Properties to this file. Please don't change these names, because it has been used by the ${UTILITYBUILD} -->
    <property file="../gosi.properties"/>
    <property name="srcdir" value="${SOURCE_CODE}/gosi/core"/>
    <property name="xmldir" value="${SOURCE_CODE}/gosi/core/projects/session"/>
    <property name="jarfile" value="CMN_Session.jar"/>
    <!-- Main build task for this ant file -->
    <target name="build" description="Builds components.">
    <!-- Create Temp folders and copy the deployment descriptor their -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="maketempdir"/>
    <!-- Compile the java classes in to ${clientclasses} -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="javac">
    <property name="sourcedir" value="${srcdir}"/>
    <property name="destinationdir" value="${clientclasses}"/>
    <property name="include" value="**/*Session.java,**/*SessionHome.java"/>
    <property name="exclude" value="**/*MaintainDateChangeSession.java,**/*MaintainDateChangeSessionEJB.java,**/*MaintainDateChangeSessionHome.java,**/*MaintainHolidaysSession.java,**/*MaintainHolidaysSessionEJB.java,**/*MaintainHolidaysSessionHome.java,**/*StartupUtilitySession.java,**/*StartupUtilitySessionEJB.java,**/*StartupUtilitySessionHome.java,**/UserSession.java"/>
    </ant>
    <!-- Compile the java classes again in to ${tempdir} this folder will be used to create the Jar file -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="javac">
    <property name="sourcedir" value="${srcdir}"/>
    <property name="destinationdir" value="${tempdir}"/>
    <property name="include" value="**/*Session.java,**/*SessionHome.java,**/*SessionEJB.java"/>
    <property name="exclude" value="**/*MaintainDateChangeSession.java,**/*MaintainDateChangeSessionEJB.java,**/*MaintainDateChangeSessionHome.java,**/*MaintainHolidaysSession.java,**/*MaintainHolidaysSessionEJB.java,**/*MaintainHolidaysSessionHome.java,**/*StartupUtilitySession.java,**/*StartupUtilitySessionEJB.java,**/*StartupUtilitySessionHome.java,**/UserSession.java"/>
    </ant>
    <!-- Create Jar file of the classes in the ${tempdir} and then apply appc compilation on them-->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="appc"/>
    <!-- Remove all file in ${tempdir} -->
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="cleantemp"/>
    </ant>
    </target>
    <!-- Main deploy task for this ant file -->
    <target name="deploy" description="Deploy the components">
    <ant inheritAll="true" dir="${ROOT}" antfile="${UTILITYBUILD}" target="deploy"/>
    </ant>
    </target>
    </project>
    gosiProperties file
    ### Build Files Properties File ###
    -- Configure the global properties for the ant build files
    -- You may need to change this section to match your machine
    BEA_HOME=C:/bea
    SIMIS_DOMAIN=${BEA_HOME}/gosiprojects/server/simis
    WL_HOME=${BEA_HOME}/wlserver_10.0/server
    JAVA_HOME=${BEA_HOME}/jdk150_06
    SOURCE_CODE=C:/sourcecode
    ROOT=${SOURCE_CODE}/build_files
    UTILITYBUILD=UtilityBuild.xml
    -- Here we set the JARs directory and server and client classes
    appdir=${SIMIS_DOMAIN}/applications
    tempdir=${SIMIS_DOMAIN}/classes
    clientclasses=${SIMIS_DOMAIN}/clientclasses
    serverclasses=${SIMIS_DOMAIN}/serverclasses
    web-inf=${appdir}/GOSI/WEB-INF/classes
    startup=${appdir}/StartUp/WEB-INF/classes
    -- Set the ClassPath for the ant tool
    classpath=${JAVA_HOME}/lib/tools.jar;${WL_HOME}/lib/weblogic.jar;${WL_HOME};${SIMIS_DOMAIN}/APP-INF/lib/CMN_DMS_WS_RequestClient.jar;
    Thanks and regards
    Edited by: Nawaf on Mar 9, 2008 8:18 AM

    Any idea, I'm looking for your opinion, what do you think of the above

  • J2EE Tutorial: Exception when building with ant

    I am trying to build the converter example on page 48 of the J2EE tutorial using ant. Ant seems to choke on the following line from the build.xml:
    <property environment="myenv" />
    The output of the "ant converter" command is:
    Buildfile: build.xml
    init:
    BUILD FAILED
    /usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: /usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    --- Nested Exception ---
    /usr/j2sdkee1.3/j2eetutorial/examples/src/build.xml:18: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    --- Nested Exception ---
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1525)
    at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:248)
    at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    at org.apache.tools.ant.Main.runBuild(Main.java:421)
    at org.apache.tools.ant.Main.main(Main.java:149)
    Total time: 1 second
    My best guess is that the "myenv" line in the build.xml requires some additional attribute. I'm using ant version 1.3. My OS is Solaris (noted for possible environment-related issues).
    Thanks in advance!
    Eric Smith

    On Windows XP Pro, the line
    <property environment="myenv" />
    in the init target of build.xml for the j2ee tutorial examples triggers a windows error message:
    16 bit MS-DOS Subsystem
    =======================
    C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application. Choose 'Close' to terminate the application.
    <<Close>> <<Ignore>>
    So it looks as if ant is trying and failing to access the winnt system environment here.
    According to Ant Developers Handbook (Sams, October 2002, chapter 4, p. 151), the ant environment property "specifies a prefix, giving access to OS-specific environment variables. This is not supported on all platforms." Until this problem is fixed, it appears that on XP systems anyway, any ant settings in build.xml files that rely on direct access to the system environment will fail. Here is some debug output from the j2ee tutorial examples init target which demonstrates this:
    C:\apps\j2sdkee1.3.1\j2eetutorial\examples>ant init
    Buildfile: build.xml
    init:
    [echo] starting init target
    [echo] reached marker 1
    [echo] reached marker 2
    [echo] value of J2EE_HOME is ${myenv.J2EE_HOME}
    [echo] finished init target
    BUILD SUCCESSFUL
    where the task:
    <property environment="myenv" />
    (which generates the OS error popup noted above) occurs between marker 1 and marker 2. Clearly the value of J2EE_HOME is NOT being successfully read from the system environment here.

  • ECLIPSE BUILD WITH ANT CFURLGetFSRef failed

    Hi,
    someone know why when a build the same code I create with the DollyXs and use in my Xcode in Eclipse appear this message error?
    [echo] Now compiling FR file /Users/rbueno/Development/Indesign Plugin Editor/sdk/source/sdksamples/myplugin/MyPlug.fr for mac
    [exec] Beginning ODFRC
    [exec] CFURLGetFSRef failed - maybe the output directory doesn't exist (ODFRC.res)
    [echo] FR Compilation Complete: Attempting to build C++ files...
    [exec] xcodebuild: Warning: configuration release is not in the project. Building default configuration.
    I see in archived post some guy have the some problem and fix that when he changed the location form release build. I try to do the some, but i don't have success.
    Thanks a Lot!

    The full build message.
    Buildfile: /Users/rbueno/Development/Indesign Plugin Editor/projects/MyPlugin/build.xml
    mac:
    [echo] Now compiling FR file /Users/rbueno/Development/Indesign Plugin Editor/sdk/source/sdksamples/myplugin/MyPlug.fr for mac
    [exec] Beginning ODFRC
    [exec] CFURLGetFSRef failed - maybe the output directory doesn't exist? (ODFRC.res)
    [echo] FR Compilation Complete: Attempting to build C++ files...
    [exec] xcodebuild: Warning: configuration release is not in the project. Building default configuration.
    [exec] === BUILDING NATIVE TARGET Debug WITH THE DEFAULT CONFIGURATION (Default) ===
    [exec] Checking Dependencies...
    [exec] PhaseScriptExecution "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/../../../source/sdksamples/myplugin/MyPlug.fr"
    [exec] cd "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj"
    [exec] /bin/sh -c "\"../../../devtools/bin/odfrc-cmd\" -d DEBUG -d MACINTOSH -d __GNUC__ -o \"$REZ_COLLECTOR_DIR/$INPUT_FILE_NAME.rsrc\" \"$INPUT_FILE_PATH\""
    [exec] Beginning ODFRC
    [exec] ResMergerCollector "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/build/MyPlugin.build/Default/Debug.build/ResourceManagerResource s/MyPlugin.rsrc"
    [exec] cd "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj"
    [exec] /Developer/Tools/ResMerger -dstIs DF "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/build/MyPlugin.build/Default/Debug.build/ResourceManagerResource s/MyPlug.fr.rsrc" -o "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/build/MyPlugin.build/Default/Debug.build/ResourceManagerResource s/MyPlugin.rsrc"
    [exec] ResMergerProduct "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/../debug/sdk/MyPlugin.InDesignPlugin/Versions/A/Resources/MyPlug in.rsrc"
    [exec] cd "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj"
    [exec] /Developer/Tools/ResMerger "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/build/MyPlugin.build/Default/Debug.build/ResourceManagerResource s/MyPlugin.rsrc" -dstIs DF -o "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/../debug/sdk/MyPlugin.InDesignPlugin/Versions/A/Resources/MyPlug in.rsrc"
    [exec] Touch "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/../debug/sdk/MyPlugin.InDesignPlugin"
    [exec] cd "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj"
    [exec] /usr/bin/touch -c "/Users/rbueno/Development/Indesign Plugin Editor/sdk/build/mac/prj/../debug/sdk/MyPlugin.InDesignPlugin"
    [exec] ** BUILD SUCCEEDED **
    [echo] C++ Build Complete
    BUILD SUCCESSFUL
    Total time: 6 seconds

  • Compiling Flash Builder Projects with ant - error

    I'm fairly new to FlashBuilder as well as using ant to build projects.
    I'm working on a project in FlashBuilder 4.5. I'm using a 3rd party SWC that contains an alchemy-compiled C application in the SWC. Building my entire project within FlashBuilder is working fine. However, due to other parts of the project (not imported into FlashBuilder) I need to build with ant on occasion.
    The Class specific to the C app within the SWC is throwing errors when building with ant - it says it can not find the source. I had one recommendation to look into adding/editing something within the build.xml file, but I don't know what that addition/edit would be.
    Any help appreciated.

    Apparently related to switching workspaces... the error log identifies a path to an old workspace I changed out of weeks ago. I created a new workspace and moved the project (just the source, etc, not the settings) into it. been running fine for a while now... though funny how this problem didn't show up until yesterday.

  • Error while building Web Services for Invoking PL/SQL with ANT

    Hello,
    i tried to build the demo- webservice for plsql- stored procedure, but while i want to run the demo with ant i get the following error:
    The same Error occures while Run the Demo with seperate commands: Step 5a(1) Assembly:
    env-check:
    init:
    [mkdir] Created dir: D:\ORAWebServices\webservices_demos\webservices_demos\db\plsql\build\classes\service
    wsa:
    [java] Fehler: oracle.j2ee.ws.tools.wsa.cli.CommandLineMessageBundle_de
    BUILD FAILED
    D:\ORAWebServices\webservices_demos\webservices_demos\db\plsql\build.xml:45: The following error occurred while executing this line:
    D:\ORAWebServices\webservices_demos\webservices_demos\common.xml:74: Java returned: 1
    Total time: 3 seconds
    The Database runs on a remote system and the service-connfig.xml is updated.
    Thanks for Help.

    I assume you have OC4J 10.1.3 webservices installed. Then you should not be using service-config.xml. Check out the 10.1.3 documentation about WebServiceAssembler. I am afraid, you are using 10.1.2 style service-config.xml along with 10.1.3 style WebServiceAssembler.

  • Building J2EE examples with Ant 1.3 on WinXP

    I just installed J2EE 1.3.1 and set all environment variables according to J2EE/Ant documentation. I am trying to build the examples with Ant 1.3 and just before it tries to compile the first example, I get a "NTVDM.EXE Error while setting up environment" error window. This occurs every time I try this examples build. After I close this error window, the compiles fail mostly because the javax.ejb package classes cannot be found.
    Have I overlooked something here? Can anyone shed some insight on this problem?
    -Ryan

    Didn't think I'd be replying to so many of my own messages :-) ..., but anyway the problem with the NTVDM.EXE error message does not go away. I found that it's happens when Ant reads the system environment in the "property" task in build.xml under examples directory:
    <property environment="myenv" />
    <!--
    references to ${myenv.J2EE_HOME} and so on
    -->
    So I replaced occurences of ${myenv.<J2EE_HOME>} with the literal value, in my case, "C:\j2sdkee1.3.1" and now it works. Hope this helps.
    Cheers,
    Lakshmi.

  • Building the ADF 11g project with ANT or MAVEN

    I want to automate the build process of my project using ant or maven. Is there already some build scripts for ant / maven. which can compile and package it using the structure which JDeveloper follows?

    Anthony,
    You probably can. However, since I wrote the original article, I have changed my way of thinking on this; at the time I wrote the article, ojdeploy was not working - now it is. Installing JDev on a build machine takes a bit of space, but it's not a big deal; it doesn't require a license or anything. If I were doing this today, there is no way I would consider anything but ojdeploy for doing the build - it guarantees that what I set up in JDev is what gets built. The one thing that could make me change my mind is if and when JDeveloper gets fully-baked Maven support, including keeping a POM in synch with any libraries added to a project, but that's neither here today nor a certainty, since Oracle hasn't made any specific announcements that I am aware of about the direction of Maven support in JDev.
    We did have a discussion about this on the [url http://groups.google.com/group/adf-methodology/browse_thread/thread/52f7aab00d201b4c/bec6e076a7c82520?lnk=gst&q=ojdeploy#bec6e076a7c82520]ADF Enterprise Methodology Group a while back, and I recall quite a discussion in the forums as well about ojdeploy vs ANT/Maven. I used to be more of a "purist" mindset (i.e. don't make me install an IDE on the build server), but if you like, don't think of it as an IDE in this function - it doesn't require a user to operate it, it's just another build tool that you'd install on the server. That build tool can be integrated with ANT using the ojdeploy tasks.
    John

  • Working with ANT /CVS/JDeveloper doing integrated build

    Is there a documentation out there which gives details structurally on doing builds using ANT and CVS under JDeveloper?

    Check the JDeveloper online help and search for CVS
    "Using Concurrent Versions System (CVS) With JDeveloper"
    and also for ANT
    "About Ant Integration in JDeveloper"
    You can access the online help online on OTN at:
    http://otn.oracle.com/jdeveloper/903/help/

  • JSP problem with ANT

    Hello!
    I built up a web site and I want to test them using ANT. It works fine with other web page, however it doesn't work with web pages with "session" statement. For example in login.jsp I have the following statement
    session.setAttribute("user", request.getParameter("userName"));
    And if the user's name and password are correct, the user is directed to home.jsp, where i have the following statement to retrieve the user's name:
    String id=session.getAttribute("user").toString();
    In order to test the above 2 pages with ANT, I have the following code in builder.xml:
    <?xml version='1.0'?>
    <project name="proj" default="test" basedir=".">
    <target name="test">
    <get src="http://path/login.jsp?userName=id&passWord=1111" dest="1.html" />
    </target>
    </project>
    When I run the script, I get the error that the home.jsp cannot be opened (see below)
    [get] Error opening connection java.io.IOException: Server returned HTTP response code: 500 for URL: http://path/home.jsp
    I am pretty sure the above error is caused by the "session" statement, because if I remove the statement in home.jsp, the page can be correctly opened. But I really need the "session" statement, Can someone tell me how to deal with it?
    thanks a million.

    Usually with a 500 error there's more detail in a server log somewhere. Can you find anything in stderr.log or some such?

  • Test jsp pages with ant

    Hello!
    I built up a web site and I want to test them using ANT. It works fine with other web page, however it doesn't work with web pages with "session" statement. For example in login.jsp I have the following statement
    session.setAttribute("user", request.getParameter("userName"));
    And if the user's name and password are correct, the user is directed to home.jsp, where i have the following statement to retrieve the user's name:
    String id=session.getAttribute("user").toString();
    In order to test the above 2 pages with ANT, I have the following code in builder.xml:
    <?xml version='1.0'?>
    <project name="proj" default="test" basedir=".">
    <target name="test">
    <get src="http://path/login.jsp?userName=id&passWord=1111" dest="1.html" />
    </target>
    </project>
    When I run the script, I get the error that the home.jsp cannot be opened (see below)
    [get] Error opening connection java.io.IOException: Server returned HTTP response code: 500 for URL: http://path/home.jsp
    I am pretty sure the above error is caused by the "session" statement, because if I remove the statement in home.jsp, the page can be correctly opened. But I really need the "session" statement, Can someone tell me how to deal with it?
    thanks a million.

    One mistake i find in your code is while retreiving the session value its session.getAttribute("userName"), as you stored the value using the parameter 'userName'. Is it not causing problem. Please check...

  • Generate HTML report with ANT

    Hello,
    I'm  new to FlexPMD. I have just generated my firsts reports. I try to generate HTML reports.
    I browse the documentation, this forum and the web and I find informations to :
    - generate documentation with Hudson
    - generate documentation with Maven
    - generate documentation with XSLT pmd.xml -> html
    Ok, I try to keep it simple. So I don't want to use Hudson.
    I'm using ANT, and I currently don't want to install/learn Maven.
    I'm using FlexUnit with ANT. And It's really simple to generate reports :
    <junitreport todir="${report.flexunit.loc}">
                <fileset dir="${report.flexunit.loc}">
                    <include name="TEST-*.xml" />
                </fileset>
                <report format="frames" todir="${report.flexunit.loc}/html" />
    </junitreport>
    I'm really new to FlexPMD, so I don't have currently a big knowledge, but it seems impossible to generate a HTML report just like junitreport. (1 line in an ANT task)
    I test the XSLT transformation found on this forum (thread "XSLT pmd.xml -> html"). It's really cool. But it's seems difficult, for example, to extract the wrong code part and add it to the HTML page.
    So, what is the simpler solution to generate HTML report just with FlexPMD/ANT ?
    Thanks !

    Hello,
    Currently you generate a PMD report with ANT  like this :
    <! -- define taskdef  -->
    < taskdef name="pmd"  classname="com.adobe.ac.pmd.ant.FlexPmdAntTask"  classpath="${build.pmd.loc}/flex-pmd-ant-task-${flexpmd.version}.jar">
             < classpath>
                 < path refid="flexpmd.base" />
                 < pathelement  location="${build.pmd.loc}/commons-lang-2.4.jar" />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-core-${flexpmd.version}.jar" />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-ruleset-api-${flexpmd.version}.jar"  />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-ruleset-${flexpmd.version}.jar"  />
                 < pathelement  location="${build.pmd.loc}/plexus-utils-1.0.2.jar" />
             < /classpath>
    < /taskdef>
    then generate XML  report like this :
    < pmd  sourceDirectory="${src.loc}" outputDirectory="${report.loc}"  ruleSet="${build.pmd.loc}/rules.xml"/>
    The  XML contains some file nodes :
    < file  name="/Users/user/workspace/AS3_UTILS/src/utils/align/gridAlignSpaceNumber.as">
           < violation beginline="22" endline="22" begincolumn="0"  endcolumn="27" rule="adobe.ac.pmd.rules.naming.TooShortVariable"  ruleset="All Flex Rules" package="utils.align"  class="gridAlignSpaceNumber.as" externalInfoUrl="" priority="5">This  variable name is too short (3 characters minimum, but 1 actually).  Detects when a field, local, or parameter has a very short name<  /violation>
    < /file>
    The  message is in the text node  < violation>TEXT< /violation>
    For  me, we miss an important part of the message : the portion of the "bad"  code.
    It could be very usefull if PMD can generate  something like this :
    < file  name="">
           < violation beginline="" endline="" begincolumn=""  endcolumn="" rule=""  ruleset="" package=""  class="gridAlignSpaceNumber.as" externalInfoUrl="" priority="">
            < description>TEXT< /description>
            < code><CDATA[MY CODE
    MY CODE
    MY CODE]>< /code>
        <  /violation>
    < /file>
    With this, we can  generate "full" HTML report with XSLT transform easily.
    I  understand that it modify the standard XML schema of the output.
    So,  perharps it could be an option like this :
    < pmd fullDescription="true"  sourceDirectory="${src.loc}"  outputDirectory="${report.loc}"  ruleSet="${build.pmd.loc}/rules.xml"/>
    What do you think ?
    Thanks !

  • Flex 2 charting trial watermark appears when building via Ant

    The trial watermark appears when building with the flex Ant
    tasks, but not via Flex Builder 2. I believe the Ant tasks set up
    the compiler options with the same arguments in FB, and the build
    library path is also the same, but the trial watermark still
    appears.
    The charting source has been extracted into the Flex SDK 2
    directory, and the license key appears in the
    frameworks/license.properties file. As far as I know, these are the
    only steps needed to install the paid version of the charting
    tools. If I missed something, please let me know.
    Thanks in advance,
    KaJun

    Just an update on this issue:
    If I run the mxmlc compiler from the command line, I found
    that the output .swf does not have the watermark. It seems to be a
    bug in the Adobe Flex Ant tasks. I've changed the build script to
    use an exec call to the compiler instead.
    Thanks,
    KaJun

  • How to define new classpath of libraries while making jar files with ant

    I am useing eclipse and ant and trying to make a jar file. I have used some external jar files. I have managed to add external jar files to my jar. But Still I have a problem. In my project all libraries in lib folder. But when I put them into jar file. They are in the root folder.Classpath has changed and It couldn't find the class path.
    Is there any body knows how to define a new class path for external libraries with ANT. or How can I put my libraries into a lib folder in jar ?? I think both of them would solve my problem.
    thanks in advance.
    My code is like that, I think it requires a little modification
    <target name="jar">
            <mkdir dir="build/jar"/>         
            <jar destfile="build/jar/Deneme.jar" basedir="build/classes" >             
                <manifest>
                    <attribute name="Main-Class" value="${main-class}"/>                    
                </manifest>             
                 <fileset  dir="${lib.dir}" includes="**/*.jar"/>           
            </jar>
        </target>

    I can see why your other "question" was likely deleted. You need to drop the editorial comments and just ask a question. I believe what you want to know is how to configure something using php on your Apache server so that it can be read. If that's your question, here's a couple of places that discuss the topic:
    http://www.webmasterworld.com/linux/3345459.htm
    http://forums.macrumors.com/showthread.php?t=427742
    http://en.allexperts.com/q/PHP5-3508/configuring-installing-permissions.htm
    For a general introduction to 'nix permissions, take a look at this:
    http://www.osxfaq.com/Tutorials/LearningCenter/UnixTutorials/ManagingPermissions /index.ws
    And here's a whole book on the subject of Leopard permissions:
    http://my.safaribooksonline.com/9780321579331
    Try doing a Google search on "leopard permissions php apache" and see if you find what you are looking for.
    Francine
    Francine
    Schwieder

Maybe you are looking for

  • Profile 1 = INACTIVE, Radio power mode = OFF

    Hi everyone, I've been struggling this for a moment, and i can't figure it out how to resolve this in turning on the radio power mode. Help pls? Thank you very much. sh cellular 0/0/0 radio Radio power mode = OFF, Reason = Unknown Current Band = None

  • Captured images not showing in gallery Nokia N8

    I have 2 identical Nokia N8. I have changed nothing on either in terms of programs/ applications/ etc. When I took a photo, image would appear in both: - Gallery (1st page) - Captured (2nd page) Suddenly, on one phone only the photo is only appearing

  • Macbook 2008 unable to detect the 4 gen iPod or iPad

    The macbook 2008 model is unable to detect iPod or iPad of 4th Generation. I am unable to upgrade the OS software and unable to install any new software. (.dmg) Help me.

  • Migrating 10.4 to 10.6 - Users can't log in

    Hello, Manually upgrading from 10.4.11 on G5 with internal drive to 10.6.5 on Intel with Firewire Raid Array. Moved all home directories as root with cp -pR to the firewire drive. Setup all the users in Workgroup manager (setting users to same UID as

  • NWDI/DI configuration

    Hi! Can anybody here say, where is full step by step configuration guide for NWDI or CBS/DTR/CMS/...? We have DTR/CBS etc. on DEV server. But some configuration issues were missed: 1. CMS Landscape configurator -> Domain Data -> Update CMS: SLD (URL