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...
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...
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...
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...
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:
...
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...
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...
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...
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...
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
...
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...
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...
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...
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...
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:
...
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!
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.
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.
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.
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.
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?
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
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.
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.
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.
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.
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.
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.
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.
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.
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.