griffon lazybones cannot create griffon-swing-groovy project - java

I am following this guide Griffon Guide 2.12
I am stuck at 2.2.1. Creating a Project in the line
$ lazybones create griffon-swing-groovy console
I get the following errors:
lazybones create griffon-swing-groovy console ~
Creating project from template griffon-swing-groovy (latest) in 'console'
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.configuredInputStream(ResourceGroovyMethods.java:1978)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.newInputStream(ResourceGroovyMethods.java:1991)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.withInputStream(ResourceGroovyMethods.java:1657)
at uk.co.cacoethes.lazybones.commands.PackageDownloader$_downloadPackage_closure1.doCall(PackageDownloader.groovy:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
at groovy.lang.Closure.call(Closure.java:423)
at groovy.lang.Closure.call(Closure.java:439)
at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethods.java:1316)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.withOutputStream(ResourceGroovyMethods.java:1627)
at uk.co.cacoethes.lazybones.commands.PackageDownloader.downloadPackage(PackageDownloader.groovy:32)
at uk.co.cacoethes.lazybones.commands.PackageDownloader$downloadPackage.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:138)
at uk.co.cacoethes.lazybones.commands.CreateCommand.doExecute(CreateCommand.groovy:89)
at uk.co.cacoethes.lazybones.commands.AbstractCommand.execute(AbstractCommand.groovy:30)
at uk.co.cacoethes.lazybones.LazybonesMain.main(LazybonesMain.groovy:89)
I am using the following environment for developing
Windows 7 Ultimate
Babun shell
SDK version SDKMAN 5.5.12+269
Lazybones
lazybones list ~
Available templates in griffon/griffon-lazybones-templates
griffon-javafx-groovy
griffon-javafx-java
griffon-javafx-kotlin
griffon-lanterna-groovy
griffon-lanterna-java
griffon-pivot-groovy
griffon-pivot-java
griffon-plugin
griffon-swing-groovy
griffon-swing-java
Gradle
gradle -v
Gradle 4.3
Build time: 2017-10-30 15:43:29 UTC Revision:c684c202534c4138b51033b52d871939b8d38d72
Groovy:2.4.12
Ant:Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:1.8.0_144 (Oracle Corporation 25.144-b01)
OS:Windows 7 6.1 x86
I downloaded the templates manually also
The following are available in .lazybones/templates
griffon-javafx-groovy-template-1.9.1
griffon-javafx-java-template-1.9.1
griffon-plugin-template-1.9.1
griffon-swing-groovy-template-1.9.1
griffon-swing-java-template-1.9.1
I am still unable to create any project using lazybones.I am not able to understand the problem that I am getting.
Thanks in advance,
Vanlal

That's odd, I can successfully create an application using the latest versions of all tools, starting from scratch as witnessed by
[tmp]> ls -l ~/.lazybones/templates/
[tmp]> lazybones --version
Lazybones version 0.8.3
[tmp]> gradle --version
------------------------------------------------------------
Gradle 4.3
------------------------------------------------------------
Build time: 2017-10-30 15:43:29 UTC
Revision: c684c202534c4138b51033b52d871939b8d38d72
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_144 (Oracle Corporation 25.144-b01)
OS: Mac OS X 10.12.5 x86_64
[tmp]> lazybones create griffon-swing-groovy sample
Creating project from template griffon-swing-groovy (latest) in 'sample'
Define value for 'group' [org.example]:
... snip snip ...
Project created in sample!
[tmp]> ls -l ~/.lazybones/templates/
total 1024
-rw-r--r--+ 1 aalmiray staff 510K Oct 31 18:28 griffon-swing-groovy-1.12.0.zip
[tmp]>
It's worth mentioning that the latest version of the griffon-swing-groovy template is 1.12.0. You may specify a version number when creating the application, such as
lazybones create griffon-swing-groovy 1.12.0 sample

Related

Gradle project import fails in eclipse

I am trying to import existing project to eclipse. I am using eclipse neon and gradle 4.2
I get the following error
org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'GradleBuild' using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.3-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
at com.gradleware.tooling.toolingclient.internal.DefaultToolingClient.executeAndWait(DefaultToolingClient.java:88)
at com.gradleware.tooling.toolingclient.internal.DefaultModelRequest.executeAndWait(DefaultModelRequest.java:79)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository$13.get(DefaultModelRepository.java:287)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeAndWait(DefaultModelRepository.java:355)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.access$100(DefaultModelRepository.java:49)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository$14.call(DefaultModelRepository.java:313)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.getFromCache(DefaultModelRepository.java:330)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeRequest(DefaultModelRepository.java:309)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeRequest(DefaultModelRepository.java:280)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.fetchGradleBuild(DefaultModelRepository.java:143)
at org.eclipse.buildship.core.workspace.internal.DefaultModelProvider.fetchGradleBuild(DefaultModelProvider.java:56)
at org.eclipse.buildship.core.projectimport.ProjectPreviewJob.fetchGradleBuildStructure(ProjectPreviewJob.java:86)
at org.eclipse.buildship.core.projectimport.ProjectPreviewJob.runToolingApiJobInWorkspace(ProjectPreviewJob.java:75)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob$1.run(ToolingApiWorkspaceJob.java:79)
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:62)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob.runInWorkspace(ToolingApiWorkspaceJob.java:76)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=64m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Error: VM option 'GuaranteedSafepointInterval' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.
at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:34)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:152)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:135)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:210)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:204)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:128)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:138)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:92)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:60)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:41)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:60)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:34)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:143)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:118)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:192)
at org.gradle.tooling.internal.consumer.connection.CancellableModelBuilderBackedModelProducer.produceModel(CancellableModelBuilderBackedModelProducer.java:53)
at org.gradle.tooling.internal.consumer.connection.PluginClasspathInjectionSupportedCheckModelProducer.produceModel(PluginClasspathInjectionSupportedCheckModelProducer.java:41)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:58)
at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(DefaultModelBuilder.java:60)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:84)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Is there any way to resolve this error?

Windows Service - Apache commons daemon class not found

I have a Jar file that needs to be installed as a windows service. I'm using Apache commons daemon procrun.
Though the service appears in the Services tab in task manager its not running. Its in stopped state and attempting to start it seems not working.
*In commons daemons logs I noticed that it cannot load the main class which is the "AgentApp".
I installed 32bit jre too.
Mentioned here under the log file contents.
imageprocagent stderr:
2015-01-07 15:47:47 Commons Daemon procrun stderr initialized
java.lang.NoClassDefFoundError: org/apache/commons/daemon/Daemon
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.daemon.Daemon
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 12 more
Exception in thread "main"
crawford-daemon:
[2015-01-07 15:47:47] [info] Commons Daemon procrun (1.0.10.0 32-bit) started
[2015-01-07 15:47:47] [info] Running 'ImageProcAgent' Service...
[2015-01-07 15:47:47] [info] Starting service...
[2015-01-07 15:47:49] [error] FindClass com/fx358/fx9/agent/AgentApp failed
[2015-01-07 15:47:49] [error] Failed to start Java
[2015-01-07 15:47:49] [error] ServiceStart returned 4
[2015-01-07 15:47:49] [info] Run service finished.
[2015-01-07 15:47:49] [info] Commons Daemon procrun finished
`[2015-01-07 15:47:49] [error] FindClass com/fx358/fx9/agent/AgentApp failed
Here is the script I'm using to install the agent:
SET DISPLAYNAME="ImageProcAgent"
SET DESCRIPTION="FX9 image processing Agent"
SET LOGPATH="C:\FX9\logs\ImageProcAgent"
SET STARTPATH=
SET JVMLOCATION="C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll"
SET CUSTCLASSPATH="C:\FX9\release\ImageProcAgent\GenericAgent_jar\GenericAgent.jar;C:\FX9\release\ImageProcAgent\GenericAgent_jar\ImageProcAgent.jar;."
ECHO ON
ImageProcAgent.exe //IS//ImageProcAgent --DisplayName=%DISPLAYNAME% --Description=%DESCRIPTION% --Startup=auto --LogPath=%LOGPATH% --LogLevel=INFO --LogPrefix=crawford-daemon --StdOutput=auto --StdError=auto --StartPath=%STARTPATH% --StartClass=com.fx358.fx9.agent.AgentApp --StartMethod=main --StartParams=start --StartMode=jvm --StopPath=%% --StopClass=com.fx358.fx9.agent.AgentApp --StopMethod=stop --StopMode=jvm --Jvm=%JVMLOCATION% --Classpath=%CUSTCLASSPATH% --JvmOptions=-Xmx512M ++JvmOptions=-Djava.util.logging.config.file=logging.properties
`
Can someone point me out what I'm doing wrong? thanks in advance.
I had the same error. Turns out, I was attempting to use commons-logging and log4j directly within the Service class. However, the log4j was not initializing properly, thus causing the load to error out.
I removed all the log4j, replacing it with a simple System.out.* and it worked.
In your classpath declaration there are only 2 jar entries:
CUSTCLASSPATH="C:\FX9\release\ImageProcAgent\GenericAgent_jar\GenericAgent.jar;C:\FX9\release\ImageProcAgent\GenericAgent_jar\ImageProcAgent.jar;."
Is your application's your build as a fat-jar containing all compile and runtime dependencies? Otherwise you'll have to add each JAR that is needed at runtime of your service to the classpath. For example:
CUSTCLASSPATH="C:\FX9\release\ImageProcAgent\GenericAgent_jar\GenericAgent.jar;C:\FX9\release\ImageProcAgent\GenericAgent_jar\ImageProcAgent.jar;C:\FX9\release\ImageProcAgent\GenericAgent_jar\lib\commons-daemon-1.0.15.jar;<PROBABLY_MORE_JARS_NEED_TO_BE_ADDED_HERE>;."
Furthermore using . in the classpath of your service is probably not a good idea. You should only use fully qualified paths in there. Otherwise you'll be dependent on the location from where the service is executed by Windows.
I had the same error with a runnable jar build with ANT. The Service-Class fails with a severe error. One reason was, i used signed libraries SHA1-Digest, please check this. To avoid this problem don't build a runnable, deliver the libraries you are using, and set the Class-Path in the MANIFEST.MF of your JAR-File. Hope this helps you.

Eclipse fails to start

When I try to start Eclipse Juno on Windows 7 a messagebox saying "An error occured. See the log file" appears and eclipse won't start. I tried either renaming my workspace folder or change eclipse workspace settings stored in eclipse_root_folder\configuration.settings\org.eclipse.core.net.prefs but it doesn't work. I have been using this for 2 months and this didn't happen before. Any solution?
!SESSION 2013-03-11 15:17:16.709 -----------------------------------------------
eclipse.buildId=M20120914-1800
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
!ENTRY org.eclipse.osgi 4 0 2013-03-11 15:17:20.919
!MESSAGE Application error
!STACK 1
java.lang.NoSuchMethodError: sun.misc.ProxyGenerator$ConstantPool.seTReadOnly()V
at sun.misc.ProxyGenerator.generateClassFile(Unknown Source)
at sun.misc.ProxyGenerator.generateProxyClass(Unknown Source)
at java.lang.reflect.Proxy.getProxyClass(Unknown Source)
at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.annotationForMap(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationType.<init>(Unknown Source)
at sun.reflect.annotation.AnnotationType.getInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationType.<init>(Unknown Source)
at sun.reflect.annotation.AnnotationType.getInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationType.<init>(Unknown Source)
at sun.reflect.annotation.AnnotationType.getInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.reflect.Field.declaredAnnotations(Unknown Source)
at java.lang.reflect.Field.getAnnotation(Unknown Source)
at java.lang.reflect.AccessibleObject.isAnnotationPresent(Unknown Source)
at org.eclipse.e4.core.internal.di.InjectorImpl.processFields(InjectorImpl.java:617)
at org.eclipse.e4.core.internal.di.InjectorImpl.processClass(InjectorImpl.java:575)
at org.eclipse.e4.core.internal.di.InjectorImpl.processClass(InjectorImpl.java:568)
at org.eclipse.e4.core.internal.di.InjectorImpl.processClassHierarchy(InjectorImpl.java:556)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:87)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:319)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:240)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
at org.eclipse.e4.core.services.translation.TranslationProviderFactory.bundleTranslationService(TranslationProviderFactory.java:34)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:417)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:434)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:182)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:557)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
I have the latest version of java
/eclipsepath/eclipse.exe -clean [this isn't working]
I haven't made any changes on my pc
Eclipse stores a copy of your project in it's cache. It can happen when Eclipse crashes (that happens) that this cache is corrupted and thus Eclipse won't start again. Starting with '--clean' somethimes fixes this but not always.
In my experience one solution is to delete the project's cache. Look for the '.metadata' folder in your workspace and delete it while Eclipse is NOT running (make a backup just in case). Then launch Eclipse again.
You may loose your Run Configurations preferences which you can then restore from your backup copy of ".metadata/.plugins/org.eclipse.debug.core/.launches".
Try to execute following line in command prompt:
/eclipsepath/eclipse.exe -clean
When even "clean" command fails, I have had good results with
eclipse -clean -cleanPersistedState
Apart from that, I'd use FileMon by SysInternals (or ProcMon, or similar utility) to try and see what operation exactly is failing, or where is Eclipse looking for its data.
eclipse.buildId=M20120914-1800 java.version=1.6.0_25 java.vendor=Sun
Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64,
WS=win32, NL=en_US Framework arguments: -product
org.eclipse.epp.package.jee.product Command-line arguments: -os win32
-ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
No you don't have latest version of java, your eclipse is using java 1.6, Latest java is 1.8
There seems to be some mismatch ie. OS is win32 and arch is x86_64. Make sure that if OS is 32 bit, Java and Eclipse is also 32 bit
Are you sure you downloaded the Eclipse/ JAVA version for the right processor architecture?
Looks like try to run a mixture of 32-bit and 64-bit applications on your system, maybe you updated your eclipse/ java/ etc. or added some new library?
You're probably not using the version of Java that you think you are. You need to specify to Eclipse what JVM to use, via eclipse.ini. Otherwise it can pick up unintended versions from your system path.
in your files manager do the following thing.
rm YOUR_WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.snap
rm /home/anoop/workspace2/.metadata/.plugins/org.eclipse.core.resources/.snap
Run the following command in terminal
/full/path/to/second/eclipse -clean
--clean helped me when i restart after the eclipse crashed.
Have you tried a restore of your computer to yesterday? It's certainly not as elegant as some of these other answers, but I bet something changed that you're just not thinking about (or noticing - background update, perhaps?), and a restore will fix whatever that was.

Sonar ANT task integration error

Java and ANT versions:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Sonar version: 3.3.2
Sonar Ant Task version: 2.0, using sonar-ant-task-2.0.jar
I am getting this below error when I run the build script. I tried with setting the below properties in build script as well but keeps getting the below error. Please let me know if anyone has any solution.
sonar.sourceEncoding with value Windows-1252
sonar.supportSourceFileDuplications with value as true
Error:
BUILD FAILED
D:\TestProj\build-sonar.xml:40: org.sonar.api.utils.SonarException: Unable to read and import the source file : 'D:\TestProj\WEB-INF\src\com\iwf\ImageSearchCommand.java' with the charset : 'windows-1252'.
at org.sonar.plugins.java.JavaSourceImporter.importSource(JavaSourceImporter.java:86)
at org.sonar.plugins.java.JavaSourceImporter.parseDirs(JavaSourceImporter.java:70)
at org.sonar.plugins.java.JavaSourceImporter.analyse(JavaSourceImporter.java:63)
at org.sonar.plugins.java.JavaSourceImporter.analyse(JavaSourceImporter.java:59)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
at org.sonar.batch.phases.Phases.execute(Phases.java:97)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:128)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:114)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:104)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.Batch.execute(Batch.java:104)
at org.sonar.runner.DeprecatedAntLauncher.execute(DeprecatedAntLauncher.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.sonar.runner.DeprecatedAntTaskExecutor.delegateExecution(DeprecatedAntTaskExecutor.java:110)
at org.sonar.runner.DeprecatedAntTaskExecutor.execute(DeprecatedAntTaskExecutor.java:65)
at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:86)
at org.sonar.ant.SonarTask.execute(SonarTask.java:75)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)Caused by: org.sonar.api.resources.DuplicatedSourceException: Duplicate source for resource: com.iwf.ImageSearchCommand
at org.sonar.batch.index.SourcePersister.saveSource(SourcePersister.java:45)
at org.sonar.batch.index.DefaultPersistenceManager.setSource(DefaultPersistenceManager.java:78)
at org.sonar.batch.index.DefaultIndex.setSource(DefaultIndex.java:419)
at org.sonar.batch.DefaultSensorContext.saveSource(DefaultSensorContext.java:161)
at org.sonar.plugins.java.JavaSourceImporter.importSource(JavaSourceImporter.java:83)
Sounds like:
SONAR-2444
Root cause is a source and test file of the same name. Solution is to exclude test files from Sonar analysis

java.lang.ClassNotFoundException while starting eclipse

After purging and reinstalling eclipse with dpkg (Ubuntu) there is an error throws there:
cat /home/sergiy/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1337883707989.log
!SESSION Thu May 24 21:21:48 EEST 2012 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2012-05-24 21:21:48.242
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Here is /usr/lib/eclipse/configuration/config.ini file:
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Wed Apr 04 13:29:31 UTC 2012
org.eclipse.update.reconcile=false
eclipse.p2.profile=PlatformProfile
osgi.instance.area.default=#user.home/workspace
osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.dist.jar
equinox.use.ds=true
eclipse.buildId=I20110613-1736
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.dist.jar#1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=platform\:/base/plugins/org.eclipse.platform
osgi.framework.extensions=
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=#config.dir/../p2/
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundlefile.limit=100
How to fix this issue? Thanks in advance!
The first recommendation is to NOT install Eclipse from any Linux package manager or software repository. Instead, just get it from http://www.eclipse.org/downloads/. The builds that linux distro's install are often modified (mangled, some would say).
see https://askubuntu.com/a/695401/407641 for full instructions, ...
Highlights:
Don't sudo apt-get eclipse, that version is old!
Do download and install from http://www.eclipse.org/downloads
Do create a ~/Desktop/eclipse.desktop file. Note, the full path to the Desktop folder will be dependent upon your version of ubuntu.

Categories