liferay-7java-service-wrapperliferay-hook

Unable to import service wrapper module in other module in Liferay-7 GA5


I am new in life-ray.I created a service wrapper UserLocalServiceWrapper name test wrapper .Now i Tried to use test wrapper in different module.But it's giving dependency issue.And the strange thing is i can not able to see the errors.I have attached screenshot with this questing for better clarity.

build.gradle of test wrapper

dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"

}

build.gradle of other module

dependencies {
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
    compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
    compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
    compileOnly group: "jstl", name: "jstl", version: "1.2"
    compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
    compileOnly group: "com.liferay.portal", name: "portal-service", version: "6.1.1"
    compile project(":modules:testWrapper")
}

Please let me know i am using correct dependency jar or is there anything is else that i forgot to add

I am importing test wrapper package in my jsp page

when i am adding above line in my jsp i am getting error please check server section

when i removed that line the error gone enter image description here


Solution

  • Check .bnd file of testwrapper and make sure you have exported the package. using following property.

    Export-Package: \ testWrapper,\

    In eclipse right click on project and do Gradle Refresh.