Message Boards
Getting an error on the Liferay training
Getting an error on the Liferay training
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsI am following the training 'Backend Modules- Developing real world applications' and getting an error in the 'AssignmentServiceSoap.java'
"The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files". I added the javax.servlet and portlet.api-3.0.0 to the build path, but when I build the gradle project, it goes away and the error comes back.
thanks,
Anu
RE: Getting an error on the Liferay training
Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent PostsCan you elaborate on "it goes away"? How do you add the dependencies to the build path?
RE: Getting an error on the Liferay training
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsI add dependencies to the build path by right clicking the project -> Build Path -> Configure Build Path and added the external jars, javax.servlet.jar and portlet-api-3.0.0.jar. The error goes away temporarily but when I refresh the gradle, the added jars are gone and the error is showing again.
RE: Getting an error on the Liferay training
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsRelated issue :- When I build my jar, I get the following error
Execution failed for task ':gradebook-service:compileJava'.
>
Could not resolve all files for configuration
':gradebook-service:compileClasspath'.
> Could not find
javax.portlet:portlet-api:.
Required by:
project :gradebook-service
> Could not find
javax.servlet:javax.servlet-api:.
Required by:
project :gradebook-service
I have the following dependencies in my build.gradle
compileOnly group: "javax.portlet", name:
"portlet-api"
compileOnly group:
"javax.servlet", name: "javax.servlet-api"
RE: RE: Getting an error on the Liferay training
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsI got it resolved. I had to put the version number. Entered the following lines and it is compiling fine now
compileOnly group: "javax.portlet", name:
"portlet-api", version: "2.0"
compileOnly
group: "javax.servlet", name: "javax.servlet-api",
version: "3.0.1"