docker-archive-public/docker.labs

Incorrect Java compiler version in pom.xml for Java debugging lab

Opened this issue · 0 comments

Which lab is it that you're having issues with?
https://github.com/docker/labs/tree/master/developer-tools/java-debugging

Description
Spring 3.2 does not work with Java .class files compiled at 1.8 level.

Steps to reproduce the issue, if relevant:
Followed the lab up to the step where it says:

To go to the application, Click on /UserSignup link.

Describe the results you received:
Clicking on the /UserSignup link resulted in a 404 error.

Additional information you deem important (e.g. issue happens only occasionally):
I found exceptions like the following in the webserver log file:

org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet

Searching led me to this page on SO, where I learned that Spring 3.2 is not compatible with Java 8 bytecode. Setting the Java compiler source and target version to 1.7 in pom.xml fixed the issue for me.

Output of docker version:

Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24302
 Built: Fri Mar 23 08:31:36 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.05.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   f1503241
  Built:mmit:   linux/amd6422:20:42 2018
  Experimental: false

Output of docker info:

Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 29
Server Version: 18.05.0-ce
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 40
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.93-boot2docker
Operating System: Boot2Docker 18.05.0-ce (TCL 8.2.1); HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.6MiB
Name: default
ID: JVND:533B:Y4SN:JUU4:2ODF:4JSL:N5BD:RBHN:BWY2:MOVM:XNM2:ML7Q
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, Docker for Mac, Docker for Windows, VirtualBox, physical, etc.):
Docker Toolbox on Windows.