Ask Your Question
1

Java not running in instance

asked 2014-07-31 11:02:07 -0500

Uwe gravatar image

Hi,

I have a problem with java and open stack and need some input. Perhaps someone has a helpful thought on this?

I started an instance with the current cloud image of Ubuntu 14.04 (20140731). Then, installed openjdk-7-jdk. When I try to run java, I get strange errors. Curiously, the errors only occurs when working on a OpenStack instance. The same procedure works fine with for example an Ubuntu in a VirtualBox VM.

Here's what I get when I only run the java-command without any arguments (which should give me the help-text):

root@ubuntu-14:~# apt-get update
...
root@ubuntu-14:~# apt-get install openjdk-7-jdk
...
root@ubuntu-14:~# java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

root@ubuntu-14:~# java
Exception in thread "main" java.lang.IllegalArgumentException: Unmatched braces in the pattern.
    at java.text.MessageFormat.applyPattern(MessageFormat.java:508)
    at java.text.MessageFormat.<init>(MessageFormat.java:363)
    at java.text.MessageFormat.format(MessageFormat.java:835)
    at sun.launcher.LauncherHelper.getLocalizedMessage(LauncherHelper.java:317)
    at sun.launcher.LauncherHelper.printHelpMessage(LauncherHelper.java:374)

I don't really know where to look for - is there any substantial difference between the environment in a VirtualBox VM and an OpenStack instance that could cause this problem? Any help would be much appreciated!

I'm running OpenStack Havanna on virtual Ubuntu 12.04 on a VSphere Cluster (yes, I'm aware that this is not the most performant setup - but so far it has been sufficient for our small test project).

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-07-31 13:09:39 -0500

dbaxps gravatar image

openjdk-7-jdk installed via Synaptic Manager with all dependencies on Openstack IceHouse Ubuntu 14.04 instance

[boris@icehouse1 Downloads]$ ssh -i oskey25.pem ubuntu@192.168.1.155
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Jul 30 08:08:36 UTC 2014

  System load:  0.01              Processes:           73
  Usage of /:   5.9% of 19.65GB   Users logged in:     1
  Memory usage: 4%                IP address for eth0: 40.0.0.10
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud


Last login: Wed Jul 30 07:46:51 2014 from 192.168.1.127
ubuntu@ubuntudemo:~$ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
ubuntu@ubuntudemo:~$ java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32      use a 32-bit data model if available
    -d64      use a 64-bit data model if available
    -server   to select the "server" VM
    -zero     to select the "zero" VM
    -jamvm    to select the "jamvm" VM
    -avian    to select the "avian" VM
                  The default VM is server.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
edit flag offensive delete link more

Comments

Setup Light Weight X env on Ubuntu 14.104
# apt-get install xinit e17 xterm firefox -y

dbaxps gravatar imagedbaxps ( 2014-07-31 14:19:46 -0500 )edit
0

answered 2015-02-18 03:46:51 -0500

I'm facing the same issue... Did you manage to fix it?

edit flag offensive delete link more

Comments

Me too.. Couldn't find any solution..

benhart gravatar imagebenhart ( 2017-01-24 02:39:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-07-31 11:02:07 -0500

Seen: 1,020 times

Last updated: Feb 18 '15