Neo4j 3.3.3 Community version failed to install-service in Windows - neo4j

Neo4j3.3.3 community edition, while trying to install-service its show below error. Tried on different machines. How to resolve this?
I am using Java version 1.8.0_162
I have JAVA_HOME environment variable set to C:\Program Files\Java\jdk1.8.0_162\bin
Error:
Invoke-Neo4j : Unable to determine the version of the installation at
D:\neo4j\neo4j-community-3.3.3
At line:1 char:221
+ ... t.psd1'; Exit (Invoke-Neo4j install-service)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
tion
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
n,Invoke-Neo4j

I encountered this problem too, and got it right by setting JAVA_HOME to JRE folder, which is C:\Program Files\Java\jre-X.X.X.
I think install-service is trying to fix a jdk path by adding some postfix, which is weird and causes this problem.

Related

not able to start neo4j server

I am using neo4j version 3.3.1 with java 1.8.0_151 on Windows 10. The log gives the following error:
Invoke-Neo4j : Failed to start service 'Neo4j Graph Database - neo4j (neo4j)'.
At line:1 char:163
+ ... odule 'C:\neo4j\bin\Neo4j-Management.psd1'; Exit (Invoke-Neo4j start)
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-Neo4j
I solved this problem by changing the path to the java.dll file. I have a 64 bit machine and the file was previously in Program Files(x86) folder although it is the correct version. This was confusing Neo4J.
I just copied the java folder to Program Files and changed the environment variable to point there and it worked.

install-package Thinktecture.IdentityServer3 command gives error in visual studio package manager console?

When i run following command in package manager console:
install-package Thinktecture.IdentityServer3
I am getting error:
Install-Package : Unable to find package 'Thinktecture.IdentityServer3'
At line:1 char:16
+ install-package <<<< Thinktecture.IdentityServer3
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I am following this tutorial to secure my restful api- https://identityserver.github.io/Documentation/docs/overview/simplestOAuth.html
and using visual studio 2015 express for web.
It should be install-package IdentityServer3
Check the latest tutorial here https://identityserver.github.io/Documentation/docsv2/overview/mvcGettingStarted.html

EF6 migrations stopped working on VS 2015 RC

I've been using VS2015CTP now I decided to upgrade it to VS2015 Community RC For some unknown reason migrations on my projects stopped working.
In Visual Studio 2015 I get the following message>
PM> update-database
Exception calling "LoadFrom" with "1" argument(s): "The specified path, file name, or both are too long. The fully qualified file name must be less
than 260 characters, and the directory name must be less than 248 characters."
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsP ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException
You cannot call a method on a null-valued expression.
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:781 char:5
+ $dispatcher = $utilityAssembly.CreateInstance(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "CreateInstanceFrom" with "8" argument(s): "The specified path, file name, or both are too long. The fully qualified file name
must be less than 260 characters, and the directory name must be less than 248 characters."
At G:\Projects\packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:809 char:5
+ $domain.CreateInstanceFrom(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException
PM>
If I open the solution in VS 2013 and run the above command everything works fine.
Is this some bug in VS, did it lose reference to something?
Is there a way to activate some sort of more extensive log, I really don't feel into debug EF.
Thanks
Edit:
I think this has something to do with the way Nuget is handled in Visual Studio 2015, it seems it doesn't look at nuget.config the same way.
I have all the packages across several solutions in the same folder, to do this I use a nuget.config under .nuget folder with:
<config>
<add key="repositoryPath" value="G:/Projects/packages" />
</config>
for some reason it seems that VS2015 is not handling this the same way as VS2013 because it tries to download the packages to the folder packages under the solution folder.
Downgraded the Entity Framework version from 6.1.3 to EF 6.1.2 and now it works.
https://github.com/aspnet/EntityFramework/issues/1950
Another reason can be in using EF in two or more projects (https://github.com/NuGet/Home/issues/528)
Temporary solution: Comment
<package id="EntityFramework" version="6.1.3" targetFramework="net46" userInstalled="true" />
of all its "packages.config" leaving uncommented only the project you want to work with Migrations.
Issue stems from having multiple projects referencing EF.
None of the existing answers worked for me. The only way I could resolve was to unload all projects referencing EF other than the one I was running Update-Database on.
This is caused by a NuGet bug
See Enable Migrations Error
The suggested workarounds are
Install an updated NuGet client that resolves this issue https://nuget.codeplex.com/releases/view/615507
Download this patched version of EntityFramework.psm1
EntityFramwework.psm1
Copy it into the packages\EntityFramework.6.1.3\tools directory, restart Visual Studio, and try again.
Unload other projects that reference Entity Framework
So that the only loaded project that references Entity Framework is the one that contains your EF model

No exact match installing Mono.Cecil nuget package

In VS2013.4, when I try to add Mono.Cecil nuget package in my fsharp project :
PM> Install-Package Mono.Cecil
Installing 'Mono.Cecil 0.9.5.4'.
Successfully installed 'Mono.Cecil 0.9.5.4'.
Adding 'Mono.Cecil 0.9.5.4' to Ying.Unit.
No exact match found for removing reference 'Mono.Cecil.Mdb'. Trying case-insensitive search...
Failed to find match for removing reference 'Mono.Cecil.Mdb'.
No exact match found for removing reference 'Mono.Cecil.Pdb'. Trying case-insensitive search...
Failed to find match for removing reference 'Mono.Cecil.Pdb'.
No exact match found for removing reference 'Mono.Cecil.Rocks'. Trying case-insensitive search...
Failed to find match for removing reference 'Mono.Cecil.Rocks'.
Uninstalling 'Mono.Cecil 0.9.5.4'.
Successfully uninstalled 'Mono.Cecil 0.9.5.4'.
Install failed. Rolling back...
Install-Package : Failed to add reference to 'Mono.Cecil.Mdb'.
At line:1 char:1
+ Install-Package Mono.Cecil
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
My project targets .NET 4.5 with F# 3.1 runtime (4.3.1.0).
Any thoughts ?
Thanks
Vianney

Error on Project Startup relating to Entity Framework in Package Manager Console

This error has perplexed me for the last few days and can find little to no information on Google regarding this. This started the other day when I was assigned a new laptop by work and I'm essentially running this on a clean install of Windows 7 x64 with VS2012 Update 1.
Whenever I start up a project using Entity Framework 5 or 6-alpha, this exception gets thrown to the package manager console:
New-Object : Cannot find an overload for "Version" and the argument count: "2".
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:5 char:46
+ if ($PSVersionTable.PSVersion -ge (New-Object <<<< Version #( 3, 0 )))
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
Test-ModuleManifest : Invalid Module Manifest path '<project path>
\packages\EntityFramework.5.0.0\tools\'. The path argument must resolve to a single file in the file system with a '
.psd1' extension. Please fix the path specification and try again.
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:14 char:34
+ $thisModule = Test-ModuleManifest <<<< (Join-Path $toolsPath $thisModuleManifest)
+ CategoryInfo : InvalidArgument: (C:\Users\stephe...rk.5.0.0\tools\:String) [Test-ModuleManifest], InvalidOper
ationException
+ FullyQualifiedErrorId : Modules_InvalidModuleManifestPath,Microsoft.PowerShell.Commands.TestModuleManifestCommand
Import-Module : Cannot bind argument to parameter 'Name' because it is null.
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:31 char:18
+ Import-Module <<<< $thisModule
+ CategoryInfo : InvalidData: (:) [Import-Module], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleComma
nd
I can get rid of this error by editing the package scripts manually, but that feels like it would be the wrong approach. There are also multiple instances of it checking the Powershell version in this manner so I'm suspecting it's something that's wrong with my computers's configuration.
This is affecting multiple ASP.NET MVC 4 projects of mine targeting .NET 4.5. I can't run any Entity Framework commands such as Enable-Migrations or Update-Database as a result of this error. Any clues will be greatly appreciated.
I finally got it to work, it was as simple as upgrading to PowerShell 3.0. That kinda makes the version detection pointless, but hey, at least it works.

Resources