JDeveloper build vs ant-sca-compile.xml

Hi everyone,
I have a composite containing a Spring component. The component can be compiled and deployed in JDeveloper and works fine. However, when I try to compile the composite with ant-sca-compile.xml Ant script (from my JDeveloper - Build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1) for automated testing the build fails on
Source port type for "MyTestService" does not match target port type for "MyTestSpring"
Any idea how to fix it? The Spring component (its inteface) is generated from the published WSDL and seems it is the cause of the problem as composites without Spring can be compiled with that script.
Thanks,
Jan

Hi Manish,
Compilation of Requester and Provider ABCS takes longer time than other AIA components.So check the Xms and Xmx values in ant-sca-compile.xml and check whether it is matching with your OS environment or try setting at a higher value and then try deploying again.
Is it building properly or is getting stuck at build level only?
If its issue with deployment then check $FM_HOME/user_projects/domains/[domain_name]/servers/soa_server1/logs/soa-server1-diagnostic.log.
Rgds,
Mandrita.

Similar Messages

  • Error deploying JDeveloper project using ant-sca-compile.xml

    Hi all, I'm having problems on deploying a JDeveloper project using ant-sca-compile.xml. The output in C:\XXXX\YYYYY\SCA-INF\classes\scac.log is:
    java.lang.NoClassDefFoundError: 4\jdeveloper\////oracle_common
    Caused by: java.lang.ClassNotFoundException: 4\jdeveloper\....oracle_common
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    Could not find the main class: 4\jdeveloper\/../oracle_common. Program will exit.
    Exception in thread "main"
    What's missing in wich classpath?
    Regards
    Efren.

    Same composite we were able to deploy successfully without any error, from Monday onward we are experiencing this issue.
    We checked in Installation Guide provided by oracle. Oracle has suggested few memory related changes in ant-sca-compile.xml file.
    Increasing Memory to avoid Compilation Errors
    To avoid out-of-memory errors during compilation of a SOA composite application, you need to
    increase the following memory settings.
    To increase memory settings:
    1. Open the ant-sca-compile.xml file in the SOA_HOME/bin directory.
    2. Under the scac element, increase the following memory settings.
    <jvmarg value="-Xms2048m"/>
    <jvmarg value="-Xmx2048m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    3. For Windows change the following memory settings to.
    <jvmarg value="-Xms1536m"/>
    <jvmarg value="-Xmx1536m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    We did those changes but still experiencing same error. I checked H:\AIASOAProject\AIAReceiptInterface\ReceiptListEbizProvider\SCA-INF\classes\scac.log ; file its showing Could not create the Java virtual machine.
    Regards
    Manish

  • Error at the time of Deployment of Composit ---  ant-sca-compile.xml

    Hi,
    While deploying the composite, it’s throwing given error
    [03:03:42 PM] ---- Deployment started. ----
    [03:03:42 PM] Target platform is (Weblogic 10.3).
    [03:03:42 PM] Running dependency analysis...
    [03:03:42 PM] Building...
    [03:03:49 PM] Deploying profile...
    [03:03:50 PM] Wrote Archive Module to H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\deploy\sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Deploying sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:50 PM] Processing sar=/H:/AIASOAProject/AIAFrameworkProject/ReceiptListEBS/deploy/sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Adding sar file - H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\deploy\sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Preparing to send HTTP request for deployment
    [03:03:50 PM] Creating HTTP connection to host:edpsvddb002.baea.com.au, port:8001
    [03:03:50 PM] Sending internal deployment descriptor
    [03:03:50 PM] Sending archive - sca_ReceiptListEBS_rev1.0.jar
    [03:03:52 PM] Received HTTP response from the server, response code=401
    [03:03:52 PM] Problem in sending HTTP request to the server. Check standard HTTP response code for 401
    [03:03:52 PM] Error deploying archive sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:52 PM] HTTP error code returned [401]
    [03:03:52 PM] No error message is returned from the server.
    [03:03:52 PM] Error deploying archive sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:52 PM] #### Deployment incomplete. ####
    [03:03:52 PM] Error deploying archive file:/H:/AIASOAProject/AIAFrameworkProject/ReceiptListEBS/deploy/sca_ReceiptListEBS_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    Buildfile: C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml
    scac:
    *[scac] Validating composite : 'H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\composite.xml'*
    *[scac] Error occurred during initialization of VM*
    *[scac] Could not reserve enough space for object heap*
    BUILD FAILED
    C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml:264: Java returned: 1 Check log file : H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\SCA-INF\classes\scac.log for errorsTotal time: 1 second
    Is this issue occuring due to server ant-sca-compile.xml or C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml in my desktop.
    Kindly Confirm.
    Regards
    Manish

    Same composite we were able to deploy successfully without any error, from Monday onward we are experiencing this issue.
    We checked in Installation Guide provided by oracle. Oracle has suggested few memory related changes in ant-sca-compile.xml file.
    Increasing Memory to avoid Compilation Errors
    To avoid out-of-memory errors during compilation of a SOA composite application, you need to
    increase the following memory settings.
    To increase memory settings:
    1. Open the ant-sca-compile.xml file in the SOA_HOME/bin directory.
    2. Under the scac element, increase the following memory settings.
    <jvmarg value="-Xms2048m"/>
    <jvmarg value="-Xmx2048m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    3. For Windows change the following memory settings to.
    <jvmarg value="-Xms1536m"/>
    <jvmarg value="-Xmx1536m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    We did those changes but still experiencing same error. I checked H:\AIASOAProject\AIAReceiptInterface\ReceiptListEbizProvider\SCA-INF\classes\scac.log ; file its showing Could not create the Java virtual machine.
    Regards
    Manish

  • Issue with ant-sca-compile.xml

    We have installed AIA 11.1.1.3, and using Jdev 11.1.1.3,
    We are facing issue while deploying ABCSImpl Composite(AIA Service Constructor Based composites) through Jdev 11.1.1.3 ,
    SOA-log showing
    Buildfile: C:\Jdev11113\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite "H:\AIASOAProject\AIAPOInterface\CreatePurchaseOrderListEbizProvABCSImpl\composite.xml"
    Its not moving forward, Jdeveloper is getting struck during validation step.
    Messages-log showing -
    Compiling...
    Context: MakeProjectAndDependenciesCommand selection=CreatePurchaseOrderListEbizProvABCSImpl.jpr application=AIAPOInterface.jws project=CreatePurchaseOrderListEbizProvABCSImpl.jpr node=CreatePurchaseOrderListEbizProvABCSImpl.jpr
    Its happening with AIA Service Constructor based composites.
    Non Service Constructor based Composites are getting deployed i.e. Provider Service, EBS and Requestor Services are getting deployed.
    Its very urgent kindly provide some suggestions or tips, Its urgent for us.

    Hi Manish,
    Compilation of Requester and Provider ABCS takes longer time than other AIA components.So check the Xms and Xmx values in ant-sca-compile.xml and check whether it is matching with your OS environment or try setting at a higher value and then try deploying again.
    Is it building properly or is getting stuck at build level only?
    If its issue with deployment then check $FM_HOME/user_projects/domains/[domain_name]/servers/soa_server1/logs/soa-server1-diagnostic.log.
    Rgds,
    Mandrita.

  • Know about ant-sca-deploy.xml

    Hi All,
    Can you please explain me the ant-sca-deploy.xml works, whcih parameters has to be passed ? for deployment

    Hi
    You can get more information from "ant-sca-deploy.xml" 's deploy target.
    <target name="deploy">
    <input message="Please enter server URL:" addproperty="serverURL"/>
    <input message="Please enter sar location:" addproperty="sarLocation"/>
    <deployComposite serverUrl="${serverURL}" sarLocation="${sarLocation}" user="${user}" password="${password}"
    overwrite="${overwrite}" forceDefault="${forceDefault}" configPlan="${configplan}"
    sysPropFile="${sysPropFile}"/>
    </target>
    One Example:
    ant -f e:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml -DserverURL=http://DOMAIN:8001 -DsarLocation=D:\SayHelloSCA\deploy\sca_SayHelloSCA_rev1.0.jar -Duser=weblogic -Dpassword=weblogic -Doverwrite=true
    You can also get help using "help" target
    ant -f D:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml help
    Edited by: Kathir(597386 ) on Sep 1, 2009 12:51 AM

  • 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

  • Jdeveloper dependency on ANT script for .JAR file for ADF Application

    Hi all,
    We need to create a .jar file for an ADF project consist of Model & viewcontroller. We are able to create jar file with help OjDeploy in my ANT script.
    My query: Ojdeploy uses internally jdeveloper home to complete the task. After going through the generated script, we came to know about below two references:
    1.     oracle.jdeveloper.ant.library = ${jdeveloperHome}\\ jdeveloper\\jdev\\/lib/ant-jdeveloper.jar
    2.     oracle.jdeveloper.ojdeploy.path = ${jdeveloperHome}\\jdeveloper\\jdev\\bin\\ojdeploy.exe
    Is there any way to remove above dependencies so that we can create .jar file without installing Jdeveloper on a machine ?
    regards,
    Mohit

    ojdeploy requires a JDeveloper installation.
    Without going into the debate as to whether this is "good" or not, that's the way it works, I personally don't have a problem with installing JDeveloper on a build box (after all, you do have to install other software on the build box, too).
    If you don't want to install JDeveloper, you can hand-roll your own ANT scripts which is good for racking up the billable hours, but not so good at maintainability.

  • Build the delta from two xml documents

    Hi,
    i look for a solution to solve the following problem:
    i want to build a xml-based interface to pass my data to a client(Web etc.) and i dont know in which way the client manipulates the data and what in the xml-document was changed, inserted or deleted.
    What i have is the original-document and the changed-document (both based on the same DTD). How can i determine the delta from the two documents, cause i must know what actions to be taken (for example put <?bc4j remove?> or an appropriate tag for the XDK in the xml)
    any suggestion ???
    TIA
    Oliver

    The Oracle XDK for Java comes with a utility called XMLDiffer that, given XML Documents A and B, produces an XSLT stylesheet S that transforms A to B.
    Might be of use to you. That's the only inhouse XML diffing technology that I'm aware of. We use it internally in JDeveloper for merging machine-generate web.xml file edits with the user's hand-written web.xml file edits.

  • Flex 4, exporting a Release Build does not include CSS/XML?

    Hello
    So I'm using external CSS and XML. I'm pulling the CSS with <fx:Style source="CSS/styles.css" /> and am using HTTPService to fetch the XML data.
    It works great, until I export as a Release Build.
    It doesn't include the CSS or XML files, but still pulls the CSS colors and whatnot, I just can't update them.
    What gives? How can I get the CSS and XML external files to.. well, stay "external"?
    I need the user to be able to update the CSS and XML on their end, but can't if the Release Build embeds the CSS and XML files before exporting..
    Any help would be appreciated, thanks!

    dont think Flex can read a raw CSS sheet. You have to precompile them, right click on the file in project explorer and chose compile CSS to SWF
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html

  • Build Ear: Ant vs workshop

    Why is when I build from Ant I get a different EAR file from when I build my EAR from within Workshop? for example the web.xml is missing form the WEB-INF. I'm sure there are other things missing. Is it using a different target? What's the deal?

    If you have got your jsp files precompiled, what to do next? Well, if all you want is to check your jsp files can be translated to classes, you are done. Otherwise, if you want oracle server to use the generated classes instead of the jsp files, then you need to
    1. add the generated classes to WEB-INF/classes of the .war file or put them inside a jar in WEB-INF/lib. If you applied ojspc to a .war or .ear file, the generated classes are already packaged in the page/oracle_jsp*.jar of your .war file; all you need to do in this step is to move that jar to WEB-INF/lib.
    2. change the init-param main_mode of JspServlet to justrun, in your web.xml.
    3. optionally remove your jsp files since they will not be used by the server. One catch here: if you use a jsp file as a welcome file as designated in your web.xml, you have to keep that jsp.
    4. repackage you .war file and then your .ear file.
    If you deploy your .war or .ear file now, the server will use the generated classes directly. Note in justrun mode, you can do not any hot deployment of your jsps in this web application.
    These steps are somehow missing from oracle documentation, although they can be figured out if one do understand the relevant concepts.
    These steps are being written into ojspc code, so if you apply ojspc to a war or ear in the developer preview 4 or the product version of 10.1.3, both of which are not out yet, it will be easier to manage.
    Hope I have said enough that you can get it done.

  • How do I add a jar file into the build path of the compiler?

    Hey,
    I'm trying to import a jar file into the build path of the compilation process, but it does not find the packages or the classes that are in it.
    I think I don't add it right...
              ArrayList<String> options=new ArrayList<String>();
              options.add("-d");
              options.add(targetDirectory);
              options.add("-classpath");
              for(String str:includeDirectory)
                   options.add(str);
              if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call());
                    ....and I've tried this way:
         public void setTargetDirectory(String targetDirectory) {
              this.targetDirectory = "-d " + targetDirectory;
         private void compile(Iterable<? extends JavaFileObject> compilationUnits) throws Exception {
              ArrayList<String> options = new ArrayList<String>();
              options.add(targetDirectory);
              String classPath="-cp ";// tried this also with "-classpath"
              for (String str : includeDirectory)
                   classPath+=str+":";
              options.add(classPath);
         if (!compiler.getTask(writer, fileManager, diagnostics, options, classes, compilationUnits).call())
              // throw new Exception("Compilation Error");
         }Thanks in advance,
    Adam.
    Edited by: Adam-Z. on Feb 24, 2010 5:41 AM
    Edited by: Adam-Z. on Feb 24, 2010 5:42 AM

    Thank you for your reply,
    Q: Are there .class files in that directory in that jar file? (the compiler doesn't ( can't )) look for directories, it can just look for specific files , and scan to get a list of all files matching certain criteria. So if there are no class files, it will say the package doesn't exist, even if there is a directory, possibly containing other files.yes there are class files in the jar, the tree structure:
    j2MeDataChunkGenerator_Plugin\(lots of class files)
    META-INF\manifest.mf
    and thats it.
    , your code will only work on windows because other platforms use a different path separator. You should use java.io.File.pathSeparator not explicit ';" when building your classpath. (this is unrelated to your problem, but you should correct it)will do, thanks.
    Q: Is that error in your post formatted by your own diagnostics? (we could possibly help you better if we didn't have to guess!!)I would not post my own error code, this text is generated by the compiler diagnostic.
    {code}
         System.err.println(" Error details: " + diagnostic.getMessage(null));
    {code}
    Q: Is line 3 of ImageCroper_Editor.java (sic) an import statement? (we could possibly help you better if we didn't have to guess!!)it is an import error... didn't the error message stated that it is an import problem? wired, I'm sure before it did. anyway it is an import error.
    Also you don't show us what the variable includeDirectory is in terms of type, and contents, that might be helpful. (we could possibly help you better if we didn't have to guess!!)It has only one String object: "D:\%Important Documents\WorkSpaces\PacMan\ApplicationManager\Plug-in\Data Chunk Designer.jar"
    the last file on the classpath list.
    Q: Have you proven this? that i did post, in this long line of text.
    Q: Is the compiler finding other classes (in other packages) in that same jar file?No. all the class files are in the jar, they all have entries that start with "j2MeDataChunkGenerator_Plugin\*.class", and since I get 47 errors I guess it does not load any other class.
    thank you for you comments, the problem with having these errors, is that I can't even get a piece of information where this error is coming from, only that it is an import loading error package not found, what does that mean? that the jar was not loaded in compilation(no error about this), that the jar is corrupted(no error about this), that the path is incorrect(it is correct I made sure), that there is no such package in the jar(There is), that the compiler does not load the package(does it even do that?), really I can't even guess why this happens, I've been at this on and of all day today, really annoying.
    Thanks,
    Adam.

  • Adding custom build step after each compilation

    Using Freescale's Kinetis Design Studio, based on Luna 4.4.2, with CDT 8.6.0.201502131403.
    I have GCC configured to spit out an assembly listing, e.g., foo.o.lst, but since it is 99% crud, I wrote a program to clean it up, leaving just the disassembly. Is there a way to get this program executed right after every compile? The project "Build Steps" only seem to apply to the entire build, not the individual compilations.

    http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_fileprop_steps.htm
    RTFM + FAQ:

  • An interesting discovery of ant javac compile task

    hi all
    i just found out a new thing about using ant to compile java classes, at least it is new to me. you can use ant to compile classes even if they are not in the correct physical path which are indicated in the package declaration. i.e. if you have a class :
    package com.name1.name2
    class SomeClass{
    }and, if the java file is atually located in com/name1/name2/name3, the ant can still compile it and place the binary class anywhere u specify.
    any comment on this?

    thanks, i suppose javac will place the class file in
    proper place with the information from the package
    declaration. if it is declared for this package,
    then it will be compiled and place in that folder
    accordinglyYep. Relative to current directory, or to the directory specified by -d if present.
    . interesting, i never knew that until
    now. but this wuoldn't work if you want to use an IDE
    tool to develop. i tried with eclipse, and it
    complained about the package problem and treated it
    as an error.That's probably eclipse being deliberately stricter than javac. Personally, I can't see any good reason not to put them in their respective package directories in the first place.

  • [svn:fx-trunk] 9555: Fixed 'ant doc' compilation error in DesignLayer.as.

    Revision: 9555
    Author:   [email protected]
    Date:     2009-08-24 16:06:41 -0700 (Mon, 24 Aug 2009)
    Log Message:
    Fixed 'ant doc' compilation error in DesignLayer.as.
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: None
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DesignLayer.as

  • JDeveloper Build Error with JDK1.3beta

    Dear JDev Team,
    I have a project that uses SQLJ and has been compiling fine with both JDK1.2.2 and 1.3beta. This morning it stopped working. There have been no great code changes. Once it fails using 1.3beta it will also fail using 1.2.2.
    There error message in the window is as follows. Your help would be very much appreciated, as this project cannot be built.
    Many thanks,
    Richard
    JniPortal for D:\Program Files\JDeveloper 3.0\java1.2\jre\bin\ferrari\jvm.dll reported
    InnerClasses attribute
    java.lang.IncompatibleClassChangeError: InnerClasses attribute
    int sqlj.runtime.profile.util.CustomizerHarness.customizeProfile(sqlj.runtime.profile.util.ProfileIOContext)
    void oracle.jdeveloper.sqlj.TranslatorInternal.customizeProfiles(borland.compiler.interfaces.Log)
    void oracle.jdeveloper.sqlj.TranslatorSystemImpl.customizeProfiles(borland.jbuilder.jipcbmj.portal.ComLog)
    void oracle.jdeveloper.sqlj.TranslatorSystem_JavaDispatch.invoke(int, borland.javaport.JavaCallStack)

    Richard,
    SQLJ is not supported with JDK1.2 in JDev 3.0:
    (from the release notes)
    Using SQLJ under JDK 1.2
    The 8.1.5 SQLJ version distributed with this release of JDeveloper only supports JDK 1.1.X, it does not run under JDK 1.2. A future version of SQLJ will support JDK 1.2
    Having said that it looks like you have it working anyway :-)
    There have been no great code changes. Once >it fails using 1.3beta it will also fail >using 1.2.2.Try the following :
    -Locate the output directory from Project|Project Properties
    -Close JDeveloper
    -Go to the output directory and delete all the classes and profiles related to your SQLJ project
    -Restart JDev and recompile
    Hope this helps.
    Regards,
    Arun
    null

Maybe you are looking for

  • What's wrong with Mac G5 1.8 Machine?

    I've searched the net, I've searched the forum with the whole fan noise issues and seen all possible solutions but none has worked for me. I bought a used mac a while ago and now that I bought some PNY memory (2) 512MB chips that are designed specifi

  • Why won't adobe reader show text?

    I am working for my eagle scout rank and in order to do my service project, a form must be filled out on the computer as a pdf. I started the PDF on my old dell, and i downloaded Adobe reader for my mac to finish it. For preview, it takes the lines o

  • Two scripts not aligning correctly, 200px Width each, Link inside

    Hello all, I have a slight problem, I am attempting to align a twitter script and another script on one page, next to eachother, yet no matter how small I make the width of the style div, they remain on two individual alignments, one below the other.

  • Can I retrieve my History and Tab Groups?

    I left my computer, via remote connection, in the hands of an employee of a company I'll leave unnamed to tune-up and cleanup my computer. There had been no mention of any problem with Firefox. He: 1) Reset my home page to SnapDo. Easy enough to fix,

  • 980 songs missing out of 5567 aft upgrade to 8.2.1.6

    This is frustrating. songs are in the iTunes Music folder. Only way i see is to add all files all over again manually. Somgs missing are random over all albums. I noticed this when syncing my nano and it came up with a warning that many songs could n