wsdl2 java :Java 堆空间
我正在使用网络服务。我有一个文件 wdsl 并将其转换为两个 java 文件:
wsdl2java -uri nameFile.wsdl
创建的 java 文件之一有 87kb。当我尝试用 eclipse 打开它时,出现以下错误:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.setDocumentContent(FileStoreTextFileBuffer.java:586)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.initializeFileBufferContent(FileStoreTextFileBuffer.java:352)
at org.eclipse.core.internal.filebuffers.FileStoreFileBuffer.create(FileStoreFileBuffer.java:63)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connectFileStore(TextFileBufferManager.java:150)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:567)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFileInfo(CompilationUnitDocumentProvider.java:969)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1229)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4056)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:217)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1444)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2578)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2551)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1371)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
我现在想如果:
1) 参数 wsdl2java 出现问题。这意味着可以通过某种方式创建更多 java 文件而不是大文件。
2)eclipse内存问题
如何解决?
谢谢
I'm working with web services. I have a file wdsl and I trasnformed it in two java files:
wsdl2java -uri nameFile.wsdl
One of the java file created has 87kb. When I try it to open with eclipse I have this error:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.setDocumentContent(FileStoreTextFileBuffer.java:586)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.initializeFileBufferContent(FileStoreTextFileBuffer.java:352)
at org.eclipse.core.internal.filebuffers.FileStoreFileBuffer.create(FileStoreFileBuffer.java:63)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connectFileStore(TextFileBufferManager.java:150)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:567)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFileInfo(CompilationUnitDocumentProvider.java:969)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1229)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4056)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:217)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1444)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2578)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2551)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1371)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
I want to now if :
1) It problem to the arguments wsdl2java . It means some way to create more java files intead of the big one.
2) Memory problem eclipse
How can I resolve it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试增加 eclipse 的 xss 和 xmx 吗?
编辑 eclipse.ini 文件并添加/更改以下参数:
-Xmx512m
您还可以尝试在“文本编辑器”中打开它:在 eclipse 中右键单击您的文件 -> 使用文本编辑器打开。
Try to increase eclipse's xss and xmx ?
edit your eclipse.ini files and add/change the following parameters :
-Xmx512m
You can also try to open it in a "text editor" : right click on your file in eclipse->open with text editor.
尝试在
wsdl2java
上使用-u
标志。Try the
-u
flag onwsdl2java
.