Follow by Email

Sunday, February 16, 2014

Maven error occurred during initialization of VM Could not reserve enough space for object heap

Today I faced the same problem with same error message but this time it was when I was trying to run Maven for my project to clean and build , eclipse was showing me below message again

Error occurred during initialization of VM Could not reserve enough space for object heap

The reason for this problem was that I am using a 32 bit JDK and in my VM parameters I was initiating the head size like

-Xmx1024m equal to 1GB

when you do that on a 64bit windows platform the windows can't alocate this uch memory and you will see the above error message , so I just reduced the size to less then a GB like below

-Xmx1000m

and now I can run maven.

Sunday, February 9, 2014

Error occurred during initialization of VM; Could not reserve enough space for object heap ,

I am running tomcat/weblogic in eclipse and when I was trying to start server from within eclipse I was facing this problem.

I found that I was not adding the tns VM parameter in server enviorment variable.

By adding the below VM argument to the JEE server (tomcat/weblogic) I was able to run my server from eclipse.
 
-Doracle.net.tns_admin=The location of you tns


 

Thursday, February 6, 2014

ORA-31061: XDB error: special char to escaped char conversion failed.


I encountered this exception while trying to get the XML data for a query while I was using
dbms_xmlgen.getXML function in oracle.

Problem :
I found that one of the varchar columns in my table had invalid xml characters in it , so whenever the query was trying to fetch a record having that column with invalid data oracle was showing me the error as

ORA-31061: XDB error: special char to escaped char conversion failed.

For a list of invalid xml characters please see below





List of invalid XML chars



Solution :
The best solution I can think of is to update that column and remove the invalid xml characters , and make sure by adding a trigger rule that nobody can enter those characters again in any similar field.