I’ve been using my trustworthy thinkpad for a couple of years now, but as soon as I installed Fedora on it, it became quite slow due to gnome-shell using a huge amount of CPU power.
My thinkpad isn’t the quickest out there, it’s a dual core machine from around 2006, but 50% CPU on two cores for just Gnome was a bit excessive.
I’ve been searching a lot, and didn’t found any solution, until I started fiddling with Gnome-tweak-tool and saw the “Background logo” entry.
If you haven’t yet; Install gnome-tweak-tool with the following command: sudo yum install gnome-tweak-tool
The background logo is an PNG overlay on your desktop, and that overlay doesn’t work well with Intel GM cards.
Start gnome-tweak-tool, disable that extention and see your CPU usage drop to 2%, which is what it should be.
I encountered this weird behaviour last week where one managed server in a cluster of two servers constantly gave the error “HTTP Error 401 Unauthorized“.
The setup was a standard Oracle Service Bus installation on Oracle Weblogic.
The domain consisted out of one Admin server, one cluster with two managed servers.
Managed Server #1 was acting without problems but all the requests which needed authentication and which where pointed to Managed Server #2 failed and responded with a 401 Unauthorized message.
There was an error in the logs of MS#2, which is displayed at the bottom of this post as well. #### <> <Inbound http BASIC authentication failed
javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User webhosting javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User webhosting denied
The solution to this problem lies in the internal LDAP configuration of the faulty Managed Server. I did not find an answer to what might have caused this problem, but the solution was to rebuild the LDAP setting of the Managed Server.
This is done by following these steps:
Shut down Managed Server via Weblogic Console
Log in via SSH
Rename the following folder: %domain_directory%/servers/%osb_managed_server_1%/data/ldap
This post will outline how to install Oracle Java JDK in Fedora, Red Hat or CentOS.
Please note that this will only install the JDK, when you’re done you will need to select this JDK to be able to use it. That is outlined in this blog post: Easily switch between java versions using alternatives in Linux
First determine if you need 32 or 64 bit. If you’re unsure you can check using “uname -p” in a terminal which will display your kernel and which architecture you’re using.
Next, download the JDK that you wish to use. In this example I will be installing the latest JDK from Oracle, you can find it here: Oracle Java Downloads.
I have chosen Java Platform (JDK) 8u31, which downloads the RPM.
After the download is finished, open a terminal and go to the location of the download.
Next, enter this command:
sudo yum install jdk-8u31-linux-x64.rpm
This will install the JDK.
Important: After this is done, you have placed all the files in the right location, but can’t use it until you’ve finished the steps in this blog post: Easily switch between java versions using alternatives in Linux
This approach works in several distros, I’ve been using it in Ubuntu for a while and just used it in Fedora as well.
As a developer, you might need to switch between java versions often, this approach will come in handy then.
We will be using the command “alternatives”, in this case to check the configuration of your Java installation. The default is most often OpenJDK, while you might need Oracle Java.
Run “alternatives –display java” to see which versions you can currently choose from:
[joris@today ~]$ alternatives –display java
java – status is manual.
link currently points to /usr/java/latest/bin/java
Current `best’ version is /usr/lib/jvm/java-1.8.0-openjdk-126.96.36.199-3.b13.fc21.x86_64/jre/bin/java.
There’s no Oracle Java yet, make sure you’ve installed Oracle Java. If you haven’t, you can check this blog post: Install Oracle Java in Fedora, Red Hat or CentOS using Yum and RPM
When Oracle Java is installed, you can add it to your alternatives: “sudo alternatives –install /usr/bin/java java /usr/java/latest/bin/java 20000”
Please note: I used “latest” in the command above, another options is to specifically set the version you want. This way you can install several JDK’s and switch as shown below.
When that is finished, you can select your current flavour of Java:
[joris@today ~]$ sudo alternatives –config java
There are 2 programs which provide ‘java’.
* 1 /usr/lib/jvm/java-1.8.0-openjdk-188.8.131.52-3.b13.fc21.x86_64/jre/bin/java
+ 2 /usr/java/latest/bin/java
Enter to keep the current selection[+], or type selection number:
Choose the option you want to switch between Java versions.
As mentioned by enkouyami, please check if you need to use update-java-alternatives instead of alternatives. The use of alternatives was valid when I wrote the post, but might not be working anymore!
I’ve been using this trick for a while and it’s quite useful when querying Oracle Service Bus logs. I found myself trying to explain this one to a colleague and thought it made a nice post 🙂
Let’s start with the basic command:
Which translates into:
Note: the first argument is being cast from CLOB to XMLTYPE and that you can keep adding namespaces at the end by adding commas.
I’ve added three rows in my table “XML_TABLE” for this example:
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
Next we’ll query our XML_TABLE:
EXTRACTVALUE( xmltype(xmlval), ‘/book/title’ ) AS title,
EXTRACTVALUE( xmltype(xmlval), ‘/book/author’ ) AS author,
EXTRACTVALUE( xmltype(xmlval), ‘/book/year’ ) AS year,
EXTRACTVALUE( xmltype(xmlval), ‘/book/price’ ) AS price
Which results in this output:
This is a fairly handy trick.
I’m always logging in to different servers, which all have a different location for their logs. With this trick you can login and just type “cd logs” from anywhere.
First we will add our directory to the CDPATH variable:
$ echo $CDPATH
$ export CDPATH=/data/share/my_domain
$ echo $CDPATH
Then we’ll check if it is working:
$ cd logs
Awesome, we’ve arrived in our logs directory straight from our homedir!
This article shows how to execute remote commands via ssh, but you’ll send the commands from your own shell.
ssh my_server ‘ls -l /home/my_home_dir’
This will result in this output:
$ ssh ae2 ‘ls -lha ~’
drwxr-xr-x 2 joris joris 4.0K Jan 23 11:42 .
drwxr-xr-x. 5 root root 4.0K Jan 23 11:41 ..
-rw-r–r– 1 joris joris 54 Jan 23 11:41 .bash_logout
-rw-r–r– 1 joris joris 507 Jan 23 11:41 .bash_profile
-rw-r–r– 1 joris joris 213 Jan 23 11:41 .bashrc
-rw——- 1 joris joris 51 Jan 23 11:42 .history
-rw-r–r– 1 joris joris 171 Jan 23 11:41 .kshrc
-rw-r–r– 1 joris joris 375 Jan 23 11:41 .profile
-rw-r–r– 1 joris joris 153 Jan 23 11:41 .vimrc
What’s even better, is that you can run multiple commands separated with a semi colon, like this:
ssh my_server ‘ls -l /home/my_home_dir;whoami’
And the best trick is this one, user input with an interactive command, sending input and output back and forth!
ssh -t my_server ‘vi ~/.bash_profile’
Navigation in Console: DefaultDomain - Services - Data Sources
Create a new datasource, in my example I use the JNDI name “LocalDB“
When you’re done with the configuration, test the datasource to make sure all is well:
The status message will be green and show a check mark if you’ve configured your data source correctly.
JDeveloper: Oracle Service Bus project
If you import the DBRouting project from here, you should have all the necessary services.
I will only discuss the assign steps which are needed in the DBRouting_v1Pipeline.pipeline.
There are three assign actions:
1.) Assign $route: node-name($body/*)
This assign determines our routing key. It is the same key as
the first column in the routing table.
The XPath here is used to select the name of the first node
but you can change this to what you want to route on.
2.) Assign $query:
fn:concat("select ENDPOINT from ROUTINGTABLE where ROUTE = '", $route, "'")
This assign determines the query which will be executed in
the next step. We want to select the ENDPOINT which belongs
to the ROUTE which was assigned in step 1.
3.) Assign $query:
This assign actually executes the SQL query to our database,
which is the first argument.
The second argument names the re-occurring rows, in this
The thirst argument is the query to execute.
The XPath after the execute-sql statement is to make sure
we only get one endpoint.
4.) After those assigns, we use place a task “Routing Options” in the HTTP Route node:
We only use the “URI” Routing Option:
This ends the article, if you execute the pipeline you will see the endpoint has become dynamic, it is retreived from the routing table:
Okay, this was a bit awkward, I installed the quick start 12c Fusion Middleware and was well underway to getting it all up and running.
Untill I closed JDev and couldn’t find the executable anymore..!
For anyone who had the same embarrassing situation, it’s located here:
Everybody knows that the java executable is located in /usr/bin/java , but what if you need the JDK / JRE location itself?
Just using “whereis” will not get you there, that will point you to the /usr/bin/java point.
So, let’s find out a but more about /usr/bin/java:
ls -l /usr/bin |grep java
Awesome, this will lead us somewhere, it’s a symlink to /etc/alternatives/java
So let’s do the same there:
ls -l /etc/alternatives/ |grep java
And we’ve hit the jackpot, among the lines here, there’s a bunch of lines pointing us to the JRE location:
As you can see in the screenshit, our java executable within the JRE location is: