cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy Script Intelli J create message

rasjoshi
Active Contributor
0 Kudos

Hi,

I am trying to create Message Class Under package --> com.sap.gateway. ip.core.customdev.util

However, when I right click on this package name I dont see any option to create class.

Please help me to understand where I am doing wrong.

Source :- Developing Groovy Script (E-Bites) Page No - 90.

BR,

Rashmi

MortenWittrock
Active Contributor
0 Kudos

Hi Rashmi

Please keep in mind to accept the answer, now that you've gotten an answer that solved your problem.

Regards,

Morten

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor

Hello Rashmi,

In the package name that you have created (com.sap.gateway. ip.core.customdev.util), there is a space character (a character before ip), whereas space characters are not permitted in Java package names. As a result, IntelliJ IDEA treats that not as a package, but as a regular folder (you might notice a difference in the icon that is used for that - icons used for packages and icons used for regular directories are slightly different). Please, refactor (rename) the package that you created by removing a space from it (com.sap.gateway. ip.core.customdev.util shall be renamed to com.sap.gateway.ip.core.customdev.util), and you shall notice that the created directory will turn into a package, and when that happens, you shall get additional context menu items for it that shall enable you to create Java-related artifacts (such as Java classes).

Regards,

Vadim

rasjoshi
Active Contributor
0 Kudos

Thanks Vadim, I am able to get the Groovy Class option now.

However, I am getting below error now. Any idea what can I do to fix this?

Class 'Message' already exists in 'com.sap.gateway.ip.core.customdev.util'

TIA,

Rashmi

engswee
Active Contributor

Hi rashmi.joshi4

You have additional dependencies in the Mock Message project that should not be there - script api and generic api. I recommend that you refer to the bundle that was provided together with the E-Bite, it gives you an IntelliJ IDEA project that you can refer to.

Also, I noticed that your Groovy version is above that being used in the current CPI tenants. Please refer to Listing 3.1 (Page 43) to find out how you can determine the right Groovy version and use it accordingly.

Regards,

Eng Swee

rasjoshi
Active Contributor
0 Kudos

Thanks engswee.yeoh , I think I better start new project 🙂

Thanks for the version mismatch catch, I will restart with intelli again.

BR,

Rashmi

Answers (2)

Answers (2)

JohnColtrane
Explorer
0 Kudos

Nevermind, I resolved the issue.

JohnColtrane
Explorer
0 Kudos

I can not find this maven library in IntellJ: org.apache.camel:camel-core:2.17.4 Is there a workaround? I can I import this global library?

Mark