Hot to convert a properties object to a InputStream object?

hot to convert a properties object to a InputStream object?

peter321 wrote:
The two property files need further process and filter out some values. The two configuration files come from different application. I want to use java.util.logging.LogManager.readConfigure(InputStream).For the last time, you've made it clear how you want to solve some as-of-yet undescribed problem. What you haven't made clear is what problem you're trying to solve. From the class you mention, it sounds like you want to read in two logging configurations (since that's what a LogManager is for) from separate applications and "filter out some values". Those are mysterious requirements at best, and if you're intending to use LogManager to process some arbitrary properties files, you're headed down the wrong path entirely. There are [much better solutions readily available|http://commons.apache.org/configuration/].
~

Similar Messages

  • Error trying to run SSIS Package via SQL Server Agent: DTExec: Could not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object

    Situation:
    SSIS Package designed in SQL Server 2012 - SQL Server Data Tools
    Windows 7 - 64 bit.
    The package (32 bit) extracts data from a SQL Server db to an Excel Output file, via an OLE DB connection.
    It uses 3 package variables:
    *) SQLCommand (String) to specify the SQL Statement to be executed by the package
    Property path: \Package.Variables[User::ExcelOutputFile].Properties[Value]
    Value: f:\Output Data.xls
    *) EXCELOutputFIle (String) to specify path and filename of the Excel output file
    Property path: \Package.Variables[User::SQLCommand].Properties[Value]
    Value: select * from CartOrder
    *) VarObjectDataSet (Object) to hold the data returned by SQL Server)
    Property path: \Package.Variables[User::VarObjectDataSet].Properties[Value]
    Value: System.Object
    It consists out of 2 components:
    *) Execute SQL Task: executes the SQL Statement passed on via a package variable. The resultng rows are stored in the package variable VarObjectDataSet
    *) Script Task: creates the physical output file and iterates VarObjectDataSet to populate the Excel file.
    Outcome and issue:The package runs perfectly fine both in SQL Server Data Tools itself and in DTEXECUI.
    However, whenever I run it via SQL Server Agent (with 32 bit runtime option set), it returns the errror message below.
    This package contains 3 package variables but the error stating that a package variable can not be set, pops up for the VarObjectDataSet only.  This makes me wonder if it is uberhaupt possible to set the value of a package variable
    of type Object.
    Can anybody help me on this please ?
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:40:20 PM  DTExec: Could
    not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object.  Started:  6:40:20 PM  Finished: 6:40:21 PM  Elapsed:  0.281 seconds.  The package execution failed.  The step failed.
    Thank you very much in advance
    Jurgen

    Hi Visakh,
    thank you for your reply.
    So, judging by your reply, not all package variables used inside a package need to be set a value for when run in DTEXEC ?
    I already tried that but my package ended up in error (something to do with "... invocation ...." and that error is anything but clearly documented. Judging by the error message itself, it looks like it could be just about anything. that is why I asked my
    first question about the object type package variable.
    Now, I will remove it from the 'set values' list and try another go cracking the unclear error-message " ... invocation ...". Does an error message about " ... invocation ..." ring any bells, now that we are talking about it here ?
    Thx in advance
    Jurgen
    Yes exactly
    You need to set values only forthem which needs to be controlled from outside the package
    Any variable which gets its value through expression set inside package or through a query inside execute sql task/script task can be ignored from DTExec
    Ok I've seen the invocation error mostly inside script task. This may be because some error inside script written in script task. If it appeared after you removed the variable then it may because some reference of variable existing within script task.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Why can't I open the filter gallery in Photoshop CC 2014? I've converted the photo layer into a smart object, but the filter gallery selection is still grayed out.

    Why can't I open the filter gallery in Photoshop CC 2014? I've converted the photo layer into a smart object, but the filter gallery selection is still grayed out. How do I make it active?

    Please go to Help, System Info and Copy then paste here.
    Benjamin

  • Convert xml file into a JDOM Element object?

    Hi,
    I need to convert an xml file into a JDOM Element object.
    I need to do that because I need to pass the JDOM Element object to another method for processing.
    That method takes in a JDOM element object as a single parameter for that method: it was supplied by my supervisor.
    Does anyone knows how to do that?
    Please advice and give me some example.
    Regards.

    Hi,
    You misunderstood me.
    The javaworld article shows you how to convert the xml file to JDOM Document object using SAXBuilder; I am very aware of it as I had done it before.
    Now the problem is tha tI need to convert the xml file to JDOM Element object instead.
    The JDOM Element object contains the whole xml file and that JDOM Element object will be input into a parameter of a method for use.
    Can anyone help?

  • Converting an Image object to a BufferedImage object?

    I have a BufferedImage object, bi, which I want to resize, hence:
    Image image = bi.getScaledInstance(400, 300, Image.SCALE_DEFAULT);
    Next I want to encode the resized image to JPEG format. The problem is that inorder to use the JPEGImageEncoder.encode() method, I need to pass it a BufferedImage object. I have looked through the API and cant see a way of converting the Image object to a BufferedImage object.
    Can anyone shed some light on this problem?
    Any help will be much appreciated.

    I copied + pasted the code from:
    http://java.sun.com/docs/books/tutorial/2d/problems/ind
    x.html :-)
    So you propably could use :
    int width = 400;
    int height = 300;
    Image image = bi.getScaledInstance(width, height,
    Image.SCALE_DEFAULT);
    BufferedImage bi = new BufferedImage(width, height,
    BufferedImage.TYPE_INT_RGB);
    Graphics2D biContext = bi.createGraphics();
    biContext.drawImage(img, 0, 0, null);Greets
    PuceThis works fine; but has anybody else noticed this takes an unreasonable amount of time? How to get around this?

  • How to change Anchor Object Options Status of Object Styles?

    hi to all,
    here i'm creating Object Style and applying some properties, when i create a Object Style, and the anchor Object options not become true status instead it being in false status how do i change status of anchor Object options of object styles
    pls help me
    here the i tried code,....
      myAnchorFrame.contents =selItem;
         try{
         var rightObjStyle = app.activeDocument.objectStyles.add({name: "RightAlignment"});
         with(rightObjStyle.anchoredObjectSettings)
          spineRelative = false;
          anchoredPosition=AnchorPosition.anchored;
          anchorPoint = AnchorPoint.LEFT_CENTER_ANCHOR;
          horizontalAlignment = HorizontalAlignment.RIGHT_ALIGN;
          horizontalReferencePoint = AnchoredRelativeTo.COLUMN_EDGE;     
          anchorXoffset = spaceVal;
          verticalReferencePoint = VerticallyRelativeTo.lineBaseline;
         }}catch(e){
           myCharacterStyle = app.activeDocument.objectStyles.item("RightAlignment");
           myCharacterStyle.anchoredObjectSettings.anchorXoffset= spaceVal;
          try{
         var leftObjStyle = app.activeDocument.objectStyles.add({name: "LeftAlignment"});
         with(leftObjStyle.anchoredObjectSettings)
          spineRelative = false;
          anchoredPosition=AnchorPosition.anchored;
          anchorPoint = AnchorPoint.RIGHT_CENTER_ANCHOR;
          horizontalAlignment = HorizontalAlignment.LEFT_ALIGN;
          horizontalReferencePoint = AnchoredRelativeTo.COLUMN_EDGE;     
          anchorXoffset = spaceVal;
          verticalReferencePoint = VerticallyRelativeTo.lineBaseline;
         }}catch(e){
           myCharacterStyle = myDocument.objectStyles.item("LeftAlignment");
           myCharacterStyle.anchoredObjectSettings.anchorXoffset= spaceVal;
          try{
         var L_RObjStyle = app.activeDocument.objectStyles.add({name: "L/RAlignment"});
         with(L_RObjStyle .anchoredObjectSettings)
          spineRelative =true;
          anchoredPosition=AnchorPosition.anchored;
          anchorPoint = AnchorPoint.LEFT_CENTER_ANCHOR;
          horizontalAlignment = HorizontalAlignment.LEFT_ALIGN;
          horizontalReferencePoint = AnchoredRelativeTo.COLUMN_EDGE;     
          anchorXoffset = spaceVal;
          verticalReferencePoint = VerticallyRelativeTo.lineBaseline;
         }}catch(e){
           myCharacterStyle = myDocument.objectStyles.item("L/RAlignment");
           myCharacterStyle.anchoredObjectSettings.anchorXoffset= spaceVal;
          if(align =="Left")
           myAnchorFrame.applyObjectStyle(app.documents[0].objectStyles.item("LeftAlignment"), true);
          else if (align =="Right")
           myAnchorFrame.applyObjectStyle(app.documents[0].objectStyles.item("RightAlignment"), true);
          else if(align =="Left/Right")
           myAnchorFrame.applyObjectStyle(app.documents[0].objectStyles.item("L/RAlignment"), true);

    Is it the:
       enableAnchoredObjectOptions = true;
    As shown here: http://forums.adobe.com/thread/454988?tstart=30

  • Object to user defined object

    I pushed user defined objects in to the Vector or Stack.
    But they return an java defined Object type when I try to use them.
    Is there way that I can convert this Object into my defined object.
    MyClass a;
    MyClass b;
    Stack table = new Stack();
    table.push(a);
    table.push(b);
    //now when i use pop to get it back it returns an Object type
    Object temp = table.pop();
    //how do I change this object into MyClass so i can have access to MyClass stuff?

    dam..thank you so much I feel stupid..Don't.
    Casting is one of those things that can take a while to get used to.
    In your original post, you asked: how do I change this object into MyClass so i can have access to MyClass stuff?
    It's important that you understand that casting doesn't change the object in any way.
    All it does is cause a reference that's been declared as one type to be treated as a different type. So even though all the compiler knows about what's returned from pop() is that it refers to an Object, you're telling it you know better, and that the object pointed at will in fact be a MyClass, and so you can access MyClass' members.
    If, at runtime, the object you happen to pop off the stack isn't a MyClass, casting won't magically turn it into one. You'll get a ClassCastException.

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • ManagedAccounts.aspx Object not reference to object

    SETUP: 2x SharePoint 2010 Servers (14.0.5130.5002); 1x SQL 2008 R2
    I setup alot of managed accounts (about 10) and had them setup to automatically generate the new passwords.  After doing this operation, i can no longer access the managedaccounts.aspx page.  I get object not referenced to object.  I read
    a bunch of forums that said the farm account shouldn't be set to autogenerate passwords and it will cause the error.  Next, what i did is setup a new AD account with static password and made it the farm account.  I then deleted the old farm account
    using powershell.  However, even after doing this, i am still getting the same error.  Any ideas? (everything else is working in the farm as far as i can tell.
    04/12/2011 10:38:06.44  w3wp.exe (0x197C)                        0x1FB0 SharePoint Foundation        
     Runtime                        tkau Unexpected System.NullReferenceException: Object reference not set to an instance of an object.   
    at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)     at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments
    selectArguments)     at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)     at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments,
    DataSourceViewSelectCallback callback)     at System.Web.UI.WebControls.DataBoundControl.PerformSelect()     at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildContro... 
    04/12/2011 10:38:06.44* w3wp.exe (0x197C)                        0x1FB0 SharePoint Foundation        
     Runtime                        tkau Unexpected ...ls()     at System.Web.UI.Control.EnsureChildControls()    
    at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()    
    at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) a5dbe0de-bab0-48cc-9d99-9c094490a1f1

    Here is another thread about this:
    http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010setup/thread/406f1817-d687-49d7-9691-26e487fb5577
    However, none of suggestions worked for me.  i can't reinstall our staging farm cause we are in the middle of a migration.  I am probbably going to open a case with MS as it doesn't seem like anyone has any idea about the problem.

  • Create a business object for a Maintenance object

    Hello,
    I want to create a business object for a maintenance object to change all XML attributes to XML elements.
    Should I have to change the whole XML Schema from attributes to elements one by one?
    For example, I create the business object CM_Person_BO for the maintenance object Person, and use the business object to add user in a more standard way.
    But it is a quite large job to rewrite the whole schema for the maintenance object Person, which has following elements, which are PersonIdentifiers, PersonNames, PersonPhones, PersonCharacteristics, Person and SeasAddress.
    Is there any easy way to do it?
    Thanks,
    Kerr

    Should I have to change the whole XML Schema from attributes to elements one by one?
    Is there any easy way to do it?Unfortunately not, you will have to define the schema containing each field/element, once. The primary objective is that you should create a scaled down version of the BO having only the required fields or subset of available fields, you may not need all the fields of a MO. This increases performance as the IO is performed only for specified fields in the BO.
    You can define separate Data Areas for each Person object's context, i.e. Identifiers, Names, Phones, etc. and include them (includeDA) within the Person BO (CM_Person_BO) for clarity.

  • There was an error while writing data back to the server: Failed to commit objects to server : Duplicate object name in the same folder.

    Post Author: dmface15
    CA Forum: Administration
    I am working in a new enviorment and i am trying to save a report to the Crystal Server via the CMC. I am uploading the report from the objects tab and attempting to save to a folder. The report has 1 static defined parameter and that's it. When i click submit to save the report i receive the following error message: "There was an error while writing data back to the server: Failed to commit objects to server : Duplicate object name in the same folder." There is not a anothe report within the folder with that name. What could be causing this error message and equally important, what is the solution.

    hte message you received about duplicate user probably means something hadn't fully updated yet. Once it did then it worked...
    Regards,
    Tim

  • Possible?Multi-Entity View Object with one Entity Object that is Read-only.

    I know this sounds crazy, but I would like to create a multi-entity view object, where one entity object is based on a table in my application (we'll call it "Users", which basically stores the primary key for the person from the institutional people database), and the other table is a entity object based on a view of the institutional people database table (read only access), which we can call "People".
    I know that since no updates will be done to the People table, it really should be a read-only View Object, but I would lose the ability to sort on attributes like Last Name, Hire date, etc, since those would be transient attributes in my ViewObject for the Users. By having People as an entity object, I can then create a multi entity view object and have the ability to join Users to People and be able to sort on the above mentioned fields (like Last Name).
    The problem is that when I use the JDev (I'm currently using 10.1.2.1) AppModule BC4J tester, when I click on the multi-entity view object that I added to the AppModule it gives me an error:
    oracle.jbo.RowCreateException) JBO-25017: Error while creating a new entity row for People.
    ----- LEVEL 1: DETAIL 0 -----
    (java.lang.InstantiationException) null
    I have tried to change all the attributes to updateable in my entity object, but no create method, and I have tried to make them all read-only, but no effect, I get the same error (probably because the People view is read-only in my schema).
    Is there a way to change the entity object so that it will not try to create a new row when it runs the Tester? So that the multi entity view object behaves more like a view link, but gives me the added bonus of being able to sort on the Last Name column from the People table?
    Thanks for any help on this subject...at worst, I will have to use the view link method to get the job accomplished, but it would be "cooler" if this would work!
    Jeremy.

    Steve, thanks for your quick response to my question.
    To answer your questions, I was trying to create the Multi-entity View Object to give me more flexibility when working with my User table, and my People view. The flexibility I desired was that I would be able to sort my Users based on attributes in the People view. This is not possible when the there is only one Entity in my VO, and the People view data are all transient attributes, because they are not in the SQL statement.
    Ultimately, after working with one of my colleagues, we decided to use the approach that you mentioned by creating a read-only VO with the SQL query we want to display to the user (contains both User and People data fields), and then use a different ViewObject when performing other actions on the User Table (such as inserts/updates/deletes). By using the setWhereClauseParam() method in the handleLifeCycle() for the JSP page, we should be able to navigate between the different View Objects, so that the user does not see any difference.
    Thanks! Oh, and by the way, I have read your article you included before, and I have used it many times before to tune my View Objects! Thanks!

  • Photoshop bug: Smart Objects overwriting other Smart Objects when edited and saved in Illustrator

    Experiencing issues when working with a large number (over 200) vector smart objects brought into Photoshop CS4 from Illustrator. 
    Things seemed to be going along nicely; if I needed to edit a Smart Object, I could double-click it, it would open in Illustrator and then I could edit and save it.  Return to Photoshop and the Smart Object is updated.  Swell and dandy.  The issue started happen when I hit a large quantity of either vector smart objects (remember, over 200) or the many layers and groups within Photoshop (must be over 500).  When I would double-click, open, edit, and save the vector Smart Object, the Photoshop Smart Object I was working on would update AND another/several other Smart Objects would update as well.  Which, of course, would ruin the artwork, as suddenly I was seeing several instances of the same object.  If it hadn't have been for ForeverSave, I many not have recovered the work.
    It's rather hard to isolate the issue to see what's causing the problem.  Here are some of the possible causes:
    Running Snow Leopard on Mac
    Many, many Smart Objects in file, perhaps enough to ruin the naming convention and cause bugs when Photoshop referenced the temp file
    Many, many Photoshop layers and groups
    Illustrator vector files copy+pasted from several different files (affects the naming convention perhaps?)
    Some groups/layers in Photoshop are duplicates
    To help make it a little clearer, you should know:
    Running the most updated software / OS (that is until CS5 comes out)
    Smart Objects showed no error until I had actually opened, edited, and saved the referenced temp file (i.e. VectorSmartObject1.ai)
    Files saved and worked on from Dropbox (network folder)
    Not looking for much of an answer to this question; I just wanted to see if anyone else had come across this bug.  Also, Adobe PLEASE look into this as you begin testing for the next update.  I have the file(s) if you need to replicate the issue.  My best guess is that the naming convention of Vector Smart Objects has an odd character limit so when Vector Smart Object 200.ai is saved, Vector Smart Object 2.ai gets overwritten.

    Have you tested this with Photoshop CS5 and Illustrator CS5? (the current versions, that came out last month)
    If you duplicated a smart object layer, both layers refer back to the same file content. So when you change the file, both layers would be updated.  That is intentional and explained in your manual.  If you didn't realize this, that could explain what you are seeing.
    If you placed separate files, then they should not be updated at the same time, because they will refer to separate files.
    Yes, Smart Objects only update when you save the file.
    You would need over 4 billion smart objects in one document to get Photoshop confused about which one refers to which file.  And since the layer limit is much less than 4 billion, I doubt that is the cause.
    There is no naming convention involved. We don't limit the filenames (except to platform standards and to include a file type extension).

  • Difference between Service data objects and process data object

    Hi
    Can anybody tell me what is the difference between SDO (Service Data Objects) & PDO (Process Data Objects).I am using 2 port PCI-CAN series 2 card.
    If anybody knows the answer then please reply.
    Thanking You

    Hi,
    See the online help file from our NI CANopen Library for LabVIEW for some basic informations about SDOs and PDOs.
    More information should be available from the web.
    DirkW
    Attachments:
    lvcanopenvhelp.zip ‏154 KB

  • ABAP proxy object and JAVA proxy objects

    can anyone explain whether ABAP proxy object and JAVA proxy objects can communicate with each others?
    if yes then how???

    JCO connectors would be able to do the trick here i guess
    regards
    krishna

Maybe you are looking for

  • How can I search for files in the "Save As" dialogue when saving attachment

    I receive a lot of graphics via email that are updates to existing graphics for a website. When I click on "Save Attachment As..." on the pop-up menu within Mail, a finder-like window appears that has a little search oval on it. I would like to be ab

  • Media Encoder CS6 not working with Premiere

    Hi I have been merrily editing a lager job in Adobe Premiere CS6 and then queuing the time lines to export in media encoder CS6 done the entire job everything rendered fine then Bam all of a sudden when I try and render I get all the audio a couple o

  • Discover server fail 3.1.1, ovs-agent-passwd = User admin does not exists

    Hello The discover Oracle Server 3.1.1 (fresh install) failed from Oracle VM manager 3.1.1 with the message : Job Internal Error (Operation)com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_4010E Attempt to send command: get_api_versi

  • Purchase record disappears in Purchases page of App Store

    I upgraded my OS to Lion early this year and appeared in the Purchases page of App Store before.  Recently, I would like to upgrade my MBA and opened the Purchase page of App Store.  The purchase disappeared so I could not do the upgrade.  Where shou

  • Transactio :CORK

    Hi All, I am using a user-exit in the Transaction CORK. when the Goods Movement button is pressed the user is entering quantity and Storage location where the goods will be moved. The user-exit which i am using is not able to capture the value of the