how to solve 'Adding file to index' has encountered a problem in Eclipse? - eclipse

I am having problem with eclipse on my laptop while I want to add a project to index(for github). I get this error: Failed to add resource to index
Failed to add resource to index
Exception caught during execution of add command
this is my log:
!ENTRY org.eclipse.egit.ui 4 0 2023-01-25 20:38:42.622
!MESSAGE Failed to add resource to index
!STACK 1
org.eclipse.core.runtime.CoreException: Failed to add resource to index
at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:78)
at org.eclipse.egit.ui.internal.actions.AddToIndexActionHandler$1.run(AddToIndexActionHandler.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:225)
at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:74)
... 2 more
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock C:\Users\motah\.git\index. Ensure that no other process has an open file handle on the lock file C:\Users\motah\.git\index.lock, then you may delete the lock file and retry.
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:221)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:292)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:258)
at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1285)
at org.eclipse.egit.core.RepositoryHandle.lockDirCache(RepositoryHandle.java:319)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:122)
... 3 more
!SUBENTRY 1 org.eclipse.egit.core 4 0 2023-01-25 20:38:42.622
!MESSAGE Failed to add resource to index
!STACK 0
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:225)
at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:74)
at org.eclipse.egit.ui.internal.actions.AddToIndexActionHandler$1.run(AddToIndexActionHandler.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock C:\Users\motah\.git\index. Ensure that no other process has an open file handle on the lock file C:\Users\motah\.git\index.lock, then you may delete the lock file and retry.
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:221)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:292)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:258)
at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1285)
at org.eclipse.egit.core.RepositoryHandle.lockDirCache(RepositoryHandle.java:319)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:122)
... 3 more
Can anyone help me here how I can solve it?
I have deleted my project and made another one and it did not work. I did with other projects that I have and I get the same error.
I am learning how to push in eclipse to github. I only had this problem at class and we could not solve it.

I just found the solution. I had to delete .lock file. Now it works fine.

Related

Unable to add file to index using eGit plugin (Eclipse Neon3)

Eclipse is showing the below error when I select to add a file to index. Is there any way to fix this?
Failed to add resource to index
Failed to add resource to index
Exception caught during execution of add command
Below is the stack trace of the exception:
org.eclipse.core.runtime.CoreException: Failed to add resource to index
at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:80)
at org.eclipse.egit.ui.internal.actions.AddToIndexActionHandler$1.run(AddToIndexActionHandler.java:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:252)
at org.eclipse.egit.core.op.AddToIndexOperation.execute(AddToIndexOperation.java:77)
... 2 more
Caused by: org.eclipse.jgit.errors.LockFailedException: Cannot lock C:\Users\kkuma203\git\voice-war-nwp-pluto\.git\index
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:250)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:327)
at org.eclipse.jgit.dircache.DirCache.lock(DirCache.java:293)
at org.eclipse.jgit.lib.Repository.lockDirCache(Repository.java:1192)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:148)
... 3 more
Solved this error by manually deleting index.lock file.
I am now able to add files to index.
The file is located at /home/user/location/.git/index.lock.

Failed to restart after installed APOC Plugin in Neo4j

I would like to install the APOC plugin for Neo4j. However once generated jar file and restart, neo4j not able to restart again
Follow Guide
https://github.com/neo4j-contrib/neo4j-apoc-procedures/tree/3.1
Error msg:
ERROR Failed to start Neo4j: Starting Neo4j failed: Component ' org.neo4j.server.database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component ' org.neo4j.server.database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server. database.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to sta rt. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(Serv erStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:227)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:68)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.databa se.LifecycleManagingDatabase#3b6579d6' was successfully initialized, but failed to start. Pl ease see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 43)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:199)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDat abaseFacadeFactory, /root/NEO4J_HOME/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabase FacadeFactory.java:193)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseF acadeFactory.java:124)
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:57)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDataba se.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 33)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.p roc.Procedures#2200fd80' was successfully initialized, but failed to start. Please see attac hed cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 43)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabase FacadeFactory.java:189)
... 9 more
Caused by: org.neo4j.kernel.api.exceptions.ProcedureException: Unable to register procedure, because the name `apoc.algo.betweenness` is already in use.
at org.neo4j.kernel.impl.proc.ProcedureRegistry.register(ProcedureRegistry.java:81)
at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:103)
at org.neo4j.kernel.impl.proc.Procedures.register(Procedures.java:76)
at org.neo4j.kernel.impl.proc.Procedures.start(Procedures.java:209)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:4 33)
... 11 more
the jar file name: apoc-3.1.0.4-SNAPSHOT-al.jar
neo4j version: 3.1.1
The stacktrace says: "the name apoc.algo.betweenness is already in use". So, perhaps you forgot to remove a previous APOC jar file from the plugins directory.

how solve launching Talend open studio Errors?

I have already installed the talend open studio for a month and suddenly when I open it last morning it gives this error
java.lang.NoClassDefFoundError: org/eclipse/jdt/core/JavaCore at
org.talend.designer.runprocess.java.JavaProcessorUtilities.getTalendJavaProject(JavaProcessorUtilities.java:99)
at
org.talend.designer.runprocess.DefaultRunProcessService.getTalendProcessJavaProject(DefaultRunProcessService.java:514)
at
org.talend.designer.runprocess.RunProcessService.getTalendProcessJavaProject(RunProcessService.java:356)
at
org.talend.designer.runprocess.DeleteAllJobWhenStartUp$1.run(DeleteAllJobWhenStartUp.java:85)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at
org.talend.designer.runprocess.DeleteAllJobWhenStartUp.earlyStartup(DeleteAllJobWhenStartUp.java:136)
at
org.talend.designer.runprocess.DeleteAllJobWhenStartUp.startup(DeleteAllJobWhenStartUp.java:56)
at
org.talend.designer.runprocess.RunProcessService.deleteAllJobs(RunProcessService.java:228)
at org.talend.core.CoreService.deleteAllJobs(CoreService.java:318)
at
org.talend.core.repository.model.ProxyRepositoryFactory.logOnProject(ProxyRepositoryFactory.java:1879)
at
org.talend.repository.ui.login.LoginHelper$1.run(LoginHelper.java:426)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
How can I deal with please...thanks?
If you read logs (TOS_DI-20170623_1246-V6.4.1\workspace.metadata.log), you can see
Caused by: org.eclipse.core.internal.resources.ResourceException:
Could not read metadata for
'C:\Programmation\TOS_DI-20170623_1246-V6.4.1\workspace.metadata.plugins\org.eclipse.core.resources.root.indexes\properties.index'.
Unexpected version: 0. at
org.eclipse.core.internal.localstore.Bucket.load(Bucket.java:303) at
org.eclipse.core.internal.properties.PropertyBucket.load(PropertyBucket.java:258)
at org.eclipse.core.internal.localstore.Bucket.load(Bucket.java:274)
at
org.eclipse.core.internal.localstore.BucketTree.loadBucketFor(BucketTree.java:115)
at
org.eclipse.core.internal.properties.PropertyManager2.getProperty(PropertyManager2.java:134)
at
org.eclipse.core.internal.resources.Resource.getPersistentProperty(Resource.java:1205)
at
org.eclipse.jdt.internal.core.JavaModelManager.loadVariablesAndContainers(JavaModelManager.java:3265)
at
org.eclipse.jdt.internal.core.JavaModelManager.startup(JavaModelManager.java:5036)
at org.eclipse.jdt.core.JavaCore.start(JavaCore.java:5651) at
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at
org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method) at
org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
... 21 more
I just removed 'TOS_DI-20170623_1246-V6.4.1\workspace.metadata.plugins\org.eclipse.core.resources.root.indexes\properties.index' and it worked well
Go to folder TOS_DI-20170623_1246-V6.4.1\workspace.metadata.plugins
Delete metadata.plugin, and restart your system open talend studio. It will take some time for loading plugins+ metadata.
After this we want to create talend projects.
Go to windows + search -> type run -> type %temp%-> remove/ delete all files.

org.neo4j.kernel.lifecycle.LifecycleException in Neo4j

I've been using neo4j 1.9 RC1 for the past two months. Yesterday, after an eclipse crash I started having this this exception:
Exception in thread "main" java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager#bf5743' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:282)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:90)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:75)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:60)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceService.<init>(PersistenceService.java:44)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceServiceFactory.createPersistenceService(PersistenceServiceFactory.java:27)
at fr.inria.atlanmod.neo4emf.drivers.impl.PersistenceManager.<init>(PersistenceManager.java:80)
at fr.inria.atlanmod.neo4emf.impl.Neo4emfResource.<init>(Neo4emfResource.java:58)
at fr.inria.atlanmod.neo4emf.impl.Neo4emfResourceFactory.createResource(Neo4emfResourceFactory.java:58)
at main.JDTASTMain.main(JDTASTMain.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager#bf5743' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:260)
... 9 more
Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM, no active tx log file found but found either tm_tx_log.1 or tm_tx_log.2 file, please set one of them as active or remove them.
at org.neo4j.kernel.impl.transaction.TxManager.openLog(TxManager.java:738)
at org.neo4j.kernel.impl.transaction.TxManager.start(TxManager.java:138)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 11 more
I am running it with Java 1.7. Any ideas?
It seems that your data directory is corrupt. There is already a suggestion printed to the log to fix that issue:
Unable to start TM, no active tx log file found but found either
tm_tx_log.1 or tm_tx_log.2 file, please set one of them as active or
remove them.

Stack overflow while working with CFBuilder plugin

In the past 30 minutes of working in CFBuilder (I have it as an Eclipse Plug in), I got this error 4 times:
A stack overflow has occurred.
You are recommended to exit the workbench.
Subsequent errors may happen and may terminate the workbench without warning.
See the .log file for more details.
Do you want to exit workbench?.
together with:
Unhandled event loop exception
java.lang.StackOverflowError
The log file had this:
!ENTRY org.eclipse.ui 4 0 2010-05-11 09:41:51.951
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StackOverflowError
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at com.adobe.ide.cfml.parser.generated.CFMLParserBase.getVariableInfo(CFMLParserBase.java:1613)
at com.adobe.ide.cfml.parser.generated.CFMLParserBase.getVariableInfo(CFMLParserBase.java:1603)
at com.adobe.ide.editor.model.CFMLDOMUtils.getVariable(CFMLDOMUtils.java:2375)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromNode(CFMLDOMUtils.java:2484)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromFunctionCall(CFMLDOMUtils.java:2168)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromNode(CFMLDOMUtils.java:2495)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromFunctionCall(CFMLDOMUtils.java:2168)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromNode(CFMLDOMUtils.java:2495)
at com.adobe.ide.editor.model.CFMLDOMUtils.getComponentNameFromFunctionCall(CFMLDOMUtils.java:2168)
(and so on - repeat n times)
It happens whenever I copy/paste something. Does anyone know what is going on?
Seems like this is a CFB bug http://forums.adobe.com/thread/551761
EDIT: i saw now you added comment there ;)
Please see Update 1 to ColdFusion Builder, this should fix the issue being reported here:
http://kb2.adobe.com/cps/846/cpsid_84607.html