When I compile my code with Ant using OkHttp version 4.0.0-RC1 I see warnings and errors:
[javac] warning: unknown enum constant DeprecationLevel.WARNING
[javac] warning: unknown enum constant DeprecationLevel.ERROR
[javac] warning: unknown enum constant DeprecationLevel.ERROR
[javac] /Users/janne/work/github/pureload/pureit/packages/purehttp/src/com/pureload/net/http/impl/okhttp/HeaderUtil.java:51: error: cannot access KMappedMarker
[javac] Set<String> headerNames = headers.names();
[javac] ^
[javac] class file for kotlin.jvm.internal.markers.KMappedMarker not found
[javac] warning: unknown enum constant DeprecationLevel.ERROR
...
I simply replaced the OkHttp jar files from version 3.12.1 with the latest 4.0.0-RC1. I'm using Java 11.
I assume this is Kotlin related (?), but I do not know how to solve this...
Related
Can Someone point me in the right direction about what this error is all about , as i'm fairly new to Java and all this building stuff.
the below Code is terminal output that is received after building
ubuntu#ip-172-31-43-23 ~/j/java-NFTB (develop)> ./gradlew build
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :protocol:compileJava
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/WalletGrpc.java:20: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/WalletExtensionGrpc.java:20: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/DatabaseGrpc.java:23: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/MonitorGrpc.java:20: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/nftbZksnarkGrpc.java:20: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/WalletSolidityGrpc.java:20: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
/home/ubuntu/java-nftb/java-NFTB/protocol/src/main/java/org/nftb/api/NetworkGrpc.java:23: error: cannot find symbol
#javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation
7 errors
> Task :protocol:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':protocol:compileJava'.
Sorry, if i've made any mistakes please feel free to correct me as i am new to stackoverflow
You have to go to build.gradle file and make sure you have all the dependencies you need .
for example , here you are missing this
implementation 'javax.annotation:javax.annotation-api:1.2'
You can add and try to rebuild again , also please make sure to add the build.gradle code for next time .
While using JDK internal Xerces implementation, I have the following issue:
At compile javac warns me that
XMLSchema.java:28: warning: XSConstants is internal proprietary API and may be removed in a future release
[javac] import com.sun.org.apache.xerces.internal.xs.XSConstants;
but fails to find com.sun.org.apache.xerces.internal.xs.datatypes package.
XMLSchema.java:35: error: package com.sun.org.apache.xerces.internal.xs.datatypes does not exist
[javac] import com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList;
What could be the issue here?
I'm using JDK 1.8
The problem has been reported and answered before: Using internal sun classes with javac
When javac is compiling code it doesn't link against rt.jar by default. Instead it uses special symbol file lib/ct.sym with class stubs.
Surprisingly this file contains many but not all of internal sun classes. In my case one of those more-internal-than-usual classes was com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList (adapted answer)
When I compile FreeRep7.dpk project I have error message IBEXPRESS missing. I changed it to IBXPRESS.
Now I have an errors:
[Error] fr_intrp.pas(674): Incompatible types: 'WideChar' and 'Char'
[Fatal Error] Required package 'RXCTL6' not found
I Found http://sourceforge.net/projects/rxlib/ components, but this propably is not rxctl6 package ?
I got this error while building hibernate using gradle
:hibernate-entitymanager:compileTestJava
/home/jsiddharth/workspace/hibernate-orm-master/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/paths/SingularAttributeJoinTest.java:128: error: <anonymous org.hibernate.jpa.test.criteria.paths.SingularAttributeJoinTest$2> is not abstract and does not override abstract method integrate(MetadataImplementor,SessionFactoryImplementor,SessionFactoryServiceRegistry) in Integrator
return new Integrator() {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:hibernate-entitymanager:compileTestJava FAILED
FAILURE: Build failed with an exception.
I assumed that I need to run gradle with the -Xlint options, but turns out, I am doing it wrong. I got this error when I ran
./gradlew eclipse -Xlint:deprecation -Xlint:unchecked Maven settings.xml file did not exist : /home/jsiddharth/.m2/settings.xml
FAILURE: Build failed with an exception.
* What went wrong:
Problem configuring task :eclipse from command line. Unknown command-line option '-X'.
> Unknown command-line option '-X'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.185 secs
How do I run my build to ignore the errors ?
As to you question, the -Xlint is a Java compiler option and has nothing to do with Gradle. You can specify these options via GRADLE_OPTS which is how Gradle passes arguments to the JVM.
Specifically: GRADLE_OPTS="-Xlint:deprecation"
Anyway this is not your trouble. Have a look at the error:
SingularAttributeJoinTest$2> is not abstract and does not override abstract method integrate(MetadataImplementor,SessionFactoryImplementor,SessionFactoryServiceRegistry) in Integrator
return new Integrator() {
You have an anonymous class inside SingularAttributeJoinTest which is declared to implement Integrator but fails to implement method integrate and is not declared abstract. This kind of error can't be suppressed by a -Xlint option of course.
I'm having a bit of a sticky problem building openjdk7 on an Itanium server running Suse Linux Enterprise Server 11 SP2.
I have successfully installed the Sun JDK 1.6 update 33 to serve as the bootstrap for the installation. And, I have downloaded the source drops and unzipped the openJDK7 install source into a directory. My build passes all the make sanity checks and looks ready to go.
I have unset JAVA_HOME, declared LANG=C, and pointed the build to the bootstrap JDK.
Then I invoke make ALLOW_DOWNLOADS=false ALT_BOOTDIR=/usr/java/jdk1.6.0_33 ALT_DROPS_DIR=~/openjdk_src/sourcedrop
The build runs fine for about 5-10 minutes, and then I get a string of errors about SSL libraries not being found.
This occurs in the following segment of the build in the jaxws source tree, and appears to have something to do with SSL:
[javac] Compiling 2735 source files to /root/openjdk_src/openjdk/build/linux-ia64/jaxws/build/classes
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:54: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:55: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:56: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:54: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:55: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:56: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:218: error: cannot find symbol
[javac] private static class HttpClientVerifier implements HostnameVerifier {
[javac] ^
[javac] symbol: class HostnameVerifier
[javac] location: class MetadataFinder
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:219: error: cannot find symbol
[javac] public boolean verify(String s, SSLSession sslSession) {
[javac] ^
[javac] symbol: class SSLSession
[javac] location: class HttpClientVerifier
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:32: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:33: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:34: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSocketFactory;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:39: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSocketFactory;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:40: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:41: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:42: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac] ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:302: error: cannot find symbol
[javac] private static class HttpClientVerifier implements HostnameVerifier {
[javac] ^
[javac] symbol: class HostnameVerifier
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:303: error: cannot find symbol
[javac] public boolean verify(String s, SSLSession sslSession) {
[javac] ^
[javac] symbol: class SSLSession
[javac] location: class HttpClientVerifier
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:154: error: cannot find symbol
[javac] if (conn instanceof HttpsURLConnection) {
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class WSEntityResolver
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:156: error: cannot find symbol
[javac] ((HttpsURLConnection) conn).setHostnameVerifier(new HttpClientVerifier());
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class WSEntityResolver
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:207: error: cannot find symbol
[javac] if (httpConnection instanceof HttpsURLConnection) {
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:223: error: cannot find symbol
[javac] ((HttpsURLConnection) httpConnection).setHostnameVerifier(new HttpClientVerifier());
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:227: error: cannot find symbol
[javac] HostnameVerifier verifier =
[javac] ^
[javac] symbol: class HostnameVerifier
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:228: error: cannot find symbol
[javac] (HostnameVerifier) context.invocationProperties.get(JAXWSProperties.HOSTNAME_VERIFIER);
[javac] ^
[javac] symbol: class HostnameVerifier
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:230: error: cannot find symbol
[javac] ((HttpsURLConnection) httpConnection).setHostnameVerifier(verifier);
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:234: error: cannot find symbol
[javac] SSLSocketFactory sslSocketFactory =
[javac] ^
[javac] symbol: class SSLSocketFactory
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:235: error: cannot find symbol
[javac] (SSLSocketFactory) context.invocationProperties.get(JAXWSProperties.SSL_SOCKET_FACTORY);
[javac] ^
[javac] symbol: class SSLSocketFactory
[javac] location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:237: error: cannot find symbol
[javac] ((HttpsURLConnection) httpConnection).setSSLSocketFactory(sslSocketFactory);
[javac] ^
[javac] symbol: class HttpsURLConnection
[javac] location: class HttpClientTransport
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 27 errors
To work around this I unpacked the jsse.pack into jsse.jar in the jdk/jre/bin.
Then if I remember to make with make ALLOW_DOWNLOADS=false ALT_BOOTDIR=/usr/java/jdk1.6.0_33 ALT_DROPS_DIR=~/openjdk_src/sourcedrop DISABLE_HOTSPOT_OS_VERSION_CHECK=ok to ignore the architecture well.
The build then fails when it makes adlc in the VM:
Making adlc
g++ -Wl,-relax -Xlinker -O1 -Xlinker -export-dynamic -o ../generated/adfiles/adlc
../generated/adfiles/adlparse.o ../generated/adfiles/arch Desc.o
../generated/adfiles/arena.o ../generated/adfiles/dfa.o ../generated/adfiles/dict2.o
../generated/adfiles/filebuff.o ../generated/adfil es/forms.o
../generated/adfiles/formsopt.o ../generated/adfiles/formssel.o
../generated/adfiles/main.o
../generated/adfiles/adlc-opcodes.o ../ generated/adfiles/output_c.o
../generated/adfiles/output_h.o
make[6]: *** No rule to make target
`/root/openjdk_src/openjdk/hotspot/src/cpu/ia64/vm/.ad', needed by
`../generated/adfiles/linux_.ad'. Stop .
Now what? What is adlc and why won't it build?
I only recently stumbled across this (still open) question, having attempted something similar in recent months; and also having encountered (and solved) the same issue.
'adlc' is HotSpot's Architecture Description Language Compiler, i.e. ADLC.
It is employed in generating the source of the Java execution engines (interpreter and JIT compiler) of the HotSpot build; based on processing '.ad' files. If and when you get the ADLC tool to build, this is what its 'usage' looks like:
$> ./adlc
Architecture Description Language Compiler
Usage: adlc [-doqwTs] [-#]* [-D<FLAG>[=<DEF>]] [-U<FLAG>] [-c<CPP_FILE_NAME>] [-h<HPP_FILE_NAME>] [-a<DFA_FILE_NAME>] [-v<GLOBALS_FILE_NAME>] <ADL_FILE_NAME>
d produce DFA debugging info
o no output produced, syntax and semantic checking only
q quiet mode, supresses all non-essential messages
w suppress warning messages
T make DFA as many subroutine calls
s output which instructions are cisc-spillable
D define preprocessor symbol
U undefine preprocessor symbol
c specify CPP file name (default: (null))
h specify HPP file name (default: (null))
a specify DFA output file name
v specify adGlobals output file name
# increment ADL debug level
Your build problem is that you cannot avoid the 'architecture' detection! (Indeed, your use of "DISABLE_HOTSPOT_OS_VERSION_CHECK=ok", is probably suspect even.) However, its worse than (just) that : IA64 (apart from with Windows, until the end of Windows Server 2008 R2 (extended)support... out-to 2020?) is being removed from the Java 7 OpenJDK source tree, and bits have been removed/are being actively removed (and/or are not being maintained?). Specifically, thats been the problem with some of the HotSpot/OpenJDK build configuration components of the Makefile-support system that is necessary to specify all the architectural qualifications to locate/process the '.ad' files necessary on the Linux Itanium/IA64 architecture. Specifically, you are missing certain critical definitions needed for correct filename expansions: [...]/cpu/ia64/vm/.ad and ../generated/adfiles/linux_.ad are manifestly not correct, fully architecturally qualified names of the files/targets (hence are not located).
The proper name of the file/target concerned above actually is ../generated/adfiles/linux_ia64.ad, which comes about through an environment variable substitution in the target name, but for a missing definition of ${arch_model} (a similar situation presents with another envvar, ${os_arch_model}). These are/were absent (an oversight?) in the 'platform_ia64' under the 'linux' directory of [JDK_distribution]/hotspot/make. A brief review of the other platform files under linux, and you should see that 'arch_model' should take the value of 'arch', i.e. ia64, and similarly, 'os_arch_model' takes the same value as 'os_arch', i.e. linux_ia64.
[Java7 JDK distribution]/hotspot/make $ cat platform_ia64
os_family = linux
arch = ia64
arch_model = ia64 # Added
os_arch = linux_ia64
os_arch_model = linux_ia64 # Added
lib_arch = ia64
compiler = gcc
gnu_dis_arch = ia64
sysdefs = -DLINUX -D_GNU_SOURCE -DIA64 -DCC_INTERP
mark_style = alignment
With just that amendment/correction, you should be able to succeed in these initial steps of the OpenJDK build.
(I can get past the ADLC building, but fail later down the build process for another area of source having been dropped from later IA64 sources...) Good Luck!