Here's a sample Error message from Errai compilation:
[INFO] Rule did not match
[INFO] Found better fallback match for <replace-with class='com.google.gwt.logging.client.LogConfiguration.LogConfigurationImplRegular'/>
[INFO] Checking rule <generate-with class='org.jboss.errai.marshalling.rebind.MarshallerGenerator'/>
[INFO] Checking if all subconditions are true (<all>)
[INFO] <when-assignable class='org.jboss.errai.marshalling.client.api.GeneratedMarshaller'/>
[INFO] Yes, the requested type was assignable
[INFO] Yes: All subconditions were true
[INFO] Rule was a match and will be used
[INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallerGenerator
[INFO] Type 'org.jboss.errai.marshalling.client.api.Marshaller_a_j_l_StackTraceElement_D1_Impl' already exists and will not be re-created
[INFO] Generator returned type 'org.jboss.errai.marshalling.client.api.Marshaller_a_j_l_StackTraceElement_D1_Impl; mode USE_EXISTING; in 0 ms
[INFO] Rebind result was org.jboss.errai.marshalling.client.api.Marshaller_a_j_l_StackTraceElement_D1_Impl
[INFO] Shutting down PersistentUnitCache thread
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:52 min
My question is how to get into the actual error that needs to be fixed or at least something more detailed.
Related
Recently I've observed a (at least for me) strange behavior of the Java Compiler "ToolProvider.getSystemJavaCompiler()".
If I try to compile a not-compilable java file in a "bare" maven project, I can obtain the errors as expected.
If I add certain dependencies (I've first observed this when adding log4j), the compiler does not provide any information regarding compiler errors anymore.
To demonstrate this behavior, I've created an example repository for this: https://github.com/dfuchss/JavaCompilerIsStrange
In this repository I've added a simple main method that tries to parse the AST of an invalid Java File. The main method throws an exception if the diagnostics object contains no errors. This main method will be invoked by a single test.
In my pom.xml I've created a profile "strange" that simply adds a dependency to the project (that is not used but obviously will be added to the classpath after activating the profile). For this example it's the "metainf-services" dependency.
In the run.sh file, I simply execute mvn test twice.
First without the profile activated and after that with the activated profile.
If you run the script you get a successful test (because the invalid syntax was detected) and an failed test (because the invalid syntax was not detected after adding the dependency)
## Build without activated profile
[INFO] Scanning for projects...
[....]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running SimpleExecTest
src/main/resources/Example.java:4: error: ';' expected
System.out.println("Hello World!")
^
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.19 s - in SimpleExecTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.832 s
[INFO] Finished at: 2022-06-24T00:57:46+02:00
[INFO] ------------------------------------------------------------------------
## Build with activated profile
[INFO] Scanning for projects...
[....]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running SimpleExecTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.203 s <<< FAILURE! - in SimpleExecTest
[ERROR] SimpleExecTest.testMain Time elapsed: 0.171 s <<< ERROR!
java.lang.Error: Shall not be possible to compile.
at org.fuchss.Main.main(Main.java:46)
at SimpleExecTest.testMain(SimpleExecTest.java:7)
[....]
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] SimpleExecTest.testMain:7 ยป Shall not be possible to compile.
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.323 s
[INFO] Finished at: 2022-06-24T00:57:54+02:00
[INFO] ------------------------------------------------------------------------
[....]
Does anyone has an idea how to resolve this behavior?
EDIT:
mvn dependency:tree does not show any further dependency (compile) for "metainf-services"
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # strange ---
[INFO] org.fuchss:strange:jar:1.0-SNAPSHOT
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.8.2:test
[INFO] | +- org.junit.platform:junit-platform-engine:jar:1.8.2:test
[INFO] | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | \- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] \- org.kohsuke.metainf-services:metainf-services:jar:1.9:compile
Edit II: I've added the output mvn -X clean verify without and with activated profile to https://github.com/dfuchss/JavaCompilerIsStrange/blob/main/result.txt
You can "fix" this problem by disabling annotation processing:
final JavaCompiler.CompilationTask task = javac.getTask(
null, fileManager, listener, List.of("-proc:none"), null, javaFiles
);
This looks like a bug in the JDK to me: when annotation processing is meant to happen (which doesn't seem to require an explicit annotation processor being used, hence this problem occurs with dependencies like log4j) the error reporting is wrapped in a DeferredDiagnosticHandler. I think the intention is that after the processing is done, reportDeferredDiagnostics() will be called, which will transfer the diagnostics to the original handler, but for some reason this isn't happening.
A bit more time with the debugger would answer this properly.
I'm exploring DocdokuPLM.
To Install docdoku I have used the docker configuration file which can be found here.
Using it have configured and installed Docdokuplm in my localhost.
Now not sure why sample project is not getting imported.
To import and check sample project I have used the following command.
sudo ./platform-ctl insert-sample MY_LOGIN_USER_ID MY_PASSWORD
While running the command to import sample project i'm getting the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.571 s
[INFO] Finished at: 2019-01-31T07:29:36+00:00 [INFO] Final Memory: 34M/301M
[INFO] ------------------------------------------------------------------------
[INFO] - No workspace name supplied, generating one...
[INFO] - Using wks-a72fca63 as workspace name
[INFO] - Starting load process...
[INFO] - Checking server availability...
[INFO] - Creating your account...
[INFO] - Creating account [sommesh29]
[INFO] - Cannot create account, trying to use given credentials for next operations
[INFO] - Creating workspace...
[INFO] - Adding user sommesh29 to workspace wks-a72fca63
[SEVERE] - Ooops, something went wrong while loading sample data : Not Found Not Foundcom.docdoku.api.client.ApiException: Not Found
at com.docdoku.api.client.ApiClient.handleResponse(ApiClient.java:838)
at com.docdoku.api.client.ApiClient.execute(ApiClient.java:773)
at com.docdoku.api.client.ApiClient.execute(ApiClient.java:757)
at com.docdoku.api.services.WorkspacesApi.addUserWithHttpInfo(WorkspacesApi.java:833)
at com.docdoku.api.services.WorkspacesApi.addUser(WorkspacesApi.java:819)
at com.docdoku.loaders.SampleLoader.addUserToWorkspace(SampleLoader.java:304)
at com.docdoku.loaders.SampleLoader.load(SampleLoader.java:88)
at com.docdoku.loaders.Main.main(Main.java:73)
what am i doing wrong ?
Is this a issue from my side or is this issue occurring from Docker file?
I have been trying to scan a java project (ArgoUML) with the sonar scanner and I'm getting the following error when using sonar-scanner in the project directory:
ERROR: Error during SonarQube Scanner execution
ERROR: Please provide compiled classes of your project with sonar.java.binaries property
The project is cloned from this repo:
https://github.com/cscorley/argouml-mirror
I tried building with maven using mvn package and mvn install but every time I'm getting an error. The last error that I got is:
Results :
Failed tests:
Tests in error:
Tests run: 1106, Failures: 2, Errors: 8, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] argouml-core 0.35.2-SNAPSHOT ....................... SUCCESS [ 0.898 s]
[INFO] argouml-core-model ................................. SUCCESS [ 0.783 s]
[INFO] argouml-core-model-mdr ............................. SUCCESS [ 8.167 s]
[INFO] argouml-core-model-euml ............................ SUCCESS [ 0.162 s]
[INFO] argouml-app ........................................ FAILURE [04:55 min]
[INFO] argouml-core-notation .............................. SKIPPED
[INFO] argouml-core-transformer ........................... SKIPPED
[INFO] argouml-core-umlpropertypanels ..................... SKIPPED
[INFO] argouml-core-diagrams-activity2 .................... SKIPPED
[INFO] argouml-core-diagrams-class2 ....................... SKIPPED
[INFO] argouml-core-diagrams-sequence2 .................... SKIPPED
[INFO] argouml-core-diagrams-state2 ....................... SKIPPED
[INFO] argouml-core-diagrams-structure2 0.35.2-SNAPSHOT ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:05 min
[INFO] Finished at: 2018-05-03T12:07:31+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.8.1:test (default-test) on project argouml: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/redhood148/Documents/git/argouml-mirror/src/argouml-app/target/surefire-reports for the individual test results.
Any suggestions how I can fix this?
Let me know if you need more info.
Thanks.
I do not exactly know the reason for this, but can help you with the solution that worked for me.
You must have mentioned the source path under "sonar.sources" in your configuration specifying the source package from where code needs to be scanned.
eg. sonar.sources=/home/workspace/codecoveragejob/Test_project/Test_project_service/src
along with this property, set another property under "sonar.java.binaries" and provide same value as "sonar.sources".
So it would look something like this:
sonar.sources=/home/workspace/codecoveragejob/Test_project/Test_project_service/src
sonar.java.binaries= /home/workspace/codecoveragejob/Test_project/Test_project_service/src
Hope that helps...
You have unit tests in argouml-app that are failing. You can either fix the code or the tests so that they pass. Or you can just skip the tests by running mvn install -DskipTests when building the project. This will allow you to build the project and produce the binaries that Sonar needs.
Having this class in a maven project:
package test;
public class A {
/**
* Used by {#link B#setC(C)}.
* Used by {#link A.B#setC(C)}.
* Used by {#link test.A.B#setC(C)}.
*/
public class C {
}
public class B {
public void setC(C c) {
System.out.println("hello!");
}
}
}
Gives me this warning:
C:\Users\user\workspace\t>mvn clean javadoc:javadoc
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building t 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # t ---
[INFO] Deleting C:\Users\user\workspace\t\target
[INFO]
[INFO] >>> maven-javadoc-plugin:2.10.4:javadoc (default-cli) > generate-sources # t >>>
[INFO]
[INFO] <<< maven-javadoc-plugin:2.10.4:javadoc (default-cli) < generate-sources # t <<<
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.4:javadoc (default-cli) # t ---
[WARNING] Source files encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO]
Loading source files for package test...
Constructing Javadoc information...
Standard Doclet version 1.8.0_101
Building tree for all the packages and classes...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\A.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\A.B.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\A.C.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\package-frame.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\package-summary.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\package-tree.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\constant-values.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\class-use\A.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\class-use\A.C.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\class-use\A.B.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\test\package-use.html...
Building index for all the packages and classes...
Generating C:\Users\user\workspace\t\target\site\apidocs\overview-tree.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\index-all.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\deprecated-list.html...
Building index for all classes...
Generating C:\Users\user\workspace\t\target\site\apidocs\allclasses-frame.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\allclasses-noframe.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\index.html...
Generating C:\Users\user\workspace\t\target\site\apidocs\help-doc.html...
3 warnings
[WARNING] Javadoc Warnings
[WARNING] C:\Users\user\workspace\t\src\main\java\test\A.java:9: warning - Tag #link: can't find setC(C) in test.A.B
[WARNING] C:\Users\user\workspace\t\src\main\java\test\A.java:9: warning - Tag #link: can't find setC(C) in test.A.B
[WARNING] C:\Users\user\workspace\t\src\main\java\test\A.java:9: warning - Tag #link: can't find setC(C) in test.A.B
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.521 s
[INFO] Finished at: 2016-12-02T10:10:28+01:00
[INFO] Final Memory: 17M/309M
[INFO] ------------------------------------------------------------------------
C:\Users\user\workspace\t>
Why does javadoc say he can not find the method?
Try Used by {#link A.B#setC(A.C)}.
I am now learning how to integrate wicket and enunciate by following this article http://docs.codehaus.org/display/ENUNCIATE/A+Rich+Web+service+API+for+Wicket. But the results is different from that site. The api folder was succesfully generated but when I pointed to the API in xml or json or rest or soap, I can't access them.
Here are info I got when I tried to "mvn:jetty-run" in cmd :
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wicket Examples 1.5.7
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> jetty-maven-plugin:7.4.2.v20110526:run (default-cli) # wicket-example
s >>>
[WARNING] Could not transfer metadata org.jvnet.staxex:stax-ex/maven-metadata.xm
l from/to java.net.1 (http://download.java.net/maven/1): No connector available
to access repository java.net.1 (http://download.java.net/maven/1) of type legac
y using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] --- maven-enunciate-spring-plugin:1.18:assemble (default) # wicket-exampl
es ---
[INFO] C:\Users\AGI\Downloads\apache-wicket-1.5.7\src\wicket-examples\enunciate.
xml exists, so it will be used.
[INFO] initializing enunciate.
[INFO] invoking enunciate:generate step...
[INFO] [c] Skipping C code generation because everything appears up-to-date.
[INFO] [csharp] Skipping C# code generation because everything appears up-to-dat
e.
[INFO] [jaxws-ri] Skipping generation of JAX-WS RI support as everything appears
up-to-date....
[INFO] [jaxws-support] Skipping JAX-WS support generation as everything appears
up-to-date...
[INFO] [jersey] Skipping generation of JAX-RS support files because everything a
ppears up-to-date.
[INFO] [obj-c] Skipping C code generation because everything appears up-to-date.
[INFO] [ruby] Skipping Ruby code generation because everything appears up-to-dat
e.
[INFO] [xml] Skipping generation of XML files since everything appears up-to-dat
e...
[INFO] [jaxws-client] Skipping generation of JAX-WS Client sources as everything
appears up-to-date...
[INFO] [docs] Skipping documentation source generation as everything appears up-
to-date...
[INFO] [spring-app] Skipping generation of spring config files as everything app
ears up-to-date...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[INFO] invoking enunciate:compile step...
[INFO] [jaxws-client] Skipping compilation of JAX-WS client classes as everythin
g appears up-to-date...
[INFO] invoking enunciate:build step...
[INFO] [jaxws-client] Skipping creation of JAX-WS client jar as everything appea
rs up-to-date...
[INFO] [jaxws-client] Skipping creation of the JAX-WS client source jar as every
thing appears up-to-date...
[INFO] [basic-app] Skipping the build of the expanded war as everything appears
up-to-date...
[INFO] invoking enunciate:package step...
[INFO] closing enunciate.
[INFO]
[INFO] --- maven-remote-resources-plugin:1.2:process (default) # wicket-examples
---
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[WARNING] Failure to transfer org.jvnet.staxex:stax-ex/maven-metadata.xml from h
ttp://download.java.net/maven/1 was cached in the local repository, resolution w
ill not be reattempted until the update interval of java.net.1 has elapsed or up
dates are forced. Original error: Could not transfer metadata org.jvnet.staxex:s
tax-ex/maven-metadata.xml from/to java.net.1 (http://download.java.net/maven/1):
No connector available to access repository java.net.1 (http://download.java.ne
t/maven/1) of type legacy using the available factories WagonRepositoryConnector
Factory
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # wicket-e
xamples ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 661 resources
[INFO] Copying 12 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.4:compile (default-compile) # wicket-examples
---
[INFO] Compiling 5 source files to C:\Users\AGI\Downloads\apache-wicket-1.5.7\sr
c\wicket-examples\target\classes
[INFO]
[INFO] --- maven-bundle-plugin:2.2.0:manifest (bundle-manifest) # wicket-example
s ---
[WARNING] Ignoring project type war - supportedProjectTypes = [jar, bundle]
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) #
wicket-examples ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.4:testCompile (default-testCompile) # wicket-
examples ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< jetty-maven-plugin:7.4.2.v20110526:run (default-cli) # wicket-example
s <<<
[INFO]
[INFO] --- jetty-maven-plugin:7.4.2.v20110526:run (default-cli) # wicket-example
s ---
[INFO] Configuring Jetty for project: Wicket Examples
[INFO] Webapp source directory = C:\Users\AGI\Downloads\apache-wicket-1.5.7\src\
wicket-examples\src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = C:\Users\AGI\Downloads\apache-wicket-1.5.7\src\wicket-examples\
target\classes
[INFO] Context path = /
[INFO] Tmp directory = C:\Users\AGI\Downloads\apache-wicket-1.5.7\src\wicket-exa
mples\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file = file:/C:/Users/AGI/Downloads/apache-wicket-1.5.7/src/wicke
t-examples/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = C:\Users\AGI\Downloads\apache-wicket-1.5.7\src\wicket-
examples\src\main\webapp
[INFO] Starting jetty 7.4.2.v20110526 ...
2012-06-18 14:50:04.567:INFO::jetty-7.4.2.v20110526
2012-06-18 14:50:08.422:INFO::No Transaction manager found - if your webapp requ
ires one, please configure one.
2012-06-18 14:50:08.664:INFO:/:Initializing Spring root WebApplicationContext
INFO - ContextLoader - Root WebApplicationContext: initialization
started
INFO - XmlWebApplicationContext - Refreshing Root WebApplicationContext: star
tup date [Mon Jun 18 14:50:08 GMT+07:00 2012]; root of context hierarchy
INFO - XmlBeanDefinitionReader - Loading XML bean definitions from class pat
h resource [applicationContext.xml]
INFO - DefaultListableBeanFactory - Pre-instantiating singletons in org.springf
ramework.beans.factory.support.DefaultListableBeanFactory#141622d: defining bean
s [contactDao,wicketApplication]; root of factory hierarchy
INFO - ContextLoader - Root WebApplicationContext: initialization
completed in 396 ms
2012-06-18 14:50:09.064:INFO::started o.m.j.p.JettyWebAppContext{/,file:/C:/User
s/AGI/Downloads/apache-wicket-1.5.7/src/wicket-examples/src/main/webapp/},file:/
C:/Users/AGI/Downloads/apache-wicket-1.5.7/src/wicket-examples/src/main/webapp/
2012-06-18 14:50:13.260:INFO::Started SelectChannelConnector#0.0.0.0:8080 STARTI
NG
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 60 seconds.
I think, there is something wrong with the enunciate I am trying to, but I don't know where I should check because if I think I have done what the codehaus tell me to do. Would you guide me to the right track ?
For your attention I say thanks.
try using enunciate 1.28.
I tried for my project with older version of the library without success and succeeded with the latest version.