Truss: cannot trace set-id or unradable object file: file

Good afternoon,
As a tool from my company is running very slowly, I wanted to know where something is going wrong. In order to determine this, I have decided to "truss" the tool:
Prompt>truss <tool>Unfortunately I get error message:
truss: cannot trace set-id or unradable object file: <file>Can something be done about this?
Thanks

Run truss as root, or remove the setuid/setgid bit from the binary.

Similar Messages

  • Cannot use Set-Acl properly despite being file owner and being a member of Administrators Group.

    Hi,
    sorry if this question is already answered but i didn´t find a solution to this ...
    Situation:
    - Running powershell with administrator privileges.
    - I am the owner of file to be modified.
    - Full Control privileges holded by TrustedInstaller.
    - Administrators have no modify privilege to change the file.
    - i can modify acl of that file by GUI
    - I cannot modify acl using Set-Acl snapin.
    This is the executed command:
    Get-Acl C:\inetpub\custerr\en-US\401.htm  |Set-Acl C:\inetpub\custerr\en-US\500-100.asp
    and this the result:
    Set-Acl : Attempted to perform an unauthorized operation.
    At line:1 char:44
    + Get-Acl C:\inetpub\custerr\en-US\401.htm  |Set-Acl C:\inetpub\custerr\en-US\500- ...
    +                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : PermissionDenied: (C:\inetpub\custerr\en-US\500-100.asp:String) [Set-Acl], UnauthorizedAccessException
        + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetAclCommand
    I dont want to use external modules. This will be a part of a script to fully automate iis installation on windows 2012 and 2008..
    Thanks in advance guys.

    I get the same thing.  I found this post that should help you:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/87679d43-04d5-4894-b35b-f37a6f5558cb/solved-how-to-take-ownership-and-change-permissions-for-blocked-files-and-folders-in-powershell
    Scroll down to one of the last posts, a long one by barnabya, I tested it and it works.  Note that you do not have to execute the bits at the very end to take ownership of the file if the account you're using is already the owner, but you DO need to
    run all three bits to establish SeBackupPrivilege, SeRestorePrivilege, and SeTakeOwnershipPrivilege before running the get-acl | set-acl command.
    I hope this post has helped!

  • ORA-6522 -- module: Bad object file type

    Hello!
    I have created a external procedure. When I call it I get the following message:
    ORA-06522: '/sys/app/oracle/product/9.2.0/lib/shell.o' is not a valid load
    module: Bad object file type
    I cannot find anything explaining what "Bad object file type" means. Do you have any suggestions?

    Hello!
    I have created a external procedure. When I call it I get the following message:
    ORA-06522: '/sys/app/oracle/product/9.2.0/lib/shell.o' is not a valid load
    module: Bad object file type
    I cannot find anything explaining what "Bad object file type" means. Do you have any suggestions?

  • Oracle.jbo.ReadOnlyAttrException) JBO-27008: Attribute in view object cannot be set.

    Hi all,
    I have three table:
    Member : MemberID(pk), Email, Adress, ProvinceID (fk)
    Province : ProvinceID(pk), ProvinceName, CountryID(fk)
    Country : CountryID(pk), CountryName.
    After created three entities and object view for all of them.
    In ProvinceView : i add a parameter for CountryID using Bind Variables + View Criteria to select Province from Country
    In MemberView : i add more two entity: Province and Country then Add more attributes: CountryID (from Province table), CountryName(from Country table).
    Create LOVs for CountryID and ProvinceID....that's i want: selected Country ----> Province auto show but when i selected Country, an error show like this :
    (oracle.jbo.ReadOnlyAttrException) JBO-27008: Attribute Countryid in view object PhaiMemberacbView1 cannot be set.
    What's solutions to fix this. Thanks

    Hi,
    Please verify if the Attribute Countryid has been marked as "Updatable" in the view object.
    Best Regards,
    Ankit Gupta

  • Cannot trace to hosts on ISR's using FW feature set

    The issue is that we can trace between networking equipment on tunnels involving the ISR routers using Firewall feature set, but we cannot trace to hosts. For example from (US)AS1, I can trace to (UK)CS1's 192.168.1.2 ip address, but not to host that I find in the arp table for that vlan. I have added ICMP TTL exceeded and TTL time-outs to the ACL's, but it still does not work.  Any helf would be greatly appreciated

    Elijay, You stated that you are using ISR's. Are you perhaps running inspection? If so, you may want to check your ICMP rules for router-traffic and timeouts. You may want to increase the timeout setting.

  • Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK' when trying to update quick launch menu sharepoint 2013

    When we try to deploy a wsp to sharepoint containing code to generate quick launch menu we get the following error messages when running the last enable-spfeature command in powershell. The same code is working in the development environment, but when we
    deploy to a test server the following error occurs:
    Add-SPSolution "C:\temp\ImpactSharePoint.wsp"
    Install-SPSolution -Identity impactsharepoint.wsp  -GACDeployment
    Enable-SPFeature impactsharepoint_branding -url http://im-sp1/sites/impact/
    Enable-SPFeature impactsharepoint_pages -url http://im-sp1/sites/impact/
    From UlsViewer.exe:
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880i
    High System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6,
    1000).  The statement has been terminated.     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& 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& task, Boolean asyncWrite)  
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& 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.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)  ClientConnectionId:2bb4004c-aa75-470e-b11e-dbf1c476aaed
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880k
    High at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String
    bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32
    iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()
        at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback
    secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties
    properties)     at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags
    activateFlags, Boolean fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)
        at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtWeb(Boolean fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean
    fActivate, Guid featid, SPFeatureDefinition featdef, String urlScope, Boolean fForce)     at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject()     at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()  
      at System.Management.Automation.CommandProcessor.ProcessRecord()     at System.Management.Automation.CommandProcessorBase.DoExecute()     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object
    input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][]
    commandRedirections, FunctionContext funcContext)     at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
    frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0
    arg0)     at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase
    commandRequestingUpstreamCommandsToStop)     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
        at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()     at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()     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()
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880j
    High SqlError: 'Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6, 1000).'
       Source: '.Net SqlClient Data Provider' Number: 2601 State: 1 Class: 14 Procedure: 'proc_NavStructAddNewNode' LineNumber: 92 Server: 'IMPACTCLUSTER\IMPACTDB'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 880j
    High SqlError: 'The statement has been terminated.'    Source: '.Net SqlClient Data Provider' Number: 3621 State: 0 Class: 0 Procedure: 'proc_NavStructAddNewNode' LineNumber: 92 Server: 'IMPACTCLUSTER\IMPACTDB'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database tzku
    High ConnectionString: 'Data Source=IMPACTCLUSTER\IMPACTDB;Initial Catalog=WSS_Content;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15;Application Name=SharePoint[powershell][1][WSS_Content]'
       Partition: 6323df8a-5c57-4d3e-a477-09aa8b66100a ConnectionState: Closed ConnectionTimeout: 15
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database tzkv
    High SqlCommand: 'BEGIN TRAN DECLARE @abort int SET @abort = 0 DECLARE @EidBase int,@EidHome int SET @EidBase = 0 SET @EidHome = NULL IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAllocateEidBlockWebId @wssp0, @wssp1,
    @wssp2, @wssp3, @EidBase OUTPUT SELECT @wssp4 = @EidBase, @wssp5 = @abort END IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAddNewNodeByUrl '6323DF8A-5C57-4D3E-A477-09AA8B66100A','7AE114DF-9D52-4B08-AFFA-8C544CBC27B6',1,2072,-1,0,N'sites/impact/default.aspx',N'PersonSøk',N'PersonSøk',NULL,0,0,0,NULL,@EidBase,@EidHome
    OUTPUT SELECT @wssp6 = @abort END IF @abort = 0 BEGIN EXEC proc_NavStructLogChangesAndUpdateSiteChangedTime @wssp7, @wssp8, NULL END IF @abort <> 0 BEGIN ROLLBACK TRAN END ELSE BEGIN COMMIT TRAN END IF @abort = 0  BEGIN EXEC proc_UpdateDiskUsed
    '6323DF8A-5C57-4D3E-A477-09AA8B66100A' END '     CommandType: Text CommandTimeout: 0     Parameter: '@wssp0' Type: UniqueIdentifier Size: 0 Direction: Input Value: '6323df8a-5c57-4d3e-a477-09aa8b66100a'     Parameter: '@wssp1'
    Type: UniqueIdentifier Size: 0 Direction: Input Value: '7ae114df-9d52-4b08-affa-8c544cbc27b6'     Parameter: '@wssp2' Type: Int Size: 0 Direction: Input Value: '1'     Parameter: '@wssp3' Type: Int Size: 0 Direction: Input Value: '2072'
        Parameter: '@wssp4' Type: Int Size: 0 Direction: Output Value: '2072'     Parameter: '@wssp5' Type: Int Size: 0 Direction: Output Value: '0'     Parameter: '@wssp6' Type: Int Size: 0 Direction: Output Value: '10006'  
      Parameter: '@wssp7' Type: UniqueIdentifier Size: 0 Direction: Input Value: '6323df8a-5c57-4d3e-a477-09aa8b66100a'     Parameter: '@wssp8' Type: UniqueIdentifier Size: 0 Direction: Input Value: '7ae114df-9d52-4b08-affa-8c544cbc27b6'
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database aek90
    High SecurityOnOperationCheck = True
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database d0d6
    High System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.NavNodes' with unique index 'NavNodes_PK'. The duplicate key value is (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6,
    1000).  The statement has been terminated.     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& 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& task, Boolean asyncWrite)  
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& 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.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean
    retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)  ClientConnectionId:2bb4004c-aa75-470e-b11e-dbf1c476aaed
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database ad194
    High ExecuteQuery failed with original error 0x80131904
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Database 8z23
    Unexpected Unexpected query execution failure in navigation query, HResult -2146232060. Query text (if available): "BEGIN TRAN DECLARE @abort int SET @abort = 0 DECLARE @EidBase int,@EidHome int SET @EidBase
    = 0 SET @EidHome = NULL IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAllocateEidBlockWebId @wssp0, @wssp1, @wssp2, @wssp3, @EidBase OUTPUT SELECT @wssp4 = @EidBase, @wssp5 = @abort END IF @abort = 0 BEGIN EXEC @abort = proc_NavStructAddNewNodeByUrl '6323DF8A-5C57-4D3E-A477-09AA8B66100A','7AE114DF-9D52-4B08-AFFA-8C544CBC27B6',1,2072,-1,0,N'sites/impact/default.aspx',N'PersonSøk',N'PersonSøk',NULL,0,0,0,NULL,@EidBase,@EidHome
    OUTPUT SELECT @wssp6 = @abort END IF @abort = 0 BEGIN EXEC proc_NavStructLogChangesAndUpdateSiteChangedTime @wssp7, @wssp8, NULL END IF @abort <> 0 BEGIN ROLLBACK TRAN END ELSE BEGIN COMMIT TRAN END IF @abort = 0  BEGIN EXEC proc_UpdateDiskUsed
    '6323DF8A-5C57-4D3E-A477-09AA8B66100A' END "
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General 8kh7
    High <nativehr>0x8107140d</nativehr><nativestack></nativestack>An unexpected error occurred while manipulating the navigational structure of this Web.
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General aix9j
    High SPRequest.AddNavigationNode: UserPrincipalName=i:0).w|s-1-5-21-2030300366-1823906440-2562684930-2106, AppPrincipalName= ,bstrUrl=http://im-sp1/sites/impact ,bstrName=PersonSøk ,bstrNameResource=<null> ,bstrNodeUrl=/sites/impact/default.aspx
    ,lType=0 ,lParentId=2072 ,lPreviousSiblingId=-1 ,bAddToQuickLaunch=False ,bAddToSearchNav=False
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    General ai1wu
    Medium System.Runtime.InteropServices.COMException: <nativehr>0x8107140d</nativehr><nativestack></nativestack>An unexpected error occurred while manipulating the navigational structure of this
    Web., StackTrace:    at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32 iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode
    node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
        at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated
    secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties properties)    
    at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean
    fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtWeb(Boolean
    fActivate, Boolean fEnsure, Guid featid, SPFeatureDefinition featdef, String urlScope, String sProperties, Boolean fForce)     at Microsoft.SharePoint.SPFeature.ActivateDeactivateFeatureAtScope(Boolean fActivate, Guid featid, SPFeatureDefinition
    featdef, String urlScope, Boolean fForce)     at Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature.UpdateDataObject()     at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()     at System.Management.Automation.CommandProcessor.ProcessRecord()
        at System.Management.Automation.CommandProcessorBase.DoExecute()     at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.PipelineOps.InvokePipeline(Object
    input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)     at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame
    frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)    
    at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)     at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)     at System.Management.Automation.DlrScriptCommandProcessor.RunClause(Action`1
    clause, Object dollarUnderbar, Object inputToProcess)     at System.Management.Automation.CommandProcessorBase.DoComplete()     at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop)
        at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)     at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()    
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()     at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()     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()
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    03.12.2014 15:21:25.45 PowerShell.exe (0x1620)
    0x11F4 SharePoint Foundation
    Feature Infrastructure 88jm
    High Feature receiver assembly 'ImpactSharePoint, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3f4d824fecc0071e', class 'ImpactSharePoint.Features.Pages.PagesEventReceiver', method 'FeatureActivated' for feature
    'd8aabd95-076a-4650-a8a6-0aa5bd8ac8d1' threw an exception: Microsoft.SharePoint.SPException: An unexpected error occurred while manipulating the navigational structure of this Web. ---> System.Runtime.InteropServices.COMException: <nativehr>0x8107140d</nativehr><nativestack></nativestack>An
    unexpected error occurred while manipulating the navigational structure of this Web.     at Microsoft.SharePoint.Library.SPRequestInternalClass.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32
    lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource,
    String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav, String& pbstrDateModified)     --- End of inner exception stack trace ---     at Microsoft.SharePoint.SPGlobal.HandleComException(COMException
    comEx)     at Microsoft.SharePoint.Library.SPRequest.AddNavigationNode(String bstrUrl, String bstrName, String bstrNameResource, String bstrNodeUrl, Int32 lType, Int32 lParentId, Int32 lPreviousSiblingId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav,
    String& pbstrDateModified)     at Microsoft.SharePoint.Navigation.SPNavigationNode.AddInternal(Int32 iPreviousNodeId, Int32 iParentId, Boolean bAddToQuickLaunch, Boolean bAddToSearchNav)     at Microsoft.SharePoint.Navigation.SPNavigationNodeCollection.AddInternal(SPNavigationNode
    node, Int32 iPreviousNodeId)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.<ConfigureQuickLaunchBar>b__0()     at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()
        at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)     at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated
    secureCode)     at ImpactSharePoint.ConfigureSharePointInstance.NavigationConfig.ConfigureQuickLaunchBar()     at ImpactSharePoint.Features.Pages.PagesEventReceiver.FeatureActivated(SPFeatureReceiverProperties properties)    
    at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)
    5b7e05f7-49df-42ca-b7c9-8ae5b06b464f
    The code:
    using System.Diagnostics;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Navigation;
    namespace ImpactSharePoint.ConfigureSharePointInstance
        public class NavigationConfig
            public void ConfigureQuickLaunchBar(SPWeb web)
                SPSecurity.RunWithElevatedPrivileges(delegate
                    //Delete All Links
                    web.AllowUnsafeUpdates = true;
                    for (int i = web.Navigation.QuickLaunch.Count - 1; i > -1; i--)
                        web.Navigation.QuickLaunch[i].Delete(); // -> Deleting all the links in quick launch
                    web.QuickLaunchEnabled = true;
                    EventLog.WriteEntry("Sharepointfeature","Starter");
                    //Adding Links
                    SPNavigationNodeCollection nodes = web.Navigation.QuickLaunch;
                    var sokNode = new SPNavigationNode("Søk", null, false);
                    nodes.AddAsFirst(sokNode);
                    sokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til søk");
                    // Personsøk
                    var personSokNode = new SPNavigationNode("Deltakere", "/sites/impact/default.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(personSokNode);
                    personSokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node personsøk");
                    // Udb-søk
                    var udbSokNode = new SPNavigationNode("UDB-Søk", "/sites/impact/udbsok.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsLast(udbSokNode);
                    udbSokNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node udbsøk");
                    // Kommuner
                    var kommuneNode = new SPNavigationNode("Kommuner", "/sites/impact/kommunesearch.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(kommuneNode);
                    kommuneNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node kommunesøk");   
                    // Organisasjoner
                    var virksomhetNode = new SPNavigationNode("Organisasjoner", "/sites/impact/virksomhetsearch.aspx", false); //TODO: fix hardkoding
                    sokNode.Children.AddAsFirst(virksomhetNode);
                    virksomhetNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node kommunesøk");
                    // NIR
                    var nirNode = new SPNavigationNode("Nir", null, false); //TODO: fix hardkoding
                    nodes.AddAsLast(nirNode);
                    nirNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node Nir");
                    // Tilskudd
                    var tilskuddNode = new SPNavigationNode("Tilskudd", "/sites/impact/", false);
                    nodes.AddAsLast(tilskuddNode);
                    tilskuddNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node Tilskudd");
                    // Kjøringsoversikt
                    var showkjoringerNode = new SPNavigationNode("Kjøringsoversikt", "/sites/dev/kjoringoversikt.aspx", false); //TODO: fix hardkoding
                    tilskuddNode.Children.AddAsFirst(showkjoringerNode);
                    showkjoringerNode.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Lagt til node showkjoringerNode");
                    web.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Etter update");
                    //Setting homepage
                    SPFolder folder = web.RootFolder;
                    folder.WelcomePage = "default.aspx";
                    folder.Update();
                    EventLog.WriteEntry("Sharepointfeature", "Etter homepage");
                    web.AllowUnsafeUpdates = false;

    i think you need to debug your code, lookalike the values you trying insert already exist in the database.
    these two IDs (6323df8a-5c57-4d3e-a477-09aa8b66100a, 7ae114df-9d52-4b08-affa-8c544cbc27b6).
    i would try to run the select command against the content db.
    SELECT TOP *  FROM [DB Name].[dbo].[NavNodes] where id = '6323df8a-5c57-4d3e-a477-09aa8b66100a'
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Error 0(Native: listNetInterfaces:[3]) and error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

    Hi Gurus,
    I'm trying to upgrade my test 9.2.0.8 rac to 10.1 rac. I cannot upgrade to 10.2 because of RAM limitations on my test RAC. 10.1 Clusterware software was successfully installed and the daemons are up with OCR and voting disk created. Then during the installation of RAC software at the end, root.sh needs to be run. When I run root.sh, it gave the error: while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory. I have libpthread.so.0 in /lib. I looked up on metalink and found Doc ID: 414163.1 . I unset the LD_ASSUME_KERNEL in vipca (unsetting of LD_ASSUME_KERNEL was not required in srvctl because there was no LD_ASSUME_KERNEL in srvctl). Then I tried to run vipca manually. I receive the following error: Error 0(Native: listNetInterfaces:[3]). I'm able to see xclock and xeyes. So its not a problem with x.
    OS: OEL5 32 bit
    oifcfg iflist
    eth0 192.168.2.0
    eth1 10.0.0.0
    oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth1 10.1.1.0 global cluster_interconnect
    eth0 192.168.2.0 global public
    cat /etc/hosts
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    My questions are:
    should ping on sunny1vip and sunny2vip be already working? As of now they dont work.
    if you look at oifcfg getif, I initially had eth1 10.0.0.0 global cluster_interconnect,eth0 192.168.2.0 global public then I created eth1 10.1.1.0 global cluster_interconnect with setif. Should it be 10.1.1.0 or 10.0.0.0. I looked at the subnet calculator and it says for 10.1.1.1, 10.0.0.0 is the subnet. In metalink they had used 10.10.10.0 and hence I used 10.1.1.0
    Any ideas on resolving this issue would be very much appreciated. I had been searching on oracle forums, google, metalink but all of them refer to DOC Id 414163.1 but it does n't seem to work. Please help. Thanks in advance.
    Edited by: ayyappa on Aug 20, 2009 10:13 AM
    Edited by: ayyappa on Aug 20, 2009 10:14 AM
    Edited by: ayyappa on Aug 20, 2009 10:15 AM

    a step forward towards resolution but i need some help from the gurus.
    root# cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    root# /u01/app/oracle/product/crs/bin/oifcfg iflist
    eth1 10.0.0.0
    eth0 192.168.2.0
    root# /u01/app/oracle/product/crs/bin/oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth0 191.168.2.0 global public
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    ****ORACLE_HOME environment variable not set!
    ORACLE_HOME should be set to the main directory that contain oracle products. set and export ORACLE_HOME, then re-run.
    root# export ORACLE_BASE=/u01/app/oracle
    root# export ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
    root# export ORA_CRS_HOME=/u01/app/oracle/product/crs
    root# export PATH=$PATH:$ORACLE_HOME/bin
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP does not exist.
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny1pub -o $ORACLE_HOME -A 192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny2pub -o $ORACLE_HOME -A 192.168.2.44/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP exists.: sunny1vip.ezhome.com/192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny2pub -a
    VIP exists.: sunny2vip.ezhome.com/192.168.2.44/255.255.255.0
    Once I execute the add nodeapps command as root on node 1, I was able to get vip exists for config nodeapps on node 2. The above 2 statements resulted me with same values on both nodes. After this I executed root.sh on both nodes, I did not receive any errors. It said CRS resources are already configured.
    My questions to the gurus are as follows:
    Should ping on vip work? It does not work now.
    srvctl status nodeapps -n sunny1pub(same result for sunny2pub)
    VIP is not running on node: sunny1pub
    GSD is not running on node: sunny1pub
    PRKO-2016 : Error in checking condition of listener on node: sunny1pub
    ONS daemon is not running on node: sunny1pub
    [root@sunny1pub ~]# /u01/app/oracle/product/crs/bin/crs_stat -t
    Name Type Target State Host
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    Will crs_stat and srvctl status nodeapps -n sunny1pub work after I upgrade my database or should they be working now already? I just choose to install 10.1.0.3 software and after running root.sh on both nodes, I clicked ok and then the End of installation screen appeared. Under installed products, I see 9i home, 10g home, crs home. Under 10g home and crs home, I see cluster nodes(sunny1pub and sunny2pub) So it looks like the 10g software is installed.

  • Set Sequence Call Trace Setting for a SequenceCall Step

    Hi there.  I need to edit a sequence file automatically with a LabVIEW program.  We have a program the is successful in editing and saving a sequence file automatically which goes in and does a few things.  However I also need to be able to go in and change a setting in Run Options for the top level SequenceCall steps in Main of MainSequence.  I want to be able to change the Sequence Call Trace Setting for the steps from Disable Tracing in Sequence to Enable Tracing in Sequence.  However I do not seem to be able to find this in the API call chin anywhere.  At this point I am certain that it IS in there somewhere, but probably hidden under an option mask for something.  Anyone know where I might find it?
    This is NOT something I want to do at execution time.  This is something I want to do by launching TestStand in edit mode from LabVIEW to automatically edit and save a new version of the sequence file.
    Thanks!
    Greg
    Gregory Osenbach, CLA
    Fluke
    Solved!
    Go to Solution.

    Not sure if this will work.  I'm kinda bummed the To More Specific Class function wouldn't work.
    The Automation Refnum going into the top of the TypeCast is using the NI TestStand Adapter API 4.1.1 Version 1.0 as the type library and SequenceCallModule as the Object.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Cannot create weak reference to 'classobj' object

    I am trying to run the python Script in a C# program using Iron Python I am getting this type of Error
    cannot create weak reference to 'classobj' object
    I am using this code for running the python code
    var ironPythonRuntime = Python.CreateRuntime();
    try
    dynamic loadPython = ironPythonRuntime.UseFile("Program.py");
    catch (Exception ex)
    Console.WriteLine(ex.Message);

    Hi Mahesh,
    About IronPython issue, It's third-party product.  Please redirect to IronPython forum.  The link as below.
    https://ironpython.codeplex.com/workitem/list/basic
    After search this error,
    this thread tells me.
    Try to use virtualenv. It is used to separate many instances of python and it's libraries - you can have as many virtual environments as possible: python 2.5 , 2.6 , 2.7, whatever - with any combinations of libraries - so you can have for example five
    python 2.6 instances with different sets of libraries configured.
    By the way, here is also a blog talking about
    Running IronPython Scripts from a C# 4.0 Program
    Now I will move your thread to "off-topic" forum. Thanks for your understanding.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Libsqlplus.so: cannot open shared object file

    After oracle-instantclient-sqlplus-10.1.0.3-1 rpm install on Red Hat, running sql plus gives:
    sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
    The fix is to include in the sqlplus rpm the file
    /etc/ld.so.conf.d/oracle-instantclient.conf
    which would contain this line:
    /usr/lib/oracle/10.1.0.3/client/lib/
    Also run ldconfig in post-install script.
    Thanks.

    Alternatively you can set LD_LIBRARY_PATH as mentioned
    in the notes:
    http://www.oracle.com/technology/docs/tech/sql_plus/10103/readme_ic.htm
    This is more flexibile than using ld.so.conf if you have
    another version of Oracle or the Instant Client installed.
    -- CJ

  • Cannot insert duplicate key row in object

    This is a JPA question. The tbHardware table has a PK identity column and a unique non-clustered index on CoxBarcode column.
    I have a SFSB in a Seam2.0.0.GA app running on JBoss 4.2.1.GA. I am using flushMode=FlushModeType.MANUAL (Seam specific when beginning a conversation) and that's why you see the flush() reference at the end of the following code snippet.
    Query query = entityManager.createNativeQuery("INSERT INTO tbHardware "+
                                                 "VALUES (:coxBarCode, :serialNo, :currentStatus, :currentLocationNo, "+
                                                 ":desc, :hardwareModelId, :ownerTypeCode, :firstEnteredDate, :enteredByUser, :lastAuditDate, :hardwarePrice, null)")
                                              .setParameter("coxBarCode", coxBarcode)
                                              .setParameter("serialNo", serialNo)
                                              .setParameter("currentStatus", curstatus)
                                              .setParameter("currentLocationNo", curloc)
                                              .setParameter("desc", desc)
                                              .setParameter("hardwareModelId", selmodid)
                                              .setParameter("ownerTypeCode", selectedOwner)
                                              .setParameter("firstEnteredDate", firstEnteredDate)
                                              .setParameter("enteredByUser", enteredByUser)
                                              .setParameter("lastAuditDate", lastAuditedDate)
                                              .setParameter("hardwarePrice", unitPrice);
                             query.executeUpdate();
                             query = entityManager.createNativeQuery("INSERT INTO TbHardwareHistory "+
                                            "VALUES (:hardwareId, :currentStatus, :currentLocationNo, :firstEnteredDate, null, :enteredByUser, :ownerTypeCode)")
                                             .setParameter("hardwareId", findHardwareId(coxBarcode))                                        
                                             .setParameter("currentStatus", curstatus)
                                             .setParameter("currentLocationNo", curloc)          
                                             .setParameter("firstEnteredDate", firstEnteredDate)
                                             .setParameter("enteredByUser", enteredByUser)
                                             .setParameter("ownerTypeCode", selectedOwner);
                             query.executeUpdate();
                             //TO DO: following query should return only one entity, need to refactor and remove the for loop below
                             TbHardware hw = (TbHardware)entityManager.createNativeQuery("SELECT t FROM tbHardware t WHERE t.coxBarCode = :coxBarCode AND t.serialNo = :serialNo", TbHardware.class)
                                                                                    .setParameter("coxBarCode", coxBarcode)
                                                                                    .setParameter("serialNo", serialNo)
                                                                                    .getSingleResult();
                             Integer hardwareId = hw.getHardwareId();
                             query = entityManager.createNativeQuery("INSERT INTO tbHardwareNote VALUES (:hardwareId, :hardwareNote)")
                                                   .setParameter("hardwareId", hardwareId).setParameter("hardwareNote", hardwareNote);
                             query.executeUpdate();
                             entityManager.flush();I am getting the following in the server.log:
    10:10:57,552 ERROR [STDERR] Caused by: org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:174)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1163)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)
    10:10:57,552 ERROR [STDERR]      ... 138 more
    10:10:57,552 ERROR [STDERR] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.tbHardware' with unique index 'IX_tbHardwar_coxBarCode_UNIQUE'.
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
    10:10:57,552 ERROR [STDERR]      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
    10:10:57,552 ERROR [STDERR]      at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:165)
    10:10:57,552 ERROR [STDERR]      ... 141 moreHow should I handle this SQLServerException? What is the best practice regarding this from a JPA perspective? I thought about executing a select query prior to the insert in tbHardware to check to see if a record with that particular coxBarCode exists or not. Would the exception be handled differently if I used the persist() method instead of the createNativeQuery() and executeUpdate() combination? thx.
    Edited by: asookazian on May 7, 2008 11:07 AM

    kajbj wrote:
    What do you mean by control? Yes, you can find duplicates and remove them (by e.g. implementing a Comparator and adding them to a Set)
    KajI mean to say replace the duplication with just a single value for insert!
    Any psuedo for the comparactor suggested?

  • Libstdc++-libc6.1-1.so.2: cannot open shared object file

    When I try to install Oracle 9i on OEL 5 I get:
    #./runInstaller
    Initializing Java Virtual Machine from /tmp/OraInstall2009-01-05_03-05-57PM/jre/bin/java. Please wait...
    /tmp/OraInstall2009-01-05_03-05-57PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
    Although:
    #rpm -qi libstdc++
    Name : libstdc++ Relocations: (not relocatable)
    Version : 4.1.2 Vendor: Oracle USA
    Release : 42.el5 Build Date: Sun 25 May 2008 11:14:02 AM EEST
    Install Date: Sat 03 Jan 2009 03:15:57 AM EET Build Host: ca-build15.us.oracle.com
    Group : System Environment/Libraries Source RPM: gcc-4.1.2-42.el5.src.rpm
    Size : 925520 License: GPL
    Signature : DSA/SHA1, Mon 26 May 2008 08:58:57 AM EEST, Key ID 66ced3de1e5e0159
    URL : http://gcc.gnu.org
    Summary : GNU Standard C++ Library
    Description :
    The libstdc++ package contains a rewritten standard compliant GCC Standard
    C++ Library.
    What's the problem?

    Hi Valentin
    It is very typical that a Library is not found by the OUI when an installation is going to be done. Basically there are 2 typic causes.
    The first is that the library is not in your OS and the another one is that the library is in your OS but you have not set correctly the LD_LIBRARY_PATH in order to the OUI can find it. The solution is very easy:
    1.- Check where is the library in your OS. It can be in:
    /usr/lib or /usr/lib64 or another directory. connected as root go to / and apply this command to find where the library is:
    find ./ -name libstdc*
    with that command you will see where the library is. Take that path and added it to the LD_LIBRARY_PATH.
    The LD_LIBRARY_PATH is an eviroment variable that must be set in the profile of the user usually.
    Once done all this , reload the connection with the user with what you want to install the Oracle Software and test.
    For any more information or guide replay again friend.
    Joel Pérez
    Oracle Ace Member
    DBA Oracle

  • Getting constraint errorr for INSERT? Cannot insert duplicate key row in object 'etag.Tag_Processed' with unique index 'IX_Tag_Processed'

    I have an index constraint "IX_Tag_Processed" on the field "Tag_Name" for the table "Tag_Processed". I keep getting this constraint error:
    Msg 2601, Level 14, State 1, Line 15
    Cannot insert duplicate key row in object 'etag.Tag_Processed' with unique index 'IX_Tag_Processed'. The duplicate key value is (AZPS_TEMUWS0110BL4_CISO).
    The statement has been terminated.
    For this INSERT: I have tried using tagstg.Tag_Name NOT IN with same result:
    INSERT into [Forecast_Data_Repository].[etag].[Tag_Processed] (Tag_Name, Tag_Type,Start_Datetime, End_Datetime, Source_SC, Sink_SC, Source_CA, Sink_CA, Source, Sink, Load_dt, Energy_product_code_id)
    SELECT DISTINCT (Tag_Name), Tag_Type,Start_Datetime, End_Datetime, Source_SC, Sink_SC, Source_CA, Sink_CA, Source, Sink, GETUTCDATE(),  [Forecast_Data_Repository].rscalc.GetStubbedEngProductCodeFromStaging(tagstg.Tag_Name)
    FROM [Forecast_Data_Repository].[etag].[Tag_Stg] tagstg
    WHERE tagstg.Id BETWEEN @minTId AND @maxTId --AND
    --tagstg.Tag_Name NOT IN (
    -- SELECT DISTINCT tproc.Tag_Name from [Forecast_Data_Repository].[etag].[Tag_Processed] tproc
    thank you  in advance, 
    Greg Hanson

    I have even tried a merge with the same constraint error,
    DECLARE @minTId bigint, @minTRId bigint, @minEId bigint
    DECLARE @maxTId bigint, @maxTRId bigint, @maxEId bigint
    DECLARE @errorCode int
    DECLARE @ReturnCodeTypeIdName nvarchar(50)
    SELECT @minTRId = Min(Id) FROM [etag].[Transmission_Stg]
    SELECT @maxTRId = Max(Id) FROM [etag].[Transmission_Stg]
    SELECT @minTId = Min(Id) FROM [etag].[Tag_Stg]
    SELECT @maxTId = Max(Id) FROM [etag].[Tag_Stg]
    DECLARE @MergeOutputTag TABLE
    ActionType NVARCHAR(10),
    InsertTagName NVARCHAR(50)
    --UpdateTagName NVARCHAR(50)
    --DeleteTagName NVARCHAR(50)
    DECLARE @MergeOutputEnergy TABLE
    ActionType NVARCHAR(10),
    InsertTagId BIGINT
    --UpdateTagName NVARCHAR(50)
    --DeleteTagName NVARCHAR(50)
    DECLARE @MergeOutputTransmission TABLE
    ActionType NVARCHAR(10),
    InsertTagId BIGINT
    --UpdateTagName NVARCHAR(50)
    --DeleteTagName NVARCHAR(50)
    MERGE [Forecast_Data_Repository].[etag].[Tag_Processed] tagProc
    USING [Forecast_Data_Repository].[etag].[Tag_Stg] tagStg
    ON 
    tagProc.Tag_Name = tagStg.Tag_Name AND
    tagProc.Tag_Type = tagStg.Tag_Type AND
    tagProc.Start_Datetime = tagStg.Start_Datetime AND
    tagProc.End_Datetime = tagStg.End_Datetime AND
    tagProc.Source_SC = tagStg.Source_SC AND
    tagProc.Source_CA = tagStg.Source_CA AND
    tagProc.Sink_CA = tagStg.Sink_CA AND
    tagProc.Source = tagStg.Source AND
    tagProc.Sink = tagStg.Sink 
    WHEN MATCHED THEN
    UPDATE
    SET Tag_Name = tagStg.Tag_Name,
    Tag_Type = tagStg.Tag_Type,
    Start_DateTime = tagStg.Start_Datetime,
    End_Datetime = tagStg.End_Datetime,
    Source_SC = tagStg.Source_SC,
    Sink_SC = tagStg.Sink_SC,
    Source_CA = tagStg.Source_CA,
    Sink_CA = tagStg.Sink_CA,
    Source = tagStg.Source,
    Sink = tagStg.Sink,
    Load_dt = GETUTCDATE()
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (Tag_Name, Tag_Type, Start_Datetime, End_Datetime, Source_SC, Sink_SC, Source_CA, Sink_CA, Source, Sink, Load_dt)
    VALUES (tagStg.Tag_Name, tagStg.Tag_Type, tagStg.Start_Datetime, tagStg.End_Datetime, tagStg.Source_SC, tagStg.Sink_SC, tagStg.Source_CA, tagStg.Sink_CA, tagStg.Source, tagStg.Sink, GETUTCDATE())
    OUTPUT
    $action,
    INSERTED.Tag_Name
    --UPDATED.Tag_Name
    INTO @MergeOutputTag;
    SELECT * FROM @MergeOutputTag;
    Greg Hanson

  • Libjvm.so: cannot open shared object file

    Hi, I hope I am posting to right forums. I am trying to install tomcat on my linux box and running into an issue ?libjvm.so: cannot open shared object file: Permission denied?
    Here is what I have:
    Linux = Red Hat Linux release 9 (Shrike)
    SDK = java_app_platform_sdk-5_02-linux.bin
    Tomcat = apache-tomcat-6.0.10
    I built jsvc this morning and running following command to get tomcat daemon up,
    ./bin/jsvc -cp ./bin/bootstrap.jar -outfile ./logs/catalina.out -errfile ./logs/catalina.err org.apache.catalina.startup.Bootstrap
    I am seeing following error message in Catalina.err file,
    06/03/2007 10:49:24 21247 jsvc.exec error: Cannot dynamically link to /home/rsah/SDK/jdk/jre/lib/i386/client/libjvm.so
    06/03/2007 10:49:24 21247 jsvc.exec error: /home/rsah/SDK/jdk/jre/lib/i386/client/libjvm.so: cannot open shared object file: Permission denied
    06/03/2007 10:49:24 21246 jsvc.exec error: Service exit with a return value of 1
    I looked at the permission for libjvm.so and it appears to be fine. When I run ldconfig ?p I don?t see libjvm.so loaded so definitely there is something going on. I edited /etc/ld.so.conf and added following line
    /home/rsah/SDK/jdk/jre/lib
    But still I don?t see libjvm.so being loaded. I am wondering if one could provide me some pointers.
    libjvm.so located at,
    /home/rsah/SDK/jdk/jre/lib/i386/client
    -rwxrwxrwx 1 root root 5310375 Mar 5 18:20 libjvm.so
    I have set JAVA_HOME = ?/home/rsah/SDK/jdk?
    PS: I tried all above stuffs with sudo permission.
    Thanks!

    I found problem, it was in a configuration file located at bin/jsvc-src/native//Tomcat.sh.
    Thanks

  • ProgressProperty and isCancelled causing a bound value that cannot be set.

    I noticed that cancelling the following application causes errors since a bound value cannot be set. I tried to add some conditions to prevent this error from happening but to no avail.
    The following is the main culprit:
    pb.progressProperty().bind(serv.progressProperty());You can also notice that I tried to use progressProperty and ChangeListener instead of bind method. Unfortunately unsuccessfully. Can I make progressbar functioning without bind method (code above)?
    Complete error message when cancel button is pressed is the following:
    Service status: SCHEDULED
    Let the download begin!
    Service status: CANCELLED
    Service status cancelled when progress was: 0.09582292038557658
    java.lang.RuntimeException: A bound value cannot be set.
         at javafx.beans.property.DoublePropertyBase.set(Unknown Source)
         at javafx.scene.control.ProgressIndicator.setProgress(Unknown Source)
         at dm.Thr$2.handle(Thr.java:73)
         at dm.Thr$2.handle(Thr.java:1)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
    Cancelling!
    Finished/cancelled!
         at javafx.scene.Node.fireEvent(Unknown Source)
         at javafx.scene.control.Button.fire(Unknown Source)
         at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.scene.control.skin.SkinBase$5.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.access$1300(Unknown Source)
         at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.notifyMouse(Unknown Source)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
         at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Application:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class Thr extends Application {
         @Override
         public void start(Stage stage) throws Exception {
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
         private void setS(Group rg) {
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        pb.setProgress(serv.getProgress());
              //pb.setProgress(0);
              if (cancelled!=true) {
                   pb.progressProperty().bind(serv.progressProperty());
              } else {
                   pb.progressProperty().unbind();
              /*pb.progressProperty().addListener(new ChangeListener<Task>() {
                   @Override
                   public void changed(ObservableValue<? extends Task> arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
         private class FirstLineService extends Service {
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                          return null;
         public static void main(final String[] arguments)
              Application.launch(arguments);
    }

    The following is the main culprit:
    pb.progressProperty().bind(serv.progressProperty());I think your problem is the following line:
       pb.setProgress(serv.getProgress())  //bound value cannot be setAdd a listener to a serv. progressProperty()
      serv.progressProperty().addListener(new ChangeListener() {
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
                   });Here is the modified code:
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javafx.beans.value.*;
    import javafx.application.Application;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ProgressBar;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class Thr extends Application {
         @Override
         public void start(Stage stage) throws Exception {
              final Group rootGroup = new Group();
               final Scene scene = new Scene(rootGroup, 500, 400, Color.GHOSTWHITE);
               stage.setScene(scene);
               stage.setTitle("Testing downloads from Spring");
               stage.show();
               setS(rootGroup);
         final VBox vbox = new VBox();
         final javafx.scene.control.Button btn = new javafx.scene.control.Button("START!");
         final TextArea tf = new TextArea();
         final javafx.scene.control.Button btnC = new javafx.scene.control.Button("CANCEL!");
         final ProgressBar pb = new ProgressBar();
         final FirstLineService serv = new FirstLineService();
         boolean cancelled = false;
         private void setS(Group rg) {
              tf.setPrefRowCount(5);
              vbox.getChildren().add(btn);
              vbox.getChildren().add(tf);
              vbox.getChildren().add(btnC);
              vbox.getChildren().add(pb);
              pb.setPrefWidth(450);
              rg.getChildren().add(vbox);
              btn.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.start();
                        System.out.println("Service status: "+serv.getState());
                        tf.setText("STARTED!");
                     serv.progressProperty().addListener(new ChangeListener() {
                       @Override
                       public void changed(ObservableValue o, Object oldVal,
                               Object newVal) {
                          pb.progressProperty().setValue(serv.getProgress());
              btnC.setOnAction(new EventHandler<ActionEvent>() {
                   @Override
                   public void handle(ActionEvent arg0) {
                        serv.cancel();
                        System.out.println("Service status: "+serv.getState());
                        System.out.println("Service status cancelled when progress was: "+serv.getProgress());
                        tf.appendText("\nCANCELLED!");
                        //pb.setProgress(serv.getProgress());n
              //pb.setProgress(0);
         //     if (cancelled!=true) {
    //               pb.progressProperty().bind(serv.progressProperty());//
    //          } else {
    //               pb.progressProperty().unbind();
              pb.progressProperty().addListener(new ChangeListener<Task>() {
                   @Override
                   public void changed(ObservableValue<? extends Task> arg0,
                             Task arg1, Task arg2) {
                        // TODO Auto-generated method stub
                        pb.setProgress(serv.getProgress());
         private class FirstLineService extends Service {
            protected Task createTask() {
                return new Task<Void>() {
                    protected Void call() {
                         URL url;
                             try {
                                  url = new URL("http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.1.1.RELEASE.zip");
                               InputStream in = url.openStream();
                               int fileSize = url.openConnection().getContentLength()/1024;
                               File f = new File("spring.zip");
                               BufferedInputStream bin = new BufferedInputStream(in, 1024);
                               FileOutputStream fos = new FileOutputStream(f);
                               BufferedOutputStream bos = new BufferedOutputStream(fos, 1024);
                               int n=0;
                               int k=0;
                               System.out.println("Let the download begin!");
                               while(n !=-1){
                                    if (isCancelled()) {
                                         cancelled = true;
                                            n=-1;
                                            System.out.println("Cancelling!");
                                       } else {
                                       k=k+1;
                                    n=bin.read();
                                    bos.write(n);
                                    updateProgress(k/1024,fileSize);
                                    //pb.progressProperty().bind(this.progressProperty());
                                    //pb.setProgress(getProgress());
                               bos.close();
                               System.out.println("Finished/cancelled!");
                             } catch (MalformedURLException e) {
                                  e.printStackTrace();
                             } catch (FileNotFoundException e) {
                                  e.printStackTrace();
                             } catch (IOException e) {
                                  e.printStackTrace();
                          return null;
         public static void main(final String[] arguments)
              Application.launch(arguments);
    }

Maybe you are looking for

  • My Image CLASS MF4350d printer is not recognized by windows 8-64 bit

    My Image CLASS MF4350d printer is not recognized by windows 8-64 bit any help how can i fix the problem. I just bought new HP computer from Future shop and it came with Windows in it. but this windows8 doesnt have drivers for my printer Image Class M

  • Best Way to call Dynamically an stored procedure

    Hi Guys, Here my question... I need to call dynamically to an stored procedure... - the stored procedure can change, the name , the number of parameters - the called stored procedure can contain output parameters. lv_sql := 'BEGIN '|| lv_program_name

  • Installing HTML Server and HTML DB

    I am installing the HTML server and HTML db. I get to the screen to enter the HTML DB information and an failing with an error ORA-01017:Invalid username and password. I have checked my SYS password by logging into the database I am using. From the i

  • Itunes won't install due to permission error???

    iTunes will not let me install because every time this thing pops up and says I do not have permission to the files. Some HKEY file but I am the administrator. When I go to the registry edit it will not let me change who has permission.I also cannot

  • Sizing of different components in SAP

    How can we measure the average and peak throughput of different elements in SAP say CO-PA-BIL, CO-PA-FI  for sizingI