Friday, March 21, 2014

Resolved: java.lang.OutOfMemoryError: Java Heap space

When opening a large heap file, the following error occurs.
java.lang.OutOfMemoryError: Java Heap space
at com.ibm.jinwoo.heap.HeapInfo.readHAX(HeapInfo.java: 8319)
...



Solution
It would be resolved by increasing the memory for the Heap Analyzer by the following command.

java -Xmx1024m - jar ha454.jar

if it is not enough, you can try to adjust to -Xmx2048m or -Xmx4096m

Monday, December 30, 2013

[How to] How to call a function defined in the package

The following sql is to call a function defined in the package
 
declare
  outVal number;
begin
   -- Call the function
   outVal := mypackage.myfunction (100);
end;

Friday, August 9, 2013

Howto: Find the biggest value in the column

This article teaches you how to get the biggest value in the columns in the same table.

It could be done by the built-in function GREATEST

However, it does not work when there are null values in the column.

You may use NVL function as a work around.

Friday, July 19, 2013

[Resolved] Ping Connection Pool failed for XXX Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Tried to setup the connection pool for mysql in Glassfish today. The following error occurs when I tried to ping the connection pool.

Error Message
Ping Connection Pool failed for XXX Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.



Solution
1. Download Connector / J
http://dev.mysql.com/downloads/connector/j/

2. Put it in the glassfish's lib folder


3. Restart the server

4. Ping Successfully!

MySQL, Glassfish 4, Connection Pool Setup

Saturday, June 29, 2013

Java compiler level does not match the version of the installed Java project facet.

Created a dynamic web project and set GlassFish 4.0 as the testing server.  The following error occured:

Java compiler level does not match the version of the installed Java project facet.


Solution:
1. Right click and choose Quick Fix
2. Change Java compiler level to 1.7

3. Done!

[RESOLVED] java.lang.ClassNotFoundException org.springframework.web.servlet.DispatcherServlet Spring MVC3 Maven Eclipse

The following error occurs when deploying app to the testing machine, using Eclipse + Spring MVC 3 + Maven.

java.lang.ClassNotFoundException org.springframework.web.servlet.DispatcherServlet


Solution:
1. Right Click the project -> Properties

2. Go to Deployment Assembly

3. Click Add


4. Select Java Build Path Entries

5. Click "Maven Dependencies"
 

6. Click OK

7. Done and deploy again without error.

Sunday, June 16, 2013

[RESOLVED] org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required

Tried to run some jsp pages in eclipse with Glassfish 4 server.  The following error occurs:

org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required


Solution:
You have to choose jdk when you are configure the server runtime.

 

HTTP Status 500 - Internal Server Error
GlassFish Server Open Source Edition 4.0