ServletFileUpload.parseRequest return empty list in Struts 1.3?

I used ServletFileUpload.parseRequest(request) to get my list of items, with Struts 1.3, JBoss 4.2.2GA(migrated from JBoss 4.0.5GA) I am using JDK 1.5, on myEclipse 6.6 ( migrated from myEclipse 5.5.1GA).
My file upload application used to work and ServletFileUpload.parseRequest(request) used to return non empty results as a List<FileItem>. I am not sure ( that's the frustrating part) what has changed, but now I am getting a empty list!
I have switched to previous version of JBoss 4.0.5.GA, and myEclipse 5.5.GA and still it didn't work. I know what I need to have for this to work, i.e. :
JSTL tag in JSP:
<html:form enctype="multipart/form-data"....>
<html:file styleId="uploadFile" property="uploadFile" size="40" />
My FormBean has uploadFile as FormFile and getter and setter for it.
I wrote a Utility class to include this apache commons fileupload API and my action class calls the Util class.
The Util class looks like this:
DiskFileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List<FileItem> items = (List<FileItem>) upload.parseRequest(request);
Like I said, items used to return non-empty results and I was uploading file just fine. I am using Struts 1.3, Spring 2.0, which hasn't changed. And even though my myEclipse and JBoss version changed, I did revert back to the previous version just to test them and still am getting empty list.
I am pulling my hair out on this, I'd really appreciate any input and if you need more info, I'd be happy to replenish them!
Thanks in advance!

The current release BEA Workshop 3.2 (build 569), does not bundle Struts 1.3.5 and is also not aware of Struts 1.3 release.
However, this should not stop you from manually importing the Struts 1.3 libraries or samples into Workshop.
Preferences | Workshop Studio Facet Libraries | Struts Libraries, is used by the New Web app and Project Facet wizard to import the libraries on creation. Instead you can manually copy/overwrite Struts 1.3 libraries in your existing Struts project.We will keep you posted on the 1.3 support release.

Similar Messages

  • Jakarta commons ServletFileUpload parseRequest return 0 items, migration ?

    I used ServletFileUpload.parseRequest(request) to get my list of items, with Struts 1.3, JBoss 4.2.2GA(migrated from JBoss 4.0.5GA) I am using JDK 1.5, on myEclipse 6.6 ( migrated from myEclipse 5.5.1GA).
    My file upload application used to work and ServletFileUpload.parseRequest(request) used to return non empty results as a List<FileItem>. I am not sure ( that's the frustrating part) what has changed, but now I am getting a empty list!
    I have switched to previous version of JBoss 4.0.5.GA, and myEclipse 5.5.GA and still it didn't work. I know what I need to have for this to work, i.e. :
    JSTL tag in JSP:
    <html:form enctype="multipart/form-data"....>
    <html:file styleId="uploadFile" property="uploadFile" size="40" />
    My FormBean has uploadFile as FormFile and getter and setter for it.
    I wrote a Utility class to include this apache commons fileupload API and my action class calls the Util class.
    The Util class looks like this:
    DiskFileItemFactory factory = new DiskFileItemFactory();
    ServletFileUpload upload = new ServletFileUpload(factory);
    List<FileItem> items = (List<FileItem>) upload.parseRequest(request);
    Like I said, items used to return non-empty results and I was uploading file just fine. I am using Struts 1.3, Spring 2.0, which hasn't changed. And even though my myEclipse and JBoss version changed, I did revert back to the previous version just to test them and still am getting empty list.
    I am pulling my hair out on this, I'd really appreciate any input and if you need more info, I'd be happy to replenish them!
    Thanks in advance!

    amberbee1999 wrote:
    BalueC....I have checked the User guide and FAQ to see prior to posting. If indeed Struts has consumed the request and intercept it the 1st time and when it comes down to the Action that Request is already empty, then I am not sure why it USED TO WORK with the same code and all. I know there are other Filters or Servlet interceptors in the system as well. I am planning on installing another Filter and see if I see any InputStream.
    I guess THE PROBLEM is that it worked before /w same Struts version and all. There hasn't been any Struts config change or new filter or servlet interceptor installed either.As I don't have any practical experience with Struts, I can't help you much in detail. Just follow the given link how to do it properly. There's no need to do it all the "raw" way. Just let Struts handle it.

  • Jakarta commons FileUpload - ServletFileUpload.parseRequest(...)

    Hello people. I am using:
    # Orion app server (don't ask why)
    # WebWork 2.1.7 framework
    # Jakarta commons file upload 1.2
    While writing a file upload action I am having problems with ServletFileUpload.parseRequest(...) as it always returns an empty list.
    Reading related Jakarta FAQ it says "this most commonly happens when the request has already been parsed, or processed in some other way."
    I then assumed it was my WebWork interceptor so I took that out but I'm still getting the same problem.
    Am I missing something in my JSP, another <input> or something?
    Is the request being parsed somehwere else beforehand (maybe a WebWork issue)?
    Any help would be much appreciated.
    Here is the relevant code...
    My JSP<html>
         <head>
              <title>File Upload</title>
         </head>
         <body>
              <form enctype="multipart/form-data" method="post" action="doUpload.action" name="uploadForm">
                   <input name="upload" type="file" label="File"/>
                   <input type="submit" value="upload" />
              </form>
         </body>
    </html>
    The execute() method of my action     public String execute() {
              log.info("executing");
              // get the request
              HttpServletRequest request = ServletActionContext.getRequest();
              // check that we have a file upload request
              boolean isMultipart = ServletFileUpload.isMultipartContent(request);
              log.debug("request "+ ( (isMultipart ? "IS" : "is NOT") ) +" a multi-part");
              if (isMultipart) {
                   // Create a factory for disk-based file items
                   DiskFileItemFactory factory = new DiskFileItemFactory();
                   factory.setSizeThreshold(100);
                   factory.setRepository(new File("C:/tmp/cms/uploads"));
                   // Create a new file upload handler
                   ServletFileUpload upload = new ServletFileUpload(factory);
                   // Parse the request
                   try {
                        //List /* FileItem */ items = upload.parseRequest(request);
                        _uploads = upload.parseRequest(request);
                   } catch (FileUploadException e) {
                        log.error("Error parsing request" , e);
                   // if the above method doesn't work, use my method :)
                   if (_uploads.isEmpty()) {
                        _uploads = parseRequest(request);
              return (_uploads == null) || _uploads.isEmpty() ? INPUT : SUCCESS;
         }My implementation of parseRequest(...) works but returns File objects and I need FileItem objects. I don't really want to use this method but will include it here just incase it triggers some inspiration for someone.
    private List<File> parseRequest(HttpServletRequest requestObj) {
             List<File> files = new ArrayList<File>();
             // if the request is a multi-part
             if (requestObj instanceof MultiPartRequestWrapper) {
                  // cast to multi-part request
                  MultiPartRequestWrapper request = (MultiPartRequestWrapper) requestObj;
                   // get file parameter names
                   Enumeration paramNames = request.getFileParameterNames();
                   if (paramNames != null) {
                        // for each parameter name, get corresponding File
                        while (paramNames.hasMoreElements()) {
                             File[] f = request.getFiles("" + paramNames.nextElement() );
                             // add the File to our list
                             if (!ArrayUtils.isEmpty(f)) {
                                  files.add(f[0]);
              return files.isEmpty() ? null : files;
        }

    Hi edin7976, just wonder have you got any feedback for this problem?
    I really want to push this thread up as I am stuck at the exact same question. Can anybody give a hint?

  • Applescript button returned of list

    Hi
    Here is my script:
    set firstList to {"Sincronizza proprietà avanzate", "Escludi proprietà avanzate"}
    set listchoice1 to choose from list firstList with prompt "Le proprietà avanzate di una cartella sono l'icona della cartella, la posizione degli elementii al suo interno e l'icona delle cartelle al suo interno." with title "Fai una selezione" without multiple selections allowed
    At the end of the list there are two buttons, "Ok" and "Cancel", if I select "Ok" it goes ahed, if I select "Cancel" it still goes ahed.
    Instead I want that if the button "Cancel" is selected, regardless of the choice made, the application must close.
    How can I do that?

    Returend result from choose from list
    Result
    If the user clicks the OK button, returns a list of the chosen number and/or text items; if empty selection is allowed and nothing is selected, returns an empty list ({}). If the user clicks the Cancel button, returns false
    So check to see if the result returned is false and if it is exit.
    Something like (there are other ways to do this)
    if listchoice1 is false then
         tell me to quit
    end

  • What's Empty List Good For?

    I'm having a hard time understanding the point of an empty list. The following code doesn't let me add anything to the list:
    public static void main(final String[] args) {
       final List<String> mammalList = Collections.emptyList();
       mammalList.add("Dog");
       mammalList.add("Cat");
       final List<String> fishList = Collections.emptyList();
       fishList.add("Shark");
       fishList.add("Grouper");
       System.out.printf("Mammals: %s%n", mammalList);
       System.out.printf("Fish: %s%n", fishList);
    }Gives Exception in thread "main" java.lang.UnsupportedOperationException
         at java.util.AbstractList.add(Unknown Source)
         at java.util.AbstractList.add(Unknown Source)
         at Test.main(Test.java:16)
    So, if you can't use the empty list, why have it in the first place? Why not just say
    List<String> mammalList = new ArrayList<String>();What's the added value of EMPTY_LIST? What am I missing here?

    It's useful for return values from methods where the caller is not expecting a modifiable list.
    public List<String> findSomeStuff() {
      // ... do search here ...
      if(!foundResults) {
        return Collections.emptyList();
      // ... return real results
    }It's also useful for simplifying subsequent code without having to deal w/ null values.
    List<String> results = getSomeResults();
    if(results == null) {
      results = Collections.emptyList();
    // process "results" knowing it is not null
    for(String result : results) {
    }In both of these cases i don't need to instantiate a new list ("emptyList()" returns an single existing instance).

  • Dynamic LOV displays empty list

    Hi,
    I use the following sql in my dyncamic LOV, but it always gives an empty list. However, the sql does return values when run in sqlplus. Any ideas?
    select p.description, p.id
    from person p,
    customer c
    where p.customer_id = c.id
    and c.description = :p2_customer_description
    Thanks

    I think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
    Hope this helps.
    Florin

  • Cfdirectory returns empty set despite full permissions?

    I am porting a  coldfusion application from 32-bit ubuntu to 64-bit and have run into an  odd snag.  For some reason, I am able to perform file operations in a  directory but am completely unable to get a directory listing using  cfdirectory.
    The CF server is Ubuntu 10.04 64-bit running  coldfusion mx7.  It is joined to active directory using centrify  express, and has the centrify samba package installed instead of regular  samba.  The directories in question actually reside on windows servers -  Windows Server 2003 and 2008.  The shares are mounted on the CF server  using the following lines in fstab:
    //server2003/share /network/server1/share smbfs _netdev,noperm,credentials=/root/.smbpasswd,uid=0,file_mode=0777,dir_mode=0777   0 0
    //server2008/share /network/server2008/share smbfs _netdev,noperm,credentials=/root/.smbpasswd,uid=0,file_mode=0777,dir_mode=0777   0 0
       Coldfusion jrun process is running as root.  The directories are  browsable with no apparent problems when logged in via ssh.  Coldfusion  can create new files in directories with cffile, and FileExists works  with one of the files I'm trying to list, but cfdirectory always returns  an empty list.  I tried using the undocumented FileInfo="name" option  to avoid running java's stat() command, but that yielded an empty set as  well.
    After getting some advice on Experts Exchange, I tried getting a directory listing with java:
    <cfset obj = createObject("java", "java.io.File").init(testPath)>
    <cfoutput>
    listRoots = #arrayLen(obj.listRoots())#<br>
    listFiles = #arrayLen(obj.listFiles())#
    </cfoutput>
    ... no dice.  Empty result sets as before, though java could see that  the parent directory was there, and obj.canRead() and obj.canWrite()  both returned True.
    I think I've already summarized all I've tried, but here's a link to the  question thread on experts exchange, in case I missed something:  http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup _Language/Q_27062231.html
    I have no idea what's going on here... any help would be greatly appreciated!!
    Thanks!

    Just to confirm: you're getting (basically ~) the same results with Java file operations as you are with CF's?
    That being the case, you might be better of rephrasing your question on expert-sex-change to be more Java-centric: ultimately it'll be a Java issue, and the Java community is much bigger than CF's.  Additionally, stackoverflow might be a better place to post?
    Are you in the position to install a dev version of CF9 in the same environment and test if that works any better?
    Adam

  • Fn_my_permissions returns empty result yet my account is a member of sysadmin?

    I was trying to see what permissions I had on another server using fn_my_permissions 
    USE Database_name_here         
    SELECT * FROM sys.fn_my_permissions(NULL, 'SERVER')  
    USE Database_2_name_here         
    SELECT * FROM sys.fn_my_permissions(NULL, 'SERVER')  
    The one DB that returns the expected list of permissions is the only DB where I am the owner.  Others return an empty result.
    My (domain) account is in the local administrators group which is in the sysadmin server role.  
    Whats going on here?  Does my account have to be explicitly granted permissions to those schemas?  Is role membership not enough?

    Hi,
    SELECT * FROM fn_my_permissions(NULL, 'SERVER') returns a list of the effective permissions of the caller on the server.
    For the server itself, a null value (meaning "current server") is required and fn_my_permissions cannot check permissions on a linked server.
    In my option, the server level permission should not change with the databases you specified. You can re-run the code and see if it returns empty by chance.
    To return a list of the effective permissions of the caller on the AdventureWorks2012 database:
    USE AdventureWorks2012;
    SELECT * FROM fn_my_permissions (NULL, 'DATABASE');
    GO
    sys.fn_my_permissions (Transact-SQL)
    http://technet.microsoft.com/en-us/library/ms176097.aspx
    Tracy Cai
    TechNet Community Support

  • PdhEnumObjects returns corrupted list

    In my PC I have a graphics card of type NVIDIA Quadro NVS 295. When I have installed the latest driver from Windows Update or from NVIDIA website, then NVIDIA driver also installed "NVIDIA WMI 2.16.0". This tools breaks the Windows API PdhEnumObjects.
    NVIDIA WMI registers performance counters.
    The Windows API PdhEnumObjects returns a list of performance counter objects. The list is a TCHAR buffer with all the object names. The end of the list is recognized by an empty string.
    When NVIDIA WMI 2.16.0 is installed PdhEnumObjects returns a list of counter objects, but in the middle of the list there is an empty string, so all programs detect that as the end of the list.
    This bug not only breaks PdhEnumObjects but also PdhBrowseCounters. PdhBrowseCounters is for example used by the Windows Performance Monitor.
    This is a bug in the NVIDIA tool, but I think Windows should also handle that better and disallow registration of performance counter objects with an empty name - or exclude them from PdhEnumObjects.
    Is any one reading that from Microsoft and could please file that as a bug!?
    Regards, Werner Henze

    This is a community forum. Emails are entirely out of the hands of the people who participate, we can't even see your email. You should return to the forum to see replies when you post in the LiveCycle Assembler forum which is here http://forums.adobe.com/community/livecycle/livecycle_modules_and_development_tools/assemb ler

  • OracleDataSourceEnumerator GetDataSources method returns empty

    Hello,
    I have a problem regarding the OracleDataSourceEnumerator.GetDataSources() method.
    Its does not return any datasource listed in my tnsnames.ora.
    I do have a full 10g client installed.
    After that I installed odp.net . In both oracle homes I do have the tnsnames.ora file.
    In the registry does the oracle_home parameter point to the odp.net home.
    How can I see wich oracle home is used by odp.net?
    Thanks in advance.

    I have checked the operating system permission on the root directory and its sub directories and the user that's running that executes the prog has got the read access to all directories and sub directories.
    Won't API will throw an exception if there program is not allowed to access the directories.
    Just to eliminate the security permission option i have written a simple program that calls the native file system API using reflection and list the sub directories on the mount but this also returns an empty list, but if i do ls -ltr on the same directory it shows three sub directories
    Class fileClass = cl.loadClass("java.io.FileSystem");
    Method[] methods = fileClass.getDeclaredMethods();
    Object fs = null;
    Method list = null;
    for (int i = 0; i < methods.length; i++) {
    Method method = methods ;
    System.out.println(method.getName());
    if (method.getName().equals("getFileSystem")) {
    method.setAccessible(true);
    fs = method.invoke(null, null);
    if (method.getName().equals("list")) {
    method.setAccessible(true);
    list = method;
    System.out.println("FileSystem is : " + fs);
    String a[] = (String[]) list.invoke(fs, new Object[] { new File(
    args[0]) });
    System.out.println(Arrays.asList(a));
    Edited by: HarmanSingh on Jul 5, 2008 3:22 AM
    Edited by: HarmanSingh on Jul 5, 2008 3:26 AM

  • Pl/sql web service returning a list of results

    I am able to publish a pl/sql package as a web service that returns a single result. However, when I try to return a list of results, I get an error in jdeveloper when I select the package and invoke publish as web service.
    I use a simple pl/sql package:
    create type longcredit_obj as object (
    credit varchar2(200),
    parlrepid number(6),
    mbrid number(6),
    rdgid number(6))
    create type longcredit_list as table of longcredit_obj
    create or replace package longcredit_pck as
    function get_longcredit (initials in varchar2) return longcredit_list;
    end longcredit_pck;
    create or replace package body longcredit_pck as
    function get_longcredit (
    initials in varchar2) return longcredit_list
    as
    i integer;
    list longcredit_list;
    cursor c_credit is
    select a.credit, a.parlrepid, a.mbrid, a.rdgid
    from member_credits_test_vw a
    where upper(init) = upper(initials);
    begin
    list := longcredit_list();
    for rec in c_credit
    loop
    i:= list.last;
    list(i) := longcredit_obj(null, null, null, null);
    list(i).credit := rec.credit;
    list(i).parlrepid := rec.parlrepid;
    list(i).mbrid := rec.mbrid;
    list(i).rdgid := rec.rdgid;
    end loop;
    return list;
    end get_longcredit;
    end longcredit_pck;
    Is this a feature that is available?
    Any suggestions are appreciated.
    Thank you in advance.
    Carmen.
    I am running jdeveloper 10.1.3.2.0 and database v. 10.1.0.4.0.

    Hi Steffen,
    I did manage to get it to work by doing the following:
    drop type longcredit_list
    drop type longcredit_obj
    create type longcredit_obj as object
    (credit varchar2(200),
    parlrepid number(6),
    mbrid number(6),
    rdgid number(6))
    create type longcredit_list as table of longcredit_obj
    create or replace package longcredit_pck as
    function get_longcredit(initials in varchar2) return longcredit_list;
    end longcredit_pck;
    create or replace package body longcredit_pck as
    function get_longcredit(initials in varchar2) return longcredit_list
    as
    v_longcredit_obj longcredit_obj:=longcredit_obj(null,null,null,null);
    v_longcredit_list longcredit_list:=longcredit_list();
    i number:=1;
    cursor getlist is
    select distinct a.credit, a.parlrepid, a.mbrid, a.rdgid
    from member_credits_test_vw a
    where upper(init) = upper(initials)
    order by a.parlrepid;
    begin
    for rec in getlist loop
    v_longcredit_obj.credit := rec.credit;
    v_longcredit_obj.parlrepid := rec.parlrepid;
    v_longcredit_obj.mbrid := rec.mbrid;
    v_longcredit_obj.rdgid := rec.rdgid;
    v_longcredit_list.extend;
    v_longcredit_list(i):=v_longcredit_obj;
    i:=i+1;
    end loop;
    return v_longcredit_list;
    end get_longcredit;
    end longcredit_pck;
    Also, before deploying, in jdeveloper, in the deploy file, I select the property filters under web-inf\classes and check all the classes that are unchecked (see thread id 505217).
    Also, the database I'm using now is v. 10.2.0.3.0.
    Thanks for your suggestion!
    Carmen.

  • EntryProcessor invokeAll returning empty ConverterMap{}

    Hi All,
    I am trying to write a custom entryprocessor and whatever I return from the invokeAll method in the entryprocessor, I am always getting a empty ConverterMap{}. The code for the entryprocessor is as below:
    public class CustomEP implements PortableObject, EntryProcessor {
         public CustomEP (){
    public Map processAll(Set entries) {
              Map results=new HashMap ();
    results.put ("1", "1");
    System.out.println("Inside process All method");
              return results;
    public Object process(Entry arg0) {
              Map results=new HashMap ();
    results.put ("1", "1");
    System.out.println("Inside process method");
              return results;
    The client code to invoke this entryprocessor is as below:
    Map results=cache.invokeAll(AlwaysFilter.INSTANCE, new CustomEP());
    The processAll method on the Coherence nodes is invoked but if the print the results on the client side it return empty ConverterMap{}
    On the other hand, if I invoke process method of CustomEP as below:
    Map results=(Map) cache.invoke(AlwaysFilter.INSTANCE, new CustomEP());
    I get the desired results. Please help me with the details why it is happening this way when the return type of the processAll is a Map.
    Thanks a lot!
    Regards,
    S

    911767 wrote:
    Hi Robert and JK,
    Thank you for your reply and time!
    I could not find these details in any of the documentation that specifies keys passed in the result should be subset of the keys passed to the processAll method. Anyways, my problem is to invoke server-side code (avoid de-serialization) by passing a filter and then create a entirely new map (key and value will be different from the entries extracted from the passed filter) by reading the data from the passed entries. How can I implement it?
    I am thinking to use aggregator as they are read-only and faster but again how to implement it using:
    public Object aggregate(Set entries){
    Again, I am getting an empty Map so is it necessary that the object returned should have keys matching the set of the entries passed to this method.
    Secondly, there are other methods such as, finalizeResult() and init() if I extend AbstractAggregator, do I need to implement them and if yes, how? The entries set passed to the aggregate() method may not reside on the same node.
    Please advise!
    Regards,
    SHi S,
    the process() return value object, or the entry value objects in the map returned by processAll() can be arbitrary objects. So you just return a map from process(), and return a map as the entry value in the result map from processAll().
    The AbstractAggregator has a fairly badly documented contract in the Javadoc (does not properly cover the values received in different scenarios for invocation). You should probably read the section about it in the Coherence book, that explains leveraging AbstractAggregator in significantly more details. It also happens to be in the sample chapter, but I recommend reading the entire book.
    I am not sure about the issues relating to posting links to PDFs on Packt's webpage, so I won't do that. Please go to Packt's webpage (http://www.packtpub.com ), look for the Coherence book there and download the sample chapter (or order the book).
    In short, all 3 to-be-implemented methods (init(), process(), finalizeResult()) in AbstractAggregator are called both on the server and on the caller side. You can distinguish which side you are on from looking at both the passed in fFinal boolean parameter and the m_fParallel attribute tof the aggregator instance.
    There are 3 cases:
    - non-parallel aggregation processing extracted values (m_fParallel is false, I don't remember what fFinal is in this case),
    - parallel aggregation storage side processing extracted values (if I correctly remember, m_fParallel is true, fFinal is false),
    - parallel aggregation caller side processing parallel results (m_fParallel and fFinal are both true).
    Depending on which side you are on, the process method takes different object types (on server side it receievs the extracted value, on caller side it receives a parallel result object instance).
    You SHOULD NOT override any of the other methods (e.g. aggregate() which you mentioned).
    The advantage of this approach is that the AbstractAggregator subclass instance can pass itself off as a parallel-aggregator instance.
    You should put together a temporary result in a member attribute of the AbstractAggregator subclass, which also means that it will likely not be thread-safe, but at the moment it is not necessary for it to be thread-safe either as it is called only on a single-thread.
    Best regards,
    Robert
    Edited by: robvarga on Feb 3, 2012 10:38 AM

  • Return multiple lists at once...

    Hi all,
    I was wondering if there was a good way to return two lists of strings at once. To my knowledge, theres no such thing as a list array. Is there a better way than adding two list objects to another list and returning the new list (which contains two lists of strings)? Thanks for any info.
    - Leon

    Another way, could be to pass one (or both) of the lists as method arguments.
    e.g....
    List list1 = new ArrayList();
    List list2 = new ArrayList();
    myMethod(list1, list2);
    public void myMethod(List list1, List list2) {
      if (list1 == null || list2 == null) return;
      list1.add(...);
      list1.add(...);
      list2.add(...);
    }You'll have to decide which way is suitable and if you do indeed need to
    return two Lists from your method.

  • Xslt copy-of creates a xml which returns empty while trying to access elements using XPATH

    Hi
    I am trying to do a copy-of function using the XSLT in jdev. This is what I do
        <xsl:param name="appdataDO"/>
        <xsl:template match="/">
        <ns1:applicationData>
          <ns1:applicationId>
            <xsl:value-of select="$appdataDO/ns1:applicationData/ns1:applicationId"/>
          </ns1:applicationId>
          <xsl:copy-of select="/fslo:ExternalapplicationData/fslo:ApplicationsHDRAddInfo">
          </xsl:copy-of>
        </ns1:applicationData>
        </xsl:template>
        </xsl:stylesheet>
    After this I can see the document created in the process flow as this :
        <ns1:applicationData>
        <ns1:applicationId>MMMM</ns1:applicationId>
        <ns2:ApplicationsHDRAddInfo>
        <ns3:genericFromBasePrimitive>iuoui</ns3:genericFromBasePrimitive>
        <ns4:EstimatedMarketValue>77</ns4:EstimatedMarketValue>
        <ns4:PropertyInsuranceFee>jih</ns4:PropertyInsuranceFee>
        <ns4:LoanOriginationFee>hjh</ns4:LoanOriginationFee>
        <ns4:RegistrarFee>kkkkk</ns4:RegistrarFee>
        <ns4:LoanCashInFee>hjh</ns4:LoanCashInFee>
        <ns4:LoanPaidInCashFlag>cddffgd</ns4:LoanPaidInCashFlag>
        </ns2:ApplicationsHDRAddInfo>
        </ns1:applicationData>
    But whenever I am trying to extract any of the output nodes I am getting an empty result. I can copy the whole dataset into similar kind of variable.
    But I am unable to get individual elements using XPATH.
    I tried using exslt function for node set and xslt 2.0 without avail.
    The namespaces might be the culprit here . The test method in the jdev is able to output a result but at runtime the xpath returns empty .
    I have created another transform where I try to copy data from the precious dataobject to a simple string in another data object .
    This is the test sample source xml for the transform created by jdev while testing with all namespaces, where I try to copy the data in a simple string in another data object.
        <applicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/bpmpa/fs/ulo/types file:/C:/JDeveloper/NewAPP/Xfrm/xsd/ApplicationData.xsd" xmlns="http://xmlns.oracle.com/bpmpa/fs/ulo/types">
           <applicationId>applicationId289</applicationId>
           <ApplicationsHDRAddInfo>
              <genericFromBasePrimitive xmlns="http://xmlns.oracle.com/bpm/pa/extn/types/BasePrimitive">genericFromBasePrimitive290</genericFromBasePrimitive>
              <EstimatedMarketValue xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">291</EstimatedMarketValue>
              <PropertyInsuranceFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">PropertyInsuranceFee292</PropertyInsuranceFee>
              <LoanOriginationFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanOriginationFee293</LoanOriginationFee>
              <RegistrarFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">RegistrarFee294</RegistrarFee>
              <LoanCashInFee xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanCashInFee295</LoanCashInFee>
              <LoanPaidInCashFlag xmlns="http://xmlns.oracle.com/bpm/pa/extn/headerCategories/">LoanPaidInCashFlag296</LoanPaidInCashFlag>
           </ApplicationsHDRAddInfo>
        </applicationData>
    And the xslt
        <xsl:template match="/">
            <ns1:DefaultOutput>
              <ns1:attribute1>
                <xsl:value-of select="/fslo:applicationData/fslo:ApplicationsHDRAddInfo/custom:LoanOriginationFee"/>
              </ns1:attribute1>
            </ns1:DefaultOutput>
          </xsl:template>
    This results in a empty attribute1. Any help will be appreciated .

    Please delete attributeFormDefault="qualified" elementFormDefault="qualified" from your XSD
    Please check the next link:
    http://www.oraclefromguatemala.com.gt/?p=34

  • Applescript: file.open("r") returns empty in jsx

    Hey guys,
    i am having a bit of a scripting problem here. The big goal for me at the moment is creating a UI script to control aerender.
    To achieve getting feedback from the terminal about when an aerender process is completed, i let the terminal trigger an applescript running a jsx inside after effects (since the terminal can't run a jsx inside after effects itself).
    However, this particular script needs to eval the contents of a text file that is outputted during the render process (its just a log file put into a fixed location). No matter what i do: I can't get a proper response from the script. Here is what should happen when a render is done:
    function RenderEnd () {
    var report = new File ("Macintosh HD/Users/macname/generallog.txt");
    report.open("r");
    var reportstring = report.read();
    report.close();
    var reportendindex = reportstring.indexOf("Total Time Elapsed:");
    var reportcloseindex = reportstring.indexOf("aerender version");
    var reportendstring = reportstring.substring(reportendindex, [reportcloseindex]);
    var regex = /Finished composition/gi, result, indices = [];
    while ( (result = regex.exec(reportstring)) ) {
        indices.push(result.index);
    var ItemStringArray = new Array ();
    for(var i=0; i<indices.length; i++){
        ItemStringArray.push("Finished Item " + (i+1) + ": " + reportstring.substring(indices[i]-32, [indices[i]-2]));
    var AlertString = "Rendering done." + "\r" + reportendstring + "\r" + ItemStringArray.toString().replace(",","\r");
    alert(AlertString);
    RenderEnd ();
    Running this script by itself properly returns an alert containing a message "Rendering done." plus additional info about the render time and item completion.
    But whenever i have the following applescript triggering the above jsx script...
    set scriptfile to (POSIX file ("/Applications/Adobe After Effects CS5.5/Scripts/AERenderEndTrigger.jsx"))
    tell application "Adobe After Effects CS5.5"
      DoScriptFile scriptfile
    end tell
    ...the line report.open("r") just returns empty.
    Same goes when i place the jsx in the startup folder and just call the function RenderEnd () via applescript. It's as if the file open/read stuff does not work when using applescript.
    Does anybody have an idea about this or knows the reason for why this obviously wrong behaviour happens? Maybe someone knows a different approach of how to get feedback from a completed aerender process back into a UI script.

    Ok, i finally found the issue:
    Applescript apparently does not recognize file paths beginning with a drive designation:
    When i change the file path part of the report file from
    var report = new File ("Macintosh HD/Users/macname/generallog.txt");
    to simply
    var report = new File ("/Users/macname/generallog.txt");
    everything works as it should.
    It's still a bit weird and i don't understand this. Maybe someone can explain this to me, please?

Maybe you are looking for

  • [SOLVED]Problem with sound in HDMI

    Hello good society of Arch Now I have problems with sound from HDMI. I use Arch as an tvPc, wasting movies and tv shows on it. I use ALSA and it works well, except of a few files that I have, then there is picture but sound is either twisted or not p

  • PLEASE HELP!!! Error - 36 when copying from powerbook to iMac/Lacie HDs

    I'm working on a film and have captured to my powerbook G4 in FCP. I am now trying to transfer my scratch disk to either my iMac (intel 2.4GHz) or my Lacie HD extreme 500 GB / Lacie 250 GB. When I drag the folder over, it starts copying and then at s

  • How to use BAPI_ASSET_RETIREMENT_POST(error)

    i am a abaper. when i use BAPI_ASSET_RETIREMENT_POST to retire An asset,there is an error message: 'Internal error: Line items were not created for the document'. the error message is the promble of the system configure?  please help me ! thanks . th

  • Preview, Applescript & Mountain Lion

    Just a warning: Because the "Preview" app has been un-AppleScript-able since forever, homegrown terminal commands are recommended to make it scriptable, such as: "Quit Preview.app, then open a terminal and enter: "sudo defaults write /Applications/Pr

  • Adobe License Recovery 11.5.0.9

    Has anyone had this problem. I open the application which takes me to terminal, which will not let me enter my password. End of story. How do I get terminal to accept? Thanks, C