Installing Java 1.6 on Fedora 7 64 bit
March 16th, 2009I usually use yum on fedora to install everything except when I need to tweak the code to fit my needs (mod_perl, apache, php, mysql). Java is one that I don’t need to tweak much, I just needed a base installation so I can get tomcat running.
I went to Sun’s java page to download the latest version of Java 1.6:
http://developers.sun.com/downloads/
from the list pick Java SE (JDK) 6. Then download the JRE or SDK.
When prompted for Platform choose “Linux x64″. Finally, from the list download jdk-6u12-linux-x64-rpm.bin (notice that you should have the rpm in the name).
Once you have it downloaded, run the binary file as follows:
chmod 775 jdk-6u12-linux-x64-rpm.bin
./jdk-6u12-linux-x64-rpm.bin
follow the instructions to install and you’re done installing but sun puts files in a different place then fedora expects it so if you run “java -version” you may see java 1.5.0 (which I did since I already have 1.5 installed). If you see 1.6 then you’re good to go. If you are still seeing 1.5 I ran the following command:
alternatives –install /usr/bin/java java /usr/java/jdk1.6.0_12/jre/bin/java 20000
At this point starting up tomcat worked for me. If it doesn’t work for you you may need to add the following environment variable:
export JAVA_HOME=/usr/java/jdk1.6.0_12/jre/
In the above commands your paths may be different.
lolFail
October 17th, 2008Marek and Sesnon Fires
October 14th, 2008The Marek and Sesnon fires are pretty close to where I live and you can actually see both from my balcony. I’ve taken a few shots:
and:
You can see more pictures in a new set I created on flickr at:
http://www.flickr.com/photos/sergem/sets/72157608016966263/
I also found this google maps mashup from CBS2, I’ve submitted my photos on there as well:
Google Maps
Bad Maven, bad!
September 14th, 2007Recently I had a compilation error when using Maven:
OrderDirectionConverter.java:[3,29] package javax.faces.component does not exist
Immediately I checked for javax.faces in my classpath by looking at the maven pom file. Everything looked fine but just to be sure that something weird wasn’t going on with pom dependencies, I ran the following command:
mvn help:effective-pom
This is one of the most helpful commands when you need to debug your pom problems. It basically dumps out the final pom file that will be used by maven (after including the pom files of all dependencies). The official description of the plug-in is:
Display the effective POM for this build, with the active profiles factored in.
Once I had the effective pom dumped out, I noticed that there were no errors. javax.faces was in my classpath and I couldn’t explain why there was a failure. After exhaustive trials and errors I found out the solution to this irritating problem. Upgrade maven to 2.0.7. I was using maven 2.0.4 which was throwing out that error, and with 2.0.7 everything was fine.
Xerces Strikes Again
June 26th, 2007I’m working on a Java project currently. We’re using Maven2, Spring 2.0 and JPA using Hibernate. One of the last things I wanted to install was connection pooling. It should have been an easy installation because all I needed to do was add c3p0 as my data source and inject it into my entity manager factory. My configuration looked like this:
When I ran a test in maven I noticed that c3p0 was setting up and I could see debug messages from it but then it failed. Looking at the surefire report I saw:
Error creating bean with name ‘entityManagerFactory’ defined in URL [file:/Users/mark/projects/quadran/target/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.StackOverflowError
Caused by: java.lang.StackOverflowError
at java.lang.String.toLowerCase(String.java:2213)
at java.lang.String.toLowerCase(String.java:2277)
at org.apache.xerces.util.URI.setScheme(URI.java:908)
at org.apache.xerces.util.URI.initializeScheme(URI.java:576)
at org.apache.xerces.util.URI.initialize(URI.java:400)
at org.apache.xerces.util.URI.(URI.java:211)
at org.apache.xerces.util.URI.(URI.java:195)
at org.apache.xerces.impl.XMLEntityManager.expandSystemId(XMLEntityManager.java:1140)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:581)
at org.apache.xerces.impl.xs.XMLSchemaLoader.xsdToXMLInputSource(XMLSchemaLoader.java:625)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:580)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:489)
at org.apache.xerces.impl.xs.XMLSchemaLoader.processJAXPSchemaSource(XMLSchemaLoader.java:588)
and it continues on and on like that. It took me quite some time to figure this one out and the error had nothing to do with anything specific to my project and so it was hard to track down. I also couldn’t find any others online with the same error except one. So I decided to write about it on my blog to help others if they happen to have the same error. Here’s the forum page that helped me:
http://forum.springframework.org/showthread.php?t=34654
The solution? Xerces 2.0.2 has some bug and maven2 comes with it. Instead you need to use Xerces 2.8.1.
And that solved the issue, c3p0 was able to connect, all my tests passes.
Wordpress sidebar pushed to bottom of page
June 5th, 2007I recently made a post in my other blog linuxtomacbook.com and noticed that the wordpress sidebar had disappeared. When I scrolled down to the bottom of the page I noticed that the sidebar was now all the way at the bottom after all the posts. I couldn’t figure out what the error was because I didn’t use any code in the post, I didn’t even have any special characters like a less than or greater than sign.
Inside the wordpress administration, I looked at the visual editor and couldn’t find anything again. It was time to look at the html itself. At first glance I didn’t notice anything different. After looking at the code for about 5 minutes and reading it line by line, the only thing that stuck out at me was an extra line the wordpress editor had put in. This line was sandwiched between a </p> and another div:
<div align=”left” />
Once I removed that line, everything went back to normal.
Bluegrind.com now has blogs
May 21st, 2007I’ve been working on bluegrind.com for a while now and over the weekend we were able to roll out the blog section.
Bluegrind.com is a web site that automatically converts news and blogs to audio/mp3. We started the site because we wanted to create a site that would allow visually impaired internet users to get the latest news read to them. While we were building the engine though we found out many other uses for it as well. I started queuing up news stories that interest me so I could listen to them while driving in LA traffic or put them on my ipod to listen to the news while at the gym. We’re still building the site with our original goals in mind and have even made a mirror site that can be navigated through audio and keyboard presses (no visual pages).
Back to the blogs section. With our latest changes, we offer registered users the ability to add their blog to be processed by the bluegrind engine. Once you have a blog registered, you can go to the control panel and see instructions on how to add our audio player under each post on your own blog. You can see that I have already installed the code to my wordpress template and th player appears at the end of this post.
Please visit the site and leave us comments on what else we can do to make it better for the community. Also keep in mind that we are in beta and the site is not complete yet but we thought we have enough ready to get it to users who need it and also get some early feedback.




