Recently in Java Category

Get App-ing with Google App Inventor

| No Comments
Finally! Google opened up the AppInventor to the general public.Armaghan Chaudhary-Google Ap Invetor.jpg
 Fresh off from Google Labs, the App Inventor lets a user create an Android App pronto! Think of it as the Form Designer of Android. It lets you create your own apps and saves the files online. Its a drag and drop interface with custom properties for each item displayed in a separate view. The components available for the apps include social, media, animation, maps and sensor widgets etc.  Once your app has been created, you are able to download it to your phone for a final round of testing. Thats it! Its that easy!

Here are a few links to get your hands dirty:

  • Get your own account today: Link
  • Quick intro on App Inventor : Link 
  • Learn what you can do with Google App Inventor: Link
The App Inventor comes with a tons of online tutorials and instructional videos on how to use it correctly. Its a Beta release at the moment and all you need is a Google account, some coffee and a Google phone ( it comes with an emulator in case you don't have one).

What are you waiting for ? Get App-ing! 
Even your 2 year old can make Google Apps now :)


This SQL Snippet get a list of all the tables under a user:

select * from user_objects where object_type = 'TABLE';

This SQL Snippet will get you a list of all the sequences in a DB Schema for the user tables

select * from user_sequences


This SQL Snippet will get you a list of all the view in a DB Schema for the user tables

select * from user_views;

Happy Coding :)

Default Value in QueryParam Annotations

| No Comments
In order to remove any null pointer exceptions while using RestEasy Annotations, you can always pass a default value and handle it appropriately in the Data Access Objects ( If you are using one. This ensures that there are no null pointer excpetions from the returning classes.

Here is a code snippet to do just this:

public StreamingOutput getUsersSummaryList(@QueryParam("active") @DefaultValue("0") String active  ){}

PermGen space error (Hibernate, JPA)

| No Comments

If you ever come across a PerGen space error in Hibernate or JPA...it refers to the java.lang.outfspacememoryerror (Your webapp is out of memory). PermGen is  used to store the class definations ( and I do mean all the Loaded Classes ). This error refers to the heap space being full due to the large number of classes.

Generally you can recover from these errors by restarting your WebServer. If you want to really fix it, do one of the following 2:

1. Hibernate: Change the hibernate.properties file from  "hibernate.bytecode.provider javassist" to hibernate.bytecode.provider cglib".

2. JPA:  Change the persistance.xml file from
<property name="hibernate.bytecode.provider" value="javaassist"/> to <property name="hibernate.bytecode.provider" value="cglib"/>

Happy Coding :)

Remote Debugging Using Eclipse, Netbeans, Tomcat

| No Comments

For the regular J2EE/Java programmers that use the amazing Tomcat as their Servlet container, i found an amazing link. It steps through the necessary configurations to debug your servlets....an awesome find :)

http://wiki.apache.org/tomcat/FAQ/Developing

Share what you learn...and Happy Coding :)

About this Archive

This page is an archive of recent entries in the Java category.

Flex is the previous category.

LiveCycle is the next category.

Find recent content on the main index or look in the archives to find all content.

Categories