The element name '' isn't known in this provider... again

Posts   
 
    
Keiser
User
Posts: 17
Joined: 21-Apr-2010
# Posted on: 25-Jul-2016 16:15:28   

Hi guys,

problem that was described earlier in posts with simple solution to change reference to newer version of DatabaseSpecific assembly. My problem is a bit different. I have 2 in pairs DAL and BLL projects, each for one database (differrent databases). First pair is for main database and is working fine as expected. Second one is for connection to aux data. DataAccessAdapters for each of this database is obviously in his namespace. But when trying to fetch data for this aux data (where views and everything exists) I'm getting above mentioned exception. All projects are referencing the same LLBLGen assemblies (v.4.0).

As if typed view/entity is being referenced in different assembly pair (main db).

Any thoughts would be appreciated.

Tnx, Keiser

p.s. I checked connection strings and they are just fine on initiated adapter snippet.


        VwConversationTypedView view = new VwConversationTypedView();
        using (DataAccessAdapter adapter = new DataAccessAdapter())
               return adapter.GetDbCount(view.GetFieldsInfo(), filter);  // <---- exception line
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 25-Jul-2016 21:54:30   

Please provide complete stack trace. And the exact LLBLGen Pro runtime libraries version no. Please refer to: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7717

Keiser
User
Posts: 17
Joined: 21-Apr-2010
# Posted on: 25-Jul-2016 22:59:15   

RuntimeVersion: 4.0 Final May 15th, 2013 StackTrace:


   at SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase.GetElementMappingInfo(String elementName) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\InfoProviders\PersistenceInfoProviderBase.cs:line 373
   at SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase.GetFieldPersistenceInfo(String elementName, String fieldName) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\InfoProviders\PersistenceInfoProviderBase.cs:line 239
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetFieldPersistenceInfo(IFieldInfo fieldInfo) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 3725
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PreprocessQueryElements(QueryParameters parameters) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 4788
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityFields2 fields, IRelationPredicateBucket filter, IGroupByCollection groupByClause, Boolean allowDuplicates) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 489
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetDbCount(IEntityFields2 fields, IRelationPredicateBucket filter) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.0\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 442
   at EGHub.TypedViewClasses.VwConversationTypedView.GetVwConversationViewCount(IRelationPredicateBucket filter) in c:\EG\WebBased.v3\src\LLBLGEN\llblgenV3CommHub\BL\Business\VwConversationTypedViewBL.cs:line 77

I Hope this is enough if not, let me know what else is needed. One more things I have noticed. That might be the cause or this, generation of DAL is giving me this error ( I have not noticed this before):


Task: SD.Tasks.Generic.PersistenceInfoProviderClassGenerator
Could not find template 'SD_PersistenceInfoProviderAdapterTemplate'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)

Database I use is MS SQL server 2008R2. How can I check if and where this template resides. Template for this task is bound to: "LLBLGen Pro\Templates\SharedTemplates\Net3.5\C#\persistenceInfoProvider.lpt" and this file exists. Other things I could check?

Keiser
User
Posts: 17
Joined: 21-Apr-2010
# Posted on: 26-Jul-2016 09:19:02   

**Resolution: ** Writing my last post I realized that something is wrong with this persistance task performer. I have disabled old one and added new one. Adding new one task (the same one) actually refreshed stuff somehow and now everything seems to be fine. The old one didn't refresh properly in build/generate process and I was getting the above mentioned error.

Tnx.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 26-Jul-2016 10:45:45   

Was the file on disk readonly perhaps? Or did you disable the task manually? In any case, if a task runs into an error (e.g. the file is readonly while this isn't expected) it is logged in the generator output log. In case you run into this again simple_smile

Frans Bouma | Lead developer LLBLGen Pro