Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Getting an error on the Liferay training
I 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
Can you elaborate on "it goes away"? How do you add the dependencies to the build path?
I 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.
Related 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"
I 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"
Powered by Liferay™