Javadoc says package doesnt exist in all the imports. This same setup worked for Java1.8 but with java 11 it has this issue
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9:jar (attach-javadocs) on project esymac: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /home/JDK/com/SelfMonServiceLocator.java:23: error: package com does not exist
[ERROR] import com.SelfMonConstants;
[ERROR] ^
It was working in java1.8 properly with the same classes and pom.xml. But with java11 it fails to find packages.
Related
I run maven using mvn clean verify -U -e -DskipITs=true
and get the following compilation error. When I run with the debug option -X it points me to the https://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException but I cannot find the underling problem.
These packages are part of the magnolia-pages-app-5.6.4.jar with is
in my .m2 directory under
/Users/asusti/.m2/repository/info/magnolia/pages/magnolia-pages-app/5.6.4/magnolia-pages-app-5.6.4.jar
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/asusti/Projects/xxx-wcms/xxx-module-versioning/src/main/java/ch/xxx/module/versioning/VersionSelector.java:[5,38] package info.magnolia.pages.app.editor does not exist
[ERROR] /Users/asusti/Projects/xxx-wcms/xxx-module-versioning/src/main/java/ch/xxx/module/versioning/VersionSelector.java:[6,48] package info.magnolia.pages.app.editor.extension does not exist
[ERROR] /Users/asusti/Projects/xxx-wcms/xxx-module-versioning/src/main/java/ch/xxx/module/versioning/VersionSelector.java:[12,38] cannot find symbol
symbol: class AbstractExtension
[ERROR] /Users/asusti/Projects/xxx-wcms/xxx-module-versioning/src/main/java/ch/xxx/module/versioning/VersionSelector.java:[15,17] cannot find symbol
symbol: class PageEditorPresenter
location: class ch.xxx.module.versioning.VersionSelector
[ERROR] /Users/asusti/Projects/xxx-wcms/xxx-module-versioning/src/main/java/ch/xxx/module/versioning/VersionSelector.java:[18,83] cannot find symbol
symbol: class PageEditorPresenter
location: class ch.xxx.module.versioning.VersionSelector
I added this into my module's pom file and after that maven worked:
<!-- magnolia pages extensions for pagebar functionality -->
<dependency>
<groupId>info.magnolia.pages</groupId>
<artifactId>magnolia-pages-app</artifactId>
<version>5.6.4</version>
</dependency>
By executing a mvn clean package I see a strange maven output:
[ERROR] /home/user/Desktop/mycompany/myapp/server/src/main/java/com/mycompany/myapp/representation/rest/RestControllerAdvice.java:[8,38] error: cannot find symbol
[ERROR] symbol: class InvalidPropertyValueException
[ERROR] location: package com.mycompany.myapp.exception
So, I searched the row nr. 8 in that class and I found this one
import org.springframework.web.bind.annotation.ExceptionHandler;
But, the line which is referred to InvalidPropertyValueException is 2 rows before:
import com.mycompany.myapp.exception.InvalidPropertyValueException;
And, the strange thing, in the package com.mycompany.myapp.exception I didn't found any class or file named InvalidPropertyValueException. But Eclipse accept it and present me in the option list. And this class don't generate any error or red line.
Try maven->update project this error may go out.
On Project Explorer, right-click on the parent module
select maven, then select Update Project
I'm trying to create a fresh Java application using Play Framework 2.2.3, I run JDK 1.8.0_60.
Running play new does work and generates the project I want, however when I try to set it to work with Eclipse Luna by typing play eclipse it fails to compile and writes this:
[info] About to create Eclipse project files for your project(s).
[info] Compiling 4 Scala sources and 2 Java sources to D:\EclipseTest\FileUpload
\target\scala-2.10\classes...
[error] D:\EclipseTest\FileUpload\app\controllers\Application.java:3: error: pac
kage play does not exist
[error] import play.*;
[error] ^
[error] D:\EclipseTest\FileUpload\app\controllers\Application.java:4: error: pac
kage play.mvc does not exist
[error] import play.mvc.*;
[error] ^
[error] D:\EclipseTest\FileUpload\app\controllers\Application.java:8: error: can
not find symbol
[error] public class Application extends Controller {
[error] ^
[error] symbol: class Controller
[error] D:\EclipseTest\FileUpload\app\controllers\Application.java:10: error: ca
nnot find symbol
[error] public static Result index() {
[error] ^
[error] symbol: class Result
[error] location: class Application
[error] D:\EclipseTest\FileUpload\app\controllers\Application.java:11: error: ca
nnot access Html
[error] return ok(index.render("Your new application is ready."));
[error] ^
[error] class file for play.api.templates.Html not found
[error] 5 errors
[error] (compile:compile) javac returned nonzero exit code
[error] Could not create Eclipse project files:
[error] Error evaluating task 'dependencyClasspath': error
I tried looking up the solution but all solutions refer to Scala. I saw a solution which modified the build.sbt, saying the code parts couldn't find the libraries they depend on. I removed the libraries found in the Seq section, but it was unhelpful.
EDIT:
Here's my build.sbt file:
name := "FileUpload"
version := "1.0-SNAPSHOT"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache
)
play.Project.playJavaSettings
And my project/plugins.sbt:
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.3")
EDIT 2:
In the log above it says that the play libraries are missing: play.*, play.mvc.* & play.api.templates.Html. How could this be though? I only just created the project.
The problem was the location of my Play library files had characters that were not English nor numerical, such a rookie mistake...
During using mvn install or mvn compile i got error that maven can not find symbol with different methods and variables in mozilla rhino classes. I made exclusions everywhere where it is possible and said to use 7r5 build for rhino. Also i decompiled jar and got sure that mentioned classes and methods in maven were in that classes. I had pom deps and i couldnt exclude all 3d libraries. So in classpath i saw also path to rhino 6r5 library. I thought that problem was there. So i also decompiled that jar but i saw that methods in the error were also there. My question is how i can debug maven and see what library or class it is using for compiling class. All mozilla rhino libraries which are set in classpath have that methods.
PS: I wanted to mention that mvn eclipse:eclipse works fine and i have no errors in eclipse.
[ERROR] ...path_to_class...:[264,65] cannot find symbol
[ERROR] symbol: method getLength()
[ERROR] location: class org.mozilla.javascript.NativeArray
[ERROR] ...path_to_class...:[288,18] cannot find symbol
[ERROR] symbol: method getWrapFactory()
[ERROR] location: variable cx of type org.mozilla.javascript.Context
[ERROR] ...path_to_class...:[322,49] cannot find symbol
[ERROR] symbol: method getLength()
[ERROR] location: variable array of type org.mozilla.javascript.NativeArray
I download Weasis code and run it on Eclipse using maven.
Now I create a new class that use JMF so I want to add jmf.jar.
I follow the answers from here but I take the follow
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project weasis-base-ui: Compilation failure: Compilation failure:
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[14,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[15,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[16,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[17,19] package javax.media does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[18,27] package javax.media.control does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[19,26] package javax.media.format does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[20,24] package javax.media.util does not exist
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[33,26] cannot find symbol
[ERROR] symbol: class Player
[ERROR] location: class org.weasis.base.ui.gui.WeasisVideo
[ERROR] /C:/Users/Ioanna/git/Weasis/weasis-base/weasis-base-ui/src/main/java/org/weasis/base/ui/gui/WeasisVideo.java:[36,12] cannot find symbol
[ERROR] symbol: class Buffer
Do anyone know what is the problem. The class file that I used the jmf function doesn't appears errors.