How to include a SWC using custom Console?

Currently, it appears as if it is not possible to include an external SWC for use in a custom Console implementation.
For instance, assume that I have a SWC: Foo.swc that contains the class
com.test::Foo
I also have a custom com.adobe.flascc.Console implementation which imports and uses com.test.Foo from the Foo.swc library.
I've managed to get my SWF to compile without a problem, but I get the following run-time error:
VerifyError: Error #1014: Class com.test::Foo could not be found.
Here's how I've setup the compile:
CCC:=$(FLASCC)/usr/bin/g++
Console.abc:
          $(ASC) -merge -md -abcfuture -AS3 -optimize -strict \
                    -import $(call nativepath,$(FLASCC)/usr/lib/builtin.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/playerglobal.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/BinaryData.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/ISpecialFile.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/IBackingStore.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/IVFS.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/InMemoryBackingStore.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/PlayerKernel.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/CModule.abc) \
                    -import $(call nativepath,$(FLASCC)/usr/lib/C_Run.abc) \
                    -li $(call nativepath,./aslibs/Foo.swc) \
                    -le $(call nativepath,./aslibs/framework.swc) \
                        Console.as -outdir . -out Console
test.swf: Console.abc
          $(CCC) -jvmopt=$(JVMARGS) -Wall -g -O0 -fno-exceptions -o test.swf \
                    main.cpp \
                    -lAS3++ \
                    -fllvm-llc-opt=-ascopt=-li \
                    -fllvm-llc-opt=-ascopt=$(call nativepath,./aslibs/Foo.swc) \
                    -fllvm-llc-opt=-ascopt=-le \
                    -fllvm-llc-opt=-ascopt=$(call nativepath,./aslibs/framework.swc) \
                    -symbol-abc=Console.abc \
                    -emit-swf \
                    -swf-size=800x600
I've also attempted adding -no-swf-preloader assuming that the problem was linkage in the first frame, but this did not work either.
If I only use asc2.jar to generate a SWF (using the -li and -le options), it works, but I need access to the libraries via flascc Console.
Any ideas?
Regards,
Matt Bolt

Thanks for the response and the suggested work-around! This solution worked exactly as you described and was precisely the result I was looking for.
--- Some Follow Up Ranting and Questions ---
Was the behavior I mentioned in my previous post a bug? It seems like the issue may be due to the following:
* Compiling .as to .abc referencing a swc will simply refer to the contents of the swc to resolve external references and there's nothing in the abc itself referring to the external library (Could be way off here).
* Compiling .as to .swf will resolve fully.
* Because we compile Console to abc first, we lose the ability to resolve external references before going to SWF.
If the above statements are correct, then -li and -le behave identically when compiling to .abc, and the behavior mentioned in my previous post would make sense.
What is strange to me is that the ASC provides a way to compile to .abc but no way to link .abc and output a swf. Perhaps it's because of the loss of data that occurs (full resolution tracks dependencies in memory).
I'm not sure that what I'm claiming is even remotely close to the truth, but it seems accurate based on my observations. If anyone knows for sure, please feel free to set me straight.

Similar Messages

  • How to export book pdf using custom presets for all book files in indesign using javascript

    How to export book pdf using custom presets for all book files in indesign using javascript.

    Hi jackkistens,
    Try the below js code.
    Note: you can change your preset name in below (e.g, Your preset name).
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "Your preset name", myBook.bookContents, "Book_PDF", false);
    example:
    var myBook = app.activeBook;
    myBook.exportFile(ExportFormat.PDF_TYPE, File (myBook.filePath+"/"+myBook.name.replace(/\.indb/g, ".pdf")), false, "[High Quality Print]", myBook.bookContents, "Book_PDF", false);
    thx,
    csm_phil

  • Who's Who: How to refine employee search using customer defined indicator?

    Hello,
    It is possible to refine employee search using status indicator STAT2 (Employees' Employment Status). I would like to refine employee search using e.g. Customer defined status indicator STAT1. I created an entry identical to STAT2 but with STAT1
    in view V_T77S0 but it did not help at all.
    How to refine employee search using customer defined indicator or any other info
    from infotype 0000 or 0001?
    Kind regards,
    Pawel

    Hi
    This could be done using the infosets provided in who's who customization screen.
    Pl go through following help.
    If this helps, pl do reward.
    Who's Who (ESS): Selection and Output
    In this activity, you can change the fields for selecting and outputting data for the Who's Who service. The fields of the underlying InfoSet Query are available. Note, however, that text fields cannot be used for data selection (with the exception of the fields Organizational Unit, Position Name, and Job Name).
    You have the following options:
    You can specify the fields for selecting an employee.
    You can specify the fields for the hitlist, that is, the list of all employees who meet the selection criteria.
    You can specify the fields for the detail screen for a selected employee.
    All selected fields are automatically transferred to the service in the sequence you chose and are then available for selection or output.
    Standard settings
    The standard system contains an InfoSet for the service. It contains default selection and output fields.
    Activities
    1. Check whether the default settings fulfill your requirements.
    2. If you want to change the default values, proceed as follows:
    a) Choose the relevant tab page and remove the indicator in the Use default settings for group box.
    To change the selection fields, choose the Selection Fields tab page.
    To change the fields of the hitlist, choose the Output Fields List tab page.
    To change the fields of the detail screen, choose the Output Fields Detail tab page.
    b) If you want to delete a default field, select the field in the relevant tab page and choose Delete Line from Display Table.
    c) If you want to add an additional field from the InfoSet, select the field in the Fields in InfoSet group box and choose Copy Entry from InfoSet Table. You have two options:
    You select an existing field in the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it above the selected entry.
    You select the blank field at the end of the tab page and choose Insert Entry in Display Table. The system copies the InfoSet field and inserts it at the end of the tab page.
    Note that the sequence of the fields in the tab page determines the sequence of the fields in the service.
    The selection screen fields are laid out according to the following pattern (maximum of 4 rows and 20 fields):
    1 I 2 I 3 I13 I17
    4 I 5 I 6 I14 I18
    7 I 8 I 9 I15 I19
    10 I11 I12 I16 I20
    The fields in the detail screen are laid out underneath each other for a maximum of 20 rows, while the fields in the hitlist are laid out from left to right for each row, for a maximum of 20 fields.
    Note: You cannot select by the Employment Status field (P0000-STAT2).
    d) If you want to add a new field that is not in the InfoSet, you have to create a new InfoSet. You then assign the required field to the new InfoSet. Then select the new InfoSet in the InfoSet field in the Parameters group box. Proceed as described above to add the field to the relevant tab page.
    For information about creating InfoSets, see Specify InfoSets for Interactive Employee Selection in the IMG for the HR Information System.
    Not the SAP naming convention for the standard InfoSet: /SAPQUERY/HR_XX_PA_ESS
    The country code "XX" stands for "international." The InfoSet itself is in the global area (cross-client). You can create customer-specific InfoSets by copying an existing entry. Take account of your  customer namespace and set the relevant country code.
    Note: The Personnel Number field (P0000-PERNR) must not be added to the InfoSet. If you want to use the personnel number, use the P0001-PERNR field, for example.
    e) In the Sort field of the Output Fields List tab page, you can specify the sort sequence in the hitlist.
    Example: You have selected the Last Name and First Name fields for the hitlist. You want the hits to be sorted first of all by the employees' last name, then by the first name. You therefore enter 1 for the last name and 2 for the first name in the Sort field.
    f) Once you have completed your modifications, choose Check Display Table. If the check was successful, choose Save to save your changes. If inconsistencies were found during the check, a message in the relevant line notifies you of them.
    Further notes
    In certain circumstances, runtime issues may occur, especially in data selection. If they do, set the Selection Fields indicator in the Use Default Settings for group box. This deactivates the use of the InfoSet Query; instead, the system uses the BAPI_EMPLOYEE_GETDATA method.
    You can switch the hitlist and the detail screen to the BAPI_EMPLOYEE_GETDATA method by setting the Output Fields List and Output Fields Detail indicators.
    Note that by setting an indicator, you restrict the field selection in the relevant tab page to the interface of the method.
    If, in the initial screen, you enter a country for which values have not yet been defined, the system automatically creates an entry that sets all indicators in the Use default settings for group box. You can then edit the entry to suit your requirements.
    You can specify whether you want employees' photos to be displayed in the service in the IMG for Employee Self-Service under Determine User Options.
    If this helps, pl do reward.

  • How to load an applet using custom classloader ?

    Hi All,
    How to load an applet using custom classloader rather than using default browsers classloader i.e AppletClassLoader usually ?
    Regards,
    Kumar.

    I would guess that that would require two applets.
    The first does nothing but create the custom class loader and then load the second applet.

  • How to query a dataset using custom code in report builder 3.0

    Hi,
    Can anyone please suggest whether it is possible to query a dataset by using custom code in report builder 3.0.
    Thanks in advance.

    Hi Purbasha,
    please see below similar thread:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9af8f39a-9dc5-49ab-91af-2f64198c8477/ssrs-2008-custom-code-for-database-query
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/440ff5de-1c21-47de-95d8-e4212d6cef6d/dataset-in-custom-code-in-sql-server-reporting-services?forum=sqlreportingservices
    swallow

  • How to include richtext in a custom xtype as multifield

    Hi,
    I have a requirement of adding a richtext in a custom multifield.
    There is a richtext component created under '/apps/website/components/richtext/items/items/richtext'
    This richtext would have 3 plugins as well.
    Now my custom multifield xtype should have the below
    1) Text Field
    2) Pathfield
    3) Richtext(with the additional plugins. Same as /apps/website/components/richtext/items/items/richtext).
    I tried the below option
    1)
    this.text = new CQ.form.RichText({
                    anchor: '100%',
                    fieldLabel : "Enter Text",
                    width : '400',
                    "rtePlugins" :{
                        "edit" : {
                            "features" : ['cut', 'copy', 'paste-plaintext']
                        "subsuperscript" : {
                            "features" : "*"
                        "spellcheck" : {
                            "features" : "*"
                        "undo" : {
                            "features" : "*"
                        "findreplace" : {
                            "features" : "*"
                        "misctools" : {
                            "features" : "*"
                    listeners : {
                        change :{
                            scope : this,
                            fn : this.updateHidden
                        dialogclose: {
                            scope : this,
                            fn : this.updateHidden
                        destroy: function(){
                            this.el.dom={};
                this.add(this.text);
    However in the dialog I'm able to add the xtype only once.
    On click of add item I see the below error in console
    TypeError: features is undefined
    var featCnt = features.length;
    Please let me know how I can get rid of this error.
    2) Is there an option to include xtype as cqinclude
      path : '/apps/website/components/richtext/items/items/richtext.infinity.json',
      xtype : 'cqinclude',  
    Thanks
    Narendra.

    You're in the wrong Forum. This forum is for FrameMaker's connectors to various content manegement systems, not Adobe's CQ/Experience Manager products.

  • How to include /Exclude products in customer catalog view.

    We are using CRM 4.0 with internet sales applications (ISA).We have product catalog setup in webshop where customer/customer service team given access to view products based on the different product hierarchy.
    This is enabled though creation of multiple customer views
    Now we have a requirement that customer need to view only few product out of the product category level assignment but asper the current system if a particular product category is marked then it show all the product under the product category in hierarchy assignment
    Which means assume there are 100 products assigned to a product category ID under customer view, but customer has show all the 100 products but he need to view only 50 products out of 100 products assigned
    We need to find out if it is possible to include / exclude products from a customer view not based on the product hierarchy / category ID.
    Is that possible? we tried Partner product range but not sure ...can anyone throw some light in it... please let me know if I'm not clear on this.
    Thanks
    Jegatheesan.

    The app builder prior to 8.x was only designed to install the application you created. The actual instrument driver VIs should be included in the app but the IVI driver itself (the low level dll) is not. You should really include the installer for the IVI driver and not just the dlls. This is the .msi file that is on the instrument driver download page. If you are getting an error about VISA32, then it sounds like VISA was not installed either. I usually install VISA and NI-GPIB from the CD that comes with the GPIB board and I do this when I install the board into the computer. However, you can also include these installers with your app as well. On the Installer Settings tab, click the Advanced button. You have the option there of 'Run executable after installation'. The simplest thing to do is to create a .bat file that will call the other installers you include with the distribution. Don't forget that you also need the IVI Compliance Package so include that installer as well.

  • How to filter Groupwise records using custom fields?

    I am consuming the Groupwise web service and want to search
    the appointments based on value provided for a custom field. All
    the other searches (date, subject, message) are working fine. The
    only thing that does not work is search on the custom field. If I
    search on the Custom field the service returns all records.
    Following is the excerpt of the code. CFGWID is the field
    that is sent to groupwise with an application generated value. I am
    able to query the field but cannot filter appointments using the
    CFGWID field.
    <filter>
    <elements type="FilterGroup">
    <element type="FilterEntry">
    <op xsi:type="xsd:string">eq</op>
    <custom xsi:type="xsd:custom">cfgwid</custom>
    <value
    xsi:type="xsd:string">#arguments.AppMsgID#</value>
    </element>
    </elements>
    </filter>
    At this time there is only one entry in this filter. Any
    ideas?

    PS0510 wrote:
    > I am consuming the Groupwise web service
    First of all, "Groupwise web service"!? Please tell me more
    about this.
    I use Groupwise here and this sounds like an interesting
    feature!
    > and want to search the appointments based on value
    provided for a custom field.
    How are you searching the custom field? Are you accounting
    for the name
    space xsi: and xsd: values? There is a bit of quirkiness with
    CFML xml
    functionality when working with name spaces. I've always been
    able to
    work out these issues with a bit of Google searching.

  • How to include interactive components in custom models?

    Hello guys,
    How can I include interactive components like switches and indicator in my custom models.
    I'm experienced working with new SPICE models and footprints, now I'm planning design custom indicators and keyboard based on switches but firts I would like to make sure it's possible.
    Thanks,
    Roosvelt
    Solved!
    Go to Solution.

    Hi Roosvelt,
    Unfortunately, interactive components can only be created internally, and you cannot modify existing interactive components. We have heard this request before, and I hope to see this in a future release, but we have time frame for when this might be possible.
    Garret
    Senior Software Developer
    National Instruments
    Circuit Design Community and Blog
    If someone helped you, let them know. Mark as solved or give a kudo.

  • How to create Theme SWC using Flash Builder 4

    I have created a library project in flex which contains spark skin classes for certain controls and a style sheet class. The problem is when I use the SWC generated by thsi project  and import this SWC as Theme and apply it to another test project. the stylings chasnges are not reflected.
    IF I use comand line to generate Theme SWC the changes are reflected.
    Can any one help me use FLash Builder to create and apply theme SWC.

    Connect to PHP in FB4 is used when you have a PHP Class and you want to use that in FB, for example Employee.php and it has a Employee class and various methods in that like create, update, get, delete.
    However, if you have exposed your functionality in PHP as a HTTP URL (i.e. it is not a class), then you should be using HTTPService from the data menu.
    So if your file is login.php and is accessible as a URL, then using the HTTPService and enter the URL.
    Does this help?
    -Sunil

  • How can I make FF use custom visited/unvisited link colors but allow the website to choose the other text and background colors?

    websites often choose colors that I have trouble distinguishing between but overriding the other colors can cause color defects on certain websites.

    Add code like this to userContent.css in the chrome folder.<br />
    There can however still be problems with clickable elements that use background images.
    Remove that link from the history to restore that background image.
    *http://kb.mozillazine.org/userContent.css
    *http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    *ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>a:visited, a:visited * {
    color:#CC33CC!important;
    background-color:#F8F8F8;
    </nowiki></pre>

  • How to get data for current week and previous week using customer exit in Bex.

    Hi everyone,
    I have a scenario in which I need to display data for current week and previous week (based on "sy_datum" the program has to calculate current week and previous week) in Bex using  Customer exit. I have created one variable in Bex Query Designer and I have written code for the variable in CMOD. But it is not working fine, (I know that we can do the same by using offset value in Bex). Can some one guide me how to achieve my requirement using customer exit.
    Thanks in Advance,
    G S Ramanjaneyulu.

    Hi krishna,
    Thanks for your quick reply, can you have a look at my code,
    case i_vnam.
    WHEN 'ZPWK_CWK'.
    ranges : pre_week for sy-datum.
    data : start_date type DATS,
           end_date TYPE dats .
    ************FM TO GET FIRST DATE OF CURRENT WEEK ************************
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        DATE_IN  = sy-datum
      IMPORTING
        DATE_OUT = start_date.   " WEEK FIRST DATE
    end_date = START_DATE + 6.   " WEEK LAST DATE
    END_DATE   = START_DATE - 1.   " PREVIOUS WEEK END DATE
    START_DATE = START_DATE - 7.   " PREVIOUS WEEK START  DATE
    **********PREVIOUS WEEK DATES IN PRE_WEEK******************
    pre_week-SIGN   = 'I'.
    pre_week-option = 'BT'.
    pre_week-LOW    = START_DATE.
    pre_week-HIGH   = END_DATE.
    APPEND  pre_week.
    CLEAR : START_DATE,END_DATE.
    endcase.
    Regards,
    G S Ramanjaneyulu.

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

  • How can I use custom WLST commands for Oracle SOA Suite in Weblogic

    Hi There,
    I'm trying to view and search the weblogic log files using WLST on a Solaris/Unix system.
    I have come across this "custom WLST commands for Oracle SOA Suite" and thought of using the custom logging commands to get my task done.
    However, my WLST shell is not recognizing the commands and giving me the NameError!
    wls:/devDomain1/domainRuntime> listLogs()
    Traceback (innermost last):
    File "<console>", line 1, in ?
    NameError: listLogs
    I tried the commands listLogs, displayLogs, getLogLevel & setLogLevel but in vain!
    I have followed the instructions as per the oracle recommendation of using Custom WLST commands (http://docs.oracle.com/cd/E29597_01/core.1111/e10105/getstart.htm#ASADM10692) as below
    - Launched the WLST shell from Oracle Home.
    cd ORACLE_HOME/common/bin
    ./wlst.sh
    - Tried to run the listLogs command from domainRuntime()
    I would like to know if I need to import any additional libraries to run the custom WLST commands for Oracle SOA Suite in my WLST shell?
    I have only weblogic 10.3.1 server installed on my Solaris 10 machine on which I have deployed the OSB application software.
    There is no SOA Suite installed.
    Or is there any other way I can browse the Server Log file and get the list of log messages? Basically I would like to use this feature in my script to customize it according to my requirement of listing specific error logs which I can work it out if I know how to make these commands work.
    Please advise if this is possible and how?
    Cheers.
    Satish

    I have tried on my OSB installation (no SOA Suite here), the command listLogs() works (I was in online mode, after a connect), and the classpath is:
    CLASSPATH=/opt/oracle/fmw11_1_1_5/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/oracle/fw11_1_1_5/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0.33.x6_64/lib/tools.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/server/lib/weblogic_sp.jar:/opt/oracle/fmw11_1_1_5/wlserver_10./server/lib/weblogic.jar:/opt/oracle/fmw11_1_1_5/modules/features/weblogic.server.modules_10.3.5.0.jar:/opt/oracle/fmw111_1_5/wlserver_10.3/server/lib/webservices.jar:/opt/oracle/fmw11_1_1_5/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/optoracle/fmw11_1_1_5/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/opt/oracle/fmw11_1_1_5/oracle_common/moules/oracle.jrf_11.1.1/jrf-wlstman.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lib/adfscripting.jar:/opt/oracl/fmw11_1_1_5/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/lb/mdswlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/auditwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_cmmon/common/wlst/resources/igfwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jps-wlst.jar:/optoracle/fmw11_1_1_5/oracle_common/common/wlst/resources/jrf-wlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/reources/oamap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/opt/oracle/fmw111_1_5/oracle_common/common/wlst/resources/ossoiap_help.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/osoiap.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/opt/oracle/fmw11_1_1_5/oracle_comon/common/wlst/resources/sslconfigwlst.jar:/opt/oracle/fmw11_1_1_5/oracle_common/common/wlst/resources/wsm-wlst.jar:/optoracle/fmw11_1_1_5/utils/config/10.3/config-launch.jar::/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbynet.ar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/derby/lib/derbyclient.jar:/opt/oracle/fmw11_1_1_5/wlserver_10.3/common/drby/lib/derbytools.jar::
    The wlst.sh I have used is /opt/oracle/fmw11_1_1_5/osb/common/bin/wlst.sh
    I hope this can help

  • How to include custom application.xml in JDev9i project

    Can anybody explain to me how to include a custom application.xml file when deploying to an .ear file? I need to include application wide security roles, and I can't see where in Jev9i how to do this.
    After searching this forum, I see that jdev9i can't include the orion-application.xml, but I want to include just the standard J2EE application.xml. Is this possible?
    Thanks,
    matt

    The standard application.xml file unfortunately can't be customized in JDev 9.0.2. The reasons why this capability was left out of JDev 9.0.2 are same reasons why the other EAR-level XML files were excluded. The OTN thread
    Re: Regarding 11i and E-business suite
    has a summary of those reasons, which you've probably seen. We know this is an area in need of improvement and will be adding this functionality in the JDev 9.0.3 release. Until then, you'll have to go with a work-around like an Ant build file, batch file, Java application, or some other kind of script.
    Below is a sample Java application which can be used to insert <security-role> elements into an EAR file's application.xml. Modify the main() method to customize for your purposes, and put xmlparserv2.jar on the classpath (in a JDev project, add the "Oracle XML Parser v2" library):
    package mypackage4;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class PostProcessEAR
    public static void main( String[] args ) throws IOException
    final String earFile = "C:\\temp\\myapp.ear";
    final PostProcessEAR postProcess = new PostProcessEAR( earFile );
    postProcess.addSecurityRole( null, "first_role" );
    postProcess.addSecurityRole( "Description for the second role", "second_role" );
    postProcess.commit();
    System.out.println( "Done." );
    private final File _earFile;
    private final ArrayList _securityRoles = new ArrayList();
    public PostProcessEAR( String earFile )
    _earFile = new File( earFile );
    public void addSecurityRole( String description, String roleName )
    if ( roleName == null )
    throw new IllegalArgumentException();
    _securityRoles.add( description );
    _securityRoles.add( roleName );
    * Write out modified EAR file.
    public void commit() throws IOException
    if ( _securityRoles.size() == 0 )
    return;
    final ZipFile zipFile = new ZipFile( _earFile );
    final Enumeration entries = zipFile.entries();
    final File outFile = new File( _earFile.getAbsolutePath() + ".out" );
    final ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( outFile ) ) );
    while ( entries.hasMoreElements() )
    final ZipEntry entry = (ZipEntry) entries.nextElement();
    final InputStream in = zipFile.getInputStream( entry );
    if ( "META-INF/application.xml".equals( entry.getName() ) )
    final XMLDocument modifiedApplicationXml = insertSecurityRoles( in );
    final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
    modifiedApplicationXml.print( byteOutput );
    final int numBytes = byteOutput.size();
    entry.setSize( numBytes );
    if ( entry.getMethod() == ZipEntry.STORED )
    entry.setCompressedSize( numBytes );
    final CRC32 crc32 = new CRC32();
    crc32.update( byteOutput.toByteArray() );
    entry.setCrc( crc32.getValue() );
    out.putNextEntry( entry );
    byteOutput.writeTo( out );
    else
    // Copy all other zip entries as they are.
    out.putNextEntry( entry );
    copy( in, out );
    in.close();
    out.close();
    private XMLDocument insertSecurityRoles( InputStream in ) throws IOException
    final DOMParser domParser = new DOMParser();
    domParser.setAttribute( DOMParser.STANDALONE, Boolean.TRUE );
    try
    domParser.parse( in );
    final XMLDocument doc = domParser.getDocument();
    final Element docElem = doc.getDocumentElement();
    final Iterator iter = _securityRoles.iterator();
    while ( iter.hasNext() )
    final String desc = (String) iter.next(); // might be null
    final String roleName = iter.next().toString(); // must not be null
    final Element securityRoleElem = doc.createElement( "security-role" );
    if ( desc != null )
    securityRoleElem.appendChild( createPcdata( doc, "description", desc ) );
    securityRoleElem.appendChild( createPcdata( doc, "role-name", roleName ) );
    docElem.appendChild( securityRoleElem );
    return doc;
    catch ( SAXException e )
    e.printStackTrace();
    return null;
    private Element createPcdata( XMLDocument doc, String elemName, String pcdata )
    final Element elem = doc.createElement( elemName );
    elem.appendChild( doc.createTextNode( pcdata ) );
    return elem;
    private final byte[] buffer = new byte[4096];
    private void copy( InputStream in, OutputStream out ) throws IOException
    while ( true )
    final int bytesRead = in.read( buffer );
    if ( bytesRead < 0 )
    break;
    out.write( buffer, 0, bytesRead );

Maybe you are looking for