Using a File Object

I have downloaded a file from a FTP site into a File object. This file doesn't actually exist the file itself is in memory. Instead of using the renameTo() command to save the file to the hard drive I want to take the file and get its contents and store it in a string object? Im imaging this is something like a FileStream object but im not sure. Here is a snippet that I shows I have successfully downloaded the file off the FTP site and I want to get its contents ands tore it in a string besides saving to a file. Below I am saving the file to a hard drive but I do not want to do this anymore.
String currString = (String)fileListNames.get(c);
currentFile = ftps.download(currString);          
File dummy = new File(config.getConfig("billEDIDir") + currString);
fileList[c] = config.getConfig("billEDIDir") + currString;
if(dummy.exists())
     dummy.delete();
currentFile.renameTo(dummy);
Thanks for any help!

Im creating a Java Service in the webMethods Intergration Tool. Here is the entire class.
****************************CODE************************************
IDataCursor pipelineCursor = pipeline.getCursor();
int count,currCount;
String error = "";
String status = "";
Ftps ftps = null;
File currentFile = null;
Enumeration x;
Enumeration y;
ArrayList fileListNames = new ArrayList();
try
     ftps = new Ftps("*******","********","*********");
     ftps.setDataPortRange(6100,6199);
     ftps.setPassive(true);
     ftps.connect();
     ftps.setBinary();
     ftps.setDir("outbound");
     ftps.setDir("KUED");
     count = 0;
     for (x = ftps.getNameListing(); x.hasMoreElements() ;)
          count++;
          x.nextElement();
     currCount = 0;
     for (y = ftps.getNameListing(); y.hasMoreElements() ;)
          currCount++;
          String m = (String)y.nextElement();
          fileListNames.add(currCount - 1,m.toString());     
     status = ftps.getDirListingAsString();
catch(FtpException fexp)
     error = fexp.getMessage();
     throw new ServiceException( fexp.toString() );     
catch(Exception e)
     error = e.getMessage();
     throw new ServiceException( e.toString() );     
String [] fileList = new String[count];
String [] fileContentList = new String[count];
try
     for(int c=0;c<fileListNames.size();c++)
          String currString = (String)fileListNames.get(c);
          currentFile = ftps.download(currString);          
          File dummy = new File(config.getConfig("billEDIDir") + currString);
          fileList[c] = config.getConfig("billEDIDir") + currString;
          if(dummy.exists())
               dummy.delete();
          currentFile.renameTo(dummy);
//In this string list store the contents of each file downloaded.
          fileContentList[c] = "";
          ftps.disconnect();
catch(Exception e)
     error = e.getMessage();
     throw new ServiceException( e.toString() );     
IDataUtil.put( pipelineCursor, "status", status );
IDataUtil.put( pipelineCursor, "error", error );
IDataUtil.put( pipelineCursor, "fileList", fileList );
IDataUtil.put( pipelineCursor, "fileContentList", fileContentList );
pipelineCursor.destroy();
****************************CODE************************************

Similar Messages

  • Object reference not set to an instance of an object error when generating a schema using flat file schema wizard.

    I have a csv file that I need to generate a schema for. I am trying to generate a schema using flat file schema wizard but I keep getting "Object reference not set to an instance of an object." error when I am clicking on the Next button after
    specifying properties of the child elements on the wizard. At the end I get schema file generated but it contains an empty root record with no child elements.
    I thought may be this is because I didn't have my project checked out from the Visual SourceSafe db first but I tried again with the project checked out and got the same error.
    I also tried creating a brand new project and generating a schema for it but got the same error.
    I am not sure what is causing Null Reference exception to be thrown and there is nothing in the Windows event log that would tell me more about the problem.
    I am using Visual Studio 2008 for my BizTalk development.
    I would appreciate if some has any insides on this issue.

    Hi,
    To test your environment, create a new BizTalk project outside of source control.
    Create a simple csv file on the file system.
    Name,City,State
    Bob,New York,NY
    Use the Flat file schema Wizard to create the flat file schema from your simple csv instance.
    Validate the schema.
    Test the schema using your csv instance.
    This will help you determine if everything is ok with you environment.
    Thanks,
    William

  • Read some HR archive files (object PA_PIDX) using Abap report

    Hi experts,
    an ABAP program that is supposed to read some HR archive files (object PA_PIDX) but all we can read is the object, we cannot access the individual lines. Please help
    My code
    Output of the report as well as output of archive program
    Cycles comptab. archivés
    0000000038
    0000000040
    0000000044
    0000000045
    0000000047
    0000000050
    Cycles comptab. ignorés (pour détails voir protocole de job)
    0000000001  Simulation
    0000000002  Simulation
    0000000003  Simulation
    0000000004  Simulation
    0000000005  Simulation
    .....etc
    Please help
    Edited by: Blaiso on Apr 1, 2011 5:54 PM
    Edited by: Blaiso on Apr 1, 2011 5:59 PM
    Moderator message: please post only relevant code parts, your post must be less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on Apr 2, 2011 9:59 PM

    Hi Ajay,
    1.  You have to create a separate field catelogus and AIS according to your requirement with the required fields you want . Because the standard structures and field catelogues contains many fields from all tables. So before doing the read operation you have to deactivate the standard AIS and activate your newly created AIS .
    2. Can you give some more details for this question to be answered.
    3. The important archiving tables used are ARCH_IDX,ARCH_RPRG,ARCH_DEF.
    4. While scheduling the Read process in batch mode , it will give you three criterias to be entered.
         . Spool Parameters
         (ii). Start date
         (iii). Archive selection of files.
        Unless you enter values for any one of these options , You cannot execute the batch job.
    Hope this would help you.
    Regards - Swarna.

  • Question about using file objects

    Hi,
    I have two somewhat related issues in using file objects.
    In one app, a simple swing gui that passes a file to a sax parsing class and reports back any errors, if I parse a file using the app, then try to edit the file I'm parsing (in another application) and save, I get an error message. I need to close the parsing app before I can save the file.
    In another app I wrote, one that takes a group of files and runs an xslt stylesheet on them, if I select too many files, I get an OutOfMemory error, which leads me to believe that as the files go through multilple processes, they stay alive on the heap.
    a file object is basically just a pathname, right? If I'm not using a BufferedWriter, or InputStreamReader or whatever, you can't really close a file...will the notifiy() method let the jvm know that it can let go of the file?
    thanks,
    bp

    A File object is just a path, it doesn't open the file or lock it, etc.. But if you are parsing the file, you must be opening (and forgetting to close it).

  • Integration Directory Objects Transport Using the File System

    Hi
    I am trying to do the IR and ID Objects Transport Using the File system... I am able to Transport the IR Objects and IMport in to QA ... but when i try to Import ID objects its giving me the error...bcoz all the ID objects pointing to theSAP R/3 DEV system ( Interface Detremination, receiver determination ...)... do i have to config something in SLD ..so when i import the ID objects in to QA system it points to correct SAP R/3 QAS system...
    and we are using single SLD for all the DEV , QAS and PRD system
    SV
    Edited by: S V on Oct 15, 2008 4:08 AM

    Hi,
    You will have to configure transport targets like for different business systems in your dev environment, there shouls be corresponding Business systems in QUA environment. For more details refer the link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/a21e3e0987760be10000000a114084/frameset.htm
    Thanks!

  • How streaming an audio or video files from google drive using google api objective-c client?

       I have implemented streaming an audio or video files by mpmovieplayer from Dropbox. For this purpose I am using Dropbox sdk. Audio or video files are playing with no problem from dropbox in my app.
    But, I can not implement the same functionality from Google drive. I am using alternateLink,webcontentLink,EmbedLink,Exportlink that we get from google drive. But mpmovieplayer does not play audio or video. So how can get any link from google drive,by which i can streaming an audio or video file from google drive. I have listed all google drive files in a table view. I am using google api objective-c client. So please help me. Thanks in advance.

    Hello,
    I'm giving a try at your application and so far, it is great!
    I understand that you're working on a way to help moving back files to google drive. Actually, I can copy / paste, but it always renames the files, so I end up with both a "copy of" and my original file.
    could you save and overwite the original file when it already exists ? (perhaps an option in the settings) ?
    Thanks!

  • What advante&di​sadvante of using graphics or object as bitmap file or wmf file ?

    Working on lookuot graphics,I was recommanded to use bitmap file rather than metafiles file,but when I use bitmap file, my graphics were not looking good as original and slowed down my job.Does it take alot of memories and slowdown my computer speed if I use metafiles ?

    If your graphics use a lot of complex surface textures or were generated in a pixel driven graphics program wmf files get really bloated. As long as you draw graphics with a vector driven graphic program (like Corel Draw) and create simple objects, wmf. is really the better choice. It allows you to scale your graphics without loss of resolution and without increasing memory usage, thus speeding up your design process within Lookout. I actually use wmf in about 90% of my custom graphics. There is really a quiet good section on bmp vs wmf in the handbook.

  • Using File Object in JavaFX 2.2 to set home directory

    Am I going bongers or what? Or is there a bug? Has anyone had this problem with the following line:
    File dir = new File(getClass().getResource(".").getFile()); <-- this line is the culprit
    Choose.setInitialDirectory(dir);
    causing your programme to crash and generate the following error:
    java.lang.NullPointerException under JavaFX 2.2?
    I know it worked perfectly fine under JavaFX 2.1. So what's changed?

    My guess.
    With JavaFX 2.1 you were using NetBeans 7.1
    With JavaFX 2.2 you are using NetBeans 7.2
    Under NetBeans 7.1 the default for JavaFX projects was to run the compiled classes from the file system.
    Under NetBeans 7.2 the project can no longer be run from the file system, only from a jar which NetBeans builds using the JavaFX packaging tasks.
    When you run a java program from classes off the file system the getResource call will use the file: protocol. Under this protocol directory specifiers like . and .. are valid.
    When you run a java program from a jar the getResource call will use the jar: protocol. Under this protocol directory specifiers like . and .. are invalid.
    So your upgrade of your NetBeans version just exposed an existing bug in your program which you were unaware of.
    If you packaged the same program as a jar and tried to run the jar with a JavaFX 2.1 runtime environment you would have got the same error.

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • How can I use a COM object that does not have a type library?

    Hello,
    I've created a com server in python for which I do not have a type library. I am able to call functions for this application in Python, TCL, I'm sure VB, etc. without the type library.
    Must I have a type library registered to use this COM object with Labview? I was hoping I could simply supply the name to the refnum (or the GUID) then call functions by passings strings to the invoke node. This does not seem to be possible - am I missing something?
    In the event that I cannot use a com server without a type library. Any recommendataions on how to create one? I'm wondering if I can use the same GUID and create a shell in LabWindows which generates the IDL/TBD file I need for Labview to see my
    com server.
    Any help is greatly appreciated.
    73,
    Timothy

    Timothy Toroni wrote:
    > Thanks for the info, however their example is labview server and
    > python client. I'm going the other way. It's good to know about
    > LabPython though...
    >
    > As of now, it seems to be there is no way to use a COM object without
    > a type library from inside LabView.
    Yes that is true. LabVIEW needs that to configure the Property and
    Methode Nodes correctly. Otherwise it would need to have a special
    Property and Method Node with a configuration dialog similar to the Call
    Library Node, but a LOT more complicated. Not sure many people could
    make use of that, and it would be a very tiring experience trying to get
    things setup in that way, by going through the edit, test, and crash
    cycle over and over again.
    Rolf Kalberm
    atter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to Use Transient View Objects to Store Session-level Global Variables

    hi
    Please consider section "40.8.5 How to Use Transient View Objects to Store Session-level Global Variables"
    at http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcstatemgmt.htm#ADFFD19610
    Based on this documentation I created the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.01.zip
    It behaves as show in the screencast at http://screencast.com/t/qDvSQCgpvYdd
    Its Application Module has a Transient View Object instance "MyEmployeesContextVOVI", as master for the child View Object instance "EmpInCtxJobVI".
    On rollback the Transient View Object instance keeps its row and attribute values.
    Also when passivation and activation is forced (using jbo.ampool.doampooling=false ) the Transient View Object instance seems to keep its row and attribute values.
    questions:
    - (q1) Why does the expression #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty} evaluate as true when a Transient View Object instance attribute value is changed (as shown in screencast at http://screencast.com/t/qDvSQCgpvYdd )?
    - (q2) What would be a robust approach to make a Transient View Object instance more self-contained, and manage itself to have only one single row (per instance) at all times (and as such removing the dependency on the Application Module prepareSession() as documented in "5. Create an empty row in the view object when a new user begins using the application module.")?
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    q1) Does sample 90 help ? http://blogs.oracle.com/smuenchadf/examples/
    Yes, the sample from Steve Muench does help, "90. Avoiding Dirtying the ADF Model Transaction When Transient Attributes are Set [10.1.3] "
    at http://blogs.oracle.com/smuenchadf/examples/#90
    It does point out a difference in marking transactions dirty by different layers of the framework, "... When any attribute's value is changed through an ADFM binding, the ADFM-layer transaction is marked as dirty. ...".
    This can be illustrate with a small change in the example application
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.02.zip
    It now shows the result of both these expressions on the page ...
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.transactionDirty}
    #{bindings.MyEmployeesContextVOVIIterator.dataControl.dataProvider.transaction.dirty}... where one can be true and the other false respectively.
    See also the screencast at http://screencast.com/t/k8vgNqdKgD
    Similar to the sample from Steve Muench, another modification to the example application introduces MyCustomADFBCDataControl
    at http://www.consideringred.com/files/oracle/2010/ProgrammaticalViewObjectAndRollbackApp-v0.03.zip
    public class MyCustomADFBCDataControl
      extends JUApplication
      @Override
      public void setTransactionModified()
        ApplicationModule vApplicationModule = (ApplicationModule)getDataProvider();
        Transaction vTransaction = vApplicationModule.getTransaction();
        if (vTransaction.isDirty())
          super.setTransactionModified();
    }Resulting in what seems to be more consistent/expected transaction (dirty) information,
    see also the screencast at http://screencast.com/t/756yCs1L1
    Any feedback on why the ADF Model layer is so eager to mark a transaction dirty is always welcome.
    Currently, question (q2) remains.
    regards
    Jan

  • Error in loading data into essbase while using Rule file through ODI

    Hi Experts,
    Refering my previous post Error while using Rule file in loading data into Essbase through ODI
    I am facing problem while loading data into Essbase. I am able to load data into Essbase successfully. But when i used Rule file to add values to existing values I am getting error.
    test is my Rule file.
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot put olap file object. Essbase Error(1053025): Object [test] already exists and is not locked by user [admin@Native Directory]
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
    at java.lang.Thread.run(Thread.java:662)
    from com.hyperion.odi.common import ODIConstants
    from com.hyperion.odi.connection import HypAppConnectionFactory
    from java.lang import Class
    from java.lang import Boolean
    from java.sql import *
    from java.util import HashMap
    # Get the select statement on the staging area:
    sql= """select C1_HSP_RATES "HSP_Rates",C2_ACCOUNT "Account",C3_PERIOD "Period",C4_YEAR "Year",C5_SCENARIO "Scenario",C6_VERSION "Version",C7_CURRENCY "Currency",C8_ENTITY "Entity",C9_VERTICAL "Vertical",C10_HORIZONTAL "Horizontal",C11_SALES_HIERARICHY "Sales Hierarchy",C12_DATA "Data" from PLANAPP."C$_0HexaApp_PLData" where (1=1) """
    srcCx = odiRef.getJDBCConnection("SRC")
    stmt = srcCx.createStatement()
    srcFetchSize=30
    #stmt.setFetchSize(srcFetchSize)
    stmt.setFetchSize(1)
    print "executing query"
    rs = stmt.executeQuery(sql)
    print "done executing query"
    #load the data
    print "loading data"
    stats = pWriter.loadData(rs)
    print "done loading data"
    #close the database result set, connection
    rs.close()
    stmt.close()
    Please help me on this...
    Thanks & Regards,
    Chinnu

    Hi Priya,
    Thanks for giving reply. I already checked that no lock are available for rule file. I don't know what's the problem. It is working fine without the Rule file, but throwing error only when using rule file.
    Please help on this.
    Thanks,
    Chinnu

  • Logging with jdk1.4 - how to add a handler using configuration file

    Hi, all
    I am playing around with java.util.logging in jdk1.4. In particular, I am using a properties file for configuration. However, one thing I couldn't do is to assign a handler, such as the ConsoleHandler, to the com.xyz.foo logger. Everything for the root logger works just fine. Here's the file I use
    handlers= java.util.logging.FileHandler
    .level= INFO
    java.util.logging.FileHandler.pattern = jdk14.log
    java.util.logging.FileHandler.limit = 50000
    java.util.logging.FileHandler.count = 1
    java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
    java.util.logging.ConsoleHandler.level = INFO
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    com.xyz.foo.level = WARNING
    com.xyz.foo.handlers = java.util.logging.ConsoleHandler
    Nothing comes out on the console and everything from the com.xyz.foo logger is logged to jdk14.log file.
    Can any one tell me why the last line has no effect?
    Thanks much!

    Logger configuration files are grossly misunderstood due in large part to extremely poor documentation (some of the worst I have ever seen for the Java platform). The LogManager class uses logger configuration files to do three things:
    1. Load porperties into a private Properties object that application programmers can subsequently access using the getProperty(String name) method in LogManager.
    2. Those properties (or else the documented defaults) are then used to configure the root logger as well as the "global" handlers that are used by the root logger
    3. Finally, whenever a logger is created the Properties object is checked to see if a key exists for the logger name + ".limit". If so, then the logger is assigned that level.
    Notice that nowhere in here does it say that a programmatically created logger is configured. In your case, you must invoke getProperty("com.xyz.foo.handlers"), parse the property value (which is a bit tricky if there is more than one handler class name), load and instantiate the handler class, and invoke addHandler. Great huh? I'm in the middle of a indepth study of logger configuration, and I can tell you for sure the static configuration using configuration files is an order of magnitude harder than dynamic configuration. It offers the advantage of field service engineers being able to change the logger configuration, but at a very significant cost.

  • Error while loading members using ads file in EPMA planning app in 11.1.2.2

    Hi,
    I am trying to update the dimension using ads file in EPMA application(11.1.2.2).
    1. I am getting following error:
    "The member 'xxx' cannot be created or inserted into the shared dimension 'yyy' within the application 'abc' during application import as this is not allowed by the system. Property updates for this member will not be processed."
    2. Also, I am trying to create shared dimension using ads file. I am replacing Isprimary property to 'N' and Datastore property to 'ShareData' in the ads file. There is no error while doing it and the status is 100% complete but I could not see any changes in the hierarchy.
    Any help would be great in this.
    Thanks

    I found the log file, if you can help clarify the reason for this issue:
    [Dec 7, 2012 10:18:58 AM]: Application (HCCPEXP) Upgrade initiated by user admin...
    [Dec 7, 2012 10:18:58 AM]: *******************************
    [Dec 7, 2012 10:18:58 AM]: 11.1.2.1 to 11.1.2.2
    [Dec 7, 2012 10:18:58 AM]: *******************************
    [Dec 7, 2012 10:18:59 AM]: Execute SQLs-E:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\sql\11_1_2_2Migration_SQLServer_Unicode.sql
    [Dec 7, 2012 10:19:00 AM]: [FMWGEN][SQLServer JDBC Driver][SQLServer]The object 'DF__HSP_SYSTE__ESS_D__42ACE4D4' is dependent on column 'ESS_DEF_PSWD'.
    thanks...

  • Error while using Rule file in loading data into Essbase through ODI

    Hi Experts,
    I am facing problem while loading data into Essbase. I am able to load data into Essbase successfully. But when i used Rule fule to add values to existing values am getting error.
    test is my Rule file.
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot put olap file object. Essbase Error(1053025): Object [test] already exists and is not locked by user [admin@Native Directory]
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2458)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
         at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    from com.hyperion.odi.common import ODIConstants
    from com.hyperion.odi.connection import HypAppConnectionFactory
    from java.lang import Class
    from java.lang import Boolean
    from java.sql import *
    from java.util import HashMap
    # Get the select statement on the staging area:
    sql= """select C1_HSP_RATES "HSP_Rates",C2_ACCOUNT "Account",C3_PERIOD "Period",C4_YEAR "Year",C5_SCENARIO "Scenario",C6_VERSION "Version",C7_CURRENCY "Currency",C8_ENTITY "Entity",C9_VERTICAL "Vertical",C10_HORIZONTAL "Horizontal",C11_SALES_HIERARICHY "Sales Hierarchy",C12_DATA "Data" from PLANAPP."C$_0HexaApp_PLData" where      (1=1) """
    srcCx = odiRef.getJDBCConnection("SRC")
    stmt = srcCx.createStatement()
    srcFetchSize=30
    #stmt.setFetchSize(srcFetchSize)
    stmt.setFetchSize(1)
    print "executing query"
    rs = stmt.executeQuery(sql)
    print "done executing query"
    #load the data
    print "loading data"
    stats = pWriter.loadData(rs)
    print "done loading data"
    #close the database result set, connection
    rs.close()
    stmt.close()
    Please help me on this...
    Thanks & Regards,
    Chinnu

    Hi Priya,
    Thanks for giving reply. I already checked that no lock are available for rule file. I don't know what's the problem. It is working fine without the Rule file, but throwing error only when using rule file.
    Please help on this.
    Thanks,
    Chinnu

Maybe you are looking for

  • I need help to install Toolkit CreateJS for Flash CS6.

    Hi, I need help in installing CreateJS for Flash CS6. I had downloaded the Toolkit CreateJS from here: http://www.adobe.com/go/downloadcreatejs and here: http://www.adobe.com/devnet/createjs/articles/using-flash-pro-toolkit- createjs.html. When I att

  • Audigy 4 Pro driver and MediaSource iss

    Just bought an Audigy 4 Pro card after getting seriously fed up with my old SBLi've 5. card, however I've got quite a few issues with it. I'm waiting on a response from Creative Support but figured I might check if anyone here can help. The bundled s

  • Scanner/co​pier issues

    Hi, there.  My Photosmart C309g is totally outdated, and I know that, but it prints perfectly -- scanning and copying is where I'm having the issue.  For months now, anytime I scan (whether directly from the printer's screen or from the software) or

  • Preview app opens "split screen" on dual monitor setup

    This is a minor issue, I rarely use the utilility "Preview" app. but I'd still like to understand this issue....I use a two monitor setup (MBP & StudioDisplay).. The following happens if the window was last closed in "expanded" mode (you can see opti

  • N95-1 firmware v31.0.017, anyone not suffering fro...

    it seems since i updated my firmware my date keeps jumping forward 2 days. i have a weekday alarm set and i switch the phone off during the night. i suspect this combination is something to do with the problem? Nexu 5