Opened 8 months ago

Closed 7 months ago

Last modified 7 months ago

#2410 closed defect (fixed)

debian buster: Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Reported by: Eche|on Owned by: zzz
Priority: major Milestone: 0.9.39
Component: package/debian Version: 0.9.38
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

Hi

fresh, new debian buster system, openjdk 11 from debian, all needed packages from ant debianhowto installed, debian/rules line 41 ,quilt added, and I get this error on ant debian:
[exec] BUILD FAILED

[exec] /usr/src/i2p/i2p.i2p/build.xml:434: The following error occurred while executing this line:
[exec] /usr/src/i2p/i2p.i2p/core/java/build.xml:79: Compile failed; see the compiler error output for details.
[exec]
[exec] Total time: 1 second
[exec] [javac] Fatal Error: Unable to find package java.lang in classpath or bootclasspath
[exec] make: * [debian/rules:153: build-indep] Error 1

zzz mentioned in chat:
for 9+ you have to remove the bootclasspath lines from override.properties

I did remove these lines from that file:
javac.compilerargs=-bootclasspath /usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
javac.compilerargs7=-bootclasspath /usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar

but both lines do appear in the file automaticly on ant debian, no way to remove them from built.

echelon

Subtickets

Change History (6)

comment:1 Changed 8 months ago by Masayuki Hatta

You should comment out these lines in debian/rules, since override.properties are generated there:

        @/bin/echo -e "javac.version=1.8" > $(CURDIR)/override.properties
        @/bin/echo -e "javac.compilerargs=-bootclasspath $(JAVA_HOME)/jre/lib/rt
.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
        @/bin/echo -e "javac.compilerargs7=-bootclasspath $(JAVA_HOME)/jre/lib/r
t.jar:$(JAVA_HOME)/jre/lib/jce.jar" >> $(CURDIR)/override.properties
Version 0, edited 8 months ago by Masayuki Hatta (next)

comment:2 Changed 8 months ago by Eche|on

Ok

as it seems, tomcat9 and jetty 9.4 is installed in buster, I checked out zzz testbranch i2p.i2p.zzz.jetty94 and it did compile a updateWithJetty, ant debian still gives errors.

compile:

[exec] [mkdir] Created dir: /usr/src/i2p/i2p.i2p.zzz.jetty94/core/java/build/obj
[exec] [javac] Compiling 337 source files to /usr/src/i2p/i2p.i2p.zzz.jetty94/core/java/build/obj
[exec]
[exec] BUILD FAILED
[exec] /usr/src/i2p/i2p.i2p.zzz.jetty94/build.xml:434: The following error occurred while executing this line:
[exec] /usr/src/i2p/i2p.i2p.zzz.jetty94/core/java/build.xml:79: Compile failed; see the compiler error output for details.
[exec]
[exec] Total time: 1 second
[exec] [javac] Fatal Error: Unable to find package java.lang in classpath or bootclasspath
[exec] make: * [debian/rules:153: build-indep] Error 1

comment:3 Changed 8 months ago by Eche|on

Hi

Ok, i came along further on, now other issues:

[javac] /usr/src/i2p/i2p.i2p/core/java/src/net/i2p/util/PartialEepGet.java:13: error: package gnu.getopt does not exist

[javac] import gnu.getopt.Getopt;

[javac] /usr/src/i2p/i2p.i2p/core/java/src/net/i2p/util/Translate.java:12: error: package gnu.gettext does not exist
[javac] import gnu.gettext.GettextResource?;

Gettext is installed, also libgetopt-java.

comment:4 Changed 7 months ago by Eche|on

ok, setup a complete new debian buster system with libtomcat9 and libjetty9 - I can do ant updaterwithJetty now, looks like my first system is somewhat borked.
But ant debian fails with:
exec] ensureJettylib:

[exec]
[exec] depend:
[exec]
[exec] compile:
[exec] [mkdir] Created dir: /usr/src/i2p/i2p.i2p/apps/jetty/build
[exec] [mkdir] Created dir: /usr/src/i2p/i2p.i2p/apps/jetty/build/obj
[exec] [javac] Compiling 12 source files to /usr/src/i2p/i2p.i2p/apps/jetty/build/obj
[exec] [javac] warning: [options] bootstrap class path not set in conjunction with -source 8
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:27: warning: [deprecation] PathMap? in org.eclipse.jetty.http has been deprecated
[exec] [javac] import org.eclipse.jetty.http.PathMap?;
[exec] [javac]
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:83: warning: [deprecation] PathMap? in org.eclipse.jetty.http has been deprecated
[exec] [javac] private transient PathMap?<String> _ignorePathMap;
[exec] [javac]

[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:320: error: cannot find symbol
[exec] [javac] request.getUri().writeTo(u8buf);
[exec] [javac]
[exec] [javac] symbol: method getUri()
[exec] [javac] location: variable request of type Request
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java:486: warning: [deprecation] PathMap? in org.eclipse.jetty.http has been deprecated
[exec] [javac] _ignorePathMap = new PathMap?<String>();
[exec] [javac]

[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/JettyXmlConfigurationParser.java:46: error: method getResource in class Loader cannot be applied to given types;
[exec] [javac] URL config60 = Loader.getResource(XmlConfiguration?.class, "org/eclipse/jetty/xml/configure_6_0.dtd");
[exec] [javac]
[exec] [javac] required: String
[exec] [javac] found: Class<XmlConfiguration?>,String
[exec] [javac] reason: actual and formal argument lists differ in length
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/JettyXmlConfigurationParser.java:47: error: method getResource in class Loader cannot be applied to given types;
[exec] [javac] URL config76 = Loader.getResource(XmlConfiguration?.class,"org/eclipse/jetty/xml/configure_7_6.dtd");
[exec] [javac]

[exec] [javac] required: String
[exec] [javac] found: Class<XmlConfiguration?>,String
[exec] [javac] reason: actual and formal argument lists differ in length
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/jetty/JettyXmlConfigurationParser.java:48: error: method getResource in class Loader cannot be applied to given types;
[exec] [javac] URL config90 = Loader.getResource(XmlConfiguration?.class,"org/eclipse/jetty/xml/configure_9_0.dtd");
[exec] [javac]
[exec] [javac] required: String
[exec] [javac] found: Class<XmlConfiguration?>,String
[exec] [javac] reason: actual and formal argument lists differ in length
[exec] [javac] /usr/src/i2p/i2p.i2p/apps/jetty/java/src/net/i2p/servlet/I2PDefaultServlet.java:135: error: method does not override or implement a method from a supertype
[exec] [javac] @Override
[exec] [javac]

[exec] [javac] 5 errors
[exec] [javac] 4 warnings
[exec]
[exec] BUILD FAILED
[exec] /usr/src/i2p/i2p.i2p/build.xml:411: The following error occurred while executing this line:
[exec] /usr/src/i2p/i2p.i2p/apps/jetty/build.xml:388: Compile failed; see the compiler error output for details.

somewhat expected, jetty is the error.

ok, after ant debian, mtn revert —missing, ant distclean ant updater(WithJetty?) does not work anymore.
Same errors as above:

[javac] /usr/src/i2p/i2p.i2p/core/java/src/net/i2p/util/PartialEepGet.java:13: error: package gnu.getopt does not exist
[javac] import gnu.getopt.Getopt;
[javac]
[javac] /usr/src/i2p/i2p.i2p/core/java/src/net/i2p/util/Translate.java:12: error: package gnu.gettext does not exist
[javac] import gnu.gettext.GettextResource?;

Last edited 7 months ago by Eche|on (previous) (diff)

comment:5 Changed 7 months ago by Eche|on

Resolution: fixed
Status: newclosed

Ok

I did used the debian/* default files, thats wrong.
I copied over debian-alt/disco/* to debian/ and changed the debian/rules file:

  • changed jdk8 to 11
  • added ,quilt to line 42
  • removed the two classpath lines as mhatta noted above

and ant-debian build .debs as expected, ant-distclean works like a charm, and after a mtn -revert-missing a ant debian works fine again.

thank you.

comment:6 Changed 7 months ago by zzz

Correct. Debian files are for the current debian distro which is stretch.
disco files need more fixes for 39, I need to buy them back from mhatta.
Added new build targets precise, trusty, xenial, bionic, disco, wheezy, jessie, buster to copy the files for you, in 4980de5d3b443a5d12e95134d9548af106a37f23 to be 0.9.38-7
Still need to do the 39 fixes for disco/ but since you closed the ticket I'll leave it closed.

Note: See TracTickets for help on using tickets.