WLS 12c 12.1.3 on MacOS – error: CFGFWK-42057: No templates installed

The WLC 12c 12.1.3 config.sh fails to find installed domain templates after a new/clean install and attempting to create a new domain, it gives an error:

CFGFWK-42057: No templates installed

This doesn’t seem to be a common issue, but luckily this post mentions the domain templates are installed to wlserver/common/templates/wls

Selecting the ‘Create Domain using Custom Template’ option and pointing to this location, sure enough the templates are there. Selecting the wls.jar template, and continuing, I then get this:

Ugh. I’ll install on Linux instead.

Switching Java versions on Mac OS

The Java JDK install on MacOS has some interesting platform specific utilities, like

/usr/libexec/java_home

which tells you which Java version you’re currently using and where it’s installed. I have Java 9 currently installed and it tells me:

/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home

If you have multiple version installed, adding -V will list all the versions and where they’re installed:

$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    9, x86_64: "Java SE 9" /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home
    1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home

The next logical question from here would be ‘how do I switch versions’? If you set your $PATH in a .profile or similar approach, you can eval java_home to add the current version to your path, but a neat trick discussed in one of the answers here (thanks to this SO user for this tip) uses the -v option to allow you to switch versions. Adding a couple of aliases to your .profile like this:

alias j9="export JAVA_HOME=`/usr/libexec/java_home -v 9`; java -version"
alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version"
alias j7="export JAVA_HOME=`/usr/libexec/java_home -v 1.7`; java -version"

… and you’ve got a quick shortcut to switching between different versions.

Planning for a homelab with an HP Proliant DL380 G7

So I got caught up with the idea of running a rack mount server at home and setting up virtualization to run a ‘bunch-o-stuff’. As you do. Having never done anything with enterprise server hardware before (although I did recently set up Proxmox virtualization on my Mac Pro), naturally I have a ton of questions:

  • Should I run ESXi or Proxmox?
  • The DL380 has 8 hot-swappable 2.5″ drive bays. What’s the minimum number of disks needed to run, and do you need to configure a RAID array? Question here. A: Yes you do need to configure a RAID array, apparently it can’t be disabled. So you need 2 disks at a minimum for RAID0 (striped) or RAID1 (mirrored). See also HP Smart Array Controller docs here.
  • What about RAID10, what I understand is a combination of 0 + 1. See article here.
  • Can you run regular laptop 2.5 disks, or do they have to be ‘midline’ or enterprise? This seems like a hotly debated question with many varying opinions. The answer is probably ‘it depends’, at least on what you’re planning to use your server for. e.g. is it doing to be running 24/7, are you going to have more than 2 drives (more may cause vibrations that regular laptop drives may not be constructed to handle). A consistent answer if you’re not going to go with the HP branded/supported disks, is that WD Red drives, intended for use in NAS appliances, will work reliably in a rack server. Everything else is YMMV. I’m going with a pair of cheap HGST 500GB drives in RAID1 to get started, and then might add a couple of WD Blacks or Reds for more storage later.
  • 10k and 15k SAS drives are new to me, I’m more familiar with SATA. This might be something I’ll check out. The 146GB capacity seems a common size, but that’s rather small if I’m going to create a bunch of VMs. They’re pretty cheap at around $30 though, so could easily pick up a few for a RAID array.

So many options 🙂

 

JavaOne 2017 Day 1 Keynote: notes and thoughts

Unfortunately I wasn’t lucky enough to attend JavaOne 2017 this year, so I’m catching up this evening and watching the recording of the Day 1 Keynote here.

A few notes, key quotes and thoughts (screenshots taken from the video):

Mark Cavage, Vice President of software development, Oracle:

  • The next decade: Java first, open, evolving, nimble, scalable
  • Java EE 8. “Is it nimble? Well no, EE7 shipped 4 years ago”
  • Java EE moving to the Eclipse Foundation. What does this mean? It means everything is moving to the Eclipse Foundation
  • David Blevins (Tomitribe), Ian Robinson (IBM) and Mark Little (Red Hat) take the stage to talk about moving EE to the Eclipse Foundation:

  • David Blevins: “EE4J is EE for the next generation”, easy access to the TCKs allows developers to go straight to the tests if you have a problem, “we can all go faster in the end”
  • Ian Robinson: “Eclipse Foundation makes sense, it’s the one we (IBM) picked when we open sourced J9” (IBM’s JVM). “Having the low level JVM (J9) and Enterprise platform with the Eclipse Foundation is a really strong endorsement for Java development top to bottom at Eclipse”, “… the future of Java is strong”
  • Mark Little: “moving EE4J to Eclipse allows these two big communities (microprofile is now also with Eclipse Foundation) to come together and help to drive Enterprise Java into next decade”

Java 9:

  • From this point onwards, all features in Oracle JDK and OpenJDK will be the same, zero difference between them
  • Releases of Java will now be every 6 months.

James Governor, RedMonk:

  • “things have changed more in the Java ecosystem in the last 3 weeks than they have in the previous 13 years”
  • observations about adoption of Java by web companies, most of which rejected Java initially in favor of Ruby and other cooler technologies, only to adopt Java later as they struggled to adapt and scale

Cloud, Niklas Gustavsson, Spotify:

  • 140 million active users, more than 3 billion streams a day, 4 million requests a second
  • Started out as a Python backend
  • “When startups growup they turn into Java shops” : James Governor
  • Spotify: 1200 Java based microservices in production:

    Java and Kubernetes Craig McLuckie, Heptio:

  • “Kubernetes over the last three and a half years has emerged as pretty close to the standard” for container orchestration
  • containers simplify the operations process
  • predictable deployment and portability across environments
  • For the Java community this is significant – “we’re starting to see middleware being teased apart”  – seeing emergence of systems like Kubernetes as a standard way to operate systems, while a lot of other functionality being pushed up into application libraries
  • Your Java apps are now open to a polyglot world, they can co-exist with other systems in other languages
  • Decouples you from your cloud provider and how you want to run your applications
  • Kubernetes – a natural way to run Java applications

Wercker, Java and Kubernetes:

  • build, deploy and operations support for Container based apps
  • wercker.com

Observability and Operations:

  • Java Flight Recorder: now open sourced
  • Container Native development, simpler
  • With microservices, you need to know not just when an issue occurred, but where? (which service, and where is it running)
  • Container Diagnostics Service: runs in production, low overhead

Serverless: The Fn Project

  • Functions as a service
  • Fn server / FDK (Function Development Kit) / Fn Flow
  • Fn Flow – allows you to compose apps from your functions
  • fnproject.io – now open sourced and on github

Java 9 – Mark Reinhold

  • Jigsaw now adds modules to the platform
  • Use Java 9 modules to build smaller Docker images, including just the modules your app needs and no more (demo shows Alpine Linux Docker image with Java and app as 266MB, but building the app with only the required modules the image size is down to 39MB
  • rt.jar no longer exists in Java 9, but you can use the nio virtual filesystem jrt:/ namespace to browse available classes if needed (useful for tools developers?)
  • source that uses JDK internal classes will no longer compile on Java 9, but, strong enforcement of internal use only apis is relaxed ‘for now’ to ease transition
  • Java 9 is: open, evolving, nimble, scalable
  • jshell – repl for Java: tab completion shows you available methods, retains history

Eugene Petrenko, Jetbrains

  • demo early access build working with Java 9 modules
  • creating module-info.java using code complete in IntelliJ to help you create your module dependencies

(As a sidenote, is the first JavaOne keynote where the new tech demo was done with an IDE other than Netbeans? Unless I missed it, there was no mention of Netbeans in the keynote this year)

Mark Reinhold

  • new feature releases every 6 months
  • new features will be included only when they are ready (if they don’t make the next 6 month release then they’ll get moved to the next)
  • the next release is only 5 months away!

Brian Goetz: Project Amber: Right-sizing Language Ceremony

  • streamlining the development process, reducing bolierplate
  • local variable type inference: full static typing, but removing the need to declare the type for a local variable because the type can be inferred when you assign it a value, e.g. var url = new URL(“http://www.example.com”);
  • coming in 18.3
  • switch statement to support switching on a type, as alternative for repetitive if statements with instanceof’s

That’s a lot of changes and content, time to go check out those new features!