Problem with Migration from NUnit 2.6.0 to 3.11.0 - nunit

During migration from Nunit 2.6.0 to 3.11.0, in 2.6 RandomAttribute Class has method public override IEnumerable GetData(ParameterInfo param), in 3.11.0 it's been changed to public IEnumerable GetData(IParameterInfo param).we override GetData in 2.6 what is the alternative to do the same in 3.11.0?

Related

How to find corresponding version of MyBatis Generator for MyBatis 3.4.2?

I want MyBatis Generator generate for me source code for working with MyBatis version 3.4.2 . How to choose suitable version of MyBatis Generator?
Just get the latest one.
According to the documentation for the current (1.3.7) version:
MyBatis Generator (MBG) is a code generator for MyBatis MyBatis and
iBATIS. It will generate code for all versions of MyBatis, and
versions of iBATIS after version 2.2.0

Entity Framework Core migration from a console app not working

I am writing a simple console application to test some EF Core code.
I added the entityframework.commands package.
install-package entityframework.commands -pre
The connection string is correct and tested, but when I execute
Update-Database
from the package manager I get the following error.
No DbContext was found. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.
Of course, I have a context, just one in the project.
entityframework.commands is ancient. Use Microsoft.EntityFrameworkCore.Tools instead.

Using Spring MVC 4, when I add Spring Security 3.2 to pom I get ASM ClassReader failed to parse class file error

I am using Java 8 in eclipse. Could the issue be that spring security does not support Java 8 as of yet?
12:13:44.226 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\dev\workspace_professional_web_development\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\movierental\WEB-INF\classes\com\hemswortht\movierental\annotation\ReleaseYearConstraint.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [C:\dev\workspace_professional_web_development\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\movierental\WEB-INF\classes\com\hemswortht\movierental\annotation\ReleaseYearConstraint.class]; nested exception is java.lang.IllegalArgumentException
and ReleaseYearConstraint.java...
package com.hemswortht.movierental.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.ReportAsSingleViolation;
import com.hemswortht.movierental.validator.ReleaseYearConstraintValidator;
#Target({ ElementType.TYPE })
#Constraint(validatedBy = ReleaseYearConstraintValidator.class)
#Retention(RetentionPolicy.RUNTIME)
#Documented
#ReportAsSingleViolation
public #interface ReleaseYearConstraint {
String message() default "You have specified invalid search input parameters.";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
This all boils down to dependencies version management in your build.
I suggest you to take a look at the various solutions Spring offers for that:
Spring Framework BOM, for managing spring-framework versions efficiently
Spring IO platform BOM if you want to get version management for spring-framework, spring portfolio projects (so spring security) and even third party dependencies
Note that changing the order of dependencies in your pom does not solve completely your problem - you'd better add dependency exclusions.
I figured it out! So basically you must use Spring 4 if you are using Java 8. Spring Security 3.2 is compatible with Spring 4 so that's ok.
so where did I go wrong?????
You need to make sure the Spring Security 3.2 dependencies COME AFTER the Spring 4 dependencies in the pom. Otherwise all spring versions get resolved to 3.2.6 !!! Doh.

Spring Roo with GWT BigDecimal serialization

I use STS 3.3.0 with roo 1.2.4. this one use GWT 2.5.0
When I database reverse engineer my database some fields are typed "BigDecimal", mainly amount on financial accounts. When I want to build using mvn gwt:run , I got a build failure due to the following error:
[ERROR] BigDecimalBox cannot be resolved to a type
After search in google I've found that GWT manage the BigDecimal since 2.1.
Any Clue?
Weird, there is no class with that name in the namespace you point (com.google.gwt.user.client.ui.ValueBox) in fact there is no BigDecimalBox in the gwt-2.5.1 library.
Implement it in your project and change imports to match the namespace you use for it.
public class BigDecimalBox extends ValueBox<BigDecimal> {
public BigDecimalBox() {
super(Document.get().createTextInputElement(), BigDecimalRenderer.instance(),
BigDecimalParser.instance());
}
}

GlassFish Error: JAX-RS EJB support is disabled

I am trying a simple app using Jersey JAX-RS + EJB 3.1 on GlassFish 3.1.2.2. All seemed to look pretty well with Jersey REST on GlassFish until I added EJB. When deploying the war file, I got this error.
SEVERE: Error when configuring to use the EJB interceptor binding API. JAX-RS EJB support is disabled.
Anyone who has encountered this before? Is there a configuration in GlassFish to fix this?
My EJB is a simple pojo with #Singleton and #PostConstruct annotation.
#Singleton
public class PurchaseBean {
private String name;
#PostConstruct
public void init() {
System.out.println("Initializing PurchaseBean");
setName("Purchase Singleton EJB");
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Looks like this is an Eclipse issue. I did the deployment using Eclipse with the GlassFish adapter. Restarting Eclipse solved it.
Solution: Shutdown GlassFish, inside Eclipse go to Project->Clean(select project) and then start GlassFish again.
I don't know why but it worked. :)
Working solution or the ones who run the Glassfish standalone: Restart the Glassfish. Glassfish version number 4.1.2