DPM Console hands with ESENT events 489 455 490

Over the weekend, my DPM installation became unstable and I can no longer navigate the console, or get a response from DPM powershell commandlets. This is after running the most recent windows updates (Feb 2015).
The event logs show sqlserver errors attempting to access the C:\Windows\System32\Logfiles\Sum\api.log and api.chk files.
DMP 2012 R2, running on Server 2012 R2.
I'm not even sure where to start to get this installation working again.
Help is greatly appreciated!

Hey Cosdk i'm having the exact same issue with ours too its just sitting at the DPM loading screen. i followed the steps posted by Tom on this forum https://connect.microsoft.com/SQLServer/feedback/details/781317/error-occurred-while-opening-logfile-c-windows-system32-logfiles-sum-api-log
And the error messages have gone away but i still can't login to DPM. it looks like the DPM jobs are still running if i check the DPM logs in event viewer as well so its like the console access is just playing up. 
This also happened to me after i installed Feb's patches to this machine which is also running DPM 2012 R2 on Server 2012 R2. 
Post back if you solve the problem been doing my head in for the last 2 days! 
 

Similar Messages

  • DPM 2012 R2 Console crashing with custom filter

    Hi,
    I created a custom filter to show the next 7 days scheduled jobs, now every time I elect the filter the DPM concole crashes and exits.
    Event log show the following error;-
    Log Name:      Application
    Source:        MSDPM
    Date:          25/03/2015 09:31:33
    Event ID:      999
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Description:
    An unexpected error caused a failure for process 'mmc'.  Restart the DPM process 'mmc'.
    Problem Details:
    <FatalServiceError><__System><ID>19</ID><Seq>0</Seq><TimeCreated>25/03/2015 09:31:33</TimeCreated><Source>DpmThreadPool.cs</Source><Line>163</Line><HasError>True</HasError></__System><ExceptionType>ArgumentException</ExceptionType><ExceptionMessage>The
    supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.
    Parameter name: dateTime</ExceptionMessage><ExceptionDetails>System.ArgumentException: The supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.
    Parameter name: dateTime
       at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.GetScheduledJobs(Guid jobDefId, DateTime jobStartTime, DateTime jobEndTime)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.PopulateFromDatabase()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.GetJobsThreadStart(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()</ExceptionDetails></FatalServiceError>
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSDPM" />
        <EventID Qualifiers="0">999</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-03-25T09:31:33.000000000Z" />
        <EventRecordID>234036</EventRecordID>
        <Channel>Application</Channel>
        <Computer>UK-LUT-MOB-375.internal.stepstonesolutions.local</Computer>
        <Security />
      </System>
      <EventData>
        <Data>An unexpected error caused a failure for process 'mmc'.  Restart the DPM process 'mmc'.
    Problem Details:
    &lt;FatalServiceError&gt;&lt;__System&gt;&lt;ID&gt;19&lt;/ID&gt;&lt;Seq&gt;0&lt;/Seq&gt;&lt;TimeCreated&gt;25/03/2015 09:31:33&lt;/TimeCreated&gt;&lt;Source&gt;DpmThreadPool.cs&lt;/Source&gt;&lt;Line&gt;163&lt;/Line&gt;&lt;HasError&gt;True&lt;/HasError&gt;&lt;/__System&gt;&lt;ExceptionType&gt;ArgumentException&lt;/ExceptionType&gt;&lt;ExceptionMessage&gt;The
    supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.
    Parameter name: dateTime&lt;/ExceptionMessage&gt;&lt;ExceptionDetails&gt;System.ArgumentException: The supplied DateTime represents an invalid time.  For example, when the clock is adjusted forward, any time in the period that is skipped
    is invalid.
    Parameter name: dateTime
       at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.GetScheduledJobs(Guid jobDefId, DateTime jobStartTime, DateTime jobEndTime)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.PopulateFromDatabase()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.JobManagement.JobQuery.GetJobsThreadStart(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()&lt;/ExceptionDetails&gt;&lt;/FatalServiceError&gt;
    </Data>
        <Binary>3C0046006100740061006C0053006500720076006900630065004500720072006F0072003E003C005F005F00530079007300740065006D003E003C00490044003E00310039003C002F00490044003E003C005300650071003E0030003C002F005300650071003E003C00540069006D00650043007200650061007400650064003E00320035002F00300033002F0032003000310035002000300039003A00330031003A00330033003C002F00540069006D00650043007200650061007400650064003E003C0053006F0075007200630065003E00440070006D0054006800720065006100640050006F006F006C002E00630073003C002F0053006F0075007200630065003E003C004C0069006E0065003E003100360033003C002F004C0069006E0065003E003C004800610073004500720072006F0072003E0054007200750065003C002F004800610073004500720072006F0072003E003C002F005F005F00530079007300740065006D003E003C0045007800630065007000740069006F006E0054007900700065003E0041007200670075006D0065006E00740045007800630065007000740069006F006E003C002F0045007800630065007000740069006F006E0054007900700065003E003C0045007800630065007000740069006F006E004D006500730073006100670065003E00540068006500200073007500700070006C0069006500640020004400610074006500540069006D006500200072006500700072006500730065006E0074007300200061006E00200069006E00760061006C00690064002000740069006D0065002E002000200046006F00720020006500780061006D0070006C0065002C0020007700680065006E002000740068006500200063006C006F0063006B002000690073002000610064006A0075007300740065006400200066006F00720077006100720064002C00200061006E0079002000740069006D006500200069006E002000740068006500200070006500720069006F00640020007400680061007400200069007300200073006B0069007000700065006400200069007300200069006E00760061006C00690064002E000D000A0050006100720061006D00650074006500720020006E0061006D0065003A0020006400610074006500540069006D0065003C002F0045007800630065007000740069006F006E004D006500730073006100670065003E003C0045007800630065007000740069006F006E00440065007400610069006C0073003E00530079007300740065006D002E0041007200670075006D0065006E00740045007800630065007000740069006F006E003A002000540068006500200073007500700070006C0069006500640020004400610074006500540069006D006500200072006500700072006500730065006E0074007300200061006E00200069006E00760061006C00690064002000740069006D0065002E002000200046006F00720020006500780061006D0070006C0065002C0020007700680065006E002000740068006500200063006C006F0063006B002000690073002000610064006A0075007300740065006400200066006F00720077006100720064002C00200061006E0079002000740069006D006500200069006E002000740068006500200070006500720069006F00640020007400680061007400200069007300200073006B0069007000700065006400200069007300200069006E00760061006C00690064002E000D000A0050006100720061006D00650074006500720020006E0061006D0065003A0020006400610074006500540069006D0065000D000A00200020002000610074002000530079007300740065006D002E00540069006D0065005A006F006E00650049006E0066006F002E0043006F006E007600650072007400540069006D00650028004400610074006500540069006D00650020006400610074006500540069006D0065002C002000540069006D0065005A006F006E00650049006E0066006F00200073006F007500720063006500540069006D0065005A006F006E0065002C002000540069006D0065005A006F006E00650049006E0066006F002000640065007300740069006E006100740069006F006E00540069006D0065005A006F006E0065002C002000540069006D0065005A006F006E00650049006E0066006F004F007000740069006F006E007300200066006C006100670073002C00200043006100630068006500640044006100740061002000630061006300680065006400440061007400610029000D000A002000200020006100740020004D006900630072006F0073006F00660074002E0049006E007400650072006E0061006C002E0045006E0074006500720070007200690073006500530074006F0072006100670065002E0044006C0073002E00550049002E004F0062006A006500630074004D006F00640065006C002E004A006F0062004D0061006E006100670065006D0065006E0074002E004A006F006200510075006500720079002E004700650074005300630068006500640075006C00650064004A006F00620073002800470075006900640020006A006F006200440065006600490064002C0020004400610074006500540069006D00650020006A006F00620053007400610072007400540069006D0065002C0020004400610074006500540069006D00650020006A006F00620045006E006400540069006D00650029000D000A002000200020006100740020004D006900630072006F0073006F00660074002E0049006E007400650072006E0061006C002E0045006E0074006500720070007200690073006500530074006F0072006100670065002E0044006C0073002E00550049002E004F0062006A006500630074004D006F00640065006C002E004A006F0062004D0061006E006100670065006D0065006E0074002E004A006F006200510075006500720079002E0050006F00700075006C00610074006500460072006F006D0044006100740061006200610073006500280029000D000A002000200020006100740020004D006900630072006F0073006F00660074002E0049006E007400650072006E0061006C002E0045006E0074006500720070007200690073006500530074006F0072006100670065002E0044006C0073002E00550049002E004F0062006A006500630074004D006F00640065006C002E004A006F0062004D0061006E006100670065006D0065006E0074002E004A006F006200510075006500720079002E004700650074004A006F00620073005400680072006500610064005300740061007200740028004F0062006A0065006300740020007300740061007400650029000D000A00200020002000610074002000530079007300740065006D002E0054006800720065006100640069006E0067002E0045007800650063007500740069006F006E0043006F006E0074006500780074002E00520075006E0049006E007400650072006E0061006C00280045007800650063007500740069006F006E0043006F006E007400650078007400200065007800650063007500740069006F006E0043006F006E0074006500780074002C00200043006F006E007400650078007400430061006C006C006200610063006B002000630061006C006C006200610063006B002C0020004F0062006A006500630074002000730074006100740065002C00200042006F006F006C00650061006E00200070007200650073006500720076006500530079006E00630043007400780029000D000A00200020002000610074002000530079007300740065006D002E0054006800720065006100640069006E0067002E0045007800650063007500740069006F006E0043006F006E0074006500780074002E00520075006E00280045007800650063007500740069006F006E0043006F006E007400650078007400200065007800650063007500740069006F006E0043006F006E0074006500780074002C00200043006F006E007400650078007400430061006C006C006200610063006B002000630061006C006C006200610063006B002C0020004F0062006A006500630074002000730074006100740065002C00200042006F006F006C00650061006E00200070007200650073006500720076006500530079006E00630043007400780029000D000A00200020002000610074002000530079007300740065006D002E0054006800720065006100640069006E0067002E0051007500650075006500550073006500720057006F0072006B004900740065006D00430061006C006C006200610063006B002E00530079007300740065006D002E0054006800720065006100640069006E0067002E00490054006800720065006100640050006F006F006C0057006F0072006B004900740065006D002E00450078006500630075007400650057006F0072006B004900740065006D00280029000D000A00200020002000610074002000530079007300740065006D002E0054006800720065006100640069006E0067002E0054006800720065006100640050006F006F006C0057006F0072006B00510075006500750065002E0044006900730070006100740063006800280029003C002F0045007800630065007000740069006F006E00440065007400610069006C0073003E003C002F0046006100740061006C0053006500720076006900630065004500720072006F0072003E00</Binary>
      </EventData>
    </Event>
    Is there a way to remove this custom filter from the console without having to load the console?  I cannot delete it in the console as every time I select it the console crashed before I can delete.

    Hi,
    One of the below outlined options may assist.
    Option 1:
    You can attempt to rename the jobfilters.xml with the below steps. Please note renaming jobfilters.xml will remove all custom filters in place and they will need to be recreated.
    Log into DPM server with the user account the custom filter was created with. Ensure the DPM console is closed.
    From control panel select appearance---show hidden file and folders. Ensure for Hidden files and folders that the radio button is selected for Show hidden files, folders,
    and drives
    From windows explorer navigate to the following path
    <OS Install Path>\Users\ <account logged in with when DPM custom filter was created> \ AppData\Roaming\Microsoft System Center Data Protection Manager\JobsFilter.xml
       4. Rename JobsFilter.xml to JobFilters_old.xml
       5. Open the DPM console.
        6. Navigate to Monitoring- Jobs we should see all custom filters are no longer in place. If so re-create pervious working filters if any.
    Option 2:
    Provide full DPMUI0Curr.errlog to assist with investigating further as it may contain errors on the crash.
    Log into DPM server with the user account the custom filter was created with.
    Take needed steps to reproduce the crash behavior.
    From control panel select appearance---show hidden file and folders. Ensure for Hidden files and folders that the radio button is selected for Show hidden files, folders,
    and drives
    From windows explorer navigate to the following path
    <OS Install Path>\Users\ <account logged in with when DPM custom filter was created> \ AppData\Roaming\Microsoft System Center 2012 R2 Data Protection Manager\DPMUI0Curr.errlog
       6. Open the DPMUI0Curr.errlog
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually
    answer your question. This can be beneficial to other community members reading the thread. Regards, Dwayne Jackson II. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights."

  • DPM console not connecting . Error- Cannot connect to Data Protection Manager. This version of DPM is not supported with Central Console Client (ID : 33345) DPM console not connecting

    I  am having problem connecting the DPM console to ther server. It gives me following error -
    "Cannot connect to Data Protection Manager. This version of DPM is not supported with Central Console Client (ID : 33345)"
    The server is DPM R2 and the same console is working on one other computer.
    Any idea how to solve the problem?
    Thanks   

    Hi
    Please make sure you have both versions of Microsoft Visual C++ 2008 Redistributable installed..
    Also make sure you have .netframework 2 installed. If you look at the dpm logs it should say what is missing.

  • DPM 2012 R2 Console crashes with ID: 917 error when trying to modify a Tape only protection group

    When I attempt to Modify one particular protection group, the console crashes with this:
    This only happens to this particular Protection group that backs up to long term Tape protection.  I have tried the work around found in this article
    http://support.microsoft.com/kb/2905631 , but had no success. 

    Hi,
    It sounds like you have a DPMDB inconsistency that is not possible to troubleshoot in a forum setting. Either restore the DPMDB from before the problem occurred and run dpmsync -sync  or open a support case so it can be diagnosed and corrected. 
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • DPM console crashes due to DB error

    Hi all,
    I've updated a protection group ( removed backup targets) and the console crashed. Now i cannot open the console due to DB error
    The description for Event ID 945 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    Unable to connect to the DPM database because of a general database failure.  Make sure that SQL Server is running and that it is configured correctly.
    Problem Details:
    <FatalServiceError><__System><ID>19</ID><Seq>0</Seq><TimeCreated>12/11/2014 9:51:45 AM</TimeCreated><Source>DpmThreadPool.cs</Source><Line>163</Line><HasError>True</HasError></__System><ExceptionType>SqlException</ExceptionType><ExceptionMessage>The
    specified category "DPM_2934c289-599f-49b3-a6e3-7212b62770ea" does not exist for category class "1".</ExceptionMessage><ExceptionDetails>System.Data.SqlClient.SqlException (0x80131904): The specified category "DPM_2934c289-599f-49b3-a6e3-7212b62770ea"
    does not exist for category class "1".
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.Internal.EnterpriseStorage.Dls.DB.SqlRetryCommand.InternalExecuteReader()
       at Microsoft.Internal.EnterpriseStorage.Dls.Scheduler.SqlAgentHelper.AddSqlJobCategory()
       at Microsoft.Internal.EnterpriseStorage.Dls.Scheduler.ConsistencyCheckHelper.PerformDBOperation()
       at Microsoft.Internal.EnterpriseStorage.Dls.Scheduler.CommandHelper.Execute(SqlContext sqlContext)
       at Microsoft.Internal.EnterpriseStorage.Dls.Scheduler.ConsistencyCheckHelper.Execute()
       at Microsoft.Internal.EnterpriseStorage.Dls.Scheduler.SchedulerImpl.ConsistencyCheck()
       at Microsoft.Internal.EnterpriseStorage.Dls.Intent.IntentTranslator.IntentRestart()
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
    ClientConnectionId:1e3c3dcf-ecfb-4a86-abe8-bd218ab47ab7</ExceptionDetails></FatalServiceError>
    the message resource is present but the message is not found in the string/message table
    Please help.

    Hi,
    Did you by chance restore an older version of the DPMDB or rebuild the DPM Server ?
    Run the below Query in SQL Server management studio and see if they match.
    use msdb
    select * from syscategories
    where category_id = 100
    or name like '%dpm%'
    use DPMDB --verify DPM database name and change accordingly
    select * from dbo.tbl_DLS_GlobalSetting
    where PropertyName = 'DPMcategory'
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • DPM Console crashing.

    DPM Console Crashing.
    Event ID 948 and 999. Detail error log in eventvwr is below. Please help urgent.
    The description for Event ID 999 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event: 
    An unexpected error caused a failure for process 'DPMAMService'.  Restart the DPM process 'DPMAMService'.
    Problem Details:
    <FatalServiceError><__System><ID>19</ID><Seq>0</Seq><TimeCreated>10/16/2014 9:41:30 PM</TimeCreated><Source>DpmThreadPool.cs</Source><Line>163</Line><HasError>True</HasError></__System><ExceptionType>DlsException</ExceptionType><ExceptionMessage>exception</ExceptionMessage><ExceptionDetails>Microsoft.Internal.EnterpriseStorage.Dls.Utils.DlsException:
    exception ---&gt; System.Runtime.InteropServices.COMException (0x8007139F): The group or resource is not in the correct state to perform the requested operation. (Exception from HRESULT: 0x8007139F)
    Server stack trace: 
       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
       at Microsoft.Internal.EnterpriseStorage.Dls.Engine.CProxyUtils.HandleErrors(Int32 hr, tagSAFEARRAY* exceptionResult)
       at Microsoft.Internal.EnterpriseStorage.Dls.Engine.EngineServicesProxy.CheckForPendingReboot()
       at Microsoft.Internal.EnterpriseStorage.Dls.EngineProxyWrapper.EngineServiceProxyWrapper.CheckForPendingReboot()
       at Microsoft.Internal.EnterpriseStorage.Dls.EngineProxyWrapper.EngineServiceProxyWrapper.ConnectAsAdmin(String dpmServerName, AsyncOperation asyncOperation)
       at Microsoft.Internal.EnterpriseStorage.Dls.EngineProxyWrapper.EngineServiceProxyWrapper.GetInstance(String dpmServerName, AsyncOperation asyncOperation)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.get_Proxy()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.ReadRegistryKeyOnDPMServer(String registryKeyPath, String registryKeyName, RegistryValueKind registryValueKind)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]&amp; outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
       at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData&amp; msgData)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.ReadRegistryKeyAsync.EndInvoke(IAsyncResult result)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.ReadRegistryKey(String registryKeyPath, String registryKeyName, RegistryValueKind registryValueKind)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.InitializeIgnorableSqlErrorNumbersList()
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServer.GetDpmServerObject(String serverName, AsyncOperation asyncOperation, DpmServerScope dpmServerScope)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServerFactory.GetServer(String serverName, AsyncOperation asyncOperation, DpmServerScope dpmServerScope)
       --- End of inner exception stack trace ---
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.DpmServerFactory.GetServer(String serverName, AsyncOperation asyncOperation, DpmServerScope dpmServerScope)
       at Microsoft.Internal.EnterpriseStorage.Dls.UI.AutoHeal.AutoHeal.DpmStarted()
       at Microsoft.Internal.EnterpriseStorage.Dls.EngineUICommon.DpmThreadPool.Function(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    *** Mojito error was: ConnectionToServerFailed; 0; None</ExceptionDetails></FatalServiceError>
    the message resource is present but the message is not found in the string/message table

    Use this Walktrough
    https://support2.microsoft.com/kb/3008149/en-us
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • Possible to publish and schedule custom reports in DPM console?

    Hello
    I've made a slight adjustment to the Tape Management (MediaDetails) report using Report Builder and saved it to the report server creatively named MediaDetails2.
    It does not show up in the DPM console, Is this possible?
    I would also like to schedule this Report to be sent via email at a regular intervals just like the built-in reports.
    DPM 2012 R2 UR4
    Thanks

    Hi
    I don't think it's possible to have it show up on the DPM console, however you can subscribe to the report and have it mailed like other DPM reports.
    See the following blog for details.
    How to create a custom report in System Center 2012 Data Protection Manager
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Secondary DPM backup failure with error code 0x80070002

    Hello everyone,
    I have the following scenario:
    Protected Server -> Primary DPM (DPM 2012 R2 UR4) -> Secondary DPM (DPM 2012 R2 UR4 - remote network)
    I have created a Protection Group in Primary DPM server containing three folders under C: drive. Backups works fine.
    In my Secondary DPM server, I have created a Protection Group containing my Primary DPM server's protected data, which is the entire drive C:.
    I am getting the following error while running a Consistency Check on Secondary DPM server:
    An unexpected error occurred while the job was running. (ID 104 Details: The system cannot find the file specified (0x80070002))
    In the logs, I just see entries like this:
    1238 0B5C 11/12 00:00:08.005 18 fsutils.cpp(4055) 6A3D1492-680E-40BC-974E-59FD1EED6B68 WARNING Failed: Hr: = [0x80070003] : GetFileAttributes failed for \\?\Volume{dff758bf-692e-11e4-80bb-00155d40499d}\5778d89f-e343-4bc8-a26e-7ee7f39e3da4\Incremental\b30c95f9-5e28-4fca-bcd7-0e630e6ea942\C-Vol\Program Files\Microsoft SQL Server\MSSQL10_50.DPM2012R2\MSSQL\DATA\
    1238 0B5C 11/12 00:00:08.005 18 fsutils.cpp(4055) 6A3D1492-680E-40BC-974E-59FD1EED6B68 WARNING Failed: Hr: = [0x80070003] : GetFileAttributes failed for \\?\Volume{dff758bf-692e-11e4-80bb-00155d40499d}\5778d89f-e343-4bc8-a26e-7ee7f39e3da4\Incremental\b30c95f9-5e28-4fca-bcd7-0e630e6ea942\C-Vol\Program Files\Microsoft SQL Server\MSSQL10_50.DPM2012R2\MSSQL\
    1238 0B5C 11/12 00:00:08.005 18 fsutils.cpp(4055) 6A3D1492-680E-40BC-974E-59FD1EED6B68 WARNING Failed: Hr: = [0x80070003] : GetFileAttributes failed for \\?\Volume{dff758bf-692e-11e4-80bb-00155d40499d}\5778d89f-e343-4bc8-a26e-7ee7f39e3da4\Incremental\b30c95f9-5e28-4fca-bcd7-0e630e6ea942\C-Vol\Program Files\Microsoft SQL Server\MSSQL10_50.DPM2012R2\
    1238 0B5C 11/12 00:00:08.005 18 fsutils.cpp(4055) 6A3D1492-680E-40BC-974E-59FD1EED6B68 WARNING Failed: Hr: = [0x80070003] : GetFileAttributes failed for \\?\Volume{dff758bf-692e-11e4-80bb-00155d40499d}\5778d89f-e343-4bc8-a26e-7ee7f39e3da4\Incremental\b30c95f9-5e28-4fca-bcd7-0e630e6ea942\C-Vol\Program Files\Microsoft SQL Server\
    1238 0B5C 11/12 00:00:08.005 18 fsutils.cpp(4055) 6A3D1492-680E-40BC-974E-59FD1EED6B68 WARNING Failed: Hr: = [0x80070002] : GetFileAttributes failed for \\?\Volume{dff758bf-692e-11e4-80bb-00155d40499d}\5778d89f-e343-4bc8-a26e-7ee7f39e3da4\Incremental\b30c95f9-5e28-4fca-bcd7-0e630e6ea942\C-Vol\Program Files\
    In the DPM console, this data source status icon shows green, however no Recovery Point is created.
    Do you guys have any idea on why this is happening?
    Thanks for your cooperation.
    Best regards,
    Bruno Martins

    Does Volume C:\ on your primary server involves boot configuration data which is offline?
    This can happen due to installation of some 3rd party disk storage management solutions.
    The following blog has some details on how to solve file not specified errors:
    http://blogs.technet.com/b/askcore/archive/2010/06/18/reasons-why-the-error-enumeration-of-the-files-failed-may-occur-during-system-state-backup.aspx
    Regards, Trinadh [MSFT] This posting is provided AS IS with no warranties, and confers no rights. If you found the reply helpful, please MARK IT AS ANSWER. Looking for source of information for DPM? http://blogs.technet.com/b/dpm/ http://technet.microsoft.com/en-in/library/hh758173.aspx

  • Surely It cannot be this hard! DPM 2012 R2 with Update rollup 2

    I am close to giving up!
    New to DPM but very experienced with networking/servers.
    I installed DPM 2012 R2 and then installed rollup 2
    I launch the DPM console, add some storage and then go to install the agent on a server - it fails
    I get the standard message. When I check on the server I tried to install to I can see that the dpm 2012 r2 agent coordinator service was installed and running and listening on port 5719 but there is no DPMRA service.
    So I perform a manual installation using the correct version from Rollup 2 on the server to be protected. This goes OK and I return to the DPM server to add the protected server. Made sure services were running on both servers, checkerd RPC, WMI, DCOM settings
    and all seems OK but when I try to add the protected server from the DPM console using the attach agent option it fails with error 370.
    Followed the top 20 suggestions, configured firewall for all ports on both servers. Tried turning the firewall off and still will not install.
    I have also tried using a Hyper-V server, a physical server and none will work which tends to point to an issue with the DPM server.
    The thing that puzzles me is that after I perform a manual agent installation on the protected server this seems to knock out the dpm 2012 r2 agent coordinator service which is no longer listed under services wheras DPMRA is running. I expected both services
    to be installed and running.
    When I perform a NETSTAT -a after installing the remote agent I can see port 5718 is listening but not port 5719
    If I go back a step and try a dpm 2012 r2 agent coordinator install via DPM console (as part of adding the protected server) it does install dpm 2012 r2 agent coordinator and it listens on port 5719 but the DPMRA agent software is not installed.
    I have tried deinstalling both the DPM agent software on the protected server and have even reinstalled DPM 2012 R2 with Rollup 2 with no change
    I have verified communications between the servers. Checked the DPM server is in the relevant groups. Am at a complete loss on what to do next - it should not be this hard.
    Can someone confirm to me that they expect both the dpm 2012 r2 agent coordinator service running on 5719 and the DPMRA service to be running on 5718 on the protected server which is what I assume but this
    is not happening!
    DPM server is a physical box running Server 2012. Protected server is a Physical box running Server 2012 R2. I have also tried with a physical server 2008R2 with the same results. I am not running Server 2003
    prd

    After 3 long days trying everything I could think of and following all of the excellent guidance out there ( thanks guys) I have a workaround.
    The answer was to make the dpm server computer account a member of the domain admins group.
    After I restarted the DPM server I saw that although the protected server account was still in error - the error message changed from 270 to 316.
    So I then add the protected server computer account to the domain admins group
    After I restarted the computers I could see the magic OK in the status of the DPM console.
    As an experiment I removed the protected servers computer account from domain admins and restarted the server. After the restart DPM could no longer communicate with error 316 again.
    So I tried adding the DPM server computer account to the protected servers local administrators group but this did not work.
    Deeply unhappy with making a computer account a member of domain admin group but it works.
    The question is why? There is obviously a security permissions issue that does not affect domain admins.
    I am running this on freshly built servers on a simple, single domain.
    Microsoft you need to look into this.
    prd

  • Free disk space is not showing in DPM console

    Hello Guys,
    We have one DPM server (2K12 R2). Configured for D2D backup on HP storage. recently we have removed inactive protection of around 18 TB. But in Management Workspace it is showing only 110 GB space unallocated. If i view the things in Disk Management is also
    not giving any clear picture. For example: 
    In Volume List it is displaying the space correctly but Graphical View is completely different.
    Is there any way to claim this space in DPM console?
    Thanks,
    Arun
    Arun Kumar

    Hi Arun,
    I assume the data was removed from Disk1 of the Disk Management screenshot - it seems that many partitions are displayed with gray.
    If it is not a display issue, I cannot confirm if it is caused by storage device or Windows. It could also be caused if storage actually not "remove" data but just marked them as deleted - you may need to try a reboot or check if any specific option
    is available on storage device side which could help release space.
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Floating boxes applet with drag events need click event

    I Have an applet cobbled from the net & modified. Is works but needs one major event added. It draws "Graphics.drawline" boxes with a text "String" inside each box ( the text string represents an URL location). These "boxes" are objects which are "draggable to other locations on canvas & therefore can be independently positioned by user. Each box redraws itself periodically to a slightly different screen location & becomes stationary after a 5 or 6 seconds. The point is, all of this "drag & mobility" behavior must remain intact & is not part of the "problem task".
    Task: Need to have an "event" behavior added in one of two ways ( or a 3rd way if there is another ) whichever is quickest/ easiest. "Clickable mouse events" must be added to each box. ( boxes are built in a loop so adding to one will add to other locations & create as many "buttons" as there are boxes) . At each box's location, clicking one box should be an event which fires & clicking a different box should be a separate event which fires. Separate , so that URL location can be "hotlinked" to each box. That URL is currently displayed in the boxes (visible when running applet).
    1st possible solution: Exchange these "boxes" which appear on canvas into clickable event "Graph panel.buttons" ( for example or some other clickable object) which maintains existing "drag" behavior of boxes. These buttons must each have "clickability" with mouse events to enable placing "getAppletContext. showDocument()" code with these events ( e.g., "hotlinked" to http locations).
    or
    2nd possible solution:. The drawstring boxes are currently dead string text with no event model other than the "drag" feature associated with each box. Must add an additional mouse event behavior to existing boxes so they are "clickable" ( or text inside is clickable) and can then execute "showDocument()" URL when clicked independently.
    Maybe there is a #3. I don't know what that would be. Open to try anything without losing the drag & placement mobility of existing boxes.
    These "boxes" could be images, or event buttons - doesnt matter.
    Not sure if #2 is possible & have not been able to accomplish #1. Must stay within existing AWT framework so IE browsers can run it natively ( which of course IE cannot run Swing graphics unless a Sun plugin loaded ).
    Applet is a single file ( creating 4 classes).
    html file (which invokes it) passes a string param which is broken into above noted URL strings in each box.
    Running this applet, you see a "button" event ( at base of canvas labeled "NewUrl" ) which pops up an url location when clicked ( using "showdocument"). This button is not attached to locations or text of each box object ( which is the "task" to accomplish) . The button does represent the kind of event behavior which each "box" should have when task is achieved. So the box can be exchanged with buttons or the boxes can be imbued with events to hyperlink like a button.
    In spirit of solution #1, here is the bonehead attempt I tried which did not work: copied entire "if" block of logic from the button event (sited in preceding paragraph) into region of code which builds boxes ( "for" loop of "drawstring" method).
    "g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());"
    I copied all the "if" block of logic for button creation into the area immediately after the above line ( for loop which builds the boxes). Hoping that I could create buttons with events, along with all the boxes (which are getting created using "drawstring" above in a "for" loop). These "buttons" must also have positioning info of each box to appear in different locations on the canvas. Positioning data is not in that "if" block of code but it would have been a start to get the multiple buttons created ( even if all drawn in one spot). The "if" code block I've provieded for an example begins with the line:
    " if ("NewUrl".equals(arg)) { "
    and ends with with lines:
    " return true; "
    " } " //< -- end of above if block
    This full "if" block can be seen in the listing below:
    This "if" block creates the "NewUrl" button. Of course, I got a bunch of errors when I tried to copy this block to the above location:
    variable: "arg" "not found in class GraphPanel".
    methods: "getcodebase, showstatus, getappletcontext()"
    "not found in class GraphPanel".
    ----------- The applet code in total follows next
    Here are both the java & htm complete source.
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    double f = (edges.len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    Node n1 = nodes;
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    paintNode( offgraphics, nodes, fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;
    -----------------------htm file to launch------------------------------
    <html>
    <head>
    <title>R
    </title>
    </head>
    <body>
    <h3>
    <center>
    R
    </center>
    </h3>
    I
    <b>
    </b>
    <table border = 1>
    <td>De<td>Test List<tr>
    <td>N <td><tr>
    <td>N <td><tr>
    </table>
    <b>view </b>
    <applet code="Box.class" CODEBASE=. width=1000 height=600
    ALT="Test ">
    <param name=edges value="http:xxabc.htm-http:xxnet.htm,http:xxthis.htm-http:xx.comet.htm,http:xxnewsighting.htm-http:xxstar.htm,http:xxmoon.htm-http:xxNeptune.htm">
    <hr>
    </applet>
    </b>
    <p>
    <table border = 1>
    <tr>
    <tr>
    </table>
    </html>
    </body>
    instructions to compile :
    0 : The discussion becomes easy to follow after 1st compiling
    & viewing the applet.
    1. : cut out applet code.
    2. : the post somehow deleted all references to "" <--- HERE
    see, the data has been deleted again as I preview this post.
    ( that "" should contain an "i" array increment argument:
    "open square bracket" "i" "close square bracket" ) array
    so "javac Box.java" will get 10 errors. These "[" "i" "]"
    array args must be replaced to compile the code.
    3. : All array variables inside the 10 "for" loops ( the bare words
    "edges" and "nodes" ) without array increment "i" should
    read "edges" "[" "i" "]" & "nodes" "[" "i" "]".
    The 10 location lines are approx:
    line #65, #129, #136, #149, #195, #283, #311, #331, #477, #522
    4. : These 10 edits reqresent a missing "i" to all 10 for loop arrays.
    for eddges & nodes. fix this & javac Box.java" will get
    4 class files.
    5. : cut "Box.htm" from post & do "appletviewer Box.htm"
    or put in an apache "htdoc" or tomcat "servlet" http delivered
    directory & call "http://localhost/Box.htm.
    6. : of course, selecting the event button "NewUrl" will not
    work in appletviewer but will work in an http web location.
    7. : post your questions to problem or fixes to problem as I'm
    monitoring closely. TIA.

    Thanks for code post tip to fix array deletion problem.
    Here is code reposted using delimiters with will
    compile straight out of cut/paste.import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    //if (nodes.lbl.equals(lbl)) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    //double f = (edges.len - len) / (len * 3) ;
    double f = (edges[i].len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n1 = nodes[i];
    Node n1 = nodes[i];
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    //paintNode( offgraphics, nodes, fm); //or
    paintNode( offgraphics, nodes[i], fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;

  • Floating "boxes" applet with drag events need ckick events

    I Have an applet cobbled from the net & modified. Is works but needs one major event added. It draws "Graphics.drawline" boxes with a text "String" inside each box ( the text string represents an URL location). These "boxes" are objects which are "draggable to other locations on canvas & therefore can be independently positioned by user. Each box redraws itself periodically to a slightly different screen location & becomes stationary after a 5 or 6 seconds. The point is, all of this "drag & mobility" behavior must remain intact & is not part of the "problem task".
    Task: Need to have an "event" behavior added in one of two ways ( or a 3rd way if there is another ) whichever is quickest/ easiest. "Clickable mouse events" must be added to each box. ( boxes are built in a loop so adding to one will add to other locations & create as many "buttons" as there are boxes) . At each box's location, clicking one box should be an event which fires & clicking a different box should be a separate event which fires. Separate , so that URL location can be "hotlinked" to each box. That URL is currently displayed in the boxes (visible when running applet).
    1st possible solution: Exchange these "boxes" which appear on canvas into clickable event "Graph panel.buttons" ( for example or some other clickable object) which maintains existing "drag" behavior of boxes. These buttons must each have "clickability" with mouse events to enable placing "getAppletContext. showDocument()" code with these events ( e.g., "hotlinked" to http locations).
    or
    2nd possible solution:. The drawstring boxes are currently dead string text with no event model other than the "drag" feature associated with each box. Must add an additional mouse event behavior to existing boxes so they are "clickable" ( or text inside is clickable) and can then execute "showDocument()" URL when clicked independently.
    Maybe there is a #3. I don't know what that would be. Open to try anything without losing the drag & placement mobility of existing boxes.
    These "boxes" could be images, or event buttons - doesnt matter.
    Not sure if #2 is possible & have not been able to accomplish #1. Must stay within existing AWT framework so IE browsers can run it natively ( which of course IE cannot run Swing graphics unless a Sun plugin loaded ).
    Applet is a single file ( creating 4 classes).
    html file (which invokes it) passes a string param which is broken into above noted URL strings in each box.
    Running this applet, you see a "button" event ( at base of canvas labeled "NewUrl" ) which pops up an url location when clicked ( using "showdocument"). This button is not attached to locations or text of each box object ( which is the "task" to accomplish) . The button does represent the kind of event behavior which each "box" should have when task is achieved. So the box can be exchanged with buttons or the boxes can be imbued with events to hyperlink like a button.
    In spirit of solution #1, here is the bonehead attempt I tried which did not work: copied entire "if" block of logic from the button event (sited in preceding paragraph) into region of code which builds boxes ( "for" loop of "drawstring" method).
    "g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());"
    I copied all the "if" block of logic for button creation into the area immediately after the above line ( for loop which builds the boxes). Hoping that I could create buttons with events, along with all the boxes (which are getting created using "drawstring" above in a "for" loop). These "buttons" must also have positioning info of each box to appear in different locations on the canvas. Positioning data is not in that "if" block of code but it would have been a start to get the multiple buttons created ( even if all drawn in one spot). The "if" code block I've provieded for an example begins with the line:
    " if ("NewUrl".equals(arg)) { "
    and ends with with lines:
    " return true; "
    " } " //< -- end of above if block
    This full "if" block can be seen in the listing below:
    This "if" block creates the "NewUrl" button. Of course, I got a bunch of errors when I tried to copy this block to the above location:
    variable: "arg" "not found in class GraphPanel".
    methods: "getcodebase, showstatus, getappletcontext()"
    "not found in class GraphPanel".
    ----------- The applet code in total follows next
    Here are both the java & htm complete source.
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    double f = (edges.len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    Node n1 = nodes;
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    Edge e = edges;
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    paintNode( offgraphics, nodes, fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    Node n = nodes;
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    Node n = panel.nodes;
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;
    -----------------------htm file to launch------------------------------
    <html>
    <head>
    <title>R
    </title>
    </head>
    <body>
    <h3>
    <center>
    R
    </center>
    </h3>
    I
    <b>
    </b>
    <table border = 1>
    <td>De<td>Test List<tr>
    <td>N <td><tr>
    <td>N <td><tr>
    </table>
    <b>view </b>
    <applet code="Box.class" CODEBASE=. width=1000 height=600
    ALT="Test ">
    <param name=edges value="http:xxabc.htm-http:xxnet.htm,http:xxthis.htm-http:xx.comet.htm,http:xxnewsighting.htm-http:xxstar.htm,http:xxmoon.htm-http:xxNeptune.htm">
    <hr>
    </applet>
    </b>
    <p>
    <table border = 1>
    <tr>
    <tr>
    </table>
    </html>
    </body>
    instructions to compile :
    0 : The discussion becomes easy to follow after 1st compiling
    & viewing the applet.
    1. : cut out applet code.
    2. : the post somehow deleted all references to "" <--- HERE
    see, the data has been deleted again as I preview this post.
    ( that "" should contain an "i" array increment argument:
    "open square bracket" "i" "close square bracket" ) array
    so "javac Box.java" will get 10 errors. These "[" "i" "]"
    array args must be replaced to compile the code.
    3. : All array variables inside the 10 "for" loops ( the bare words
    "edges" and "nodes" ) without array increment "i" should
    read "edges" "[" "i" "]" & "nodes" "[" "i" "]".
    The 10 location lines are approx:
    line #65, #129, #136, #149, #195, #283, #311, #331, #477, #522
    4. : These 10 edits reqresent a missing "i" to all 10 for loop arrays.
    for eddges & nodes. fix this & javac Box.java" will get
    4 class files.
    5. : cut "Box.htm" from post & do "appletviewer Box.htm"
    or put in an apache "htdoc" or tomcat "servlet" http delivered
    directory & call "http://localhost/Box.htm.
    6. : of course, selecting the event button "NewUrl" will not
    work in appletviewer but will work in an http web location.
    7. : post your questions to problem or fixes to problem as I'm
    monitoring closely. TIA.

    Thanks for code post tip to fix array index deletion problem.
    Here is code reposted using "code" delimiters which will
    compile straight out of cut/paste.
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import java.applet.Applet;
    import java.applet.*;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.*;
    class Node {
    double x;
    double y;
    double dx;
    double dy;
    boolean fixed;
    String lbl;
    class Edge {
    int from;
    int to;
    double len;
    } // eEdgeCla
    class GraphPanel extends Panel implements Runnable {
    Box box;
    int nnodes;
    Node nodes[] = new Node[100];
    int nedges;
    Edge edges[] = new Edge[200];
    Thread relaxer;
    boolean showit;
    boolean random;
    GraphPanel(Box box) {
    this.box = box;
    } //ebox
    int findNode(String lbl) {
    for (int i = 0 ; i < nnodes ; i++) {
    //if (nodes.lbl.equals(lbl)) {
      if (nodes.lbl.equals(lbl)) {
    return i;
    return addNode(lbl);
    int addNode(String lbl) {
    Node n = new Node();
    n.x = 10 + 380*Math.random();
    n.y = 10 + 380*Math.random();
    n.lbl = lbl;
    nodes[nnodes] = n;
    return nnodes++;
    void addEdge(String from, String to, int len) {
    Edge e = new Edge();
    e.from = findNode(from);
    e.to = findNode(to);
    e.len = len;
    edges[nedges++] = e;
    public void run() {
    int i3=0;
    while (true) {
    relax();
    if (random && (Math.random() < 0.03)) {
    Node n = nodes[(int) (1 * nnodes) ]; // no
    if (!n.fixed) {
    n.x += (100*0.02) - 50;
    n.y += (100*0.02) - 50; //
    try {
    Thread.sleep(4000);
    } catch (InterruptedException e) {
    break;
    i3++;
    } //ew
    } // epublrun()
    synchronized void relax() {
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    double vx = nodes[e.to].x - nodes[e.from].x;
    double vy = nodes[e.to].y - nodes[e.from].y;
    double len = Math.sqrt(vx * vx + vy * vy);
    //double f = (edges.len - len) / (len * 3) ;
    double f = (edges[i].len - len) / (len * 3) ;
    double dx = f * vx;
    double dy = f * vy;
    nodes[e.to].dx += dx;
    nodes[e.to].dy += dy;
    nodes[e.from].dx += -dx;
    nodes[e.from].dy += -dy;
    } //efo
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n1 = nodes[i];
    Node n1 = nodes[i];
    double dx = 0;
    double dy = 0;
    for (int j = 0 ; j < nnodes ; j++) {
    if (i == j) {
    continue;
    Node n2 = nodes[j];
    double vx = n1.x - n2.x;
    double vy = n1.y - n2.y;
    double len = vx * vx + vy * vy;
    if (len == 0) {
    dx += 0.02;
    dy += 0.02;
    } else if (len < 100*100) {
    dx += vx / len;
    dy += vy / len;
    } //ef3a
    double dlen = dx * dx + dy * dy;
    if (dlen > 0) {
    dlen = Math.sqrt(dlen) / 2;
    n1.dx += dx / dlen;
    n1.dy += dy / dlen;
    } //ef3
    Dimension d = size();
    // f4
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    if (!n.fixed) {
    n.x += Math.max(-5, Math.min(5, n.dx));
    n.y += Math.max(-5, Math.min(5, n.dy));
    if (n.x < 0) {
    n.x = 0;
    } else if (n.x > d.width) {
    n.x = d.width;
    if (n.y < 0) {
    n.y = 0;
    } else if (n.y > d.height) {
    n.y = d.height;
    n.dx /= 2;
    n.dy /= 2;
    repaint();
    Node pick;
    boolean pickfixed;
    Image offscreen;
    Dimension offscreensize;
    Graphics offgraphics;
    final Color fixedColor = Color.green;
    final Color selectColor = Color.gray;
    final Color edgeColor = Color.black;
    final Color nodeColor = new Color(200, 90, 50);
    final Color showitColor = Color.gray;
    final Color arcColor1 = Color.black;
    final Color arcColor2 = Color.orange;
    final Color arcColor3 = Color.blue;
    public void paintNode( Graphics g, Node n, FontMetrics fm) {
    int x = (int)n.x;
    int y = (int)n.y;
    g.setColor((n == pick) ? selectColor : (n.fixed ? fixedColor : nodeColor));
    int w = fm.stringWidth(n.lbl) + 10;
    int h = fm.getHeight() + 4;
    g.fillRect(x - w/2, y - h / 2, w, h);
    g.setColor(Color.black);
    g.drawRect(x - w/2, y - h / 2, w-1, h-1);
    String doit = n.lbl.replace('x','/');
    g.drawString(doit, x - (w-10)/2, (y - (h-4)/2) + fm.getAscent());
    } // epa
    public synchronized void update(Graphics g) {
    Dimension d = size();
    if ((offscreen == null) || (d.width != offscreensize.width) || (d.height != offscreensize.height)) {
    offscreen = createImage(d.width, d.height);
    offscreensize = d;
    offgraphics = offscreen.getGraphics();
    offgraphics.setFont(getFont());
    offgraphics.setColor(getBackground());
    offgraphics.fillRect(0, 0, d.width, d.height);
    for (int i = 0 ; i < nedges ; i++) {
    //Edge e = edges;
    Edge e = edges[i];
    int x1 = (int)nodes[e.from].x;
    int y1 = (int)nodes[e.from].y;
    int x2 = (int)nodes[e.to].x;
    int y2 = (int)nodes[e.to].y;
    int len = (int)Math.abs(Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) - e.len);
    offgraphics.setColor((len < 10) ? arcColor1 : (len < 20 ? arcColor2 : arcColor3)) ;
    offgraphics.drawLine(x1, y1, x2, y2);
    if (showit) {
    String lbl = String.valueOf(len);
    offgraphics.setColor(showitColor);
    offgraphics.drawString("href= http://localhost:"+lbl, x1 + (x2-x1)/2, y1 + (y2-y1)/2);
    offgraphics.setColor(edgeColor);
    } //ef5
    FontMetrics fm = offgraphics.getFontMetrics();
    for (int i = 0 ; i < nnodes ; i++) {
    //paintNode( offgraphics, nodes, fm); //or
    paintNode( offgraphics, nodes[i], fm); //or
    g.drawImage(offscreen, 0, 0, null);
    public synchronized boolean mouseDown(Event evt, int x, int y) {
    double bestdist = Double.MAX_VALUE;
    for (int i = 0 ; i < nnodes ; i++) {
    //Node n = nodes;
    Node n = nodes[i];
    double dist = (n.x - x) * (n.x - x) + (n.y - y) * (n.y - y);
    if (dist < bestdist) {
    pick = n;
    bestdist = dist;
    pickfixed = pick.fixed;
    pick.fixed = true;
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    public synchronized boolean mouseDrag(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    repaint();
    return true;
    } //e-pubsyncmousedrag
    public synchronized boolean mouseUp(Event evt, int x, int y) {
    pick.x = x;
    pick.y = y;
    pick.fixed = pickfixed;
    pick = null;
    repaint();
    return true;
    public void start() {
    relaxer = new Thread(this);
    relaxer.start();
    public void stop() {
    relaxer.stop();
    public class Box extends Applet {
    GraphPanel panel;
    public void init() {
    setLayout(new BorderLayout());
    panel = new GraphPanel(this);
    add("Center", panel);
    Panel p = new Panel();
    add("South", p);
    p.add(new Button("Reposition"));
    p.add(new Button("NewUrl"));
    p.add(new Checkbox("Showit"));
    String edges = getParameter("edges"); // putinli
    for (StringTokenizer t = new StringTokenizer(edges, ",") ; t.hasMoreTokens() ; ) {
    String str = t.nextToken();
    int i = str.indexOf('-');
    if (i > 0) { int len = 50;
    int j = str.indexOf('/');
    if (j > 0) {
    len = Integer.valueOf(str.substring(j+1)).intValue();
    str = str.substring(0, j);
    panel.addEdge(str.substring(0,i), str.substring(i+1), len);
    } //ef8
    Dimension d = size();
    String center = getParameter("center");
    if (center != null){
    Node n = panel.nodes[panel.findNode(center)];
    n.x = d.width / 2;
    n.y = d.height / 2;
    n.fixed = true;
    } // eif
    } // ep
    public void start() {
    panel.start();
    public void stop() {
    panel.stop();
    public boolean action(Event evt, Object arg) {
    if (arg instanceof Boolean) {
    if (((Checkbox)evt.target).getLabel().equals("Showit")) {
    panel.showit = ((Boolean)arg).booleanValue();
    }// e-
    else {
    panel.random = ((Boolean)arg).booleanValue();
    return true;
    } // e-if instof bool
    if ("Reposition".equals(arg)) {
    Dimension d = size();
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x = 10 + (d.width-20)*Math.random();
    n.y = 10 + (d.height-20)*Math.random();
    } //ei
    } //ef9
    return true;
    } //eif scram
    if ("NewUrl".equals(arg)) {
    Dimension d = size();
    URL url = getCodeBase();
    try {
    getAppletContext().showDocument( new URL(url+"main.htm"), "_blank" );
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e) { }
    } catch(MalformedURLException e) {
    showStatus("814 URL not found");
    for (int i = 0 ; i < panel.nnodes ; i++) {
    //Node n = panel.nodes;
    Node n = panel.nodes[i];
    if (!n.fixed) {
    n.x += (80*0.02) - 40;
    n.y += (80*0.02) - 40;
    return true;
    } //ei
    return false;

  • Which is better approach to manage sharepoint online - PowerShell Script with CSOM or Console Application with CSOM?

    Which is better approach to manage sharepoint online - PowerShell Script with CSOM or Console Application with CSOM?
    change in sharepoint scripts not require compilation but anything else?

    Yes, PowerShell is great, since you can quick change your code without compilation.
    SP admin can write ps scripts without specific tools like Visual Studio.
    With powershell you can use cmdlets,
    which could remove a lot of code, for example restarting a service.
    [custom.development]

  • Over some images my imac cursor has changed to a hand with a blue magnifying grid - how to I get back to normal?

    Sometimes when moving over an image, mt cursor changes to a hand with a blue magnifying grid. How can I disable this?
    Thanks!

    Thanks sberman ... unfortunately that option is & has been unticked. It has happened to me two or three times but my memory ain't what it used to be so I can't recall the exact circumstances. It went away by itself this morning after an overnight shutdown so I don't think it can be a "preferences" item. Only thing I had to do this morning was to change trackpad batteries. Maybe low batt power was the cause? Interestingly before I posted the query here, I was searching all over the net for a similar problem and could not find even one related post or comment anywhere. And this post has 53 views with only your reply so maybe it is a spurious / unique problem? I'll leave the post for now as the problem seemed to have fixed itself and if it happens again, I will re-try everything first, including checking batteries. Somehow I thought mnaybe I had hit a keyboard shortcut in error but I can't find any reference at all to this kind of behaviour. Wierd!! But thanks very much for your reply!!

  • Jobs are going to released state after the PC triggers with user event.

    HI BI experts,
    We are facing issue with event scheduler using user event in the process chains. Some Jobs are not starting immediately with the event and reaching release state. These released jobs are never starts in near future. Also cannot start manually due to event periodic jobs.
    No log is availble in SM61 due to settings.
    Please let me know your suggestions and this issue.
    Regards,
    Mohan.

    HI BI experts,
    We are facing issue with event scheduler using user event in the process chains. Some Jobs are not starting immediately with the event and reaching release state. These released jobs are never starts in near future. Also cannot start manually due to event periodic jobs.
    No log is availble in SM61 due to settings.
    Please let me know your suggestions and this issue.
    Regards,
    Mohan.

Maybe you are looking for

  • Summary report treats a currency fields as text

    In the summary report I have three charts with the currency field. The two charts show 'average' and 'total' but the other chart shows 'percentage' of responses - in other words the report treats that field not as a number but as text. The filed is d

  • How do I download Lightroom on a new computer?

    I have Lightroom 5 installed on my laptop, but need to install it on my new desktop. How can I do this? Thanks!

  • IDOC type for PO

    Hello, I am new to SRM and need to send a PO created in SRM 6.0 to a legacy system as an IDOC. I have checked the available IDOC types in SRM and cannot find any types that match a PO. Does anybody know if such an IDOC type exists? Thank you

  • Synchronized text issue from desktop to mobile site design

    Hello, I love the idea of synchronized text, but is there a way to assign different styles on both desktop and mobile site pages? For example, If I use synchronized text on my desktop pages, my font sizes will be larger then the font sizes I would us

  • Where is the airport icon in Windows?

    On any Apple computer with Airport, there is an Airport status icon menulet. Those of us longsuffering dialup users with original AEBSs equipped with the dialup modem option are used to clicking on that icon and selecting the "connect" submenu that a