Resolved the issue by creating environment variable MAVEN_OPTS with values.
Tried all other possible ways to figure out but only above option solved my 
problem.

On Thursday, December 19, 2013 10:27:46 PM UTC-5, Vivekanand S V wrote:
>
> For Ant it is "ANT_OPTS", assign the memory values to this key and give 
> it a try
>
>
> On Fri, Dec 20, 2013 at 12:32 AM, <[email protected] <javascript:>> wrote:
>
>> Thanks for the comment but i tried before posted the query by setting 
>> JAVA_OPTS before running the ant script for the build but same error i am 
>> getting.
>>
>>
>> On Thursday, December 19, 2013 12:56:13 PM UTC-5, Jeff MAURY wrote:
>>
>>> This is an ant step so setting MAVEN_OPTS will have no effect 
>>>
>>> Jeff
>>> —
>>> Sent from Mailbox <https://www.dropbox.com/mailbox> for iPhone
>>>
>>>
>>> On Thu, Dec 19, 2013 at 6:41 PM, [email protected] <[email protected]>wrote:
>>>
>>>>  Hi,
>>>>
>>>> I am implementing custom plug-in to insert some data to DB (like 
>>>> audit2db plug-in, i cannot use audit2db plug-in as our requirement is 
>>>> different and also i cannot extend) and most of the times i get 
>>>>  "java.lang.OutOfMemoryError: PermGen space" while running the job, so i 
>>>> tried increasing java opts settings related to heap and memory but nothing 
>>>> is solving the problem,
>>>>
>>>> Tried by changing values with all possible values for "-Xms512m 
>>>> -Xmx2048m -XX:MaxNewSize=512m -XX:NewSize=512m -XX:MaxPermSize=512m 
>>>> -XX:PermSize=512m".
>>>>
>>>> Also tried to setting MAVEN_OPTS from global configurationbut no luck.
>>>>
>>>> Sample stack trace: First i thought its happening in specific case but 
>>>> its happening in other cases also as i tried to run the job with no 
>>>> settings (i mean no configurations done for the job, its empty job)
>>>>
>>>> ------------------------------------------------------------
>>>> ------------
>>>>  java.lang.OutOfMemoryError: PermGen space
>>>>         at java.lang.ClassLoader.defineClass1(Native Method)
>>>>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>>>         at org.apache.tools.ant.AntClassLoader.defineClassFromData(
>>>> AntClassLoader.java:1128)
>>>>         at hudson.ClassicPluginStrategy$AntClassLoader2.
>>>> defineClassFromData(ClassicPluginStrategy.java:632)
>>>>         at org.apache.tools.ant.AntClassLoader.getClassFromStream(
>>>> AntClassLoader.java:1299)
>>>>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(
>>>> AntClassLoader.java:1355)
>>>>         at org.apache.tools.ant.AntClassLoader.findClass(
>>>> AntClassLoader.java:1315)
>>>>         at org.apache.tools.ant.AntClassLoader.loadClass(
>>>> AntClassLoader.java:1068)
>>>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>>>         at java.lang.ClassLoader.defineClass1(Native Method)
>>>>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>>>         at org.apache.tools.ant.AntClassLoader.defineClassFromData(
>>>> AntClassLoader.java:1128)
>>>>         at hudson.ClassicPluginStrategy$AntClassLoader2.
>>>> defineClassFromData(ClassicPluginStrategy.java:632)
>>>>         at org.apache.tools.ant.AntClassLoader.getClassFromStream(
>>>> AntClassLoader.java:1299)
>>>>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(
>>>> AntClassLoader.java:1355)
>>>>         at org.apache.tools.ant.AntClassLoader.findClass(
>>>> AntClassLoader.java:1315)
>>>>         at org.apache.tools.ant.AntClassLoader.loadClass(
>>>> AntClassLoader.java:1068)
>>>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>>>         at java.lang.ClassLoader.defineClass1(Native Method)
>>>>         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>>>         at org.apache.tools.ant.AntClassLoader.defineClassFromData(
>>>> AntClassLoader.java:1128)
>>>>         at hudson.ClassicPluginStrategy$AntClassLoader2.
>>>> defineClassFromData(ClassicPluginStrategy.java:632)
>>>>         at org.apache.tools.ant.AntClassLoader.getClassFromStream(
>>>> AntClassLoader.java:1299)
>>>>         at org.apache.tools.ant.AntClassLoader.findClassInComponents(
>>>> AntClassLoader.java:1355)
>>>>         at org.apache.tools.ant.AntClassLoader.findClass(
>>>> AntClassLoader.java:1315)
>>>>         at org.apache.tools.ant.AntClassLoader.loadClass(
>>>> AntClassLoader.java:1068)
>>>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>>>         at org.hibernate.persister.PersisterFactory.
>>>> createClassPersister(PersisterFactory.java:84)
>>>>         at org.hibernate.impl.SessionFactoryImpl.<init>(
>>>> SessionFactoryImpl.java:297)
>>>>  ------------------------------------------------------------
>>>> ------------
>>>>
>>>> Appreciate quick help
>>>> Thanks
>>>>  
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Jenkins Developers" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to