LLBL migration from v 2.5 to v 3.0

Posts   
1  /  2
 
    
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 28-Apr-2011 17:34:06   

We have a licensed version for 2.x and are using v 2.5 for generating the llbl files. Since, v 2.5 does not support oracle 11g, we are planning to migrate to v 3.0. We used the migration template provided by llbl http://www.llblgen.com/documentation/3.0/Designer/Migratingv2xProjectTov3.htm We followed the steps provided in the readme.txt to migrate from v 2.5 to v 3.0 but are getting the error message, have attached the screenshot of the error message, Task 'sd.tasks.base.consumerlpttemplate' aborted the process.

Please let us know if anybody has faced this issue.

Attachments
Filename File size Added on Approval
LLBL3.0migration issue.png 5,603 28-Apr-2011 17:34.21 Approved
V2xMigrationTemplates_20110207.zip 17,796 28-Apr-2011 17:35.05 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39617
Joined: 17-Aug-2003
# Posted on: 28-Apr-2011 18:16:06   

Download v2.6 from the customer area, use the conversion template with that version. v2.6 can load your v2.5 project just fine, and is able to run the conversion template

Frans Bouma | Lead developer LLBLGen Pro
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 28-Apr-2011 20:48:23   

Thanks, we are able to generate the llbl files. But, we are getting the error as "The type or namespace ...... could not be found (are you missing a using directive or assembly reference" Could somebody please help us out here?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 28-Apr-2011 22:17:21   

When are you getting the error - when you try to generate the code from the LLBLGen project file, or when you try to compile the generated code ?

Which namespace is it complaining that it cannot find ?

Thanks

Matt

ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 28-Apr-2011 22:24:22   

We are able to generate the code from LLBL but are getting the error during compilation. There are around 18 namespaces missing or with error. Some of them are ElementCreatorBase, IElementCreator2, DynamicRelationBase.

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 28-Apr-2011 22:45:13   

Sounds like you are missing the reference to the LLBLGen runtime library SD.LLBLGen.Pro.ORMSupportClasses2.0.dll. You may need to point the reference in the generated project to the file on your machine.

Matt

ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 28-Apr-2011 23:30:12   

We are referencing SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll file. Is this not the correct one? Please tell where can we get the new file if this is not a valid file. We are using .net 3.5 version for our application development.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Apr-2011 02:59:38   

Yes, you need SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll, but the version 3. Please make sure you are using the correct version of the assemblies. If necessary, remove the references and add them again.

David Elizondo | LLBLGen Support Team
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 29-Apr-2011 05:14:00   

Where can we get the version 3 dll? Can you please provide us the path?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 29-Apr-2011 09:02:38   

When you install any version of LLBLGen Pro, you get the dlls to show in the Reference Window (.NET) of visual studio.

So all you have to do is to right click on the specified project in VS. In Solution Explorer right-click the References node and select Add Reference. In the .NET tab you should find all LLBLGen Pro dlls. Just pick the correct version.

ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 29-Apr-2011 16:49:35   

That did resolve some of the errors...we were able to bring down the error count from 15 to 7. Thanks for your help. We are getting problem in dataaccessadapter, it says return type must be 'System.Data.Common.DbConnection' to match overridden member 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateNewPhysicalConnection(string)' return type must be 'System.Data.Common.DbTransaction' to match overridden member 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateNewPhysicalTransaction()' 'SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.SetRelatedEntity(SD.LLBLGen.Pro.ORMSupportClasses.IEntity2, string)' is inaccessible due to its protection level

Can somebody help us here?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39617
Joined: 17-Aug-2003
# Posted on: 29-Apr-2011 17:20:58   

You are still referencing v2.x runtime library assemblies, you have to reference the v3.x ones of the version you're generating code with (I think you generated with v3.1, so you have to reference v3.1's ormsupportclasses dll)

Frans Bouma | Lead developer LLBLGen Pro
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 29-Apr-2011 18:00:55   

We rebuild the whole process and then, we get the following error. Cannot implicitly convert type 'SD.LLBLGen.Pro.ORMSupportClasses.IValidator' to '<project name>.DAL.EntityClasses.ValidatorEntity'. An explicit conversion exists (are you missing a cast?) Does this error make any sense to anybody?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Apr-2011 20:57:18   

Please show us the code that refers that error. Do you have an entity named Validator?

David Elizondo | LLBLGen Support Team
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 29-Apr-2011 21:50:06   

Yes, we have an entity called validator. The generated code this.Validator = validator; throws error in the llbl file.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Apr-2011 07:58:46   

ULPSR wrote:

Yes, we have an entity called validator. The generated code this.Validator = validator; throws error in the llbl file.

In What Entity are you putting that code (this.Validator = validator)? I guess this.Validator is an ValidatorEntity, but validator is an IValidator, that's why the compilation error, coz there is a property in all entities called Validator, but maybe you have a related entity in this that points to a ValidatorEntity.

Is there any chance you change the related entity name Validator to something else (like TheValidator)?

I hope that makes sense. If you still run into troubles, please post you llblgenproj file so we can test it.

David Elizondo | LLBLGen Support Team
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 02-May-2011 22:39:35   

Thanks this issue is resolved. We are getting another issue while compiling, this should be the last in the list I hope. Really appreciate your helping out. 'PricingTool.DAO.PricingToolDataAccessAdapter.CreateNewPhysicalTransaction()': return type must be 'System.Data.Common.DbTransaction' to match overridden member 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateNewPhysicalTransaction()'

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-May-2011 07:37:45   

ULPSR wrote:

Thanks this issue is resolved.

What was it? We are curious simple_smile

ULPSR wrote:

We are getting another issue while compiling, this should be the last in the list I hope. Really appreciate your helping out. 'PricingTool.DAO.PricingToolDataAccessAdapter.CreateNewPhysicalTransaction()': return type must be 'System.Data.Common.DbTransaction' to match overridden member 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateNewPhysicalTransaction()'

Weird. I still think you are not referencing the correct assemblies (v3.0 or v3.1). Please double check that please.

This is a related thread for similar weird errors, not sure if it helps but please check it: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=19157

David Elizondo | LLBLGen Support Team
ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 04-May-2011 23:20:50   

I checked all the references but could not locate the error. Still searching for solution, I rebuilt the whole solution and pointed manually each reference to the new dll files. Still no success.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39617
Joined: 17-Aug-2003
# Posted on: 05-May-2011 09:21:26   

ULPSR wrote:

I checked all the references but could not locate the error. Still searching for solution, I rebuilt the whole solution and pointed manually each reference to the new dll files. Still no success.

Do a textual check in the csproj files XML (load them into notepad for example), and check whether the references are ok. Also set 'specific version' to true in vs.net for the reference, to make sure the reference is OK.

If you didn't add any custom code to the generated code, you can also decide to simply re-generate the code in an empty folder.

For v2.x -> 3.x migration, be sure you look into the feature for field ordering (see manual!) to keep field ordering the same as in v2

Frans Bouma | Lead developer LLBLGen Pro
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 05-May-2011 09:24:42   

What's the return type of: PricingTool.DAO.PricingToolDataAccessAdapter.CreateNewPhysicalTransaction() ??

ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 11-May-2011 16:49:04   

This is the code scippet throwing error: protected override IDbTransaction CreateNewPhysicalTransaction() { if (_transaction == null) { return base.CreateNewPhysicalTransaction(); } else { return _transaction; } }

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 11-May-2011 16:58:35   

Please return DBTransaction not IDBTrasaction. To match the overidden function in the base class.

ULPSR
User
Posts: 30
Joined: 28-Apr-2011
# Posted on: 11-May-2011 17:13:30   

Changed the Idb to Db and removed those two errors but getting another error now: <projectName>.DAL.DatabaseSpecific.DataAccessAdapter' does not contain a definition for 'SchemaNameUsageSetting' Throwing error in following piece of code: base.SchemaNameUsageSetting = SchemaNameUsage.Clear; base page refers to "<PName>.DAL.DatabaseSpecific" Compared the code in the dataadapater file and found that we are missing the following code, this file is generated using the llbl. Do we need to replace this manually or is it something that has changed with v 3.1? public SchemaNameUsage SchemaNameUsageSetting { get { if(_schemaNameOverwrites!=null) { return _schemaNameOverwrites.SchemaNameUsageSetting; } else { return SchemaNameUsage.Default; } } set { if(_schemaNameOverwrites!=null) { _schemaNameOverwrites.SchemaNameUsageSetting = value; } } }

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 11-May-2011 18:13:48   

Instead DataAccessAdapter has SchemaNameOverwrites property of type SchemaNameOverwriteHashtable.

1  /  2