CipherInputStream object cannot be created

following code didi'nt work,what to do,
i need to use this constructor itself(cannot use public)
import java.io.*;
import javax.crypto.*;
class New
public static void main(String args[]) {
FileInputStream fis = new FileInputStream("news.htm");
CipherInputStream cis = new CipherInputStream(fis);
}

Ths single argument constructor is protected so to use it you must create a class derived from CipherInputStrem. The java doc is
CipherInputStream
protected CipherInputStream(InputStream is)
Constructs a CipherInputStream from an InputStream without specifying a Cipher. This has the effect of constructing a CipherInputStream using a NullCipher.
Note: if the specified input stream is null, a NullPointerException may be thrown later when it is used.
The question I ask is - why do you want to create a CipherInputStream without specifying a Cipher?

Similar Messages

  • 20011 A default named pool object cannot be created for an existingshared pool

    Further to my above message about "Cannot update eDirectory for this
    pool", i tried under nssmu on OES/Linux instead of iManager and got the
    above message.
    I found this TID which seems to describe the same problem on NetWare:
    http://support.novell.com/cgi-bin/se...i?10094555.htm
    The prescribed steps didn't work to solve the problem on Linux. The
    only objects i could find in NDS relating to the previous pools of the
    same name were in the SLP DA's scope. Deleting them and trying the
    remaining steps in the TID had no effect.
    I'm about to restart the cluster in question and the SLP DA as well, but
    i expect i am going to meet with the same lack of results.
    Any ideas?
    Paul

    Paul,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Webi Reports - Object with id ... cannot be created because it has no name

    I'm trying to launch a Webi report from our application using openDocument method. When the report is launched it fails with following error -
    30567: Unable to save the document to the repository due to the following error: The object with id number '27731' cannot be created because it has no name. (Error: WIS 30567)
    Before scheduling the report I'm calling setName method to set the name of the report but still it does not work. Any help would be greatly appreciated.
    Thanks
    Manas

    Hi John,
    I will try to give you some more background about this problem.
    From our application we are not directly launching the report. We schedule it to run immediately and then view the instance created (using the instance id returned by the schedule call).
    For scheduling we use the web services API (BIPlatform) and before scheduling we fetch all the prompts (again using a webservice API). The call is something like this -
    WebiProcessingInfo wProcessingInfo = boWebIReport_.getWebiProcessingInfo();
    After that we populate all the prompts with their corresponding values in application and schedule it. However the scheduling fails with the error I mentioned in the start of this thread and when we try to view it we are presented with a screen to enter prompts again.
    From the scheduling error it looks like its failing because the name could not be set but I really doubt if thats the case. We use same calls to schedule and view Crystal reports also and they work perfectly. Only Webi is giving this error.
    Thanks for looking into this.
    Manas
    Edited by: Manas Mandlekar on Sep 10, 2008 7:14 AM

  • Exchange Connector 3.0 (Hotfix Release) Error - Error Message=The key value of an object cannot be changed.

    Hello,
    I am running Service Manager 2012 with the Exchange Connector 3.0 RTM (Re-release Version).  The issue I have is that when an e-mail is processed that is trying to update the status or event log of an incident, the Exchange Connector encounters an error
    and will not update the object.  The Operations Manager log denotes: 
    Exchange Connector: Unable to process mail item. Subject="Close Ticket: [IRXXXXX]", Error Message=The key value of an object cannot be changed.
    This will happen on a seemingly random selection of Incident work items.  I cannot correlate them with a specific template, exchange connector, or incident tier queue that could be causing the issue.  I can recreate the way a specific ticket
    was created and update it through e-mail without issue, and the next ticket can cause the error to trigger. 
    I have already opened a Microsoft Support Case using our Software Assurance agreement.  After a few months of troubleshooting the issue and trying different fixes, Microsoft support said they were unable to fix the problem and that we would need to
    purchase Premier support to go further. At this point I thought I would reach out to the community for ideas.
    The setup I have for the Exchange connectors is as follows.
    I have three separate Exchange connectors set up to three different mailboxes.  One Exchange connector processes external support tickets and applies a specific template.  Another processes client support tickets and applies a different template. 
    And the last Exchange connector processes internal tickets and also processes the updates of tickets created by the other two exchange connectors. 
    Here are the fixes I've attempted so far:
    1.  Changed the templates that each Exchange connector applies.
    2.  Changed the management pack that each template is stored in.
    3.  Checked my management pack(s) for extended classes by searching for Extension="true" (This was also checked by Microsoft support)
    4.  Deleted each Exchange connector and recreated each connector
    5.  Deleted each Exchange connector, deleted the management pack, and reinstalled the management pack and connectors
    6.  Repeated Step 5, deleted Microsoft.SystemCenter.ExchangeConnector.dll and Microsoft.SystemCenter.ExchangeConnector.resources.dll and then installed the Exchange connector Re-release version 3.0 Published 10/7/2013 (which is supposed to address this
    issue)
    7.  Deleted the HealthServiceState folder and restarted the Management Service
    I'm not really sure what to do at this point.  I've put many hours into customizing my installation to get it working for my organization so reformatting and starting from scratch would be a nightmare scenario.  This environment is in production.
    I do have a band-aid in place using Orchestrator.  Basically I have a monitor task searching for the error message and when it finds one it searches the mailbox for the offending e-mail and applies either the Resolve or Close status change that is requested
    from the user.  However, I do not have it working to update the ticket if a comment is applied to the incident.  If anyone is in this position and needs to know how to apply this Orchestrator task I am willing to provide my workflow.
    I am new to the community and am already impressed with the amount of help and effort there is in this forum.  I appreciate in advance any help that is provided and am open to any ideas at this point.  I can post more information as needed.
    Thank you,
    John

    Yes that is the whole template.  However, I did confirm that this is only happening to incidents where either of two situations triggers a runbook to fire and modify the incident.  When I remove the activity from the incident it does clear the
    issue.  For some background the first Runbook Activity set's the first response date when an incident is resolved if the first response value is null.  The second assigns the incident to a user upon creation if the title contains assignto:username;
    1.)
    <ObjectTemplate ID="Template.d33b5bbcaf3c49b18d8b72bc1e5e1ee4" TypeID="IncidentManagement!System.WorkItem.Incident.ProjectionType">
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Escalated$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/NeedsKnowledgeArticle$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/HasCreatedKnowledgeArticle$">False</Property>
    <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity']$">
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/RunbookId$">4085f0da-ab83-48e5-bbe3-1f3b5fa2dc4a</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/TemplateId$">Template.d33b5bbcaf3c49b18d8b72bc1e5e1ee4</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/IsReadyForAutomation$">True</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/PropertyMapping$">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;ParameterMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;ParameterList&gt;
    &lt;RunbookParameterItem&gt;
    &lt;Name&gt;Get RA Guid&lt;/Name&gt;
    &lt;Id&gt;344b15effc1a44528e517c5b4227179c&lt;/Id&gt;
    &lt;Type&gt;String&lt;/Type&gt;
    &lt;Value&gt;Generic::Id&lt;/Value&gt;
    &lt;Direction&gt;In&lt;/Direction&gt;
    &lt;ContextInfo /&gt;
    &lt;/RunbookParameterItem&gt;
    &lt;/ParameterList&gt;
    &lt;RunbookId&gt;4085f0da-ab83-48e5-bbe3-1f3b5fa2dc4a&lt;/RunbookId&gt;
    &lt;/ParameterMapping&gt;</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/ChildId$">1906</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Active']$</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Skip$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Library!System.WorkItem']/Title$">Set First Response on Resolve</Property>
    </Object>
    </ObjectTemplate>
    2.)
    <ObjectTemplate ID="Template.b311e1f9126e4e19bbbbeb65ddb220ba" TypeID="IncidentManagement!System.WorkItem.Incident.ProjectionType">
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Escalated$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/Status$">$MPElement[Name='CustomSystem_WorkItem_Incident_Library!IncidentStatusEnum.Active']$</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/NeedsKnowledgeArticle$">False</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Incident_Library!System.WorkItem.Incident']/HasCreatedKnowledgeArticle$">False</Property>
    <Object Path="$Context/Path[Relationship='CustomSystem_WorkItem_Activity_Library!System.WorkItemContainsActivity' TypeConstraint='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity']$">
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/RunbookId$">ca88b13b-861a-4d39-a3cb-fd912d951e35</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/TemplateId$">Template.b311e1f9126e4e19bbbbeb65ddb220ba</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/IsReadyForAutomation$">True</Property>
    <Property Path="$Context/Property[Type='CustomMicrosoft_SystemCenter_Orchestrator!Microsoft.SystemCenter.Orchestrator.RunbookAutomationActivity.Base']/PropertyMapping$">&lt;?xml version="1.0" encoding="utf-16"?&gt;
    &lt;ParameterMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;ParameterList&gt;
    &lt;RunbookParameterItem&gt;
    &lt;Name&gt;RA Activity GUID&lt;/Name&gt;
    &lt;Id&gt;5677d117a0294a2c898a695032f26c72&lt;/Id&gt;
    &lt;Type&gt;String&lt;/Type&gt;
    &lt;Value&gt;Generic::Id&lt;/Value&gt;
    &lt;Direction&gt;In&lt;/Direction&gt;
    &lt;ContextInfo /&gt;
    &lt;/RunbookParameterItem&gt;
    &lt;/ParameterList&gt;
    &lt;RunbookId&gt;ca88b13b-861a-4d39-a3cb-fd912d951e35&lt;/RunbookId&gt;
    &lt;/ParameterMapping&gt;</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/ChildId$">1120</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Status$">$MPElement[Name='CustomSystem_WorkItem_Activity_Library!ActivityStatusEnum.Active']$</Property>
    <Property Path="$Context/Property[Type='CustomSystem_WorkItem_Activity_Library!System.WorkItem.Activity']/Skip$">False</Property>
    <Property Path="$Context/Property[Type='WorkItem!System.WorkItem']/Title$">Execute Orchestrator IR - Autoassign</Property>
    </Object>
    </ObjectTemplate>

  • Error while displaying file " C:Temp Filename.Ext cannot be created"

    Dear Friends
    Some users face problem while display the file. They get message " C:\Temp\ Filename.Ext cannot be created ". I checked Details. I got explaination as follows.
    Caution! You are not authorized to work with temporary storage
    Message no. ED204
    Diagnosis
    You do not have authorization to read or write from or to the temporary storage.
    The system uses the temporary storage when you display or change programs using the ABAP Editor.
    The system checks to see whether there is a temporary version of the program.
    If there is, a dialog box appears in which you must choose whether to use the temporary version or the database version.
    The system fills the temporary storage when the editor crashes or you save a temporary version of the program.
    System Response
    You probably do not have the authorization object S_DATASET.
    Procedure
    Ask your system administrator to assign you the relevant authorization.*
    Actually this  problem never occurs frequently. User access the files very frequently creating around 200 Mb to 400 Mb in C:\Temp Folder per day per user. I observerd as per message that User is not have Access right to C drive. Once I get access from IT for that user he is able to display file. But before giving right he is able to display file. But suddenly he is not able to display. I am not getting exact reason why this problem occurs. Some users temp folder size is upto 700 Mb with no acces right to C Drive still he is able to see the image.
    In DC20 I have kept C:\Temp as path for temp folder.
    I have checked the links  also
    Request you to provide me
    What is exact reason of the error?
    Is the solution to problem is giving access rights to the user?
    Do I have to give authorization object S_DATASET to a user?
    With Regards
    Mangesh Pande

    Dear Amaresh
    Thanks for your reply and solution.
    So you mean to say thats this Authorization object  has to be provided to user?
    But my question is how the user was able to see the file even when this Authorization Object was not assigned.
    He was able to display all file. But for particular DIR he is not able to display.
    I have checked this thread
    http://wiki.sdn.sap.com/wiki/display/PLM/Error26172withSAPGUI710+patch13.
    User has SAP GUI 7.10
    File Version 7100.1.0.1027
    Build   0
    Patch Level  0
    Request your help
    With Warm Regards
    Mangesh Pande

  • Why am I getting "Associated object cannot be opened"?

    I have created a task that utilizes method CRMSALESPROCESSEDIT of standard BOR object BUS2000115 on our CRM sandbox.  As a test, I launched the Webclient UI from transaction BSP_WD_CMPWB by clicking on the Test pushbutton for component CRM_UI_FRAME.  I can see my task in the CRM Task List.  However, when I try to execute the task I receive the message, "Associated object cannot be opened; contact your system administrator".
    According to the second edition of the text "Practical Workflow for SAP", I "can use every standard BOR object type that is enabled for dynamic navigation for your own workflow without further customizing and implementation effort".  Accordingly, I checked in table BSP_DLC_OBJ_TYPE and found object BUS2000115.  So why am I getting the error message?
    I tried maintaining Object Specific Navigation for this method in the IMG but it did not make a difference.  But I might not have maintained it properly.
    When I execute this task in the Business Workplace of the SAPGui it takes me to the "Search for Business Transactions" screen.
    I am on version 'SAP CRM ABAP 6.0', with SAP_ABA and SAP_BASIS = 700.  SAP_AP = 700.  PI_BASIS = 2006_1_700.  ST-PI = 2008_1_700.  BBPCRM = 600.
    Thanks for your help.

    Hi Lars,
    I will do what I can to help but I am going from memory.  Our sandbox has been rebuilt several times in the the last few years.  Plus we only use our SAP CRM system for channel managment now.
    I think that I instantiated an instance of the business object BUS2000115 in a previous step of the workflow with a custom task that utilized method 'GENERICINSTANTIATE' of object 'SYSTEM'.  I bound that instance to a workflow container object (probably called BUS2000115).
    In a subsequent step I think that I failed to explicitly bind BUS2000115 to &_WI_OBJECT_ID&.  This was in the definition of the step.  In other words, from the workflow builder (transaction PFTC_CHG) I clicked on the "Workflow Builder" pushbutton.  Then I double clicked on the step where I wanted to change the sales transaction.  I entered the appropriate task and step name for changing the sales transaction.  Then I clicked on the Binding pushbutton just below the "Step Name".  In the top table control on the popup I entered &BUS2000115& on the left and &_WI_OBJECT_ID& on the right.
    Once I did that then the error message was resolved.  Hope that helps.
    Cheers,
    Paul

  • Repaired objects cannot be included in dev./correction QC1K922873

    Hi All,
    We are in the Process of deleting Queries from Quality system and Transpoting the request to Production System so that its not necessary to delete them manually in Prodiuction system.so when i try to include an Object(  COMPID of Query,R3TR,ELEM) in a dev./correction request,getting error as 'Repaired objects cannot be included in dev./correction QC1K922873.
    <b>Error message:</b>
    Repaired objects cannot be included in dev./correction QC1K922873
    Message no. TK180
    Diagnosis
    In developments/corrections, it is only possible to lock and edit those objects whose original version is located in the logon system.
    The object list of your correction contains the object R3TR ELEM 61TU4TUP5S2463L4TY0JQ8AAE. This object is only available as a copy, its original is located in another SAP System.
    System response
    The function terminates.
    Procedure
    Delete the object from the correction before you repeat this function.
    Use a repair for changes to this object.
    You can assign repairs and corrections to the same request to ensure, for example, that they are part of the same transport.
    For more information on the Transport Organizer, see the SAP Library under Basis Components -> Change and Transport System.
    Can anybody help me out?
    Thanks

    'Source system' is the system where an object was originally created (before being transported to other systems). It is a field in the directory table TADIR (you can check this entry in SE16 on this table), this field stores the 'source system' value for each object.
    You may be able to change it in SE03 (change object directory entry option), if not, you can probably write an ABAP to update TADIR table record for this object.
    However, the third option I mentioned (creating a 'transport of copies' type request) would be the easiest one, if that works you do not need to do any of the above.

  • GRPO cannot be created without PO

    How to do the settings in SAP BO which should not allow GRPO to be created without creation of PO

    HI
    this can be done only through SP
    create this SP
    USE DB
    GO
    /****** Object:  StoredProcedure [dbo].[EMR_BaseRef_GRPO]    Script Date: 11/25/2011 15:19:10 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER Procedure [dbo].[EMR_BaseRef_GRPO]
    (@object int,@Docentry int, @EMRerror int OUTPUT)
    As
    Begin
    select @EMRerror = 0
    IF (@object = '20')
    BEGIN
    IF (SELECT max(ISNULL(T0.BaseEntry,-1))  FROM PDN1 T0 WHERE T0.DocEntry = @Docentry) != -1
    BEGIN
      set @EMRerror = 0
    END
    ELSE
    BEGIN
        --set @error_message='Goods Receipt PO cannot be created directly. Copy from PO'
        set @EMRerror=1  
    END
    END
    END
    then create following in SP transaction notification of ur DB
    IF (@object_type in ('20'))
    BEGIN
    if (@transaction_type in ('A','U'))
    BEGIN
    EXEc EMR_BaseRef_GRPO @object_type, @list_of_cols_val_tab_del,@EMRerror =@error OUTPUT
      IF (@error = 1)
      BEGIN
      SET @error =1
      SET @error_message = 'Goods Receipt PO cannot be created directly. Copy from PO'
      END
    END

  • DataStore Objects cannot be activated

    During installation of FI-GL BI content, error below is encountered.  As a result, all standard ODSO can't be activated.  Customized datastore objects cannot be activated as well.  InfoCube, multicube and other objects (except DSO) are working fine.
    Wonder how to fix this issue.  Would appreciate much some help.
    Thanks.
    sofie
    The creation of the export DataSource failed
    Message no. RSBM035
    Diagnosis
    The system could not create DataSource .
    System Response
    The metadata for a DataSource must be created while the export InfoSouce is being generated. An error occurred at that time.
    Procedure
    Consult the appropriate developer (function module: RSA1_OLTPSOURCE_GENERATE).

    Hi Dhanya,
    Thanks much for suggestion.
    Hi Sreekanth,
    I have indeed checked RFC connection of BI to ECC.  Anyways, have followed your idea and generally it worked.  However, after fixing the RFC connection and having a "OK" status Check for BI self connection, error below is encountered upon DSO activation.
    Basis is trying to fix the issue.  In any case, perhaps last option would be to delete source system and recreate.
    But if you have some thoughts in mind how to fix without deleting BI self source system, would really appreciate it.
    Thanks a lot.
    sofie
    Transfer structure prefix for source system T90CLNT090 is not defined
    Message no. RSAR325
    Diagnosis
    A prefix is defined for the source system for determining cross-system unique transfer structure names. This prefix is not defined between your source system T90CLNT090 and Warehouse T90CLNT090. There was probably an error when creating the source system.
    Procedure
    If you have not yet loaded data from this source system, delete the source system and then recreate it.
    If the problem occurs again, check the SAP Support Portal. Create a new problem message, if necessary.

  • Original object cannot be replaced

    Hi Experts,
    I would like to know how can I check the issue below:
    with SAPKB70015 there is a new authorization field delivered, called
    R3TR AUTH TCODE. But this object already exists on this system.
    object catalog: PGMID R3TR
    OBJECT AUTH
    OBJ NAME TCODE
    KORRNUM
    SRCSYSTEM DEV <---
    AUTHOR AMENON
    SRCDEP
    DEVCLASS ZEPOS
    This object was created on the development system. Therefore it can't be overwrittenThe authorisation field TCODE is used in the authorisation object
    Z_EPOS_REP which belongs to object class ZEPS.
    Please clarify if this authorisation field can be moved to the
    customer namespace.
    Thanks, Kurtt

    Hi Valle,
    Please check the resolution below its works fine for me....
    For the dumps,please try the solution in note 1700109.
    For the error R3TRAUTHREPORT Original object Cannot be replaced,
    kindly use report 'Change Object Directory Entries' from SE03 tcode for the
    following object to change the Original system entry to SAP:
    R3TR AUTH REPORT
    Regards,
    Veeram Reddy.
    good luck..

  • How many copies of the object will be created?

    Hi folks,
    Would anybody tell me how copies of the String objects will be created in the following examples?
    List list = new ArrayList(3);
    list.add("1");
    list.add("2");
    list.add("3");
    //example 1
    String str1 = null;
    for (int i=0; i < list.size(); i++) {
    str1 = (String)list.get(i);
    //example 2
    for (int i=0; i < list.size(); i++) {
    String str2 = (String)list.get(i);
    Thanks!

    Example 2 is better style because a variable should be declare in the narrowest possible scope.
    This,
    String str2 = (String)list.get(i);
    actually is a composite statement equivalent to,
    String str2; // variable declaration
    str2 = (String)list.get(i); // assignment to variable
    So you do two things. You declare a variable, and you assign it a reference.
    In a high level language the only thing you decide when you declare a variable is its type and its scope. You cannot determine when and where the compiler is to allocate memory for the variable. There's no penalty to declaring a variable inside a loop. The compiler will NOT somehow recreate the variable in each iteration.

  • Preview crashing on several files under Lion "object cannot be nil"

    Hi,
    with several different files - old and new ones -, Preview simply crashes with the following error message after installing Lion on my MacBook Pro:
    2011-08-15 09:16:06.255 Preview[435:60b] An uncaught exception was raised
    2011-08-15 09:16:06.256 Preview[435:60b] *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
    2011-08-15 09:16:06.262 Preview[435:60b] (
              0   CoreFoundation                      0x00007fff8fe25986 __exceptionPreprocess + 198
              1   libobjc.A.dylib                     0x00007fff95bbed5e objc_exception_throw + 43
              2   CoreFoundation                      0x00007fff8fdcc818 -[__NSArrayM insertObject:atIndex:] + 296
              3   Preview                             0x0000000104f46cf9 Preview + 23801
              4   Preview                             0x0000000104f46a17 Preview + 23063
              5   Preview                             0x0000000104f465d1 Preview + 21969
              6   Preview                             0x0000000104f46175 Preview + 20853
              7   libdispatch.dylib                   0x00007fff9144990a _dispatch_call_block_and_release + 18
              8   libdispatch.dylib                   0x00007fff9144b77a _dispatch_main_queue_callback_4CF + 308
              9   CoreFoundation                      0x00007fff8fdbac0c __CFRunLoopRun + 1724
              10  CoreFoundation                      0x00007fff8fdba216 CFRunLoopRunSpecific + 230
              11  HIToolbox                           0x00007fff91dfb4ff RunCurrentEventLoopInMode + 277
              12  HIToolbox                           0x00007fff91e02c21 ReceiveNextEventCommon + 355
              13  HIToolbox                           0x00007fff91e02aae BlockUntilNextEventMatchingListInMode + 62
              14  AppKit                              0x00007fff92205191 _DPSNextEvent + 659
              15  AppKit                              0x00007fff92204a95 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
              16  AppKit                              0x00007fff924baa4d -[NSApplication _realDoModalLoop:peek:] + 610
              17  AppKit                              0x00007fff924ba681 -[NSApplication runModalForWindow:] + 120
              18  AppKit                              0x00007fff924adf06 -[NSAlert runModal] + 159
              19  AppKit                              0x00007fff92233d66 -[NSPersistentUIManager promptToIgnorePersistentState] + 818
              20  AppKit                              0x00007fff922083dd -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completion Handler:] + 173
              21  AppKit                              0x00007fff92208241 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 227
              22  AppKit                              0x00007fff92207fb1 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 330
              23  CoreFoundation                      0x00007fff8fe17f51 -[NSObject performSelector:withObject:withObject:] + 65
              24  Foundation                          0x00007fff8c3791c7 __-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke_1 + 101
              25  Foundation                          0x00007fff8c37814e -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 283
              26  Foundation                          0x00007fff8c377fdc _NSAppleEventManagerGenericHandler + 105
              27  AE                                  0x00007fff8cad9a85 _Z20aeDispatchAppleEventPK6AEDescPS_jPh + 200
              28  AE                                  0x00007fff8cad9963 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 38
              29  AE                                  0x00007fff8cad9857 aeProcessAppleEvent + 250
              30  HIToolbox                           0x00007fff91e0a12d AEProcessAppleEvent + 102
              31  AppKit                              0x00007fff922053dd _DPSNextEvent + 1247
              32  AppKit                              0x00007fff92204a95 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
              33  AppKit                              0x00007fff922013d6 -[NSApplication run] + 463
              34  AppKit                              0x00007fff9247f52a NSApplicationMain + 867
              35  Preview                             0x0000000104f42c64 Preview + 7268
              36  ???                                 0x0000000000000002 0x0 + 2
    2011-08-15 09:16:06.263 Preview[435:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
    *** First throw call stack:
              0   CoreFoundation                      0x00007fff8fe25986 __exceptionPreprocess + 198
              1   libobjc.A.dylib                     0x00007fff95bbed5e objc_exception_throw + 43
              2   CoreFoundation                      0x00007fff8fdcc818 -[__NSArrayM insertObject:atIndex:] + 296
              3   Preview                             0x0000000104f46cf9 Preview + 23801
              4   Preview                             0x0000000104f46a17 Preview + 23063
              5   Preview                             0x0000000104f465d1 Preview + 21969
              6   Preview                             0x0000000104f46175 Preview + 20853
              7   libdispatch.dylib                   0x00007fff9144990a _dispatch_call_block_and_release + 18
              8   libdispatch.dylib                   0x00007fff9144b77a _dispatch_main_queue_callback_4CF + 308
              9   CoreFoundation                      0x00007fff8fdbac0c __CFRunLoopRun + 1724
              10  CoreFoundation                      0x00007fff8fdba216 CFRunLoopRunSpecific + 230
              11  HIToolbox                           0x00007fff91dfb4ff RunCurrentEventLoopInMode + 277
              12  HIToolbox                           0x00007fff91e02c21 ReceiveNextEventCommon + 355
              13  HIToolbox                           0x00007fff91e02aae BlockUntilNextEventMatchingListInMode + 62
              14  AppKit                              0x00007fff92205191 _DPSNextEvent + 659
              15  AppKit                              0x00007fff92204a95 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
              16  AppKit                              0x00007fff924baa4d -[NSApplication _realDoModalLoop:peek:] + 610
              17  AppKit                              0x00007fff924ba681 -[NSApplication runModalForWindow:] + 120
              18  AppKit                              0x00007fff924adf06 -[NSAlert runModal] + 159
              19  AppKit                              0x00007fff92233d66 -[NSPersistentUIManager promptToIgnorePersistentState] + 818
              20  AppKit                              0x00007fff922083dd -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completion Handler:] + 173
              21  AppKit                              0x00007fff92208241 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 227
              22  AppKit                              0x00007fff92207fb1 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 330
              23  CoreFoundation                      0x00007fff8fe17f51 -[NSObject performSelector:withObject:withObject:] + 65
              24  Foundation                          0x00007fff8c3791c7 __-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke_1 + 101
              25  Foundation                          0x00007fff8c37814e -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 283
              26  Foundation                          0x00007fff8c377fdc _NSAppleEventManagerGenericHandler + 105
              27  AE                                  0x00007fff8cad9a85 _Z20aeDispatchAppleEventPK6AEDescPS_jPh + 200
              28  AE                                  0x00007fff8cad9963 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 38
              29  AE                                  0x00007fff8cad9857 aeProcessAppleEvent + 250
              30  HIToolbox                           0x00007fff91e0a12d AEProcessAppleEvent + 102
              31  AppKit                              0x00007fff922053dd _DPSNextEvent + 1247
              32  AppKit                              0x00007fff92204a95 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
              33  AppKit                              0x00007fff922013d6 -[NSApplication run] + 463
              34  AppKit                              0x00007fff9247f52a NSApplicationMain + 867
              35  Preview                             0x0000000104f42c64 Preview + 7268
              36  ???                                 0x0000000000000002 0x0 + 2
    terminate called throwing an exception
    I have looked around for tips, but none of them seem to resolve the problem. Any help would be appreciated!

    I have run some further tests. While I am still not sure what the underlying problem is, here's what happens in an example.
    I create a new PDF from LaTeX using MacTeX 2011's pdflatex.
    I run "Preview xxx.pdf" from the shell; Preview crashes as stated above.
    I run "Preview" from the shell (note: no parameter), click "Don't restore Windows", and then manually open the pdf file inside Preview. The PDF is now shown without problems.
    The same happens in many cases if I replace running "Preview xxx.pdf" in the shell by opening the PDF file by double clicking it in Finder.
    Strange...

  • Relationship cannot be created between identical business partners

    Hello,
    I am implementing CRM 5.0 and trying to create business partner relationships to the identical business partner.  For example, I am trying to makbe BP#1 have te relationship 'Has a Contact of' to BP#1.  However, I am getting the error message:
    'Relationship cannot be created between identical business partners'.
    (Message no. R1776)
    Has anyone ever encountered this error?  Is there any way to create a relationship in SAP-CRM to the same business partner?
    Thanks much for your help,
    Dan

    Hi Daniel
    In short: No, it is not possible to have a relationship "between" a BP and itself.
    In long: In R/3 there are partner roles like Sold to, ship to and others. When CRM was designed the people at SAP did want to simplify a bit and implemented the following logic for partner determination: If there is no relationship of a searched type, the BP itself is taken. As a result a relationship pointing to its source is not allowed as it would duplicate the information already existing.
    Hope this helps,
    Kai

  • G/L account 59500140 cannot be created as a cost element

    Hi Viewers,
    When I try to do the KO88 Process order settlement i am getting the below error:
    G/L account 59500140 cannot be created as a cost element
    Message no. KQ119
    Diagnosis
    When maintaining the posting rules for passing on results analysis data to Financial Accounting, you entered a G/L account that is defined as a primary cost element in cost and revenue element accounting. This is not allowed. You must enter a G/L account in the posting rules that is not defined as a cost element.
    System Response
    The entry invalid.
    Procedure
    You have the following options:
    Enter a G/L account for which no cost element is specified in Cost and Revenue Element Accounting.
    You can change the message type with user-defined error management (transaction OPR4_KKA). What should be observed when you enter a G/L account in a posting rule that is defined as a primary cost element in Cost and Revenue Element Accounting? You need to define a CO account assignment so that the posting defined in the posting rule can be executed. You do this with transaction OKB9 (default account assignment) or OKC9 (substitution), or using the default account assignment in the cost element master.
    I would like to know the GL Account 59500140  is a P&L Account. Is it correct?.
    Please help me to overcome from this issue.
    Thanks & Regards,
    Aswin

    Execute transaction code FSP0 and check whether the account is a P&L or a Balance Sheet.  Nevertheless, you can only enter accounts that are not created as cost elements in customizing transaction OKG8.  If you enter an account that is also a cost element, then you need to configure default CO account assignment using OKB9 or a substitution using OKC9.  Please refer to the following SAP Notes.
    https://service.sap.com/sap/support/notes/581296

  • Data source cannot be created : MAPVIEWER-00011: Error creating a map data

    Hi everyone,
    i am getting an error meaasge while creating datasource
    " Data source cannot be created : MAPVIEWER-00011: Error creating a map data source."
    pls help

    You should assign only one value to jdbc_sid. Try with this
    <map_data_source name="mvdemo"
    jdbc_host="localhost"
    jdbc_sid="orcl"
    jdbc_port="1521"
    jdbc_user="mvdemo"
    jdbc_password="!mvdemo"
    jdbc_mode="thin"
    number_of_mappers="3"
    allow_jdbc_theme_based_foi="false"
    />
    Make sure that oracle sid is 'ORCL'
    Sujnan

Maybe you are looking for