Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException / OutOfMemoryError #316

Open
pbaris opened this issue Feb 29, 2020 · 2 comments
Open

IllegalArgumentException / OutOfMemoryError #316

pbaris opened this issue Feb 29, 2020 · 2 comments
Labels

Comments

@pbaris
Copy link
Contributor

pbaris commented Feb 29, 2020

There was an exception while trying to navigate to '' with the exception message 'Unable to create an instance of 'com.github.appreciated.IronCollapseLayout'. The constructor threw an exception.'

java.lang.IllegalArgumentException: Unable to create an instance of 'com.github.appreciated.IronCollapseLayout'. The constructor threw an exception.
	at com.vaadin.flow.internal.ReflectTools.createProxyInstance(ReflectTools.java:512)
	at com.vaadin.flow.internal.ReflectTools.createInstance(ReflectTools.java:449)
	at com.vaadin.flow.component.Composite.initContent(Composite.java:77)
	at com.vaadin.flow.component.Composite.getContent(Composite.java:116)
	at com.github.appreciated.app.layout.component.menu.left.LeftSubmenu.<init>(LeftSubmenu.java:61)
	at com.github.appreciated.app.layout.component.menu.left.builder.LeftSubMenuBuilder.build(LeftSubMenuBuilder.java:65)

....

Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3332)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:596)
	at java.lang.StringBuilder.append(StringBuilder.java:190)
	at org.apache.commons.io.output.StringBuilderWriter.write(StringBuilderWriter.java:143)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2370)
	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2348)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2325)
	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2273)
	at org.apache.commons.io.IOUtils.toString(IOUtils.java:1041)
	at com.vaadin.flow.server.frontend.FrontendUtils.getStatsContent(FrontendUtils.java:466)
	at com.vaadin.flow.component.polymertemplate.NpmTemplateParser.getSourcesFromStats(NpmTemplateParser.java:176)
	at com.vaadin.flow.component.polymertemplate.NpmTemplateParser.getTemplateContent(NpmTemplateParser.java:107)
	at com.vaadin.flow.component.polymertemplate.TemplateDataAnalyzer.parseTemplate(TemplateDataAnalyzer.java:200)
	at com.vaadin.flow.component.polymertemplate.TemplateInitializer.<init>(TemplateInitializer.java:91)
	at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:88)
	at com.vaadin.flow.component.polymertemplate.PolymerTemplate.<init>(PolymerTemplate.java:103)
	at com.github.appreciated.IronCollapseLayout.<init>(IronCollapseLayout.java:25)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.vaadin.flow.internal.ReflectTools.createProxyInstance(ReflectTools.java:481)
	at com.vaadin.flow.internal.ReflectTools.createInstance(ReflectTools.java:449)
	at com.vaadin.flow.component.Composite.initContent(Composite.java:77)
	at com.vaadin.flow.component.Composite.getContent(Composite.java:116)
	at com.github.appreciated.app.layout.component.menu.left.LeftSubmenu.<init>(LeftSubmenu.java:61)
	at com.github.appreciated.app.layout.component.menu.left.builder.LeftSubMenuBuilder.build(LeftSubMenuBuilder.java:65)

i noticed it in both 4.0.0.rc4 and 4.0.0.rc5 versions

@pbaris pbaris added the bug label Feb 29, 2020
@appreciated
Copy link
Owner

appreciated commented Mar 1, 2020

Can you please give some more info about your environment, with logs only I cannot help you:

  • Servlet container
  • available Memory
  • Vaadin version
  • Springboot or no springboot
  • How many users
  • Memory usage per session
  • Memory usage on session length (does the needed memory consuption grow on session length)
  • How many menu entries are being initialized?

@kunal-bhatia
Copy link

I have had this issue as well where the app was throwing OutOfMemory error during runtime. For the same I increased the min and max heap size and with that it works just fine.

-Xms768M -Xmx768M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants