Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "VuCA"

Hi admin,

My project using oralce database and need hangfire to do some background task, but hangfire doesn't work with oracle, please help me an alternative solution in this situation.

Thank you very much!

Hi admin,

I want to authentication asp.net zero web application with custom provider (it's just a services that allow end user input user name and their password and then return true or false), please show me how to do that.

Thanks!

Hi,

Yep, it's EF and Oracle problem, so I fixed by change type using VARCHAR2 instead NVARCHAR2

Thank you very much!

Hi,

After many hours, I have figured out this line

CASE WHEN ("Extent2"."Id" IS NULL) THEN '.' ELSE "Extent2"."TenancyName" END AS "C2",

caused of this error.

Please help me fixed it, thanks!

The error throw when function excuted detail like bellow

ERROR 2017-05-09 09:27:45,766 [23 ] nHandling.AbpApiExceptionFilterAttribute - An error occurred while executing the command definition. See the inner exception for details. System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-12704: character set mismatch at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone) .....

I debuged and found the error occur when execute query but don't know how to fixed this.

SELECT 1 AS "C1", "Extent1"."UserId" AS "UserId", "Extent1"."TenantId" AS "TenantId", CASE WHEN ("Extent2"."Id" IS NULL) THEN '.' ELSE "Extent2"."TenancyName" END AS "C2", "Extent1"."UserName" AS "UserName", "Extent1"."LastLoginTime" AS "LastLoginTime" FROM "AbpUserAccounts" "Extent1" LEFT OUTER JOIN
( SELECT "Var_32"."Id" AS "Id", "Var_32"."CustomCssId" AS "CustomCssId", "Var_32"."LogoId" AS "LogoId", "Var_32"."LogoFileType" AS "LogoFileType", "Var_32"."EditionId" AS "EditionId", "Var_32"."Name" AS "Name", "Var_32"."TenancyName" AS "TenancyName", "Var_32"."ConnectionString" AS "ConnectionString", "Var_32"."IsActive" AS "IsActive", "Var_32"."IsDeleted" AS "IsDeleted", "Var_32"."DeleterUserId" AS "DeleterUserId", "Var_32"."DeletionTime" AS "DeletionTime", "Var_32"."LastModificationTime" AS "LastModificationTime", "Var_32"."LastModifierUserId" AS "LastModifierUserId", "Var_32"."CreationTime" AS "CreationTime", "Var_32"."CreatorUserId" AS "CreatorUserId" FROM "AbpTenants" "Var_32" WHERE ((( CAST( "Var_32"."IsDeleted" AS number(1,0))) = 0)) ) "Extent2" ON ("Extent1"."TenantId" = "Extent2"."Id") WHERE (( (( NOT (("Extent1"."TenantId" = 1) AND ((CASE WHEN ("Extent1"."TenantId" IS NULL) THEN 1 ELSE 0 END) = (CASE WHEN (1 IS NULL) THEN 1 ELSE 0 END)))) OR ("Extent1"."UserId" <> 2)) AND ("Extent1"."UserLinkId" IS NOT NULL) AND (("Extent1"."UserLinkId" = null) OR (("Extent1"."UserLinkId" IS NULL) AND (null IS NULL))));

Please help me get rid of this bug, thanks your very much!

<cite>ismcagdas: </cite> Hi,

It is defined in ABP Framework here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/Notifications/NotificationSubscriptionInfo.cs#L43">https://github.com/aspnetboilerplate/as ... nfo.cs#L43</a>.

So you need to add a code line something like this in your DbContext's OnModelCreating.

modelBuilder.Entity<NotificationSubscriptionInfo>().Property(e => e.EntityTypeAssemblyQualifiedName).HasColumnName("EntityTypeAssemblyQn");

Hi, I found 2 column exeed max length of oracle column. There are:

  • Column EntityTypeAssemblyQualifiedName in NotificationSubscriptionInfo, TenantNotificationInfo, NotificationInfo tables
  • Column ShouldChangePasswordOnNextLogin in User table Thank ismcagdas very much!

<cite>ismcagdas: </cite> Hi,

It seems like Oracle does not allow a column name longer than 30 chars. You need to map the column name "EntityTypeAssemblyQualifiedName" to a shorter name instead.

Hi,

I know the error occurs is column EntityTypeAssemblyQualifiedName 32 characters and it used in AbpNotifications, AbpNotificationSubscriptions, AbpTenantNotifications --> but I did not find where is it define in .Core project.

Please tell me how to fix?

<cite>daws: </cite> problem solved.

(I recreated a sample console project for stevenmunoz, it solved his solution)

If needed, ask the sample :)

Please share for me, I think this is my problem.

[http://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=5389&p=13486#p13486])

Thanks!

<cite>ismcagdas: </cite> Hi,

Can you try solution offered here <a class="postlink" href="http://stackoverflow.com/questions/27250555/oracle-manageddataaccess-entityframework-ora-01918-user-dbo-does-not-exist">http://stackoverflow.com/questions/2725 ... -not-exist</a> ?

It seems like you need to set schema name in OnModelCreating.

It's work when set default schema in OnModelCreating but another error occurs when update-database

create table "KHTT"."AbpNotifications" ( "Id" raw(16) not null, "NotificationName" nvarchar2(96) not null, "Data" nclob null, "DataTypeName" nvarchar2(512) null, "EntityTypeName" nvarchar2(250) null, "EntityTypeAssemblyQualifiedName" nvarchar2(512) null, "EntityId" nvarchar2(96) null, "Severity" number(3, 0) not null, "UserIds" nclob null, "ExcludedUserIds" nclob null, "TenantIds" nclob null, "CreationTime" date not null, "CreatorUserId" number(19, 0) null, constraint "PK_AbpNotifications" primary key ("Id") ) Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00972: identifier is too long at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone) at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean bFirstIterationDone) at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, Boolean isFromEF) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery() at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext1 c) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery() at System.Data.Entity.Migrations.DbMigrator.ExecuteSql(MigrationStatement migrationStatement, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ExecuteSql(MigrationStatement migrationStatement, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinTransaction(IEnumerable1 migrationStatements, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinNewTransaction(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection) at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClass30.<ExecuteStatements>b__2e() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements, DbTransaction existingTransaction) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.ExecuteStatements(IEnumerable1 migrationStatements) at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable1 operations, IEnumerable1 systemOperations, Boolean downgrading, Boolean auto) at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.

How to deal with it?

<cite>ismcagdas: </cite> Hi,

What happens when you skip the part for adding MigrationSqlGenerator ? Did you try in that way ?

Thanks.

I already tried by skip adding MigrationSqlGenerator but It did not work. These are some steps I done with no luck.

  1. Install Oracle.ManagedDataAccess.Client.EntityFramework from nuget package to my .EntityFramework and .Web projects
  2. Change the default connectionstring to Oracle Database in web.config
  3. Clean all the migration default
  4. Re-generate migrations by using command: Add-Migration "AbpZero_Initial"
  5. Update database by using: Update-Database

The errors below:

PM> Update-Database Specify the '-Verbose' flag to view the SQL statements being applied to the target database. Applying explicit migrations: [201703131204550_AbpZero_Initial]. Applying explicit migration: 201703131204550_AbpZero_Initial. Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-01918: user 'dbo' does not exist at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone) at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean bFirstIterationDone) at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, Boolean isFromEF) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery() at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<NonQuery>b__0(DbCommand t, DbCommandInterceptionContext1 c) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery() at System.Data.Entity.Migrations.DbMigrator.ExecuteSql(MigrationStatement migrationStatement, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ExecuteSql(MigrationStatement migrationStatement, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinTransaction(IEnumerable1 migrationStatements, DbTransaction transaction, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsWithinNewTransaction(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection, DbInterceptionContext interceptionContext) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatementsInternal(IEnumerable1 migrationStatements, DbConnection connection) at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClass30.<ExecuteStatements>b__2e() at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements, DbTransaction existingTransaction) at System.Data.Entity.Migrations.DbMigrator.ExecuteStatements(IEnumerable1 migrationStatements) at System.Data.Entity.Migrations.Infrastructure.MigratorBase.ExecuteStatements(IEnumerable1 migrationStatements) at System.Data.Entity.Migrations.DbMigrator.ExecuteOperations(String migrationId, VersionedModel targetModel, IEnumerable1 operations, IEnumerable1 systemOperations, Boolean downgrading, Boolean auto) at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.Infrastructure.MigratorLoggingDecorator.Upgrade(IEnumerable`1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.

Thanks for your support!

Showing 31 to 40 of 41 entries