Warning in Ubuntu when running application :O

I just began working with Ubuntu. It seems really cool, and really new.
Installed netbeans, and after 10 minuttes of work I get this error when I try to run something:


03-09-2010 21:40:01 com.sun.corba.se.impl.ior.IORImpl getProfile
WARNING: "IOP00511201: (INV_OBJREF) IOR must have at least one IIOP profile"
org.omg.CORBA.INV_OBJREF:   vmcid: SUN  minor code: 1201  completed: No
        at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:473)
        at com.sun.corba.se.impl.logging.IORSystemException.iorMustHaveIiopProfile(IORSystemException.java:495)
        at com.sun.corba.se.impl.ior.IORImpl.getProfile(IORImpl.java:334)
        at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:787)
        at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:761)
        at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(CDRInputStream.java:231)
        at com.sun.corba.se.impl.resolver.INSURLOperationImpl.getIORFromString(INSURLOperationImpl.java:120)
        at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(INSURLOperationImpl.java:130)
        at com.sun.corba.se.impl.orb.ORBImpl.string_to_object(ORBImpl.java:836)
        at org.GNOME.Accessibility.AccessUtil.getRegistryObject(AccessUtil.java:143)
        at org.GNOME.Accessibility.JavaBridge.registerApplication(JavaBridge.java:1147)
        at org.GNOME.Accessibility.JavaBridge.<init>(JavaBridge.java:398)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:786)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:875)
        at java.awt.Window.getToolkit(Window.java:1170)
        at java.awt.Window.init(Window.java:400)
        at java.awt.Window.<init>(Window.java:438)
        at java.awt.Frame.<init>(Frame.java:419)
        at javax.swing.JFrame.<init>(JFrame.java:218)
        at javadaemon.com.GraphicsProject.GraphicsProject.<init>(GraphicsProject.java:12)
        at javadaemon.com.GraphicsProject.GraphicsProject.main(GraphicsProject.java:20)

What does it do?
Should I be worried about it?

Run this commands in your console :slight_smile:

sudo update-java-alternatives --set java-6-sun
sudo update-alternatives --config java

You usw OpenJDK instead of Suns Java :wink:

Please post the voodoo to switch it back too. OpenJDK is not without its problems.

Cas :slight_smile:

Thank you very much.

I got this in my terminal:



mads@ubuntu:~$ update-java-alternatives --set java-6-sun
update-java-alternatives: no root privileges
mads@ubuntu:~$ sudo update-java-alternatives --set java-6-sun
[sudo] password for mads: 
update-alternatives: error: no alternatives for HtmlConverter.
update-alternatives: error: no alternatives for java-rmi.cgi.
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/appletviewer
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/apt
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/extcheck
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/HtmlConverter
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/idlj
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jarsigner
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jar
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/javac
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/javadoc
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/javah
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/javap
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/java-rmi.cgi
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jconsole
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jdb
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jhat
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jinfo
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jmap
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jps
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jrunscript
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jsadebugd
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jstack
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jstatd
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/jstat
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/native2ascii
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/rmic
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/schemagen
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/serialver
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/wsgen
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/wsimport
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-6-sun/bin/xjc
mads@ubuntu:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Prioritet  Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
* 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Press enter to keep the current choice[*], or type selection number: 2
mads@ubuntu:~$ 

And I still get the error upon compiling.

I’m fairly new to ubuntu - your help is greatly appriciated.

I could just uninstall openJDK but then I lose netbeans aswell :frowning:
Should I rely on eclipse then instead?

Why not simply grab the JDK 6u21 installer from here ?

Your suggestion works but it is a bit dirty as Sun’s Java seems to be already installed on his machine. If he does a custom install, update-alternatives might not work as expected except if he uses the same directories.

Ok, i will make this all in one Box:


//These two lines if you use Ubuntu 10.04
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner
// Next very imporant line:
sudo apt-get remove openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib 
sudo apt-get install sun-java6-jdk sun-java6-source sun-java6-demo sun-java6-doc sun-java6-fonts 
//The next two commands, choose Sun Java when the were asked
sudo update-alternatives --config java
sudo update-alternatives --config javac

I hope this will fix it 8)

Right now, I wish Linux would just die. Why can’t they get this stuff right?

Cas :slight_smile:

I blame NetBeans for installing thier OpenJDK when I installed Netbeans.

@Teem
Will try that when I get on my Linux again. On iPad right now.

Hm nearly all the problems in Linux stem from the relatively archaic concept of “shared libraries” don’t they.

Cas :slight_smile:

Okay I tried the commands you posted… some went good, some didn’t.
Here is excactly what happended:

mads@ubuntu:~$ deb http://archive.canonical.com/ubuntu lucid partner
No command 'deb' found, did you mean:
 Command 'debc' from package 'devscripts' (main)
 Command 'derb' from package 'libicu-dev' (main)
 Command 'dab' from package 'bsdgames' (universe)
 Command 'debi' from package 'devscripts' (main)
deb: command not found
mads@ubuntu:~$ deb-src http://archive.canonical.com/ubuntu lucid partner
deb-src: command not found
mads@ubuntu:~$ sudo apt-get remove openjdk-6-jdk openjdk-6-source openjdk-6-demo openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib 
[sudo] password for mads: 
Indlæser pakkelisterne... Færdig
Opbygger afhængighedstræ        
Læser tilstandsoplysninger... Færdig
Pakken openjdk-6-source er ikke installeret, så den afinstalleres ikke
Pakken openjdk-6-demo er ikke installeret, så den afinstalleres ikke
Følgende pakker blev installeret automatisk, og behøves ikke længere:
  libcommons-collections3-java libjna-java libswing-layout-java libsm-dev jsvc
  junit4 apache2-utils libice-dev liboro-java libgcj-bc x11proto-kb-dev
  libnb-platform-devel-java junit libfreemarker-java libcommons-compress-java
  libregexp-java liblog4j1.2-java libapr1 javahelp2 libaccess-bridge-java-jni
  libservlet2.4-java subversion libaccess-bridge-java libxdmcp-dev
  liblucene2-java jetty libslf4j-java gcj-4.4-jre-lib libgcj10 jruby1.1
  libsvn1 xtrans-dev libdb4.7-java-gcj ant-optional-gcj x11proto-core-dev ant
  libcommons-logging-java libsvn-java libnb-platform11-java gcj-4.4-base
  libgcj-common libcobertura-java libjaxp1.3-java libxt-dev tzdata-java
  libini4j-java libjetty-java libcommons-net-java libjline-java libasm2-java
  libxerces2-java libcommons-daemon-java x11proto-input-dev
  libpthread-stubs0-dev libxau-dev libcommons-beanutils-java libpthread-stubs0
  libdb-je-java libswingworker-java libdb4.7-java libcommons-digester-java
  libhamcrest-java libjtidy-java libjzlib-java libxml-commons-resolver1.1-java
  libswingx-java libappframework-java libservlet2.5-java libicu4j-java
  libx11-dev libservlet2.3-java libjsch-java ca-certificates-java libxcb1-dev
  libnb-javaparser-java ant-gcj ant-optional libjetty-java-doc
  libnb-svnclientadapter-java libaprutil1 libbeansbinding-java
  libnb-ide12-java
Brug 'apt-get autoremove' til at fjerne dem.
Følgende pakker vil blive AFINSTALLERET:
  default-jdk default-jdk-doc default-jre default-jre-headless
  icedtea-6-jre-cacao libnb-apisupport1-java libnb-java3-java netbeans
  openjdk-6-doc openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
  openjdk-6-jre-lib
0 opgraderes, 0 nyinstalleres, 13 afinstalleres og 2 opgraderes ikke.
After this operation, 436MB disk space will be freed.
Vil du fortsætte [J/n]? j
(Læser database... 174280 filer og mapper aktuelt installeret.)
Afinstallerer netbeans...
Afinstallerer libnb-apisupport1-java...
Afinstallerer libnb-java3-java...
Afinstallerer default-jdk...
Afinstallerer default-jdk-doc...
Afinstallerer default-jre...
Afinstallerer default-jre-headless...
Afinstallerer icedtea-6-jre-cacao...
Afinstallerer openjdk-6-doc...
Afinstallerer openjdk-6-jdk...
Afinstallerer openjdk-6-jre...
Afinstallerer openjdk-6-jre-headless...
Afinstallerer openjdk-6-jre-lib...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.da_DK.utf8.cache...
Processing triggers for doc-base ...
Processing 1 removed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-support ...
mads@ubuntu:~$ sudo update-alternatives --config java
There are 1 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                  Prioritet  Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-sun/jre/bin/java   63        auto mode
* 1            /usr/lib/jvm/java-6-sun/jre/bin/java   63        manual mode

Press enter to keep the current choice[*], or type selection number: 0
mads@ubuntu:~$ sudo update-alternatives --config javac
update-alternatives: error: no alternatives for javac.

NetBeans uninstalled automaticlly…

Sometimes i hate myself and linux :-X

//These two lines if you use Ubuntu 10.04
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository "deb-src http://archive.canonical.com/ lucid partner"
// Next very imporant line:
sudo apt-get install sun-java6-jdk sun-java6-source sun-java6-demo sun-java6-fonts
//The next two commands, choose Sun Java when the were asked
sudo update-alternatives --config java
sudo update-alternatives --config javac

I tested the lines and they should work :stuck_out_tongue:

Personally I do not install NetBeans nor Eclipse from the repositories.
You can just use the NB installer from their hp. Also you can then use the latest versions.

Yes! Finally works mate :stuck_out_tongue: I love you