cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade from 4.1.3 to 5.0

hardik1512
Star Contributor
Star Contributor
I am upgrading Alfresco 4.1.3 EE to Alfresco 5.0.0 EE.
My code uses class Repository(org.alfresco.web.bean.repository.Repository) which is in alfresco-web-client-4.1.3.jar file.
But it seems that this jar is removed in Alfresco 5. 

So which class should I use instead of this? Or will this class be in any othe JAR?

I am using certain methods like Repository.getStoreRef(), Repository.getNameForNode etc.
7 REPLIES 7

afaust
Legendary Innovator
Legendary Innovator
Hello,

the web client / Explorer has been fully removed in Alfresco 5 - the class has not moved into any other JAR. For most of the functionality of the Repository class you could probably use a combination of NodeService, FileFolderService and SearchService to get what you need. It may be that you'd end up moving some of the utility methods previously contained in the Repository class to your own source code.

Regards
Axel

Hi Axel,

Thanks for your reply.

I have found that the classes of alfresco-web-client-4.1.3.jar are there in alfresco 5 but not in JAR. They are @ path \tomcat\webapps\alfresco\WEB-INF\classes\org\alfresco.  I think I can use this path in build path to compile my code in eclipse. I don't need to change anything. Is this approach right?

afaust
Legendary Innovator
Legendary Innovator
Hello,

you're right, they are there - but they shouldn't be. This Looks like an error in the Alfresco build to me and I would not rely on them being available in all Alfresco 5 Versions, e.g. in future service packs.
The best Approach in my opinion would be to refactor any code that relies on web client and remove the dependencies via direct Access to Alfresco services or custom utilities.

Regards
Axel

hardik1512
Star Contributor
Star Contributor
Hello,

I have refactored the code. Thanks.

I am using postgres as DB. It seems as there are changes in Alfresco's tables in 4.1.3 and 5.0 versions. So how do I restore my database?? Is there any guideline for this?

afaust
Legendary Innovator
Legendary Innovator
Hello,

I don't quite understand why you want to restore the database just now.
Basically, if you want to restore an old database backup (based on 4.1.3) you have to make sure that the old version of Alfresco is installed on the server to be able to use it (for verficiation) and then re-apply the 5.0 upgrade (unless you want to revert fully to 4.1.3).

Regards
Axel

hardik1512
Star Contributor
Star Contributor
Hello,

I meant how do I get data of Alfresco 4.1.3 tables to Alfresco 5 tables as there is change of schema. But it went through.

When I pointed my Alfresco 5 server to a restored DB of 4.1.3  and started server, alfresco applied upgrade scripts and DB schema was changed accordingly. I got couple of errors though but solved it by applying scripts.

i) org.postgresql.util.PSQLException: ERROR: constraint "act_ru_execution_proc_def_id__business_key__key" of relation          "act_ru_execution" does not exist . 
Solved by script
ALTER INDEX act_ru_execution_proc_def_id__key RENAME TO act_ru_execution_proc_def_id__business_key__key;

ii) org.postgresql.util.PSQLException: ERROR: constraint "act_hi_procinst_proc_def_id__business_key__key" of relation "act_hi_procinst" does not exist
Solved by script
ALTER INDEX act_hi_procinst_proc_def_id__key RENAME TO act_hi_procinst_proc_def_id__business_key__key;

hardik1512
Star Contributor
Star Contributor
Hello,

After upgrading, when any user login I get following exceptions
i) LESS for Java Engine error compiling: 'js/alfresco/core/css/ProcessWidgets.css': com.asual.lesscss.LessException: Name Error: variable @standard-border is undefined

ii) LESS for Java Engine error compiling: 'js/alfresco/debug/css/WidgetInfo.css': com.asual.lesscss.LessException: Name Error: variable @large-font-size is undefined

Few more similar errors.

I have not changed any of these css files.

Any idea how to solve this?