Base solution for your next web application
Open Closed

Strange error with asp.net zero #3502


User avatar
0
VuCA created

Hi ,

I have a strange error like bellow:

ORA-00933: SQL command not properly ended 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Oracle.ManagedDataAccess.Client.OracleException: ORA-00933: SQL command not properly ended

Source Error: 


Line 44:         {
Line 45:             var settingManager = AbpBootstrapper.IocManager.Resolve<ISettingManager>();
Line 46:             var defaultLanguage = settingManager.GetSettingValue(LocalizationSettingNames.DefaultLanguage);
Line 47: 
Line 48:             if (defaultLanguage.IsNullOrEmpty())

When debug I found some reason:

  1. Disable background job --> do not see the error happen again (not full test)
  2. I log command text and saw the error bellow
SELECT 
"Extent1"."ID" AS "ID", 
"Extent1"."CUSTOM_CSS_ID" AS "CUSTOM_CSS_ID", 
"Extent1"."LOGO_ID" AS "LOGO_ID", 
"Extent1"."LOGO_FILE_TYPE" AS "LOGO_FILE_TYPE", 
"Extent1"."EDITION_ID" AS "EDITION_ID", 
"Extent1"."NAME" AS "NAME", 
"Extent1"."TENANCY_NAME" AS "TENANCY_NAME", 
"Extent1"."CONNECTION_STRING" AS "CONNECTION_STRING", 
"Extent1"."IS_ACTIVE" AS "IS_ACTIVE", 
"Extent1"."IS_DELETED" AS "IS_DELETED", 
"Extent1"."DELETER_USER_ID" AS "DELETER_USER_ID", 
"Extent1"."DELETION_TIME" AS "DELETION_TIME", 
"Extent1"."LAST_MODIFICATION_TIME" AS "LAST_MODIFICATION_TIME", 
"Extent1"."LAST_MODIFIER_USER_ID" AS "LAST_MODIFIER_USER_ID", 
"Extent1"."CREATION_TIME" AS "CREATION_TIME", 
"Extent1"."CREATOR_USER_ID" AS "CREATOR_USER_ID"
FROM "KHTT_QC"."ABP_TENANTS" "Extent1"
WHERE ((("Extent1"."IS_DELETED" = :DynamicFilterParam_000001) ) AND (1 = "Extent1"."ID")) AND (ROWNUM <= (1) )
WHERE (ROWNUM <= (1000) )
-- DynamicFilterParam_000001: 'False' (Type = Decimal, IsNullable = false)
-- DynamicFilterParam_000002: 'null' (Type = Decimal)
-- Executing at 7/5/2017 5:31:50 PM +07:00
Exception thrown: 'OracleInternal.Network.NetworkException' in Oracle.ManagedDataAccess.dll
Exception thrown: 'Oracle.ManagedDataAccess.Client.OracleException' in Oracle.ManagedDataAccess.dll
Exception thrown: 'Oracle.ManagedDataAccess.Client.OracleException' in Oracle.ManagedDataAccess.dll
Exception thrown: 'Oracle.ManagedDataAccess.Client.OracleException' in Oracle.ManagedDataAccess.dll
Exception thrown: 'Oracle.ManagedDataAccess.Client.OracleException' in Oracle.ManagedDataAccess.dll
-- Failed in 280 ms with error: ORA-00933: SQL command not properly ended
  1. I found the problem (not sure) on the stackoverflow [https://stackoverflow.com/questions/42147820/ef-6-adding-row-limit-automatically]) but do not have solution for this one.

Please help how to resolve that.

Thanks!


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    Hi,

    These kind of errors happen, if you write a custom query that concanates strings. But if you don't use a custom t-sql then can you write the linq query that causes this exception? Try to install the latest Oracle drivers (12.2.1100 )

  • User Avatar
    0
    VuCA created

    Thanks,

    It's asp.net core feature, I don't customize any thing so the only thing I can do is install the latest Oracle drivers (12.2.1100 )

    Regards,

  • User Avatar
    0
    alper created
    Support Team

    give it a try! it's recommended to upgrade to latest version in entity framework github issues.