解决maven jetty 的 OutOfMemoryError问题

用maven 的jetty 运行appfuse的时候,出现了java.lang.OutOfMemoryError:PermGen space的错误,解决的办法是调整Maven opts的jvm虚拟内存的办法,因为我用的是ubuntu 12 做开发,网上很多的解决办法都是不行的,这里推荐一种简单的办法:

 

首先可以运行:

 

export MAVEN_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M"
mvn jetty:run

 这是两行代码,直接在项目的目录上运行,如果通过这两行代码运行jetty后可以顺利解决内存不足的问题,那么可以把Maven opts 写在~/.bashrc上,也就是把上面的代码写入到bashrc中。

 

windows 系统也可以通过同样的原理解决,需要注意的是,linux 系统是用export,win系统用set来定义系统变量

 

具体参考:

http://stackoverflow.com/questions/1451648/permgen-problems-with-lift-and-jetty

PPT里文字太多如何排版-一口气教你7种布局瞬间让PPT高大上起来 PPT里全是文字且很拥挤怎么办?本篇教你使用7种不同的排版让你的PPT瞬间变得高大上起来。 阅读详情

相关推荐

Labview程序框架介绍

当掌握LabVIEW基础知识并达到,理解单个小型模块程序会相对轻松。而若想进一步探索大型程序,就必然需要了解程序框架相关内容。LabVIEW常用的程序架构包括等。在多年工作中,我接触过的众多高级工程师所开发的大型程序,基本都基于这些架构搭建。接下来,将为大家详细介绍这些框架。

Misterlhw的博客 4643

jetty插件java.lang.OutOfMemoryError: PermGen space内存溢出

项目运行时,有时遇到java.lang.OutOfMemoryError: PermGen space问题。 例如启动线程异步导入excel、excel导出时,会出现如上问题。 原因分析: PermGen space,全称是Permanent Generation space,指的是内存中的永久区域。当java中间件启动时,会将相关的jar包和.class加载到永久区域,而用就区域的空间是固

a544879146的博客 2967

麒麟KylinV10系统yum源更换全攻略:从官方源到第三方仓库的保姆级教程

本文详细介绍了麒麟KylinV10系统yum源的更换与优化方法,包括官方源配置、第三方仓库集成及RPM包管理技巧。通过实战案例和命令示例,帮助用户快速解决软件依赖问题,提升系统管理效率。特别适合需要在国产操作系统上进行开发的工程师参考。

weixin_30752699的博客 656

jetty插件java.lang.OutOfMemoryError_ PermGen space内存溢出

项目运行时,有时遇到java.lang.OutOfMemoryError: PermGen space问题。 例如启动线程异步导入excel、excel导出时,会出现如上问题。 原因分析: PermGen space,全称是Permanent Generation space,指的是内存中的永久区域。当java中间件启动时,会将相关的jar包和.class加载到永久区域,而用就区域的空间是固定的,虽然可以设置。报这个错的原因就是在启动加载.class时,永久区域溢出了。 项目具体分析:异步导入excel会启

apollou的博客 331

功率开关管驱动串扰(Crosstalk):深度解析与优化方案

介绍了功率开关器件驱动串扰产生机理,并整理了常见的工程应用优化措施

qq_38326420的博客 577

Netapp FAS2750更换磁盘后不同步问题处理

netapp fas2750磁盘更换后不同步问题处理

jetliu05的博客 1261

应用本机jetty启动报java.lang.OutOfMemoryError: PermGen space

查了下是由于eclipse默认的JVM参数不够,内存永久域溢出,需要指定设置永久域的最大值MaxPermSize -Xms:设置jvm内存的初始大小 -Xmx:设置jvm内存的最大值 -Xmn:设置新域的大小(这个似乎只对 jdk1.4来说是有效的,后来就废弃了) -Xss:设置每个线程的堆栈大小(也就是说,在相同物理内存下,减小这个值能生成更多的线程) ...

brianxi22的博客 830

从零部署思澈科技SiFli-Solution:避坑指南与实战排错

本文详细介绍了从零部署思澈科技SiFli-Solution开发环境的完整流程与实战排错指南。重点解析了Keil uVision5版本选择、Butterfli工具路径配置等关键步骤,并针对Keil路径报错、函数冲突等高频问题提供了具体解决方案,帮助开发者高效避坑,快速搭建稳定的嵌入式开发环境。

devops8pract的博客 537

解决 在jetty 上运行时 java out of memory异常

在eclipse上运行时解决出现java out of memory 在eclipse的项目中添加一个参数如图所示: vaule的值为:-server -Xms256m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails

wscxyok的专栏 1193

华为od统一考试B卷【单词搜索】C++ 实现

找到它是一个小游戏,你需要在一个矩阵中找到给定的单词。假设给定单词 HELLOWORD,在矩阵中只要能找到 H->E->L->L->O->W->O->R->L->D连成的单词,就算通过。意区分英文字母大小写,并且您只能上下左右行走,不能走回头路。

MISAYAONE的博客 722

Calibre :Standard Verification Rule Format(SVRF) Manual (1-2)

摘要:SVRF规则文件是用于Calibre和ICverify工具的脚本文件,包含层定义、规则检查、注释、预处理指令等元素。规则文件支持全局/局部层定义、隐式层操作,以及条件编译指令(#DEFINE/#IFDEF等)。宏功能(DMACRO/CMACRO)可实现代码复用,支持参数化层操作和嵌套调用。预处理指令支持版本控制(#IFDEFCALIBRE_VERSION)和环境变量默认值设置(#PRAGMAENV)。宏中的层名具有局部作用域,可通过特殊语法实现全局层名指定,LOCAL()修饰符可创建调用作用域内的唯一

u013620135的博客 1379

mvn jetty:run出现OutOfMemoryError: PermGen space的处理

处理方法: VM参数中添加如下配置: -server -Xms256m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled -XX:+PrintGCDetails -Xloggc:%M2_HOME%/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:He...

千里之行,始于足下 380

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

eclipse运行maven的jetty插件java.lang.OutOfMemoryError: PermGen space内存溢出

系统运行在MAVEN中的jetty插件下,当在ECLIPSE运 clean jetty:run时系统提示OutOfMemoryError: PermGen space。 解决办法: 设置run as --->run configuragtions--->jre标签下的属性VM arguments: -server -Xms512m -Xmx1024m -XX:Perm

crazzy0727的专栏 2754

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

eclipse运行maven的jetty插件内存溢出

系统运行在MAVEN中的jetty插件下,当在ECLIPSE运 clean jetty:run时系统提示OutOfMemoryError: PermGen space。 解决办法: 设置run as --->run configuragtions--->jre标签下的属性VM arguments: -server -Xms512m -Xmx1024m -XX:Perm

蓝缘 1万+

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

maven通过jetty插件运行内存溢出的问题

maven通过jetty插件发布web工程 mvn jetty:run时OutOfMemoryError: PermGen space错误 如果是采用eclipse插件来运行的,则可以在run

zerocoffee 1645

Maven+jetty,内存溢出

系统运行在MAVEN中的jetty插件下,当在ECLIPSE运 clean jetty:run时系统提示OutOfMemoryError: PermGen space。 解决办法: 设置run as --->run configuragtions--->jre标签下的属性VM arguments: [code="java"]-server -Xms512m -Xmx1024m -XX:P...

记录我的开发点滴. 226

Eclipse运行maven的jetty插件内存溢出解决

系统运行在MAVEN中的jetty插件下,当在ECLIPSE运 clean jetty:run时系统提示 OutOfMemoryError: PermGen space。 解决办法: 设置run as —>run configuragtions—>jre标签下的 属性VM arguments: -server -Xms512m -Xmx1024m -XX:PermSize=512m -

Andy_LHB的专栏 1669

maven常遇到的一些问题总结

解决maven提示:Couldnotreadsettings.xml,assumingdefaultvalues错误 原因可能有两个: 1.settings.xml的格式有问题,(可以拿别来对照下) 2.有可能是repository仓库有问题。(路径最好不要有中文) 未验证,先收录 解决eclipse创建maven项目报错!Couldnotresolvearchetypeorg...

程序员一代码搬运工 154

maven参数设置

windows下: set MAVEN_OPTS="$MAVEN_OPTS -Xms256m -Xmx512m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m"; linux

enetor1的专栏 4150
上一篇: linux 下使用dropbox 自动同步 skype 聊天记录
leemo207
博客等级 码龄18年 0粉丝 18原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值