Look at your EJB implementation. If it looks like this:
@Remote
...
public class SomeEJBImpl implements SomeEJB {
...
}Change it this way:
@Remote(SomeEJB.class)
...
public class SomeEJBImpl implements SomeEJB {
...
}
A daily Java developers challenges, problems and solutions.
@Remote
...
public class SomeEJBImpl implements SomeEJB {
...
}@Remote(SomeEJB.class)
...
public class SomeEJBImpl implements SomeEJB {
...
}
java.lang.NullPointerException at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.removeLink(VirtualResource.java:300)Solution is to edit .project file by hand and to include these natures in appropriate tag (you'll find it):
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
import java.math.BigDecimal;
import java.math.MathContext;
public class BigDecimalTest {
public static void main(String[] args) {
System.out.println(new BigDecimal(0).equals(BigDecimal.ZERO));
System.out.println(new BigDecimal("0").equals(BigDecimal.ZERO));
System.out.println(new BigDecimal(0.0d).equals(BigDecimal.ZERO));
System.out.println(new BigDecimal(0.0f).equals(BigDecimal.ZERO));
//WTF
System.out.println(new BigDecimal("0.0").equals(BigDecimal.ZERO)); // false!!!
System.out.println(new BigDecimal("0.0").equals(new BigDecimal("0"))); // false!!!
System.out.println(new BigDecimal("0.0").equals(new BigDecimal(0.0))); // false!!!
//same is with "1" and "1.0", and so on
//That's not a precision problem
MathContext mc = new MathContext(2);
System.out.println(new BigDecimal("0.0", mc).equals(new BigDecimal(0.0, mc))); // false!!!
//So, the proper way to compare two big decimals is:
System.out.println(new BigDecimal("0.0").compareTo(BigDecimal.ZERO) == 0);
}
The answer lies in API docs: BigDecimal#equals.
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticatedkeytool -keystore $JAVA_HOME/jre/lib/security/cacerts -import -file /path/to/cert.cerchangeit