I am following the docs at
http://uima.apache.org/downloads/releaseDocs/2.2.2-incubating/docs/html/overview_and_setup/overview_and_setup.html#ugr.ovv.eclipse_setup
when I try to install the UIMA tools plugin, I get
Cannot complete the install because one or more required items could not be found.
Software being installed: UIMA Tools (includes Runtime) 2.8.1 (org.apache.uima.tools.feature.group 2.8.1)
Missing requirement: UIMA Eclipse: uimaj-ep-jcasgen 2.3.1 (org.apache.uima.jcas.jcasgenp 2.3.1) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.4.0 (org.apache.uima.jcas.jcasgenp 2.4.0) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.4.1 (org.apache.uima.jcas.jcasgenp 2.4.1) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.4.2 (org.apache.uima.jcas.jcasgenp 2.4.2) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.5.0 (org.apache.uima.jcas.jcasgenp 2.5.0) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.6.0 (org.apache.uima.jcas.jcasgenp 2.6.0) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.7.0 (org.apache.uima.jcas.jcasgenp 2.7.0) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.8.0 (org.apache.uima.jcas.jcasgenp 2.8.0) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Missing requirement: Apache UIMA Eclipse: uimaj-ep-jcasgen 2.8.1 (org.apache.uima.jcas.jcasgenp 2.8.1) requires 'package org.eclipse.core.internal.compatibility 0.0.0' but it could not be found
Cannot satisfy dependency:
From: UIMA Tools (includes Runtime) 2.8.1 (org.apache.uima.tools.feature.group 2.8.1)
To: org.apache.uima.jcas.jcasgenp 0.0.0
where can I install this package
org.eclipse.core.internal.compatibility 0.0.0'
so that I can then install
uimaj-ep-jcasgen 2.8.1 (org.apache.uima.jcas.jcasgenp 2.8.1)
I am using Eclipse Neon and was able to install the Eclipse EMF tools for Neon.
Solved it by:
copying the content of $UIMA_HOME/eclipsePlugins/* to $ECLIPSE_HOME/eclipse/plugins/ ( where $UIMA_HOME is where you installed the UIMA SDK
and $ECLIPSE_HOME is where you installed eclipse)
Then running eclipse with "-clean"
Note: Using Eclipse neon on linux and uima 2.9
Related
I am trying to upgrade my java web application from 2.3 to 2.8.1. Following are my jars in Pom xml:
antlr-3.1.1.jar
aopalliance-1.0.jar
aspectjweaver-1.5.2.jar
commons-cli-1.1y.jar
commons-codec-1.10.jar
commons-collection-3.2.1.jar
commons-configuration-1.9.jar
commons-dbcp-1.2.2.jar
commons-discovery-0.2.jar
commons-el-1.0.jar
commons-fileupload-1.2.2.jar
commons-httpclient-3.1.jar
commons-io-1.3.1.jar
commons-jexl-2.1.1.jar
commons-jxpath-1.3.jar
commons-Lang-2.6.jar
commons-lang3-3.5.jar
commons-logging-1.1.1.jar
commons-modeler-2.0.1.jar
commons-pool-1.4.jar
commons-vfs-1.0.jar
dom4j-1.6.1.jar
ehcache-core-2.5.0.jar
ews-java-api-2.0.jar
gwt-log-3.1.3-redhat-2.jar
gwt-servlet-2.8.1.jar
gwtupload-0.6.3-compat.jar
gwt-user-2.8.1.jar
gwt-visualization-1.1.1.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
hibernate-validator-4.0.2.GA.jar
hibernate-core-3.6.7.Final.jar
httpclient-4.4.1.jar
httpcore-4.4.1.jar
itext-2.1.5.jar
javassist-3.12.0.GA.jar
jdom-1.1.jar
jersey-client-1.9.1.jar
jersey-core-1.9.1.jar
jettison-1.2.jar
joda-time-2.0.jar
json-20080701.jar
jxl-2.6.8.jar
kxml2-2.3.0.jar
kxml2-min-2.3.0.jar
log4j-1.2.16.jar
logback-core-0.6.jar
lucene-core-2.4.1.jar
ojdbc6-11.2.0.4.jar
spring-aop-4.3.18.RELEASE.jar
spring-aspects-4.3.18.RELEASE.jar
spring-beans-4.3.18.RELEASE.jar
spring-context-support -4.3.18.RELEASE.jar
spring-context -4.3.18.RELEASE.jar
spring-core -4.3.18.RELEASE.jar
spring-expression -4.3.18.RELEASE.jar
spring-instrument -4.3.18.RELEASE.jar
spring-jdbc -4.3.18.RELEASE.jar
spring-jms -4.3.18.RELEASE.jar
spring-orm -4.3.18.RELEASE.jar
spring-oxm -4.3.18.RELEASE.jar
spring-test -4.3.18.RELEASE.jar
spring-tx -4.3.18.RELEASE.jar
poi-3.9.jar
poi-examples-3.9.jar
poi-excelant-3.9.jar
poi-ooxml-3.9.jar
poi-ooxml-schemas-3.9.jar
poi-scratchpad-3.9.jar
saaj-api-1.3.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
smartgwt-3.0.jar
smartgwt-skins-3.0.jar
stax-1.2.0.jar
validation-api-1.0.0.GA.jar
groovy-swing-2.4.7.jar
velocity-1.6.1.jar
wsdl4j-1.6.3.jar
wstx-asl-3.2.7.jar
xmlpull-1.1.3.1.jar
xstream-1.4.6.jar
jcifs-1.3.17.jar
xmlbeans-2.3.0.jar
dhbcore-dhbcore.jar
com.ibm.mq-8.0.0.5.jar
com.ibm.mq.headers-8.0.0.5.jar
com.ibm.mq.jmqi-8.0.0.5.jar
com.ibm.mq.pcf-8.0.0.5.jar
com.ibm.mqjms-8.0.0.5.jar
com.ibm.mq.connector-7.5.0.5.jar
dhbcore-7.5.0.5.jar
mqcontext-2.3.jar
com.ibm.mq.commonservices-8.0.0.5.jar
isc-jakarta-oro-2.0.6.jar
isomorphic_applets-isomorphic_applets.jar
isomorphic_core_rpc-isomorphic_core_rpc.jar
isomorphic_sql-isomorphic_sql.jar
isomorphic_web_services-isomorphic_web_services.jar
mail-1.4.6.jar
jta-1.1.jar
gwt-maven-plugin-2.8.1
when I run the application from eclipse using “mvn gwt:run-codeserver”, it says http://127.0.0.1:9876 started and ready. But I see some errors before that:
Tracing compile failure path for type ‘...’: ERROR Line xxx: No source code is available for type org.slf4j.LoggerFactory; did you forget to inherit a required module?
I see several of them like above in the console. When I run http://127.0.0.1:9876 I see: GWT Code Server
Drag these two bookmarklets to your browser’s bookmark bar: Dev Mode On Dev Mode Off
Visit a web page that uses one of these modules: <MY_MODULE>
When I click on my module, I see “this module hasn’t been compiled yet”. Please advise.
Updated Question
gradle is loading my project's dependency guice-3.0.jar, but guice's dependencies are NOT being loaded by gradle.
guice-3.0.jar > META-INF > DEPENDENCIES (file) has the following content:
// ------------------------------------------------------------------
// Transitive dependencies of this project determined from the
// maven pom organized by organization.
// ------------------------------------------------------------------
Google Guice - Core Library
From: 'an unknown organization'
- AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
License: Public Domain
- javax.inject (http://code.google.com/p/atinject/) javax.inject:javax.inject:jar:1
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
- CGLIB (http://sourceforge.net/projects/cglib/) org.sonatype.sisu.inject:cglib:jar:2.2.1-v20090111
License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
From: 'ObjectWeb' (http://www.objectweb.org/)
- ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.1
gradle seems to be failing in loading javax.inject. So, I get the error mentioned below.
Work-around
I added guice's dependencies direct into build.gradle of my project.
compile group: 'aopalliance', name: 'aopalliance', version: 1.0
compile group: 'javax.inject', name: 'javax.inject', version: 1
compile group: 'org.sonatype.sisu.inject', name: 'cglib', version: '2.2.1-v20090111'
compile group: 'asm', name: 'asm', version: 3.1
Questions
It works as a hack, but any genuine fixes are required.
Looking at other jars required by my project, they have dependencies defined in META-INF > maven > lib-name-folder-hierarchy > pom.xml, but this guice-3.0.jar has dependencies defined in META-INF > DEPENDENCIES file. Can this different convention cause any issues?
Original Question
For one of my java projects, I performed gradlew --refresh-dependencies, and the project build compileJava task started throwing the following error:
:myproject:compileJava
/<path-to-my-project/MyProvider.java:24: error: cannot access Provider
public class MyProvider<T> implements Provider<T> {
^
class file for javax.inject.Provider not found
An exception has occurred in the compiler (1.8.0_181). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Attr.visitTypeParameter(Attr.java:4016)
at com.sun.tools.javac.tree.JCTree$JCTypeParameter.accept(JCTree.java:2224)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:661)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4296)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4272)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4201)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4176)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:46)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:104)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:53)
at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:163)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:145)
at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
:myproject:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myproject:compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
------------------------------------------------------------
Gradle 2.14.1
------------------------------------------------------------
Build time: 2016-07-18 06:38:37 UTC
Revision: d9e2113d9fb05a5caabba61798bdb8dfdca83719
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_181 (Oracle Corporation 25.181-b13)
OS: Mac OS X 10.12.6 x86_64
It's openJDK.
Well, my team-mates, who haven't performed gradlew --refresh-dependencies are facing no such issues. I don't think it's java compiler issue, but it seems to be gradle issue.
When I check using eclipse, the MyProvider.java refers to com.google.inject.Provider from guice-3.0.jar.
com.google.inject.Provider refers to javax.inject.Provider, and that seems to be not included in the dependencies.
Any solutions to resovle the issue?
Any ways to rollback the refresh-dependencies command?
Any work-arounds?
I performed cleanEclipse, eclipse, upgraded gradle to 3.5, and then downgraded to 2.14.1, but no luck.
The similar issue was reported to java but it was closed as Cannot Reproduce: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8222198 .
I m working with jersey2.29 and Spring 4 to develop a web application. The following are my dependencies.
When starting Tomcat server 8 server, it doesn't start and I get the following error
Caused by: java.lang.NoSuchMethodError: org.glassfish.jersey.internal.l10n.LocalizableMessageFactory.(Ljava/lang/String;Lorg/glassfish/jersey/internal/l10n/LocalizableMessageFactory$ResourceBundleSupplier;)V
at org.glassfish.jersey.server.spring.LocalizationMessages.(LocalizationMessages.java:19)
at org.glassfish.jersey.server.spring.SpringWebApplicationInitializer.onStartup(SpringWebApplicationInitializer.java:46)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
I tried adding all the latest jar files in WEB-INF/lib
You not have minimal dependency for jersey-spring4 which is Spring 4.3.8
org.springframework spring-aop 4.3.8.RELEASE jar Apache License, Version 2.0
org.springframework spring-beans 4.3.8.RELEASE jar Apache License, Version 2.0
org.springframework spring-core 4.3.8.RELEASE jar Apache License, Version 2.0
org.springframework spring-web 4.3.8.RELEASE jar Apache License, Version 2.0
You should use spring-jersey3 jar
My setup:
Sonarqube 5.1.1
Sonar-Maven Plugin 2.6 (also tried 2.7 and 3.6)
JDK 1.7.0_51
Example of the error:
16:00:54 [INFO] [23:00:54.219] Sensor JavaSquidSensor
16:00:55 [INFO] [23:00:55.030] Java Main Files AST scan...
16:00:55 [INFO] [23:00:55.030] 1532 source files to be analyzed
16:00:58 [ERROR] [23:00:57.927] Class not found: javax.annotation.Nullable
16:00:58 [ERROR] [23:00:57.928] Class not found: javax.annotation.CheckReturnValue
16:00:58 [ERROR] [23:00:58.114] Class not found: javax.annotation.Nullable
According to this stackoverflow question, javax.annotation should be part of java 1.7 and up. Furthermore, I've tried putting it in the local maven repository but that didnt help.
So where is Sonar trying to find this package? Any help?!?
Update:
I've tried modifying the sonar-maven-plugin to include a dependency on javax.annotation
I've tried putting the dependency in my maven's settings.xml
Upgrading my JDK to 1.8 has not helped.
According to http://docs.oracle.com/javase/7/docs/api/index.html?javax/annotation/package-summary.html the classes you expect are not part of JDK 7.
The classes you're looking for are part of google JSR-305 implementation that was initiated here https://code.google.com/p/jsr-305/source/browse/trunk/ri/src/main/java/javax/annotation/Nullable.java?r=24 and which moved to Findbugs:
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
</dependency>
According to https://jcp.org/en/jsr/detail?id=305 the JSR-305 is finished, but is in dormant status and has not been added to a JDK release yet.
Hope it helps.
To avoid adding SonarQube specific dependencies to your project, define a profile like this:
<profile>
<id>sonarqube</id>
<dependencies>
<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</profile>
Then run your sonar analysis with a command like
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar -Psonarqube,sonarqube-dev
The sonarqube-dev profile is defined in my ~/.m2/settings.xml and it just specifies where my development environment SonarQube installation is
<profile>
<id>sonarqube-dev</id>
<properties>
<!-- no direct db connections in new sonar -->
<sonar.host.url>
http://localhost:9000/
</sonar.host.url>
</properties>
</profile>
What is achieved by all this?
sonarqube analysis specific dependencies don't pollute the project unnecessarily
no sonarqube maven plugin defined in pom.xml. Each developer and Jenkins can use whatever sonar plugin and server installation they wish
This is more an addendum to the latest answer:
I see similar problems and adding the google findbugs dependency to the project dependencies helps. Similar problems occured with joda convert like
[ERROR] [20:44:25.247] Class not found: org.joda.convert.ToString
Hence I also added
`<dependency>
<groupId>org.joda</groupId>
<artifactId>joda-convert</artifactId>
<version>1.8.1</version>
<scope>provided</scope>
</dependency>`
But note, that I set the scope to provided to prevent these new dependencies to be added to a resulting war file.
However, I still wonder why these errors occur since none of the analyzed classes seem to use these annotations?
I am developing an Eclipse plugin. That is using UI and file resources. Which required org.eclipse.core.resources;bundle-version="3.8.101" and filed if this dependency is not available on target eclipse.
Eclipse version: Juno (for Android development).
I want to install this jar if not available on target Eclipse. So my plugin run without any issue for target Eclipse.
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ABC
Bundle-SymbolicName: ABC;singleton:=true
Bundle-Version: 1.0
Bundle-Activator: magic.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="3.8.101"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
libs/java-json.jar,
libs/json-lib-2.4-jdk15.jar
Here is the error I got while installation
Cannot complete the install because one or more required items could not be found.
Software being installed: Feature 1.0.0 (com.confiz.android.codegen.feature.feature.group 1.0.0)
Missing requirement: Feature 1.0.0 (com.confiz.android.codegen.feature.feature.group 1.0.0) requires 'org.eclipse.core.resources 3.8.101' but it could not be found