I am using fitsharp for invoking an acceptance test. The code has compiled perfectly and when run from Visual Studio, runs without any problem. But when I invoke the same test from Fitnesse, it throws up an error "Cannot find the file Microsoft.Practices.ObjectBuilder version 1.0.x.x". I have tried to check in the test project and all the referenced dlls but this particular library is not used anywhere. Also, I could not find the ObjectBuilder library with the same signature as mentioned above anywhere. Could someone help?
Related
I am trying to get started with Logary. I need to write a new target and I have tried following the following tutorial https://logary.tech/tutorials. I have downloaded Logary.sln from https://github.com/logary/logary, but I am not able to build Logary.sln. When I build it I get 40 errors and all of them say: The command ""paket.exe" restore" exited with code 9009.
When I try to add the nuget Logary (latest 5.0) with NuGet manager I get NU1108: Cycle detected. Logary -> Logary (>= 5.0.0).
When I try following this https://logary.tech/logary-dotnet-quickstart I get 2 errors as well.
So, I am totally lost. What am I missing out? I will provide more information if necessary. I want to write a target in F# for my .NET application that would be sent as an event to Logary's centralised event storage.
I have used FAKE build and it worked OK. The problem was cause by some namespaces, which is fixed in the fake.
I seems that the problem is with the project name. Its name is the same as the referenced NuGet package. So to resolve this problem you should changed the project name and the build will succeeded.
I've been using Dagger 2 recently and just did some work with scopes in my android project, adding scopes for Activities. While everything runs, builds and tests fine on my own machine. I'm getting a compile error on Jenkins CI.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Adverts:compile***DebugJava'
.java.lang.ClassCastException: java.lang.String cannot be cast to javax.lang.model.type.TypeMirror
This is strange because the build has worked fine up until now with Dagger 2 just with less code being generated. When I navigate to the generated sources some, but not all of the code is generated. It looks like it's crapping it out somewhere along the way. Both CI and my machine are using the same version of JDK.
Has anybody ran into issues with CI & Dagger 2 before?
For people in the future who encounter this error as well, it's most likely because of a class you deleted or a class that doesn't exist that is being referenced in your Module.
I had the exact same error while compiling when I had code like this:
#Module(includes = {
AModuleThatDoesntExist.class
})
public class YourModule {
}
So what I'm saying is: if you encounter this error, check your Dagger modules and bootstrapper code, there's probably some invalid code there.
As to why it works on your machine and not on the CI server: I don't know. I would guess it's because of some cache issue where the .class file of your deleted .java file is still present on your local filesystem, so Dapper can find it, but it doesn't exist on your CI server. If you can still reproduce the issue, maybe you can try running "Rebuild" and see if the errors occurs locally too.
Whatever happens Dagger 2's annotation processor shouldn't throw an exception so assuming that is coming from the Dagger 2 annotation processor it might be worth raising a bug if you can create a reproducible example, preferably a simple one.
As others have suggested do a clean build (remove the classes yourself to make sure that they are all gone) and check for differences between your machine and the CI one.
I am trying to follow Jorge Lusar's suggestion on unit testing Umbraco. I could not get GetRoutingContext method to work because the Umbraco.Web.Routing.UrlProvider constructor is getting a null reference exception (I had downloaded an umbraco 7.0.4 installation previously and compiled the Umbraco.Tests.dll).
As I was getting out of options, I decided to download a fresh copy of Umbraco, compile and run a test that would execute the UrlProvider constructor. To my surprise, I got the null reference exception in there too so apparently, this bug has nothing to do with my solution but Umbraco's instead.
The images speak for themselves. Can anyone plase help with this? Is this really a bug or there's something I can do here?
The solution to the problem was to copy the config settings (the ones in the UnitTests project of the Umbraco solution) to my test project.
Umbraco is dependendant on config files. Not ideal for unit tests but it worked.
Here it is explained how to stub Umbraco dependencies.
Checking over a web.config for a current v7 site I've been working on, the umbracoConfiguration/settings section is of type Umbraco.Core.Configuration.UmbracoSettings.UmbracoSettingsSection.
Another thing you're doing wrong is using as IUmbracoSettingsSection. As means if the cast fails you return a null object, rather than an exception telling you the cast failed - it fails silently. It is better to do:
var umbracoSettings = (IUmbracoSettingsSection)ConfigurationManager.GetSection("umbracoConfiguration/settings");
As mentioned, I think your base type is wrong, and you should actually use:
var umbracoSettings = (Umbraco.Core.Configuration.UmbracoSettings.UmbracoSettingsSection)ConfigurationManager.GetSection("umbracoConfiguration/settings");
This should cast the section into the correct type for you.
I am doing an Max OS X terminal project. After I am done with the implementation I wanted to try try unit test. So I created a test target and set the target to be the one that I want to test. I wrote some simple test cases but it tells the link error ""_OBJC_CLASS_$_SomeClassUnderTest", referenced from:
objc-class-ref in SomeTest.o"
I looked at link
so first of all, why the error happened? I mean apple's official document does not mention anything about bundle loader or whatsoever, why I have to do that? there is something wrong with my original config or something? the linking should go the executable file? or it should go to static library file? but where to find that for testing and how to reference that?
and now the issue about linking issue is gone. but I got test fail even if I do "XCTAssertTrue(1==1,"")"! and I do not see any issue generated saying tests not pass or pass, just after build succeed there is a message saying test failed? why is this so?
This is a bug in Xcode and is corrected in version 5.1 . When using the simulator, tests can sometimes show the message Test target [test name] encountered an error (Test process exited with code -1)
See Xcode release notes for official details:
enter link description here
I am trying to preverify "signpost-commonshttp4-1.2.1.1.jar" file to use it in BlackBerry project
Here is the command im trying. Since it also needs "signpost-core-1.2.1.1.jar" to classpath which is already preverified.
C:\Eclipse_bb\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\bin>
preverify.exe -classpath
"C:\Eclipse_bb\plugins\net.rim.ejde.componentpack5.0.0_5.
0.0.25\components\lib\net_rim_api.jar;C:\Program Files\Java\jdk1.6.0_25\jre\lib\
rt.jar;C:\Eclipse_bb\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components
\bin\output\signpost-core-1.2.1.1.jar"
signpost-commonshttp4-1.2.1.1.jar
Here i have added classpath of net_rim_api.jar, rt.jar & signpost-core-1.2.1.1.jar
It throws below Error
Error preverifying class
oauth.signpost.commonshttp.CommonsHttpOAuthConsumer
VERIFIER ERROR oauth/signpost/commonshttp/CommonsHttpOAuthConsumer.wrap(Ljava/lang/Object;)Loauth/signpost/http/HttpRequest;:
Illegal type in constant pool
If you mean signpost, with source code hosted on github by kaeppler, then it appears to be a Java-SE library. BlackBerry is a Java-ME device, so you will need to find a Java-ME compliant library. The preverifier errors you are seeing are the first indication that the Java-SE code won't work on BlackBerry.