Set initialization for inputfild.

Hi ,every one,
I am a new to web dynpro for abap.
and I have one question need your help.
I have one inputfield , and I bind it to a Dictionary value ,such as "showView.InfoFrom.Get",This bind is important to me.
but I want to   set initialization value of this inputfield.
such as : "please select value"
where Can I do this , can you tell me the code or the step?
thanks very much.

Hi you can generate this code for your variable.
DATA lo_nd_flighttab TYPE REF TO if_wd_context_node.
    DATA lo_el_flighttab TYPE REF TO if_wd_context_element.
    DATA ls_flighttab TYPE wd_this->Element_flighttab.
    DATA lv_seatsmax TYPE wd_this->Element_flighttab-seatsmax.
  navigate from <CONTEXT> to <FLIGHTTAB> via lead selection
    lo_nd_flighttab = wd_context->get_child_node( name = wd_this->wdctx_flighttab ).
  @TODO handle non existant child
  IF lo_nd_flighttab IS INITIAL.
  ENDIF.
  get element via lead selection
    lo_el_flighttab = lo_nd_flighttab->get_element( ).
  @TODO handle not set lead selection
    IF lo_el_flighttab IS INITIAL.
    ENDIF.
  @TODO fill attribute
  lv_seatsmax = 1.
  set single attribute
    lo_el_flighttab->set_attribute(
      name =  `SEATSMAX`
      value = lv_seatsmax ).
in the value give the default value which ever you want.
Best regards,
Rohit

Similar Messages

  • Error occurred in deployment step 'Activate Features': The type initializer for ' 'threw an exception

    Hi,
    I have develeoped custom timer job using vs 2010 to deploy in sharepoint server.
    While I right click on solution explorer and click on deploy then system throws an error "Error occurred in deployment step 'Activate Features': The type initializer for 'TestTimerJob.TestTimerJob' threw an exception."
    Please suggest.
    Thanks.
    Knowledge is power.

    Debugger is not firing at all. SO not able t do debugging.
    Knowledge is power.
    Have you tried to set break point on feature activate? If not then set break point on feature activate and try to debug your code line by line.
    See this mSDN article to debug timer job:
    http://msdn.microsoft.com/en-us/library/ff798310.aspx
    http://www.codeproject.com/Articles/70866/Debugging-Custom-SharePoint-Timer-Jobs
    Also make sure that:
    1. Once you deploy the time job, you need to reset the IIS
    2. restart the window timer service from services.msc
    Let us know your result
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. InnerException: Requested registry access is not allowed.

    I have read some of the other posts for people that got this error, but none seem to apply to me.
    My program has been working for weeks.  I made some minor changes, and started getting the error (full details below).
    I did a TFS "undo pending changes" and still getting the same error, even after logging off.  The one odd thing is that I did change my Windows password this week. The connection string is using a SQL user id and password that has no issues.
    I'm an Admin own my own box (running WIn XP SP3).  I even tried "Run as Admin" on Visual Studio.
    I'm doing a Debug-Start, running a Console-Test-Program that calls a WCF service, which on local machine is hosted by "ASP.NET Development Server".
    We have two other developers, one has the same problem, one does not.  In theory, we have all done "get latest" and are running the same code.
    The SQL Connection is related to a trace database; we are using this library http://ukadcdiagnostics.codeplex.com which has worked fine for months.
    When I do "Start Run" in Visual Studio, I get this error:
    {"The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. "}
    with InnerException: {"The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception."}
    and it has InnerException: {"Requested registry access is not allowed. "}
    Outmost StackTrace:
       at System.Data.SqlClient.SqlConnection..ctor()
       at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
       at FRB.Diagnostics.Listeners.SqlDataAccessCommand..ctor(String connectionString, String commandText, CommandType commandType)
       at FRB.Diagnostics.Listeners.SqlDataAccessAdapter.CreateCommand()
       at FRB.Diagnostics.Listeners.SqlTraceListener.TraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.FilterTraceEventCore(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
       at FRB.Diagnostics.Listeners.CustomTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args)
       at System.Diagnostics.TraceSource.TraceInformation(String message)
       at FRB.EC.AdminService.AdminService.TestHelloWorldWithTrace(String name)
       at SyncInvokeTestHelloWorldWithTrace(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
    Second Inner StackTrace:
       at System.Data.SqlClient.SqlConnection..cctor()
    Third Inner StackTrace:
          at System.Data.SqlClient.SqlConnectionFactory..cctor()
    When I do "Run as Admin", I get this error:
    {"Could not load file or assembly 'FRB.EFDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. "}
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at FRB.EC.AdminService.ConsoleTester.svcRef.IAdminService.GetDispositionStatusTypeList()
       at FRB.EC.AdminService.ConsoleTester.svcRef.AdminServiceClient.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\Service References\svcRef\Reference.cs:line 2459
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.GetDispositionStatusTypeList() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 565
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.ExecuteNewRelease103QueryMethods() in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 189
       at FRB.EC.AdminService.ConsoleTester.ConsoleProgram.Main(String[] args) in C:\SourceEagleConnect\EagleConnect\Dev\WCFServices\FRB.EC.AdminService.ConsoleTester\ConsoleProgram.cs:line 76
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    I am also posting the web.config/app.config, but I would rather not focus on that since there were absolutely no changes to it between the time it was working and the time it began failing. 
    Client app.config
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <connectionStrings>
      </connectionStrings>
      <system.serviceModel>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <serviceAuthorization impersonateCallerForAllOperations="true"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <bindings>
          <wsHttpBinding>
            <binding name="WSHttpBinding_IAdminService" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxReceivedMessageSize="5565536"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
              allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
              <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
              <security mode="Message">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                  realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                  algorithmSuite="Default" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
            <client>
                  <endpoint address="http://localhost:3588/AdminService.svc" binding="wsHttpBinding"
                        bindingConfiguration="WSHttpBinding_IAdminService" contract="svcRef.IAdminService"
                        name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
        </system.serviceModel>
    </configuration>
    web.config of WCF service:
      <?xml version="1.0"?>
    <configuration>
        <configSections>
        <section name="FRB.Diagnostics" type="FRB.Diagnostics.Configuration.UkadcDiagnosticsSection, FRB.Diagnostics"/>
      </configSections>
        <appSettings>
           <!-- whatever goes here -->
        </appSettings>
        <!-- connection string section -->
      <connectionStrings>
        <add name="log" connectionString="Data Source=myserver;Initial Catalog=ECWCFLOG_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="DBConn" connectionString="Data Source=myserver;Initial Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
        <add name="EagleConnectEntities" connectionString="metadata=res://*/EagleConnect.csdl|res://*/EagleConnect.ssdl|res://*/EagleConnect.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=myserver;Initial
    Catalog=ECData_SharedDev;User ID=myuser;Password=mypass;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
      </connectionStrings>
        <!-- FRB.Diagnostics logging section -->
        <FRB.Diagnostics>
            <sqlTraceListeners>
                <sqlTraceListener name="sqlTraceListenerSettings"
                            connectionStringName="log"
                            commandText="INSERT INTO LogStore VALUES(@Source, @ActivityId, @ProcessId, @ThreadId, @EventType, @Message, @Timestamp)"
                            commandType="Text">
                    <parameters>
                        <parameter name="@Source" propertyToken="{Source}"/>
                        <parameter name="@ActivityId" propertyToken="{ActivityId}"/>
                        <parameter name="@ProcessId" propertyToken="{ProcessId}"/>
                        <parameter name="@ThreadId" propertyToken="{ThreadId}"/>
                        <parameter name="@EventType" propertyToken="{EventType}" callToString="true"/>
                        <parameter name="@Message" propertyToken="{Message}"/>
                        <parameter name="@Timestamp" propertyToken="{DateTime}"/>
              <!-- <parameter name="@UserId" propertyToken="{WindowsIdentity}"/> -->
            </parameters>
                </sqlTraceListener>
            </sqlTraceListeners>
            <smtpTraceListeners>
                <smtpTraceListener name="smtpTraceListenerSettings"
                             host="vssmtp"
                             port="25"
                             from="[email protected]"
                             to="[email protected]"
                             subject="AdminService Logging Event: {EventType}, {MachineName}"
                             body="{Message}&#xA;=======&#xA;Process={ProcessId},&#xA;Thread={ThreadId},&#xA;ActivityId={ActivityId}"/>
            </smtpTraceListeners>
        </FRB.Diagnostics>
        <!-- System.Diagnostics logging section -->
        <system.diagnostics>
            <sources>
                <source name="FRB.EC.AdminService" switchValue="All">
                    <listeners>
                        <clear/>
                        <add name="ods"/>
                        <add name="smtp"/>
                        <add name="sql"/>
                    </listeners>
                </source>
                <source name="System.ServiceModel" switchValue="Off" propagateActivity="true">
                    <listeners>
                        <add name="ignored" type="System.Diagnostics.ConsoleTraceListener"/>
                    </listeners>
                </source>
            </sources>
            <sharedListeners>
                <!-- OutputDebugStringTraceListener -->
                <add name="ods"
               type="FRB.Diagnostics.Listeners.OutputDebugStringTraceListener, FRB.Diagnostics"
               initializeData="{ActivityId}|{EventType}: {Message} - {DateTime}, Process={ProcessId}, Thread={ThreadId}"/>
                <!-- SqlTraceListener -->
                <add name="sql"
               type="FRB.Diagnostics.Listeners.SqlTraceListener, FRB.Diagnostics"
               initializeData="sqlTraceListenerSettings"
               traceOutputOptions="Timestamp"/>
                <!-- SmtpTraceListener -->
                <add name="smtp"
               type="FRB.Diagnostics.Listeners.SmtpTraceListener, FRB.Diagnostics"
               initializeData="smtpTraceListenerSettings">
                       <filter type="System.Diagnostics.EventTypeFilter"
                       initializeData="Error"/>
                </add>
            </sharedListeners>
            <trace autoflush="true"/>
        </system.diagnostics>
        <system.web>
        <compilation debug="true" targetFramework="4.0">
        </compilation>
            <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
        </system.web>
        <system.serviceModel>
            <services>
                <service name="FRB.EC.AdminService.AdminService"
                   behaviorConfiguration="FRB.EC.AdminService.AdminServiceBehavior">
                    <!-- Service Endpoints -->
                    <endpoint address="" binding="wsHttpBinding"
                      bindingConfiguration="wsHttpEndpointBinding"
                      contract="FRB.EC.AdminService.IAdminService">
                        <!--
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs. 
                  If removed, WCF will infer an appropriate identity automatically.
              -->
                        <identity>
                            <dns value="localhost"/>
                        </identity>
                    </endpoint>
                    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                </service>
            </services>
            <bindings>
                <wsHttpBinding>
                    <binding name="wsHttpEndpointBinding"
                     maxBufferPoolSize="2147483647"
                     maxReceivedMessageSize="500000000">
                        <readerQuotas maxDepth="2147483647"
                            maxStringContentLength="2147483647"
                            maxArrayLength="2147483647"
                            maxBytesPerRead="2147483647"
                            maxNameTableCharCount="2147483647"/>
                        <security>
                            <message clientCredentialType="Windows"/>
                        </security>
                    </binding>
                </wsHttpBinding>
            </bindings>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="FRB.EC.AdminService.AdminServiceBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="true"/>
                        <serviceCredentials>
                        </serviceCredentials>
                        <!--<serviceAuthorization principalPermissionMode="UseAspNetRoles"
                    roleProviderName="AspNetWindowsTokenRoleProvider"/>-->
                        <serviceAuthorization principalPermissionMode="UseWindowsGroups"
                                    impersonateCallerForAllOperations="true"/>
                    </behavior>
                    <behavior name="FRB.EC.AdminService.IAdminServiceTransportBehavior">
                        <!-- To avoid disclosing metadata information, set the value below to false and
                   remove the metadata endpoint above before deployment -->
                        <serviceMetadata httpGetEnabled="true"/>
                        <!-- To receive exception details in faults for debugging purposes, set the value below to true. 
                   Set to false before deployment to avoid disclosing exception information -->
                        <serviceDebug includeExceptionDetailInFaults="false"/>
                        <serviceCredentials>
                            <clientCertificate>
                                <authentication certificateValidationMode="PeerTrust"/>
                                <!--<authentication certificateValidationMode="Custom" customCertificateValidatorType="DataFactionServices.FRBX509CertificateValidator"/>-->
                            </clientCertificate>
                            <serviceCertificate findValue="WCfServer"
                                    storeLocation="LocalMachine"
                                    storeName="My" x509FindType="FindBySubjectName"/>
                        </serviceCredentials>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
        </system.serviceModel>
        <system.webServer>
            <modules runAllManagedModulesForAllRequests="true"/>
        </system.webServer>
    </configuration>
    Thanks for any help.
    Neal

    I think I found it... this is sure a strange error for what is really happening.
    Apparently it had happened to me before, and fortuantely, I actually added the following comment:
                // Above is related to the WCFLOG SQL Diagnostics Trace 
                // If you get error here an inner exception "requested registry access is not allowed"
                // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                // then make sure you have impersonation enabled in your client.
                // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
    Now I think I will do a try catch and spit out the same text.
    Still testing to assure that this really was the issue.
          <endpointBehaviors>
            <behavior name="FRB.AllowImpersonate ">
              <clientCredentials>
                <windows allowedImpersonationLevel="Impersonation"/>
              </clientCredentials>
            </behavior>
          </endpointBehaviors>
    The line below in BOLD below is what somehow seemed to disappear from my app.config - probably due to a TFS human error - still checking that also:
            <client>
                  <endpoint address="http://localhost:4998/AdminService.svc"
                                  behaviorConfiguration="FRB.AllowImpersonate"
                                  binding="wsHttpBinding"
                                  bindingConfiguration="WSHttpBinding_IAdminService"
                                 contract="svcRef.IAdminService"
                            name="WSHttpBinding_IAdminService">
                        <identity>
                              <dns value="localhost" />
                        </identity>
                  </endpoint>
            </client>
    Here's how I "idiot-proofed" this error for now, to give an error that actually at least points to a solution:
            public SqlDataAccessCommand(string connectionString, string commandText, CommandType commandType)
                try
                    _connection = new SqlConnection(connectionString);
                    // Above is related to the WCFLOG SQL Diagnostics Trace  
                    // If you get error here an inner exception "requested registry access is not allowed"
                    // inside exception "type initializer for System.Data.SqlClient.SqlConnection"
                    // then make sure you have impersonation enabled in your client.
                    // See AdminConsole web.config or FRB.EC.AdminService.ConsoleTester.app.config for examples
                catch (Exception ex)
                    if (ex.ToString().Contains("The type initializer for"))
                    throw new System.ApplicationException(@"
                    Your client app <endpoint> must be cofigured have a
                  'behaviorConfiguration' attribute like this:
                    behaviorConfiguration='FRB.AllowImpersonate'
                   that points back to a behavior that has this syntax:         
              <behavior name='FRB.AllowImpersonate'>
                 <clientCredentials>
                     <windows allowedImpersonationLevel='Impersonation'/>
                 </clientCredentials>
              </behavior>
              ", ex);
                   else
                        throw ex;
                _command = _connection.CreateCommand();
                _command.CommandText = commandText;
                _command.CommandType = commandType;
                // TODO _command.CommandTimeout = ;
    Neal

  • The Type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule1' threw an exception

    Hello,
    I am getting the error message listed in the topic subject when i try to install the Exchange Server 2013 SP1 Evaluation Mode downloaded from your website. After completing all requirements & pre-requisites, I started the installation with the Mailbox
    & Client Access role selected, when i get to the screen which says "Readiness Check" main page subject, and the progress says Configuring Prerequisites, before any progress in the %, i get the error message:
    The Type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule1' threw an exception
    and it says retry.
    Knowing that the server is a member of a domain.How would i resolve this issue?
    Thanks,
    Elie

    hi Ed,
    i am running Windows Server 2012 R2 Standard Evaluation Edition with Exchange Server 2013 Evaluation, But that error message was resolved by removing and re-installing .NET Framework 3.5. That is fine now.
    But now i am getting another error message When it tries to install the Management Tools.
    (Step 1 of 9: Management Tools)
    Error: The Following error was generated when "$error.Clear();
    Set-LocalPermissions
    "was run: "The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation"'
    knowing that the server is part of a domain and the domain controller runs Windows Server 2008 R2 Evaluation Edition.
    Any ideas why this error message popups up?
    Regards,

  • Exchange 2013 CU3 Fails "The type initializer for 'Microsoft.Exchange.Flighting.RotationHash' threw an exception."

    I can't get Exchange 2013 to install in our Server 2008 R2 infrastructure. Setup fails with the following error when preparing AD. This is running on Server 2008 R2 SP1 VM's.
    Welcome to Microsoft Exchange Server 2013 Cumulative Update 3 Unattended Setup
    Copying Files...
    File copy complete. Setup will now collect additional information needed for installation.
    Performing Microsoft Exchange Server Prerequisite Check
        Prerequisite Analysis                                                                            
    COMPLETED
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    Configuring Microsoft Exchange Server
        Organization Preparation                                                                         
    FAILED
         The following error was generated when "$error.Clear();
            install-DefaultAcceptedDomain -Name $RoleFullyQualifiedDomainName -DomainName $RoleFullyQualifiedDomainName -Dom
    ainController $RoleDomainController
    " was run: "The type initializer for 'Microsoft.Exchange.Flighting.RotationHash' threw an exception.".
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    The Exchange Server setup operation didn't complete. More details can be found in ExchangeSetup.log located in the

    I have set the PowerShell Execution Policy to unrestricted. After running setup /PS I get the following output
    PS C:\Windows\system32> cd c:\temp\ex2013cu3
    PS C:\temp\ex2013cu3> ./setup /ps /iacceptexchangeserverlicenseterms
    Welcome to Microsoft Exchange Server 2013 Cumulative Update 3 Unattended Setup
    Copying Files...
    File copy complete. Setup will now collect additional information needed for installation.
    Performing Microsoft Exchange Server Prerequisite Check
        Prerequisite Analysis                                                                            
    COMPLETED
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    Configuring Microsoft Exchange Server
        Extending Active Directory schema                                                                
    COMPLETED
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    The Exchange Server setup operation completed successfully.
    PS C:\temp\ex2013cu3>
    The installation was started at 10:13am and hung for sometime at 94% of the prereq stage. Installation finally completed at 10:47am. The errors seem to indicate that setup will continue. However upon running setup /prepareAD the installation hangs for sometime
    at 21% of Organization Preparation before finally failing with the following output....
    PS C:\temp\ex2013cu3> ./setup /prepareAD /iacceptexchangeserverlicenseterms
    Welcome to Microsoft Exchange Server 2013 Cumulative Update 3 Unattended Setup
    Copying Files...
    File copy complete. Setup will now collect additional information needed for installation.
    Performing Microsoft Exchange Server Prerequisite Check
        Prerequisite Analysis                                                                            
    COMPLETED
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    Configuring Microsoft Exchange Server
        Organization Preparation                                                                         
    FAILED
         The following error was generated when "$error.Clear();
            install-DefaultAcceptedDomain -Name $RoleFullyQualifiedDomainName -DomainName $RoleFullyQualifiedDomainName -Dom
    ainController $RoleDomainController
    " was run: "The type initializer for 'Microsoft.Exchange.Flighting.RotationHash' threw an exception.".
     Task module "CmdletHealthCountersModule.Task_IterateCompleted" fails with exception "The type initializer for 'Microsof
    t.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be aff
    ected.
     Task module "CmdletIterationEventModule.LogCmdletIterationEvent" fails with exception "The type initializer for 'Micros
    oft.Exchange.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be a
    ffected.
     Task module "CmdletHealthCountersModule.Task_Release" fails with exception "The type initializer for 'Microsoft.Exchang
    e.Flighting.RotationHash' threw an exception.". This module is skipped. Task execution result should not be affected.
    The Exchange Server setup operation didn't complete. More details can be found in ExchangeSetup.log located in the
    <SystemDrive>:\ExchangeSetupLogs folder.
    PS C:\temp\ex2013cu3>

  • Readiness Checks fail with "The type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule`1' threw an exception."

    There's another thread about this issue but the accepted answer actually has nothing at all to do with the original problem/question so that's a bit deceptive.
    Anyway, when trying to install Exchange 2013 SP1 (on 2012 R2 Datacentre) the installation reaches the Configuring Prerequisites part of the Readiness Checks and then fails out with the message:
    The type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule`1' threw an exception.
    I honestly can't find any way around this issue and the only mentions I've seen resulted in people reinstalling Windows which obviously isn't really a resolution to the problem.
    Is there any known fix for this issue?

    Ok well I've managed to get around that now by recreating a few registry keys and documented that here (apparently I'm not allowed to create links so can't put that here).
    I have a new issue now though. It seemed to get almost all the way through the installation process but is now failing due to a "memory" issue although due to the wording I can't tell whether it means RAM or Disk space. Either way, neither should
    apply. The drive has 80GB of space available and the machine has 8GB of RAM (only 2GB in use at the time the installer was ran and the amount didn't drop).
    The exact error is...
    Error:
    The following error was generated when "$error.Clear();
    Write-ExchangeSetupLog -Info "Setting up FIPS configuration based on Exchange Install Path";
    $FipsDataPath = [System.IO.Path]::Combine($RoleInstallPath, "FIP-FS\Data");
    $FipsEnginesPath = [System.IO.Path]::Combine($FipsDataPath, "Engines");
    Write-ExchangeSetupLog -Info "Loading FipFs snapin";
    Add-PsSnapin Microsoft.Forefront.Filtering.Management.PowerShell -ErrorAction SilentlyContinue;
    Set-ConfigurationValue -XPath "/fs-conf:Configuration/fs-sys:Machine/fs-sys:Paths/fs-sys:TraceFile" -Value $FipsDataPath -Confirm:$false
    Set-ConfigurationValue -XPath "/fs-conf:Configuration/fs-sys:Machine/fs-sys:Paths/fs-sys:Engines" -Value $FipsEnginesPath -Confirm:$false
    # Copy Microsoft Engine to Engines folder during the install
    $FipsBinPath = [System.IO.Path]::Combine($RoleInstallPath, "FIP-FS\Bin");
    $MicrosoftEngineSourcePath = [System.IO.Path]::Combine($FipsBinPath, "Engine\Microsoft");
    $MicrosoftEngineDestinationPath = [System.IO.Path]::Combine($FipsEnginesPath, "amd64\Microsoft");
    $MicrosoftEngineExists = Test-Path $MicrosoftEngineDestinationPath
    if(! $MicrosoftEngineExists)
    Robocopy $MicrosoftEngineSourcePath $MicrosoftEngineDestinationPath /S /COPYALL
    " was run: "Creating an instance of the COM component with CLSID {2DC947D7-A2DC-4276-A554-891346CE2032} from the IClassFactory failed due to the following error: 8007000e Not enough storage is available to complete this operation. (Exception from HRESULT: 0x8007000E (E_OUTOFMEMORY)).".
    Error:
    The following error was generated when "$error.Clear();
    Write-ExchangeSetupLog -Info "Setting up FIPS configuration based on Exchange Install Path";
    $FipsDataPath = [System.IO.Path]::Combine($RoleInstallPath, "FIP-FS\Data");
    $FipsEnginesPath = [System.IO.Path]::Combine($FipsDataPath, "Engines");
    Write-ExchangeSetupLog -Info "Loading FipFs snapin";
    Add-PsSnapin Microsoft.Forefront.Filtering.Management.PowerShell -ErrorAction SilentlyContinue;
    Set-ConfigurationValue -XPath "/fs-conf:Configuration/fs-sys:Machine/fs-sys:Paths/fs-sys:TraceFile" -Value $FipsDataPath -Confirm:$false
    Set-ConfigurationValue -XPath "/fs-conf:Configuration/fs-sys:Machine/fs-sys:Paths/fs-sys:Engines" -Value $FipsEnginesPath -Confirm:$false
    # Copy Microsoft Engine to Engines folder during the install
    $FipsBinPath = [System.IO.Path]::Combine($RoleInstallPath, "FIP-FS\Bin");
    $MicrosoftEngineSourcePath = [System.IO.Path]::Combine($FipsBinPath, "Engine\Microsoft");
    $MicrosoftEngineDestinationPath = [System.IO.Path]::Combine($FipsEnginesPath, "amd64\Microsoft");
    $MicrosoftEngineExists = Test-Path $MicrosoftEngineDestinationPath
    if(! $MicrosoftEngineExists)
    Robocopy $MicrosoftEngineSourcePath $MicrosoftEngineDestinationPath /S /COPYALL
    " was run: "Creating an instance of the COM component with CLSID {2DC947D7-A2DC-4276-A554-891346CE2032} from the IClassFactory failed due to the following error: 8007000e Not enough storage is available to complete this operation. (Exception from HRESULT: 0x8007000E (E_OUTOFMEMORY)).".
    So if it's not the drive (there's only one drive in the machine) or RAM then what exactly has it ran out of?

  • Help please with a Static Initializer for ImageIcons inside Jar Files

    At the moment I'm playing around displaying XML using A JTree
    I am subclassing DefaultMutableTreeNode, and want it to have some default Icons set up....
    Sort of like this:
    public class XNode extends DefaultMutableTreeNode
        public static final ImageIcon icon;
       public static ImageIcon getIcon()
            return XNode.icon;
    }The only thing is that for the life of me after trying various things and searching these forums and google:
    I can't work out how to write the static Initializer for the ImageIcon.
    The ImageIcon will need to be created using a URL, cos it will be inside my jar file.....
    the usual...
               URL url = this.getClass().getResource("/images/Exit16.gif");
               ImageIcon Icon = new ImageIcon( url );but I wanted these Icons to be class members..............
    Could someone help?
    }

    DrClap " I don't understand why you put Class.forName in there either"
    A: Because I don't really know what I'm doing.
    I will try that suggestion.
    At present I have this:
         static ImageIcon loadIcon;
         static
              try
                loadIcon = new ImageIcon( Class.forName("cis.editor.xml.nodes.AlNode").getResource("/images/Exit16.gif"));
              catch( ClassNotFoundException cnfe )
                   System.out.println("ClassNotFound: " + cnfe.getMessage() );
         public static final ImageIcon defaultIcon = loadIcon;
         static
              try
                loadIcon = new ImageIcon( Class.forName("cis.editor.xml.nodes.AlNode").getResource("/images/tree_folder_major.gif"));
              catch( ClassNotFoundException cnfe )
                   System.out.println("ClassNotFound: " + cnfe.getMessage() );
         public static final ImageIcon commentIcon = loadIcon;
    //.......... ANd so OnWhy? Because do far it was the only way I could get it to compile.
    And It works..
    However it's a real abortion.. codewise.
    I need to load about 16 Icons that the various subclasses can 'use'
    DefaultTreeCellRenderer - must do somethng similar because it has a bunch of Icons to "Pick from",
    Only How is that done 'properly' ?

  • How set location for tooltip text ??

    hi ,
    i want to set tooltip location myself to a button . for this i override methods are
    1. public String getToolTipText(MouseEvent e)2 public Point getToolTipLocation(MouseEvent e)here is code... where i have to change to set location for tooltip
    * DebugGraphicsTest.java
    * Created on April 28, 2005, 1:14 AM
    package swingtest;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * @author  Paramasivam
    public class DebugGraphicsTest extends javax.swing.JFrame {
        public DebugGraphicsTest() {
            initComponents();
            MyButton  btn = new MyButton("Chem m e");
            btn.setToolTipText("this is actual");
            getContentPane().add(btn);
            jButton1.setToolTipText("button 1");
            jButton2.setToolTipText("button 2");
            jButton3.setToolTipText("button 3");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.FlowLayout());
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            jPanel1.add(jButton1);
            jButton2.setText("jButton2");
            jPanel1.add(jButton2);
            jButton3.setText("jButton3");
            jPanel1.add(jButton3);
            getContentPane().add(jPanel1);
            pack();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new DebugGraphicsTest().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
    class MyButton  extends JButton{
        public MyButton(String s){
            super(s);
        public Point getToolTipLocation(MouseEvent evnt){
            return new Point(100,300);
        public String getToolTipText(){
            return "hihi";
        public String getToolTipText(MouseEvent me){
            return "event hihi";
    }

    Adding the line ToolTipManager.sharedInstance().registerComponent(this); to MyButton's constructor seems to solve the problem.

  • The type initializer for B1Wizard.Globalsu2019 threw an except

    Hi All
    I had to reinstall my B1DE few days ago for my 2007. And till today it is still having problem . When I open eventlog or Form Generator ...etc I get:
    ERROR: The type initializer for B1Wizard.Globalsu2019 threw an exception.
    I am using Visual Studio 2005 (VB.net)
    Please help me
    Thanks in Advance
    Bo Peng

    Hi Bo Peng     
    Down load the B1DE 2.1 source code , recompile it and create a new installer .
    Also remove the read only property set for the files and folders inside the directory
    C:\Program Files\SAP\SAP Business One Development Environment.
    If it is not solved then reinstall the DI Api
    Hope this will help
    Regards
    Arun

  • Error: The type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule`1' threw an exception.

    having problems on new server so I followed instructions to remove Exchange Server 2013 Sp1 using ADSI edit p;er these instructions:
    http://blog.dargel.at/2012/11/20/complete-remove-exchange-2013-using-adsiedit/
    now when I re-run setup for exchange 2013 SP1 I get the error :    
    "Error: The type initializer for 'Microsoft.Exchange.Configuration.Tasks.ThrottlingModule`1' threw an exception."
    David Sheetz MCP

    contrary to what Ed says you can fix this, it is way harder than it should be and I have NEVER had this many issues on a  fresh build! 
    things to note on Exchange 2013
    1. IPv6 MUST work and also DNS set manually, verify port 25 is open on your firewalls!
    2. even if services are running make sure there are no errors in the application event log and check that all services on the Exchange server are set to ACTIVE. to find out type the below command in exchange management shell
    Get-ServerComponentState –Identity servername
    3. The group "everyone" did not have the right "Access this computer from the network". This could be seen by an audit failure in the security log stating that the user
    "<mailbox server name>" did not have the required login type (login type 3).
    Adding everyone to the "Access this computer from the network" right solved the issue. 
    To enable "Access this computer from the network" :
    Run "gpedit.msc"
    Navigate through
    Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment
    Double click
    on "Access this computer from the network", and ensure "Everyone" is added.
    4. verify all connectors are setup correctly
    Also I found an error in the event log Event
    ID: 1009 once I fixed that emails started to fly!
    To resolve the issue, use one of the following methods.
    Method 1
    Create a new Active Directory group that is named “ContentSubmitters,” and then grant Admistrators and NetworkService full access to the group. This is a dummy group and should be used as a placeholder only. You might want to add a description so that
    the group is not removed.
    Force or wait for Active Directory replication.
    Restart the following services:
    Microsoft Exchange Search
    Microsoft Exchange Search Host Controller
    Method 2
    You can also resolve this problem by removing a configuration entry that refers to the ContentSubmitters group. This entry is present in four files. Each file is calledWcfConfigurator.xml,
    and you can find each file in the following folder:
    %ExchangeInstallPath%\Bin\Search\Ceres\HostController\Data\Nodes\Fsis\<var style="border:0px;font-family:monospace, monospace;font-size:1em;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;">NODENAME</var>\Configuration\Local
    Here, “%ExchangeInstallPath%” is the Exchange installation root path (available in the environment variable of that name), and the placeholder <var style="border:0px;font-family:monospace, monospace;font-size:1em;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;">NODENAME</var> represents
    one of the following names. (There is one name for each of the four files that are to be edited.)
    Helpful articles
    http://blog.dargel.at/2012/11/20/complete-remove-exchange-2013-using-adsiedit/
    http://exchangeserverpro.com/exchange-2013-manually-configure-dns-lookups/
    David Sheetz MCP

  • Simultanious initialization for S&D and MM mdules please advise

    Dear All,
    Can we do the initialization for S&D and MM mdules simultaniously as there is time constraint for the down time from the business.
    Please advise. its urgent.
    Points will be awareded.
    Regards
    Nisarg.

    Hi,
    You can do it simultaneously.
    Things you need to consider while doing this (Init).
    You will need to fill the set up tables in 'no postings period'. In other words when no trasnactions are posted for that area in R/3 otherwise those records will not come to BW. Discuss this with end user and decide. Weekends are a general choice for this activity.
    You can run them after business hours so that there wont be any transactions, or in the night times or you can do it on week ends so that there is no need to take down time.
    Fill the setup tables with already closed values and then fill up again with open values.This will reduce the down time.
    Initialize  closed periods first in which users wont enter data ( for example in 2007 or 2006), this initializations can be done while users are working. Then the initialize last period at night/weekends.holidays etc.
    If you know documents that are in closed periods, and you are sure that these documents can no longer be changed, you can only fill the SetUp tables for these documents or only for these periods, by continuing to post in open periods. You then initialize only for these intervals, delete the setup table, and only then do you fill the setup table with the rest of the documents  this procedure can drastically reduce the downtimes of your system.
    However, there is a risk that user exits (and in LIS, formulas and conditions) can be used to retrieve documents that are in periods that are already "closed periods".
    One more thing what you need to bear in mind is, to check if there are any Scheduled jobs which are updating the transaction tables, which would definitely cause Data Reconciliation Issues.
    How To… Minimize Downtime For Delta Initialization
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5d51aa90-0201-0010-749e-d6b993c7a0d6
    How To Minimize Effects of Planned Downtime (NW7.0)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/901c5703-f197-2910-e290-a2851d1bf3bb
    How to Minimize Effects of Planned Downtime (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a02397f9-0d8d-2910-e5a0-b8241bbc9381
    Hope this helps.
    Thanks,
    JituK

  • HOW TO: set anchoredObjectSettings for .palce() object?

    Hi, I'm currently working on interesting script for GREP placing, and I'm wondering how I can set anchoredObjectSettings for .palce() object?
    for(i=0; i < found.length; i++)
        foundElem = new File (myFolder + "/" + found[i].contents);
        found[i].place(foundElem); // Placing Ancored Object
        // HERE IS WHERE I NEED SOME HELP: how to set "anchoredObjectSettings" for just placed Ancored Object
        //anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
        //anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
    Here you can download example files - script, InDesign file and images, that should be placed into InDesign file with script
    Dropbox - GREP placing.zip
    PS: I believe this script will be very useful, so if anybody have any ideas/suggestions, and want to help me with further development - this would be great!

    Hi Kai, this script is still under development, here is updated version attached (now it can also place files/images by file name only, without extension):
    #target indesign;
    //#include  "! Basic functions.jsx"
        GREP place files.
        This script will ask to select source folder with files to place,
        and then, with dialog box (or prompt) [this is not implemented yet, so I use static GREP value while developing]
        will ask to type GREP find expresion to search for text placeholder, that need to be replaced with file from source folder we just selected.
        TODO: Check how it works with other than image formats
            Also, this might be usefull to make anchored frame with column widh, and fit image proportionally
    scriptName = decodeURI(File(app.activeScript).name.slice(0, -4)); // detect name of current script without expression
    function Alert(msg) // function for native-looking alerts
        w = new Window ("dialog", scriptName, undefined, {closeButton: true});
        w.preferredSize = [300,75]; // window width and height
        w.margins = 15; // window margins
        w.orientation = "column";
        w.alignChildren = ["left", "top"];
        w.add("statictext", undefined, msg);
        close = w.add ("button", [0,0,96,20], "OK", {name: "Ok"});
        close.alignment = ["right", "bottom"];
        close.onClick = function(){exit();}
        w.show();
    main();
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length == 0)
            Alert("No documents are open. Please open a document and try again."); exit();
        else
            //> START OF doUndoWraper
            if (parseFloat(app.version) < 6) // "app.version < 6" if it's running under an earlier version than CS4, as earlier versions don't support "Undo" in scripts
                doUndoWrapper();
            else
                app.doScript(doUndoWrapper, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, scriptName);
            //< END OF doUnoWraper
    function doUndoWrapper() // this is the wraper function UNDO everything script made  by single undo
    {// START OF doUndoWrapper
    defaultGREPexpression = "(?i)^[a-z0-9 _-]+\\.\\w{2,4}$"; // Paragraph that starts with upper or lower case latin character, digits, spaces, hyphen or underscore, and ends with .extension
    var myFilteredFiles;
    var myExtensions = []; // initialize array
    myExtensions.push(".jpg", ".jpeg", ".png", ".gif"); // raster images
    myExtensions.push(".psd", ".tif", ".tiff", ".pdf"); // raster images (layered)
    myExtensions.push(".ai", ".eps", ".svg", ".cdr"); // vector graphics
    myExtensions.push(".mp3"); // audio files
    myExtensions.push(".mp4"); // video files
    myExtensions.push(".swf"); // flash files
    myExtensions.push(".doc", ".docx", ".rtf", ".txt"); // text documents
    myExtensions.push(".xls", ".xlsx"); // table documents 
    //Display the folder browser.
    if(app.activeDocument.saved) // our document was saved before - we suggest to start search for source folder from were InDesign file saved
        var myFolder =  Folder(app.activeDocument.filePath).selectDlg("Select the source folder with files for placing", "");
    else // file was not saved before, so we don't know where to search > suggest to start from Desktop
        var myFolder = Folder.selectDialog("Select the source folder with files for placing", "");
    if(myFolder) // if folder was selected
        //Get the path to the folder containing the files you want to place.
        var files = new Object(); // This will assoc array with FILE_NAME => FILE_EXTENSION
        if(File.fs == "Macintosh")
            myFilteredFiles = myMacOSFileFilter(myFolder);
        else
            myFilteredFiles = myWinOSFileFilter(myFolder);
        if(myFilteredFiles.length != 0) // success: we have found supported files to place
            for(i = 0; i < myFilteredFiles.length; i++)
                var filename = myFilteredFiles[i].fsName.toString().replace(/^.*[\\\/]/, ""); // now we get only file names with extenstions
                var file = [];
                file = filename.split("."); // separate file name from file extension         
                files[file[0]] = file[1]; // write FILE_NAME => FILE_EXTENSION as assoc array
        else // error: There is no supported files for placing in specified folder
            Alert("ERROR: There is no supported files for placing in specified folder.");
            exit();
    else // ERROR: we have not choose source folder
        Alert("Folder with source files was not specified"); exit();
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder)
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++)
            myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0)
                for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++)
      myFilteredFiles.push(myFiles[myFileCounter]);
      return myFilteredFiles;
    function myMacOSFileFilter(myFolder)
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile)
        var myFileType = myFile.type;
        switch (myFileType)
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++)
                var myExtension = myExtensions[myCounter];
                if(myFile.name.indexOf(myExtension)>-1)
                    return true;
                    break;
      return false;
    //> START OF GREP expression dialog
    w = new Window ("dialog", scriptName+": specify expression", undefined, {closeButton: true});
    w.preferredSize = [300,75]; // window width and height
    w.margins = 15; // window margins
    w.orientation = "column";
    w.alignChildren = ["left", "top"];
    panel = w.add("panel", undefined, "Find what: (GREP expression)");
    if(app.findGrepPreferences.findWhat != "")
        grepExpression = app.findGrepPreferences.findWhat;
        clearFindWhat = false;
    else
        grepExpression = defaultGREPexpression; // use default GREP expression
        //fgrepExpression = "\\[.+\\]"; // \\< means "begining of the world", and \\> means end of the world;
        clearFindWhat = true;
    var grepExpression = panel.add ("edittext", [0,0,270,20], grepExpression);
    grepExpression.active = true;
    panel.add("statictext", undefined, "GREP expression no need for for double \\\\ escaping");
    ok = w.add ("button", [0,0,96,20], "Continue", {name: "Ok"});
    ok.alignment = ["right", "bottom"];
    ok.onClick = function()
        findWhat = grepExpression.text; 
        w.hide();
    w.show();
    //< END OF GREP expression dialog
    if(typeof findWhat !== "undefined") // check we have not left GREP expression field empy
        app.findGrepPreferences.findWhat = findWhat; // our GREP that search for image placeholder text;
        found = app.activeDocument.findGrep();
        for(i=0; i < found.length; i++)
            if(found[i].contents.indexOf(".") > -1) // we wroking with file name with extension
                foundElem = new File (myFolder + "/" + found[i].contents);
            else // we work with file name only, so we need to add file extension manually
                found[i].contents = found[i].contents.replace(/[^a-z0-9 _-]/gi, ""); // remove all unwanted characters from file name: only letters, numbers, spcaces, minus and underscores allowed     
                foundElem = new File (myFolder + "/" + found[i].contents + "." +  files[found[i].contents]);     
          try
                placedObj = found[i].place(foundElem)[0].parent; // THANKS TO: Jump_Over for help @ https://forums.adobe.com/message/6912489#6912489
                placedObj.anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
                placedObj.anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
                placedObj.frameFittingOptions.autoFit = true;
                placedObj.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;
                placedObj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;         
            catch(e)
                Alert(e);         
        app.changeGrepPreferences.changeTo = "";
        app.activeDocument.changeGrep();
        if(clearFindWhat) // clearing only if typed GREP expression manually
            app.findGrepPreferences = app.changeGrepPreferences = null; // clear Find/Change preferences once we finished
    else
        Alert("Find what GREP expression was not specified"); exit();
    }// END OF doUndoWrapper
    Top part with Windows/Mac filtering was copy-pasted from default InDeign script "ImageCatalog.jsx" as example and modified - I'm not sure if all this stuff is needed, I haven't test if it works the same without those filtering on both OS - if that's not needed - then thanks for tip!
    PS: in your findWhat \l{3,4} will not catch .ai files
    and what means .source at the end? is that doing necessary escaping, so with it it's posible to write \l instead of \\l

  • Using multiple desktops with a 4 finger swipe on a Mac Book Pro running Lion- is there a way that I can allow Safari open on several but not all??  Looks like I can set it for one but not others.  All, one, or nothing

    Using multiple desktops with a 4 finger swipe on a Mac Book Pro running Lion- is there a way that I can allow Safari open on several but not all??  Looks like I can set it for one but not others.  All, one, or nothing

    Hey Eric,
    Thanks for taking the time. Unfortunately no that does not solve it. Same as swipe it will get me there and it will show separate programs spaced out. The issue I am having is that all my open word files are bunched up in a pile on top of each other. I can see the edges of each one but I want them to be separated from each other enough that I can visually identify what file is what.
    Again, thanks for trying, it is appreciated.

  • Setting timeout for all the web test scripts in the solution

    Hello,
    I have around 16 web test scripts (using VSTS 2010 ultimate version) in my project (in a solution). By default the timeout set for each request is 60 sec. I need to increase the timeout to 180 sec. Currently, I am clicking on each request and modifying
    the timeout parameter from the Properties window.
    Is there any common setting for timeout available which would be acting across all the scripts?
    Thanks.

    Hello,
    We only can set Timeouts for a separate request in Visual Studio Web Test. There is no way to set Timeout for all requests in VS IDE. But you can write you own logic code using
    Timeout Property in a web test plugin to set Timeout for all requests in a web test.
    About how to write a web test plugin, please see:
    How to: Create a Web Performance Test Plug-In
    Best regards,
    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

  • What is the best home set up for a family to share/use apple products

    Hi, I am relatively new to apple (have an iPad) and having been a PC user for years I was pleasantly surprised with the apple experience and am now trying to work out the best set up for me, my husband and young son as I am buying them both of them apple products this Christmas.  New Mac laptop/ ipad for hubby and then an ipod touch for my son oh and a new mac laptop for me. We are also thinking of moving from Blackberries to iPhones. Yes we seem to be hooked! but i am unsure about the home family set up and how to replace my PC network that I run off an 8TB server.
    In reading the forums I keep seeing people talk about problems they have with two apple IDs and trying to merge them. I have also heard about a family ID allowing us to share apps legally.  I am really nervous of setting us up wrong and then having problems later and hence i am now looking for some advice on how to share as much as we can legally but also make usage practical and not invading each others privacy. thoughts so far:
    Music - I think we are happy to share the same music and access using one ID (we currently don't buy much music from apple but have lots of CDs we share).
    Photos - It would be nice to share photos - as long as my son or husband cannot accidentally delete photos of mine (which is my biggest concern). I currently load all camera photos onto my 8TB storage box as the network owner and my husband has full access to copy any photo to his laptop but can never delete the original copies by accident.
    Apps - If possible i would like us to share these but they are cheap enough these days to separate if really needed. Would be good to share licence for pages etc though
    cloud, contacts, facetime, email -  this is what is making me consider separate IDs or learning how to have multiple users in one apple ID - I do not want to have to share synced contacts with my husband. I have near 300 contacts now through work etc and he will not want them plus i will not want his or him being able to delete mine by mistake. and then for email and facetime, well I want to give him his privacy so I do not receive his messages etc. especially now that we are considering switching to iPhones
    Then last but not least, i don't know the best solution for my son. he is only 7 years old so even though I don't want to pay for things again I don't want him being able to download "just any" app from the purchased icon in Appstore. Also, is there a child friendly setting to prevent him from viewing inappropriate content on the internet?
    Appreciate I have asked a lot of questions here but I am looking for any genuine advice out there. Thank you in advance to any potential advisers.

    Welcome to the Apple Community.
    You don't need to use the same ID on a device for iCloud and iTunes.
    iCloud covers mail, contacts, calendars, reminders, notes, bookmarks, photostream, document syncing etc and for these I recommend you each have your own ID's, this will stop others from having access to and likely more importantly being able to edit or even delete your personal information.
    Someone of Age needs to be responsible for an account, so for younger children you will need to create and be responsible for an account yourself but let the child use it.
    For iTunes you could use a single account so everyone can share music and apps or you could use separate accounts (there are ways to share content between users, Apple provides homesharing to do this).
    When choosing how to proceed with iTunes, it might be worth remembering that someday your children will reach 21 (or whatever age they feel they have become independent) and will likely want their own account, changing accounts later may make it difficult to access previous content.
    Photostream now has shared albums, so you can share just what you want with others. Shared photos using shared albums cannot be deleted by others with different accounts, but if you all shared the same account they could be.
    Facetime and messages can also use an ID independently of each other, iCloud and iTunes. Separate ID's are recommended for these, joint accounts can be problematic.
    iTunes has parental controls for youngsters, however at 7, I suggest you don't reveal the password to him and enter it yourself when he needs to purchase something, otherwise you may receive unexpected bills.

Maybe you are looking for

  • AMD/ATi with xf86-video-ati is glitching (random frame hang)

    I've asked #archlinux about this multiple times to no avail. Also, I can't find anything on the Wiki about an issue like this. Basically my computer hangs for around a 8th-4th second or so about every 20-40 seconds. The hang is visual only (i think),

  • Can one call a function module in Calculated Key Figure?

    Can one call a function module in Calculated Key Figure? If  yes how, if not, what is the solution if formula does not suffice? I want to convert duration which is in seconds to   Duration in Hours and Minutes. There is a function module for doing it

  • Idoc Segment

    Hi,   Idoc HRMD_A07 has segments for each infotype. We specify what are the related segment to be filled for a infotype in Technical attributes of the infotype. I would like to know where and how the segment E1PAD25 is filled up. I know that E1PAD25

  • Exchange 2010 to 2013 cross forest migration doesn't have an SMTP address that matches the target delivery domain

    I'm having a problem moving a mailbox from exchange 2010 sp3 to Exchange 2013 which are in two separate forests. Two way trust in place Certificates imported ADMT is set up. SMTP namespace oldcompany.org and newcompany.org for the old email domain an

  • ITunes music library file, yet again...

    I apologize for this advance: About every other post on this discussion board relates to how people are missing their music, playlists, etc. and I roll my eyes to read them. Now I am one of them. Two days ago, I consolidated my music on my external d