asort byJavaSite

index

02/06/2012
02/05/2012
02/04/2012
02/03/2012
02/02/2012
02/01/2012
01/31/2012

sitios en español

02/06/2012
Javalobby
Java.lang.VerifyError: Expecting a stackmap frame at branch target – JDK 7
veerasundark02/06/2012 at 05:51:38
Right now, when I try to persist an object in Google App Engine, I’m facing the error “Java.lang.VerifyError: Expecting a stackmap frame at branch target“. I’m using JDK 7 and it seems like the problem lies with this JDK. After googling a bit, I found that there seems to be two solutions to fix this problem. Solution 1: Change to JDK 6 As simple as is, change your JDK to version 6 and you...
 TOP
Javalobby
Documentation that is useful
jexenberger02/06/2012 at 05:49:48
I was reading this article by Neil Mcallister on his Fatal Exception blog entitled "How to get developers to document their code". Now it begs the question: What documentation is actually useful? Well, like all things in general I don't think it's a simple answer, best I could say is; what works well in your context. Preview Text:  I...
 TOP
Javalobby
Adding Version Information to your JAR’s Manifest
CaptainDebug02/06/2012 at 05:46:59
One of the handy things about using Maven is that, by default, the names of the artifacts it creates include the current version number from the POM's version tag. It doesn’t matter what type of artifact it is, whether it’s a JAR, WAR or EAR you generally end up with something like this: Preview Text:  One of the handy things about using...
 TOP
Javalobby
A Simple Reminder for Maven/Gradle/Ivy Users: Proxy Central
tmo9d02/06/2012 at 05:39:30
Over the course of the past few years, I’ve interacted with hundreds of people when talking about build tools and repository management. It continues to surprise me how many people don’t realize where these artifacts come from. When you run a build and these JARs just show up alongside all of their dependencies, it’s like magic to most people. If you know how it works, it’s very...
 TOP
Javalobby
Refreshing AppFuse's UI with Twitter Bootstrap
mraible02/06/2012 at 05:35:57
The last time AppFuse had an update done to its look and feel was in way back in 2006. I've done a lot of consulting since then, which has included a fair bit of page speed optimization, HTML5 development and integrating smarter CSS. It was way back in '05 when we first started looking at adding a CSS Framework to AppFuse. Preview Text:  ...
 TOP
02/05/2012
Javalobby
Building updated packages for sun-java6 6u30
tomo_connor02/05/2012 at 16:41:37
Recently, Oracle withdrew the ability for Linux distributions to repackage Java and distribute their own packages.  This has been widely regarded as a bad idea.  I tend to agree. So, let's re-roll an old sun-java6 deb file, with a new content to contain the latest 6u30 java release. You will need:    Preview Text:  Recently, Oracle...
 TOP
Javalobby
How To: Install graylog2 on CentOS 5 with RVM + Passenger
joemiller02/05/2012 at 06:00:45
Graylog2 is an open-source self-hosted centralized log management tool. Think of it as a do-it-yourself version of loggly.com, or perhaps a simpler alternative to Splunk. Logs are stored in a MongoDB database. I won’t go into too much detail, so if you want more info check out graylog2.org Preview Text:  I decided to see if RVM – Ruby Version...
 TOP
Javalobby
Informer is dead: long live Informer!
trussellrose02/05/2012 at 05:59:33
Well, who’d have guessed it? After two long years, the new edition of Informer is finally out. Preview Text:  Read several articles by search experts like Charlie Hull and Tyler Tate. A great resource for enterprise search followers. Mitchell Pronsc...
 TOP
Javalobby
The Best Default Setting is not to Have a Setting
pjlehtim02/05/2012 at 05:40:53
It is easy to think that letting users change all aspects of an app UI makes the UI better. We've all heard the "if they don't like it they can change it" argument. It is also very easy to come up with theoretical scenarios where users would actually want to change any one aspects of the UI.  Preview Text:  It is easy to think...
 TOP
Javalobby
jOOX and XSLT. An XML love story, continued
lukas.eder02/05/2012 at 05:38:04
The somewhat functional way of thinking involved with jOOX’s XML manipulation cries for an additional API enhancement simply supporting XSLT. XSL transformation has become quite a standard way of transforming large amounts of XML into other structures, where normal DOM manipulation (or jOOX manipulation) becomes too tedious. Let’s have a look at how things are done in standard Java ...
 TOP
02/04/2012
Javalobby
Getting started with the Sensu monitoring framework
joemiller02/04/2012 at 22:42:16
I’m excited about Sensu, a new open source monitoring framework, and I’d like to help others get started with it as well. So, after observing the frequent questions from new visitors to #sensu on Freenode I thought perhaps the best way to do that is to write a blog article to help folks get started. If you still have questions after reading this, feel free to come by #sensu on...
 TOP
Javalobby
Using the Android Parcel
ts7277702/04/2012 at 22:36:01
A short definition of an Android Parcel would be that of a message container for lightweight, high-performance Inter-process communication (IPC). On Android,  a "process" is a standard Linux one, and one process cannot normally access the memory of another process, so with Parcels, the Android system decomposes objects into primitives that can be marshaled/unmarshaled across process...
 TOP
Javalobby
Master/worker or P2P Grid? How about You choose?
lolocohen02/04/2012 at 22:35:48
What is possible? Simple master/worker topology In its initial design, JPPF is a distributed parallel processing framework based on a master/worker architecture. A JPPF grid is made of 3 sorts of components that communicate with each other: clients which submit the work to the grid, nodes which execute the work, and servers which receive the work from clients and distribute it to the nodes in...
 TOP
Javalobby
I don't like NullPointerExceptions
xtraclass02/04/2012 at 22:35:36
I don't like NullPointerExceptions. Actually I don't like the message of NullPointer Exceptions, i. e. "null". Such a message is usually not very helpful. I created a few rules for myself how to avoid certain exceptions and actually define pre- and post-conditions for methods. Let me please give you a few examples. In the beginning of a non-private method I usually check all method...
 TOP
Javalobby
Why does my Maven build suddenly fail?
tvinke02/04/2012 at 22:19:37
I want to share something a software developer or operations guy every now and then encounters. And which I did yesterday. It all started with our nightly Maven build failing last Saturday Jan 28 on a java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventLocator The interesting snippet from the concole output from this build looked like this: Preview Text:  ...
 TOP
java.net
Night Dreams about NetBeans 7.1, etc.; Day Work Configuring CentOS Linux for JavaFX 2.1
editor02/04/2012 at 18:28:14

Last night I dreamed seemingly all night about NetBeans 7.1, the JavaFX 2.1 Developer Preview, the JDK 6 and JDK 7 installations on my CentOS Linux system, Java threads, the JDK 7 Fork/Join framework, closures... and probably a few more things were in there too. That kind of thing happens to me sometimes after a late night of programming or development-related brainstorming.

Now, if these dreams happen when I have looming deadline, I usually consider it a nightmare -- because I'll often "work" all night "solving" some problem that doesn't exist in my day world. But I'm hoping last night's dreams will ultimately prove to have been at least a little bit productive. There were plenty of curious ideas mixed in there. I'll find out if any of it's useful over the next several days...

Day work: JavaFX 2.1 Developer Preview on Linux

It's daytime now, so I'll get down to some practical work. First, there's some good news for developers who want to try out JavaFX 2.1 Developer Preview on Linux: Linux Release Notes and installation instructions are now available (that wasn't the case when I wrote my Getting Started (Very Preliminarily)... blog post a couple weeks ago). Also, the 2.1 Developer Preview is has advanced to build b11 (I originally downloaded build b9).

The instructions for JavaFX 2.1 on Linux identify the following system requirements:

  • Ubuntu Linux 10.4 or higher (32 or 64 bit)
  • JDK 6 update 26 or higher
  • gtk2 2.18+
  • libavcodec (for media)

I'm running CentOS 5.5, not Ubuntu; my current JDK 6 is prior to update 26; and rpm -q gtk2 tells me that I have gtk2 Version 2.10.4-20.el5. Not the perfect starting point... But, my guess is that likely I'll be able to get a proper configuration in place.

The latest GTK2 that's available via yum for CentOS 5.5 is still in the Version 2.10 sequence. So, I downloaded the last stable GTK2 (Version 2.24.9), and tried installing it. The result of ./configure was a bunch of missing dependencies (too old a version of GLib, and missing atk, pango, cairo, and gdk-pixbuf-2.0). Using yum to see what prepackaged versions of these are available for my CentOS system, I found that in all cases the available packages predate the required versions.

Stepping back to GTK+ 2.18 would help some, but still the dependencies could not be met by simply using the yum package manager.

So, it's a dilemma. I'd like to try out the JavaFX 2.1 Developer Preview on my CentOS system, but there's a pretty big gulf between the CentOS 5.5 packages and what's required for JavaFX 2.1. Attempting big jumps in package versions can break a stable Linux system, in my experience. And the idea of upgrading to a newer operating system isn't all that appealing (that means downtime, and I do have development deadlines to meet). In addition, there are other things I'd like to be working on as well (such as experimenting with the performance differences between various strategies for efficiently utilizing multicore computers -- all that non-JavaFX stuff I was dreaming about last night).

I'll have to think about this for a while... Or, perhaps another night of Java-centric dreaming will provide a solution!

 TOP
TheServerSide.com
x += x++ * x++ * x++; Really? Just a little mock OCAJP exam question to get you thinking.
02/04/2012 at 14:13:38
x += x++ * x++ * x++; Now that's a little annoying. You'd shoot a developer who worked that into a program, but it's they type of thing you'd see on a certification exam. Maybe it's a little too difficult for the OCAJP, the Associate exam from Oracle, but it's probably pretty good fodder for the new OCPJP exam for Java 7.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
DevX.com
Using Hibernate to Implement Multi-tenant Cloud Architecture
Manoj Debnath02/04/2012 at 03:21:48
Hibernate is an excellent Java ORM tool but it lacks the features required to implement a multi-tenant cloud architecture. Don't let that stop you.
 TOP
02/03/2012
TheServerSide.com
TheServerSide Java Symposium hits the road and the Web in 2012
02/03/2012 at 15:08:09
This year, TheServerSide Java Symposium -- North America's longest-running, vendor-neutral Java conference -- is being reinvented to make it accessible to more Java professionals. So, get ready for the new format’s first outing on April 10, and set your GPS for San Francisco.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
Tiggzi: Cloud-based HTML5 And Hybrid Mobile App Builder Is Now Free!
02/03/2012 at 15:07:06
Tiggzi is cloud-based mobile app builder. It makes it super easy and fast to build HTML5 and hybrid (with PhoneGap) mobile apps entirely in the cloud. With a new Free plan, anyone can now build a mobile app.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
Spring 3, Spring Web Services 2 & LDAP Security
02/03/2012 at 15:06:26
Creating and securing a Spring 3 , Spring WS 2 web service using multiple XSDs and LDAP security.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
02/02/2012
TheServerSide.com
Apache JMeter 2.6 released
02/02/2012 at 22:01:51
Apache JMeter, the Open Source Load Test tool reference, which recently became a Top Level Apache project has released a new version 2.6

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
java.net
SwingX 1.6.3 Released
kschaefe02/02/2012 at 19:10:55

I am very pleased to announce the release of SwingX 1.6.3.  While the release notes contain many fixes, I wanted to take a minute to highlight some of the major changes.

First and foremost, we have more fully adopted Maven.  The project is now a collection of smaller modules. This will make it easier for clients to use only the pieces of SwingX that they need or want.  To enable us to break SwingX into smaller modules, some classes have been moved or reorganized.  Don't worry, we've left a deprecated copy in the original location in all instance but one (I'm looking at you JXBusyLabel.Direction).

Secondly for Maven, we needed to rename our groupId.  Per discussions with the maven.java.net folks, we are now using org.swinglabs.swingx as the groupId.  This is a change from org.swinglabs.  Doing so allows us to use the maven.java.net facitilities for automatically updating Maven Central with our releases.  Future releases should be a lot easier for us in that regard.

The third Maven-related change is that swingx-core no longer contains a copy or dependency on all SwingX classes.  The swingx-graphics package is not used by any of our components.  To suppliment the need to have an all-in-one jar, we have created the swingx-all module which provides all SwingX content as a single JAR file.

To highlight some non-Maven changes, we have:

  • Improved our serialization support.
  • Improved our beaninfo support.
  • Rearchitected our plaf support to allow third party L&F support in the future.
  • Fixed a ton of bugs.
  • Improved our testing style and code coverage.

If anyone is experiencing any issues with out latest release, please let us know over in the forums.  Any feedback, especially about how we divided the code into modules, is always welcomed.

Thanks and enjoy!

 TOP
TheServerSide.com
Do you need to monitor your Mobile App?
02/02/2012 at 08:18:37
Mobile applications are more and more becoming part of a company’s online services. This leads to the question whether we need to monitor like other parts of our IT infrastructure. As they are part of our shipped application services we need to ensure they are working properly. However, not every application must be monitored the same way. Additionally monitoring always comes at a certain cost. We need people to take care of the monitoring, we have to prepare our applications to be ready for monitoring and we potentially also have to buy or at least integrate new monitoring tools. So is it worth the investment?

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
02/01/2012
DevX.com
Oracle Proposes Single Committee to Oversee Java
editorial02/01/2012 at 22:08:35
The change would unify Java EE/SE and ME oversight.
 TOP
java.net
Persist document in Cassandra
otaviojava02/01/2012 at 19:32:10


 
 
Nowadays the Enterprise applications beyond persist String and number also can save file. Persist this information is very interesting, for example, a civil process there are information about the process (name of author, date, number of protocol) and the document which represents, or a twett with an image. In Apache Cassandra, you can save file, but for large file you should use a NOSQL Document Store.
 
For demonstrated this resource will made a little program, an album of photography, The picture will show from name. If I use “Paris” will show a picture was related to that name.
 
 
 
 
The program was made with java SE 7 platform, with Swing like GUI, and Easy-Cassandra framework, for this it's necessary download of Easy-Cassandra and its dependencies.
 
The object has two field:
The name of the photo, how this field must be unique it also will the key
The file of the photo
 
The table 1 show the object made.
 
 
@ColumnFamilyValue
public class Photo {
@KeyValue
private String name;
 
@ColumnValue
private File picture;
//getter and setter
}
Table 1: The Object made
 
 
public class PhotoDao {
private Persistence persistence;
public PhotoDao() {
persistence = EasyCassandraManager.getPersistence("exemplo", "localhost", 9160);
}
public void criar(Photo bean) {
persistence.insert(bean);
}
 
@SuppressWarnings("unchecked")
public List<Photo> listarTodos() {
return persistence.findAll(Photo.class,ConsistencyLevelCQL.ALL);
}
}
Table 2: The DAO
 
When the Cassandra is running the next step is create the KeyStore and Family Column, in Cassandra's Client mode execute the command in the table 3.
 
 

create keyspace exemplo; use exemplo;

create column family Photo

with comparator = UTF8Type;

Table 3; Command for run

 
 
 
 
 
This post presented the persistence of an document or file with a simple example. This resource is useful and easy of use. The Easy-Cassandra has support with java.io.File and all classes who implement java.nio.file.Path.
 
 

Reference:

Easy-Cassandra: https://github.com/otaviojava/Easy-Cassandra/
 Example program with Eclipse and Netbeans: https://github.com/otaviojava/Easy-Cassandra/downloads

 

 

 TOP
java.net
Bundling Gems in Jars/Wars for Jruby
boneill4202/01/2012 at 16:15:30

 

As part of Virgil's ability to deploy ruby scripts to a remote Hadoop cluster, we needed to package gems' into that Hadoop jar.  After a bit of monkeying around, we got it.

This is the key piece of information:

"Because the operation of Java's classpath and Ruby's load path are so similar, especially under JRuby, they are unified in JRuby 1.1. This results in a number of unified capabilities:...

 

  • Everything in the Java classpath is considered to be a load path entry, so .rb scripts, for example, contained in JAR files, are loadable."

First thing you need is to actually get your hands on the gem.  To do this, you can run jruby to grab the gem.

 

java -jar jruby-complete-1.6.0.jar -S gem install -i rest-client rest-client --no-rdoc --no-ri


This will fetch the gems and install them into the current directory under the directory "rest-client".  In that subdirectory you'll find: bin, cache, doc, gems and specifications.  The actual code for the gems is found in the gems directory.  In the case of rest-client, you'll find two directories that contain the code: mime-types-1.17.2 and rest-client-1.6.7.

 

This is what you need to bundle into the jar.  We copied those two directories into our java project under src/main/resources/gems/.

 

One approach would be to simply include those directories on your classpath.  Another approach is to programmatically adjust the loadpath to include those directories.   You can do this with the following lines:

 

List paths = new ArrayList(); 

paths.add("gems/rest-client-1.6.7/lib/"); 

paths.add("gems/mime-types-1.17.2/lib/"); 

this.rubyContainer = new ScriptingContainer(LocalContextScope.CONCURRENT); this.rubyContainer.setLoadPaths(paths);

 

Then, when using this.rubyContainer you'll be able to run ruby files that require the rest-client.

 

Since the ruby scripts are actually loaded via the classpath (from the loadpath), jruby is happy loading them from within a jar.  In our case, we built the jar using maven and the gems were included in the jar because we put them under src/main/resources/gems.

 

 

 

 

 TOP
TheServerSide.com
Vowels don't cost $500: Pontificating on Java variable naming
02/01/2012 at 12:52:09
Every variable you declare in Java must be associated with a type, and it must also be given a unique name. When naming your variables, put a little bit of thought into it and name them well. Well thought out variable names make Java programs both easier to read and easier to maintain. Good names can even make Java programming fun.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
Hibernate Query Cache in Action
02/01/2012 at 12:50:01
One of the common problems of people that start using Hibernate is performance, if you don't have much experience in Hibernate you will find how quickly your application becomes slow. If you enable sql traces, you would see how many queries are sent to database that can be avoided with little Hibernate knowledge. In current post I am going to explain how to use Hibernate Query Cache to avoid amount of traffic between your application and database.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
"Java Sucks" revisited
02/01/2012 at 12:49:07
Is Java well-matured over the past 10 years? Read what a C developer thought about Java 10 years ago and compare it with how things are today!

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
01/31/2012
java.net
Guest Post: Is Java the best language to meet my needs?
sonyabarry01/31/2012 at 15:08:55

This email came into our site feedback alias this morning, and I thought this would be a great topic to ask the community.  I'm a big believer in using the right tool for the job, even if it's not Java at the moment.  I asked his permission to post it here, so please meet Mike: 

To whom it may concern,

I need your advice.  Back in 2000 I was a post-doctor at the University of Caledonia in Berkeley.  While there, I became ill with a type of brain cancer called a medulloblastoma, and was forced out of research.

After release from the hospital, I started programming rehabilitation games similar to the ones used in brain injury rehabilitation.  I decided to do this because these types of games, although a medical tool, are quite expensive.  I wanted to produce my own version of these games that were free.  The results of my efforts can be seen at http://www.msty-neurotraining.com and are registered at the Brain Injury Association of America (http://www.biausa.org/) as a rehabilitation tool.


However, I have a serious problem.  These programs were made using Microsoft’s Visual Basic 6, and the programs made with it will soon become obsolete and no longer run modern versions of Windows computers. Therefore, I am looking for an alternative.  Preferably one which is open source (like Java) to keep in spirit that the games are a free medical tool.   Do you have any suggestions as to what open source programming language would be appropriate for my needs? I need something that can produce programs capable to manipulate 2D graphics, save and retrieve files and use a joystick.  I am not restricted to using a programming similar to Visual Basic; I can also program in C++ (the programming language we predominantly used at Berkeley).

Would Java be a good alternative to Microsoft’s Visual Basic?  If not, what other programming tool would you advise using?

Also, how do I go about starting an Open Source project to create a rehabilitation tool like the one the I created with VB6?  Starting such a project would be preferable to working alone, because I feel that a team working together always gets better results than an individual working alone.

Sincerely,

Michael Tarsitano (PhD)
Bruchsal, Germany

 

 TOP
TheServerSide.com
Using the Tomcat 7 JDBC Connection Pool in Production
01/31/2012 at 14:40:51
Using the Tomcat 7 JDBC Connection Pool in Production

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
About the Performance of Map Reduce Jobs
01/31/2012 at 14:40:34
Most tutorials and blogs around map/reduce performance talk about the various hadoop options. Instead I want to look directly at the source of the problem, the performance of the map/reduce job itself and how the framework impacts it. When you know what happens underneath, you can improve the job performance a lot with less hardware.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
TheServerSide.com
Thymeleaf Spring-MVC Maven Archetype 1.0.0 Released
01/31/2012 at 14:40:14
This week I have released first version of Thymeleaf-Spring Maven Archetype. Thymeleaf Spring-MVC Maven Archetype aims to create a web application that uses Thymeleaf template engine and Spring Framework. The main goal of Thymeleaf is to provide an elegant and well-formed way of creating HTML 5 templates.

Add to StumbleUpon Add to del.icio.us Add to Google
 TOP
DevX.com
Oracle WebCenter Quick Start for the Uninitiated Java Developer
Ryan Munro01/31/2012 at 11:36:58
A quick start guide to get WebCenter up and running in JDeveloper for portal developers more familiar with other environments like Eclipse.
 TOP

 

 

JAVAsight.comcontactUS

 
 

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. javasight is independent of Sun Microsystems, Inc.