GetSchema() throws UciException "*HS.OLEDBINFO" is not in the CATALOG space" - u2

I installed UniVerse on the administrator account of a Parallels Windows installation. I subsequently created a second administrator account whose credentials I'm using to create the U2Connection.
However, when attempting to call GetSchema(...) I'm getting the following exception. I suspect this is permission-related but I'm not sure what I need to change.
{" [U2][UCINET-UO] [U2][UCINET][UNIVERSE]:\"*HS.OLEDBINFO\" is not in the CATALOG space.\r\n"}
at U2.Data.Client.Ucinet.UciStatement.ExecuteDirect(String pSQL)
at U2.Data.Client.U2Command.a(CommandBehavior A_0)
at U2.Data.Client.U2Command.ExecuteReaderObject(CommandBehavior behavior, String method, U2CursorType reqCursorType, Boolean abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, Int32 maxRows, Boolean skipInitialValidation)
at U2.Data.Client.U2Command.ExecuteReaderObject(CommandBehavior behavior, String method)
at U2.Data.Client.U2MetaDataFactory.b(U2Command& A_0, String A_1)
at U2.Data.Client.U2MetaDataFactory.v(String[] A_0)
at U2.Data.Client.U2MetaDataFactory.GetSchema(String collectionName, String[] restrictionValues)
at U2.Data.Client.U2Connection.GetSchema(String collectionName, String[] restrictionValues)
at U2.Data.Client.U2Connection.GetSchema(String collectionName)
at Connection.Program.Main(String[] args) in c:\Program Files (x86)\Rocket Software\U2 Toolkit for .NET\U2 Database Provider\samples\C#\UniVerse\Connection\Program.cs:line 30

I'm told: He is right for the second administrator account. All UniVerse users must have the permission to access the global catalog subroutines. That “*HS.OLEDBINFO” (%AHS.OLEDBINFO) will be in the “C:\U2\UV\catdir” folder by default.
Does that help?

Related

Custom login method in liferay 7

I recently started learning liferay(7.1.2 ga3). my requirement is to change the login code(i.e write my own code for login) not look and feel in login.jsp.
I created a hook file with the following steps(in liferay developer studio) New -> Liferay Module Project -> Project Name as CustomLogin -> Build Type as Maven -> Project Template Name as war-hook -> then Finish.
After This folder was created with the name as CustomLogin and in that src -> main -> java -> CustomLogin -> I can see two Files CustomLoginLoginPostAction.java and CustomLoginStartupAction.java
in CustomLoginStartupAction.java
package CustomLogin;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction;
public class CustomLoginStartupAction extends SimpleAction {
#Override
public void run(String[] lifecycleEventIds) throws ActionException {
for (String eventId : lifecycleEventIds) {
System.out.println("Startup event ID " + eventId);
}
}
}
in CustomLoginLoginPostAction.java
package CustomLogin;
import com.liferay.portal.kernel.events.Action;
import com.liferay.portal.kernel.model.User;
import com.liferay.portal.kernel.service.UserLocalServiceUtil;
import com.liferay.portal.kernel.util.PortalUtil;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class CustomLoginLoginPostAction extends Action
{
#Override
public void run(HttpServletRequest request, HttpServletResponse response)
{
long userId = PortalUtil.getUserId(request);
User user = UserLocalServiceUtil.fetchUser(userId);
System.out.println(user.getFirstName() + " has logged in.");
}
}
But I dont't know what to do after this. please help. or give some sample code.
Strong recommendations:
As you start learning Liferay, start with the current version, not with one from January 2019 (original 7.1.x release in 2018)
Start with OSGi plugins - they deploy a lot quicker than WAR archives and require a lot less memory at runtime
think about the requirement: You're using a platform that gives you the option to ignore all of the user management worries, and the first thing you do is to take back control of this delicate issue. Rather: Use the platform to your advantage. Consider using LDAP or SSO if you need to authenticate against another user database: That's configuration, not code - so nothing for you to maintain
That being said, the code that you posted adds to the login procedure. E.g. the LoginPostAction is executed after Liferay's own login code is already executed. This enables you to intercept a login and impose custom rules when you know what user you deal with (and that they authenticated correctly). Similarly, there's a similar LoginPreAction, that's allowing you to intercept the login process before the user's login is applied.
(A StartupAction is the wrong path - nothing to do with the login process - don't follow that path for this purpose)
What you typically do in these actions is to either deny access based on unconfigurable criteria (e.g. may the user log in from that IP? At this time?) or initialize some additional environments (e.g. triggering some backend action, initialize some information in the session). For this you can determine to do this before or after the login succeeded.
If - against my recommendation - you decide that you'll still want to customize the login process: This code for 7.0 should still work on 7.1 (and likely even on 7.4, the current version). It involves writing a custom login portlet, and the relevant code is in this class, after retrieving the HttpServletRequest (I'm omitting the presentation layer from the linked sample)
#Component(
property = {
"javax.portlet.name=MyLoginPortlet",
"mvc.command.name=/login/login"
},
service = MVCActionCommand.class
)
public class MyLoginMVCActionCommand extends BaseMVCActionCommand {
#Override
protected void doProcessAction(ActionRequest actionRequest,
ActionResponse actionResponse) throws Exception {
ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute(
WebKeys.THEME_DISPLAY);
HttpServletRequest request = PortalUtil.getOriginalServletRequest(
PortalUtil.getHttpServletRequest(actionRequest));
HttpServletResponse response = PortalUtil.getHttpServletResponse(
actionResponse);
String login = ParamUtil.getString(actionRequest, "login");
String password = actionRequest.getParameter("password");
boolean rememberMe = ParamUtil.getBoolean(actionRequest, "rememberMe");
String authType = CompanyConstants.AUTH_TYPE_EA;
AuthenticatedSessionManagerUtil.login(
request, response, login, password, rememberMe, authType);
actionResponse.sendRedirect(themeDisplay.getPathMain());
}
}
But really: Use your time to add business value and work on business problems. Be happy that the infrastructure layer is taken care of already.

Azure AD Connect Installation Fails

I keep getting password does not meet the password policy requirement while installing Azure AD Connector on a 2012R2Sserver (see error below).
All domain password domain polices have been disabled. Both local domain admin account and Azure accounts have complex passwords. Any idea what is causing this error?
Stack-trace error:
[23:18:12.297] [ 14] [INFO ] Starting Sync Engine installation
[23:18:17.265] [ 14] [ERROR] PerformConfigurationPageViewModel: Caught
exception while installing synchronization service. [23:18:17.265] [
13] [INFO ] Starting Telemetry Send Exception Data (Raw):
System.Exception: Unable to install the Synchronization Service.
Please see the event log for additional details. --->
System.DirectoryServices.AccountManagement.PasswordException: The
password does not meet the password policy requirements. Check the
minimum password length, password complexity and password history
requirements. ---> System.Runtime.InteropServices.COMException: The
password does not meet the password policy requirements. Check the
minimum password length, password complexity and password history
requirements. at
System.DirectoryServices.DirectoryEntry.CommitChanges() at
System.DirectoryServices.AccountManagement.SDSUtils.ApplyChangesToDirectory(Principal
p, StoreCtx storeCtx, GroupMembershipUpdater updateGroupMembership,
NetCred credentials, AuthenticationTypes authTypes) --- End of
inner exception stack trace --- at
System.DirectoryServices.AccountManagement.SDSUtils.ApplyChangesToDirectory(Principal
p, StoreCtx storeCtx, GroupMembershipUpdater updateGroupMembership,
NetCred credentials, AuthenticationTypes authTypes) at
System.DirectoryServices.AccountManagement.SDSUtils.InsertPrincipal(Principal
p, StoreCtx storeCtx, GroupMembershipUpdater updateGroupMembership,
NetCred credentials, AuthenticationTypes authTypes, Boolean
needToSetPassword) at
System.DirectoryServices.AccountManagement.SAMStoreCtx.Insert(Principal
p) at System.DirectoryServices.AccountManagement.Principal.Save()
at
Microsoft.Azure.ActiveDirectory.Synchronization.Framework.AccountManagementAdapter.CreatePrincipalCore(Principal
principal) at
Microsoft.Azure.ActiveDirectory.Synchronization.Framework.AccountManagementAdapter.CreateUser(NetworkCredential
userCredential, String userDescription, Boolean
userPasswordNeverExpires) at
Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SynchronizationServiceSetupTask.<>c__DisplayClass2b.b__2a()
at
Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action
action, String description) at
Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SynchronizationServiceSetupTask.CreateSyncServiceAccount(AccountManagementAdapter
accountManagementAdapter, String installationIdentifier) at
Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SynchronizationServiceSetupTask.InstallCore(String
logFilePath, String logFileSuffix) at
Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.ExecuteWithSetupResultsStatus(SetupAction
action, String description, String logFileName, String logFileSuffix)
at
Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SetupBase.Install()
--- End of inner exception stack trace --- at Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SetupBase.ThrowSetupTaskFailureException(String
exceptionFormatString, String taskName, Exception innerException)
at
Microsoft.Azure.ActiveDirectory.Synchronization.Setup.SetupBase.Install()
at
Microsoft.Online.Deployment.OneADWizard.Providers.EngineSetupProvider.SetupSyncEngine(String
setupFilesPath, String installationPath, String sqlServerName, String
sqlInstanceName, String serviceAccountName, String
serviceAccountDomain, String serviceAccountPassword, String
groupAdmins, String groupBrowse, String groupOperators, String
groupPasswordSet, Int32 numberOfServiceInstances,
ProgressChangedEventHandler progressChanged, NetworkCredential&
serviceAccountCredential, SecurityIdentifier& serviceAccountSid) at
Microsoft.Online.Deployment.OneADWizard.Runtime.Stages.InstallSyncEngineStage.ExecuteInstallCore(ISyncEngineInstallContext
syncEngineInstallContext, ProgressChangedEventHandler
progressChangesEventHandler) at
Microsoft.Online.Deployment.OneADWizard.Runtime.Stages.InstallSyncEngineStage.ExecuteInstall(ISyncEngineInstallContext
syncEngineInstallContext, ProgressChangedEventHandler
progressChangesEventHandler) at
Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.PerformConfigurationPageViewModel.ExecuteSyncEngineInstallCore(AADConnectResult&
result)

CodeNameNotUniqueException after applying hotfix Kentico 7

I am having a 'CodeNameNotUniqueException' error whereby after upgrading from v7.0.37 to v7.0.70 I am getting an error on loading my website. It looks like it is related to something to do with roles as the code name 'int-sg-ctx-nz-xa6-publisheddesktopoffice2013' is a role in my website. It basically happens to all the roles and not just this one. This is the error message that I get in event viewer:
Exception information:
Exception type: CodeNameNotUniqueException
Exception message: The object with code name 'int-sg-ctx-nz-xa6-publisheddesktopoffice2013' already exists.
at CMS.DataEngine.AbstractInfoProvider`2.SetInfoInternal(InfoType info)
at CMS.DataEngine.AbstractInfoProvider`2.SetInfo(InfoType info)
at CMS.SiteProvider.UserInfoProvider.EnsureRolesAndSitesInternal(UserInfo uInfo, Boolean isWindowsAuth)
at CMS.CMSHelper.AuthenticationHelper.EnsureExternalUser(UserInfo uInfo)
at CMS.CMSHelper.AuthenticationHelper.AuthenticateWindowsUser(String userName, SecurityIdentifier sid, String siteName, String[] roles)
at CMS.CMSHelper.ContextData.GetCurrentUser(Boolean& loadUserData, Boolean cacheResult)
at CMS.CMSHelper.ContextData.get_CurrentUser()
at CMSAppBase.CMSSessionStart(Object sender, EventArgs e)
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Request information:
Request URL: http://aainsurance/CMSPages/PortalTemplate.aspx?aliaspath=/home
Request path: /CMSPages/PortalTemplate.aspx
User host address: 10.212.210.58
User: INT\U362515
Is authenticated: True
Authentication Type: NTLM
Thread account name: IIS APPPOOL\AAI.Intranet
Thread information:
Thread ID: 58
Thread account name: IIS APPPOOL\AAI.Intranet
Is impersonating: False
Stack trace: at CMS.DataEngine.AbstractInfoProvider`2.SetInfoInternal(InfoType info)
at CMS.DataEngine.AbstractInfoProvider`2.SetInfo(InfoType info)
at CMS.SiteProvider.UserInfoProvider.EnsureRolesAndSitesInternal(UserInfo uInfo, Boolean isWindowsAuth)
at CMS.CMSHelper.AuthenticationHelper.EnsureExternalUser(UserInfo uInfo)
at CMS.CMSHelper.AuthenticationHelper.AuthenticateWindowsUser(String userName, SecurityIdentifier sid, String siteName, String[] roles)
at CMS.CMSHelper.ContextData.GetCurrentUser(Boolean& loadUserData, Boolean cacheResult)
at CMS.CMSHelper.ContextData.get_CurrentUser()
at CMSAppBase.CMSSessionStart(Object sender, EventArgs e)
at System.Web.SessionState.SessionStateModule.CompleteAcquireState()
at System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Can anyone help with this? As of now I've had to rollback the database and restore the files for version 37 which is a shame as this version is not fully compatible with IE11.
Are you somewhere editing/creating user`s ID or GUID manually in your custom code?
Just FYI - kentico 7 has released more than one year before release of IE11 so it is really hard to support not existing product... Source: wiki devnet

C# windows server 2008 r2 win32exception

We have a .net 2.0 exe that we are running on windows server 2008 r2. It gets stucks and stops with below info on Event log.
The same used to run correctly on windows server 2003. there are no code changes or rebuilds done in the migration to windows server 2008 r2.
We have tried putting lots of logs in exception in our code, but not sure from which line of code this error popups, but our normal logs do popup in the eventvwr, so doesnt look like permission issue on event viewer.
Any help or pointers on this would be helpful.
1) Exception Information
*********************************************
Exception Type: System.ComponentModel.Win32Exception
NativeErrorCode: 87
ErrorCode: -2147467259
Message: The parameter is incorrect
Data: System.Collections.ListDictionaryInternal
TargetSite: Void InternalWriteEvent(UInt32, UInt16, System.Diagnostics.EventLogEntryType, System.String[], Byte[], System.String)
HelpLink: NULL
Source: System
2) StackTrace Information
*********************************************
at System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
at System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category)
at DefaultPublisher.WriteToLog(String entry, EventLogEntryType type)
at DefaultPublisher.Publish(Exception exception, NameValueCollection additionalInfo, NameValueCollection configSettings)
at ExceptionManager.Publish(Exception exception, NameValueCollection additionalInfo)
The message passed to WriteEntry() is too long. It's length must be less than 32706 characters

SharePoint SPRequest Leak

I have been getting this weird message in the ULS ever since I ported the code over to SharePoint 2010.
Here is the message:
w3wp.exe (0x1320)
0x1168 SharePoint Foundation
General
90hv
Unexpected
Detected use of SPRequest for previously closed SPWeb object. Please close SPWeb objects when you are done with all objects obtained from them, but not before.
Stack trace:
at Microsoft.SharePoint.SPWorkItem.FetchData()
at Microsoft.SharePoint.SPWorkItem.retrieveSchema(Schema schemaIndex)
at Microsoft.SharePoint.SPWorkItem.get_SiteId()
at Microsoft.SharePoint.SPWorkItem.Delete()
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.WorkItemDequeue(Transaction txn, Object[] transData)
at Microsoft.SharePoint.Workflow.SPPendingWorkBatch.Commit(Transaction transaction, ICollection items)
at System.Workflow.Runtime.WorkBatch.PendingWorkCollection.Commit(Transaction transaction)
at System.Workflow.Runtime.WorkBatch.Commit(Transaction transaction)
at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)
at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
at System.Workflow.Runtime.WorkflowExecutor.System.Workflow.ComponentModel.IWorkflowCoreRuntime.PersistInstanceState(Activity activity)
at System.Workflow.ComponentModel.Activity.MarkClosed()
at System.Workflow.ComponentModel.Activity.ReleaseLockOnStatusChange(IActivityEventListener1 eventListener)
at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.SafeReleaseLockOnStatusChange(ActivityExecutionContext context)
at System.Workflow.ComponentModel.FaultAndCancellationHandlingFilter.OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)
at System.Workflow.ComponentModel.ActivityExecutorDelegateInfo1.ActivityExecutorDelegateOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
at System.Workflow.Runtime.Scheduler.Run()
at System.Workflow.Runtime.WorkflowExecutor.RunScheduler()
at System.Workflow.Runtime.WorkflowExecutor.RunSome(Object ignored)
at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service)
at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunOne(Guid workflowInstanceId)
at System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService.RunWorkflow(Guid workflowInstanceId)
at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWorkflow workflow, SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)
at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection1 events, TimeSpan timeOut)
at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection1 events, SPWorkflowRunOptionsInternal runOptions)
at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(Object context, SPWorkflowAssociation association, DateTime elevationTimeUtc, SPWorkflowEvent startEvent, SPWorkflowRunOptions runOptions)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.<>c_DisplayClass1.b_0(SPSite superUserSite, SPWeb superUserWeb)
at Microsoft.SharePoint.SPSecurity.<>c_DisplayClassf.b_e()
at Microsoft.SharePoint.SPSecurity.<>c_DisplayClass4.b_2()
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 Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)
at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.ItemUpdated(SPItemEventProperties properties)
at Microsoft.SharePoint.SPEventManager.RunItemEventReceiver(SPItemEventReceiver receiver, SPUserCodeInfo userCodeInfo, SPItemEventProperties properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEventManager.RunItemEventReceiverHelper(Object receiver, SPUserCodeInfo userCodeInfo, Object properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEventManager.<>c_DisplayClassc`1.b_6()
at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](SPUserToken userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)
at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](Byte[] userTokenBytes, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Object properties, Boolean checkCancel)
at Microsoft.SharePoint.SPEventManager.HandleEventCallback[ReceiverType,PropertiesType](Object callbackData)
at Microsoft.SharePoint.Utilities.SPThreadPool.WaitCallbackWrapper(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(ExecutionContextexecutionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
This message comes up whenever I run the workflow, it does not appear to have any harmful effects to the workflow.
Please let me know anything you folks know.
Here's the guidance from MS around the proper disposal of SharePoint objects. Odds are good that if you're following all of these (correctly) then your code will be ok. The SPDisposeCheck tool can also be helpful, although in my exeprience you still need to know all of the disposal rules. This tool only does a static analysis and can return a lot of candidate issues that may actually be fine.
When you read the exception more carefully you can see that you don't Forget to dispose the object. you reference it after it got disposed!
you can read more about it from the german SharePoint Guru Stefan Gossner

Resources