borisbrodski / Jnario

Executable specifications for Java
jnario.org
3 stars 4 forks source link

Fixes for maven-plugin #4

Closed chrismathis closed 9 years ago

chrismathis commented 9 years ago

Add org.eclipse.equinox.common as a dependency to make the OperationCanceledException required by xtext available.

Also build examples/org.jnario.maven.example to have some tests for the maven plugin.

borisbrodski commented 9 years ago

Great! Thank you!

borisbrodski commented 9 years ago

Hi!

Even with MAVEN_OPTS=-Xmx1024M mvn clean install I get


[INFO] Reactor Summary:
[INFO]
[INFO] jnario ............................................. SUCCESS [  0.461 s]
[INFO] jnario Target Definition ........................... SUCCESS [  0.165 s]
[INFO] org.jnario.lib ..................................... SUCCESS [  2.601 s]
[INFO] org.jnario ......................................... SUCCESS [  5.424 s]
[INFO] org.jnario.feature ................................. SUCCESS [  4.086 s]
[INFO] org.jnario.ui ...................................... SUCCESS [  1.050 s]
[INFO] org.jnario.spec .................................... SUCCESS [  2.932 s]
[INFO] org.jnario.feature.ui .............................. SUCCESS [  3.120 s]
[INFO] org.jnario.spec.ui ................................. SUCCESS [  2.589 s]
[INFO] org.jnario.suite ................................... SUCCESS [  1.705 s]
[INFO] org.jnario.suite.ui ................................ SUCCESS [  2.571 s]
[INFO] org.jnario.standalone .............................. SUCCESS [  0.808 s]
[INFO] org.jnario.ui ...................................... SUCCESS [  0.257 s]
[INFO] org.jnario ......................................... SUCCESS [  0.197 s]
[INFO] org.jnario.m2e ..................................... SUCCESS [  1.090 s]
[INFO] org.jnario.m2e ..................................... SUCCESS [  0.165 s]
[INFO] org.jnario.sdk ..................................... SUCCESS [  0.207 s]
[INFO] org.jnario.updatesite .............................. SUCCESS [  5.287 s]
[INFO] org.jnario.tests ................................... SUCCESS [01:00 min]
[INFO] org.jnario.standalone.tests ........................ SUCCESS [ 23.445 s]
[INFO] org.jnario.lib.tests ............................... SUCCESS [ 10.227 s]
[INFO] org.jnario.ui.tests ................................ SUCCESS [ 20.629 s]
[INFO] Jnario Runtime Library ............................. SUCCESS [  6.584 s]
[INFO] Jnario Standalone Support .......................... SUCCESS [  5.451 s]
[INFO] Jnario Maven Plugin ................................ SUCCESS [ 11.502 s]
[INFO] Jnario Maven Report Plugin ......................... SUCCESS [  5.818 s]
[INFO] Create a simple Jnario project ..................... SUCCESS [  1.119 s]
[INFO] Jnario Maven Example ............................... FAILURE [ 39.764 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:14 min
[INFO] Finished at: 2015-10-01T17:59:56+02:00
[INFO] Final Memory: 94M/1893M
[INFO] ------------------------------------------------------------------------

with

Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

Does it has something to do with your change? Any idea how what's going wrong?

Thank you!

Cheers, Boris

borisbrodski commented 9 years ago

PS Please test the last commit of the no_xtend branch (9b47230a019d7a70e99c540b41a1ef445983ffe6).

chrismathis commented 9 years ago

Memory usage seems to be excessive (if available), but the build does not fail for me - even with 256m (that is 9b47230)

[INFO] Jnario Maven Report Plugin ........................ SUCCESS [4.130s]
[INFO] Create a simple Jnario project .................... SUCCESS [0.956s]
[INFO] Jnario Maven Example .............................. SUCCESS [10.873s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:56.335s
[INFO] Finished at: Thu Oct 01 20:46:07 CEST 2015
[INFO] Final Memory: 134M/226M
[INFO] ------------------------------------------------------------------------

With Xmx2g it is: [INFO] Final Memory: 225M/1658M

It also works on our Build-Server and in our big project (in 2 or 3 eclipse-test-plugins that build without Jnario syntax errors)

The Jnario Maven Example has not been in the build previously. I added it because there seems to be no other test for the maven part of Jnario and it reproduced the missing org.eclipse.core.runtime.OperationCanceledException (new dependency of the Xtext StandaloneSetups) that prevented our big project from building.

Can you provide me a stack trace?

Regards, Chris

borisbrodski commented 9 years ago

It turned out to be the PermGen problem.

MAVEN_OPTS="-Xmx1G -XX:MaxPermSize=512m" mvn clean install

did the trick. Shouldn't be a problem starting with Java 8.

[ERROR] PermGen space -> [Help 1]
java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2570)
        at java.lang.Class.getDeclaredMethods(Class.java:1855)
        at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:662)
        at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:356)
        at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:151)
        at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:585)
        at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:543)
        at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:529)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:847)
        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:772)
        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:256)
        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
        at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:853)
        at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:46)
        at com.google.inject.internal.ProcessedBindingData.runCreationListeners(ProcessedBindingData.java:50)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:133)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.security.auth.AuthPlugin.stop() of bundle org.eclipse.equinox.security.
        at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:847)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:955)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:323)
        at org.eclipse.osgi.container.Module.doStop(Module.java:626)
        at org.eclipse.osgi.container.Module.stop(Module.java:488)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1623)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1542)
        at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:248)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:144)
        at org.eclipse.osgi.container.Module.doStop(Module.java:626)
        at org.eclipse.osgi.container.Module.stop(Module.java:488)
        at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:186)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:159)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.eclipse.equinox.internal.security.auth.AuthPlugin.stop(AuthPlugin.java:73)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:827)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:820)
        ... 13 more