cancel
Showing results for 
Search instead for 
Did you mean: 

Missing library sap.ui.commons

Former Member
0 Kudos

Dear community,

my initial setup was HANA studio with the UI5 plugins installed via repository from HANA On-demand. This works so far fine. I was able to create a first simple application. However, I wanted to deploy the application on a ABAP system so I decided to install a new eclipse with the necessary plugins ABAP development tools, UI5 + Teamprovider. The releases fits to the ABAP server software component and I was also able to share my new "hello world" project via the team provider. Now I wanted to add some UI5 elements via code completion. I have noticed that the code completion does not work for sap.ui.commons.TextView. The UI5 Core Library is already added to the project as java script library. Then I have compared the installation with my installation in the HANA studio. I have noticed that in my project (new eclipse installation) under Java Script Resources -> SAPUI5 Core libraries there is no sap.ui.commons, but in the HANA studio installation I found it. Given the fact that I want to use the code completion I wonder how I can fix this?

The UI5 installation in the HANA studio is on release 1.24.5 and in the new eclipse installation I have the release 1.26.1.

Any recommendations?

Thx in advance.

Cheers,
Marcel

Accepted Solutions (0)

Answers (10)

Answers (10)

0 Kudos

Please try to reinstall plugins

mornee_parsons
Explorer
0 Kudos

That didn't work.

I even tried to use Mars and Luna, but alas, still the same

salvatore_bruno
Explorer
0 Kudos

Hi Guys,

With plugin 1.26.9 all has been restored.

Templates for libraries and classes are now prompted after CTRL+SPACE (or .) typing.

erich_kowald3
Explorer
0 Kudos

Hello,

it is now better.

But it is still no code completion for some parts of "sap.ui.core."

And in this case it can not be used the workaraound above, as it the "sap.ui.core.js" is ignored.

frank_weigel
Employee
Employee
0 Kudos

sap.ui.core.js also contains the JSDoc documentation for the following packages

jQuery.sap.

sap.ui.

sap.ui.base

sap.ui.core

sap.ui.model

Eclipse shows the special behaviour that if it doesn't understand the JSDoc comment for a symbol in a file, it stops processing that file. As a side effect, any later JSdoc comment in that file is ignored.

I assume that Eclipse has an issue with some documentation in sap.ui.core.js and therefore stops analysing it.

We need to check where this breaks.

frank_weigel
Employee
Employee
0 Kudos

I guess I found it: the documentation for sap.ui.model.analytics.odata4analytics.Model uses an unsupported syntax for an optional method parameter:

* @param {object} mParameter?

Unfortunately, JSDoc doesn't complain and just pretends that the parameter is named "mParameter?". We propagate that into the sap.ui.core.js and Eclipse stops analysing it there:

  sap.ui.model.analytics.odata4analytics.Model = function(oModelReference,mParameter?) {};

We'll fix that documentation in 1.28 and later. For 1.26, no more patches will be produced as 1.28 is already out now.

Former Member
0 Kudos

but it seems that even with the most recent Version (1.34.7) the issue is not fixed completely. Here is how my Project Looks for the sap.m library:

And consequently the autocomplete is not working properly

I wonder if this is something that is being investigated by SAP.

mornee_parsons
Explorer
0 Kudos

Same for me...

I tried with Mars and Luna, with latest updates, but still the same...

0 Kudos

Hi,

Where exactly in a default Eclipse (Luna) installation can the "sap.ui.commons.js" file be found?

Best Regards,

Sebastian

salvatore_bruno
Explorer
0 Kudos

Hello,

same issue on both Kepler and Luna Eclipse.

Has someone sorted out this issue in the meanwhile?

frank_weigel
Employee
Employee
0 Kudos

Hi all,

there is indeed a problem with code completion in 1.26.x versions. The JSDoc inventory files (sap.ui.commons.js, sap.ui.ux3.js etc.) are missing for all libraries that now are part of OpenUI5 (sap.ui.core, sap.ui.commons, sap.ui.table, sap.ui.ux3, sap.ui.layout, sap.ui.unified, sap.ui.suite, sap.m, sap.ui.demokit).

We are working on a fix for that in the 1.26 codeline. It should be contained in one of the next patches. I'll post it here when the exact version is clear.

BTW: The libraries are not completely missing in the IDE, just the inventory files that are used for code completion. Unfortunately, Eclipse also uses these files to display the package structure of the content of a library. So it looks as if the whole library would be missing. The inventory files are not needed at runtime or for testing, only for the Eclipse JS tooling (Eclipse is not able to understand the structure and JSDoc of the runtime files so we create those inventory files during the build).

Kind Regards, Frank

salvatore_bruno
Explorer
0 Kudos

Hello Frank,

thank you for your reply.

Keep please us updated since is an important matter right now.

Is there a workaround in the meanwhile?

Salvatore.

NilsR
Explorer
0 Kudos

Hi Salvatore,

pls see Holger's workaround above, it works for me.

Nils

matthias_arn
Discoverer
0 Kudos

I am using Eclipse "Luna" and with the latest update to UI5 Dev Toolkit 1.26.10 (via update site.. https://tools.hana.ondemand.com/luna/) code autocompletion works just fine. hope it does the same for you

Former Member
0 Kudos

Was it solved by anyone ? or anyone got a workaround for it ?

I have sapui5 1.26.3 library on my sapui5 projects in eclipse luna and not able to use code completion for sap.ui.commons...

Regards,

KK

Former Member
0 Kudos

Hi Kris,

Please check the below links.

SAPUI5 SDK - Demo Kit

SAPUI5 SDK - Demo Kit

Cheers

Pandu

Former Member
0 Kudos

Hi Pandu,

thanks for your help but I think that everybody already did that. I think that because we can see some libraries but not all.

Former Member
0 Kudos

Hello,

I had the same problems.

Today I installed Eclipse Luna with UI Development Toolkit for HTML5 but unfortunately the library com.sap.ui5.commons_1.26.4.jar does not contain the file sap.ui.commons.js.

I had an older version of this library, extraced the sap.ui.commons.js file and included it in my project.

Since the file is now known to Eclipse, I can use the code completion

So far I've seen no problems with this workaround.

I know, it's not a real solution but a possible workaround as long as the function signatures in sap.ui.commons.js aren't to different.

I hope they fix this problem in the next version and include sap.ui.commons.js.

NilsR
Explorer
0 Kudos

Hi Holger,

I have still the same problem like you. Could you tell me how your workaround works. Where & how have you imported the "old" *commons.js file in your project?

Thx

Nils

Former Member
0 Kudos

Hi Nils,

there are two possible ways:

1. the easy way:

Copy sap.ui.commons.js into the WebContent folder of your project and refresh the project.

Note: You shouldn't submit sap.ui.commons.js to your SAPUI5 ABAP Repository to avoid problems. (I think it is not even possible.)

2. the better way (if you have many projects):

- Open the properties of your project

- Select JavaScript -> Include Path

- Press button 'Add JavaScript Library'

- Select 'User Library' in the dialog, press 'Next'

- Press button 'Configure User Libraries' (a new Dialog will open)

- Press 'New...' and input a name (e.g. 'Missing SAPUI5 libraries')

- Mark the new entry ('Missing SAPUI5 libraries') and press 'Add .js file...' to add sap.ui.commons.js

- Close the dialog

- Select the new User library and press 'Finish'

- Press 'OK' to leave the properties of your project

Now the code completion should work if you input sap.ui.comm...

I hope this solves your problem.

Best regards,

Holger

NilsR
Explorer
0 Kudos

Great it works. Hopefully SAP will fix this issue soon.

Best regards

Nils

Former Member
0 Kudos

Have the same issue with my installation. I have installed Luna..

Is there a workaround ? Or can i force the sap.ui.commons library into the project somehow ?

Former Member
0 Kudos

Hi Marcel,

can you take a look into: Your project --> Java Resources --> Libraries ? In this I found some Core Libraries like the common library you are missing.

It looks like they are declared in a wrong way.

Former Member
0 Kudos

Hi Nils,

unfortunately there is nothing from UI5 in the Java Resources.

Thx anyway.

BR,
Marcel

Former Member
0 Kudos

Hi,

that is interesting because my project looks like this:

Qualiture
Active Contributor
0 Kudos

I have upgraded to 1.26.3, and I noticed the 3 Javascript libraries sap.ui.commons.* were now removed. However, code completion still works.

The SAPUI5 Java libraries looked like that as well (created SAPUI5 Application project from the Projects wizard).

I have removed them from my project, rebuild, but still, code completion for sap.ui.commons still works as (un-)expected:

Former Member
0 Kudos

Hi Marcel,

I am having the same problem. Just updated to 1.26.3 and seemed to have lost sap.ui.commons library and a few others from Eclipse.

Hope you have found some solution?

Former Member
0 Kudos

Unfortunately, no solution.

manuel_thoma
Explorer
0 Kudos

Hi Marcel,

have you fixed your problem?

I have the same problem. Maybe you have now any solutions.

Former Member
0 Kudos

Unfortunately, no solution at the moment.

former_member182372
Active Contributor
0 Kudos

How did you create a project? Whats in JavaScript->Include Path? Same as below?

Former Member
0 Kudos

I have created the project as described in the How-to documents with the E2E Scenario using SAP Gateway and UI5.

Here we have the new eclipse installation with the missing library.

And here the HANA studio installation with the library:

Best Regards,

Marcel

former_member182372
Active Contributor
0 Kudos

hm, the only thing I can think of - update plugins, or may be even reinstall them from scratch

Former Member
0 Kudos

I have re-installed it several times, but without any sucess. However I have compared HANA Studio and eclipse Installation and I have noticed that I have in the HANA studio installation 4 features and in eclipse only 3.

However I have asked a colleague and he has the missing library in his project, but the code completetion also doesn't work.

Any ideas?

Thx in advance.

Best Regards,

Marcel

kedarT
Active Contributor
0 Kudos

Hi Marcel,

Which version of eclipse are you using?

I hope you are using Eclipse Luna with plugins from https://tools.hana.ondemand.com/luna

former_member182372
Active Contributor
0 Kudos

can you search for sap.ui.commons.js in \eclipse\configuration\org.eclipse.osgi\

is it there?

Former Member
0 Kudos

No, I don't use Luna. I'm using Juno.

Former Member
0 Kudos

The file is there, but still not working. I will try another new installation.

Former Member
0 Kudos

I have installed now Luna and I have installed the plugins downloaded from SMP. The same problem as before. I don' get it - I don't want to install it from hana on demand site because I want to have the same UI5 versions as my AS ABAP.

Any further hints?

former_member182372
Active Contributor
0 Kudos

I'v never done scenario like that, but my 5 cents - is your version gap pretty significant? Higher version means mostly new controls/classes/methods/properties/events/aggragations. If you try to run an existing project that should not bother you.

And last point, for code completion WebStorm is MUCH better 😉