Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Java 1.7 #76

Closed
dfarrell07 opened this issue Apr 16, 2015 · 5 comments
Closed

Force Java 1.7 #76

dfarrell07 opened this issue Apr 16, 2015 · 5 comments

Comments

@dfarrell07
Copy link
Owner

Initial diagnoses was wrong, see next few comments: ODL has moved to Java 1.8, need to follow in the Puppet mod.

  1) opendaylight class testing install methods Package "java-1.7.0-openjdk" should be installed
     Failure/Error: it { should be_installed }
       expected Package "java-1.7.0-openjdk" to be installed

     # ./spec/spec_helper_acceptance.rb:143:in `block (2 levels) in generic_validations'

Finished in 9 minutes 8 seconds (files took 2 minutes 21.3 seconds to load)
51 examples, 1 failure

Failed examples:

rspec ./spec/acceptance/class_spec.rb:11 # opendaylight class testing install methods Package "java-1.7.0-openjdk" should be installed
@dfarrell07
Copy link
Owner Author

Or maybe the issue is that we need to force the RPM to install 1.7, not >= 1.7. It seems like CentOS is now installing 1.8 by default, which wasn't the case last time I checked.

@dfarrell07
Copy link
Owner Author

So, here's the issue reported by @trozet that started this debugging

[~/vagrant-opendaylight]$ vagrant up cent7_pup_rpm
#snip
[~/vagrant-opendaylight]$ vagrant ssh cent7_pup_rpm
[vagrant@localhost ~]$ java -version
openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b13)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
[vagrant@localhost ~]$ sudo systemctl status opendaylight
opendaylight.service - OpenDaylight SDN Controller
   Loaded: loaded (/usr/lib/systemd/system/opendaylight.service; enabled)
   Active: active (running) since Thu 2015-04-16 23:21:07 UTC; 6min ago
     Docs: https://wiki.opendaylight.org/view/Main_Page
           http://www.opendaylight.org/
 Main PID: 11517 (java)
   CGroup: /system.slice/opendaylight.service
           └─11517 /usr/bin/java -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOpti...

Apr 16 23:21:07 localhost.localdomain systemd[1]: Started OpenDaylight SDN Controller.
[vagrant@localhost ~]$ cd /vagrant/scripts/
[vagrant@localhost scripts]$ ./connect.sh
#snip
opendaylight-user@root>bundle:list -s
Error executing command: java.lang.NullPointerException

Removing Java 1.8 and installing 1.7 fixes the problem.

[vagrant@localhost scripts]$ sudo yum remove -y java
#snip
[vagrant@localhost scripts]$ sudo yum install -y java-1.7.0-openjdk
[vagrant@localhost scripts]$ java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.1.el7_1-x86_64 u79-b14)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
[vagrant@localhost scripts]$ ./connect.sh
opendaylight-user@root>bundle:list -s
#works

Need to change this bit of the opendaylight.spec RPM file.

# Required for ODL at run time
Requires:   java >= 1:1.7.0

@dfarrell07 dfarrell07 changed the title Move to Java 1.8 Force Java 1.7 Apr 17, 2015
@dfarrell07
Copy link
Owner Author

This update to ODL's RPM is meant to fix this issue.

@trozet, who is consuming the Puppet mod and RPM in his OPNFV work, tells me it works. I was having some Vagrant version issues and still haven't been able to test it to my satisfactin (really want it to be solid, of course). Will close this once I have a chance to properly verify it and merge the upstream OpenDaylight patch.

@dfarrell07
Copy link
Owner Author

This update to ODL's RPM is meant to fix this issue.

Upstream patch has been merged, closing this.

@dfarrell07
Copy link
Owner Author

For future reference, note that the actual incompatibility is between Karaf 3.0.1 and Java 8. ODL's 0.2.3 release uses Karaf 3.0.1, but master (so Lithium) has moved to Karaf 3.0.3. Using ODL built from master should work fine with Java 8, but the latest Helium SR still needs Java 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant