TestNG by default disables loading DTD from unsecure Urls

Yes, that’s the default behavior of TestNG and I had introduced it through that pull request to fix the bug https://github.com/cbeust/testng/issues/2022 To set the JVM arguments in intelliJ, choose Run > Edit Configurations, and add this JVM argument in the VM options section after -ea (which would be there by default. For more information on … Read more

ModelMapper, mapping list of Entites to List of DTO objects

You can create util class: public class ObjectMapperUtils { private static final ModelMapper modelMapper; /** * Model mapper property setting are specified in the following block. * Default property matching strategy is set to Strict see {@link MatchingStrategies} * Custom mappings are added using {@link ModelMapper#addMappings(PropertyMap)} */ static { modelMapper = new ModelMapper(); modelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT); } … Read more

Java ArrayList Index

You have ArrayList all wrong, You can’t have an integer array and assign a string value. You cannot do a add() method in an array Rather do this: List<String> alist = new ArrayList<String>(); alist.add(“apple”); alist.add(“banana”); alist.add(“orange”); String value = alist.get(1); //returns the 2nd item from list, in this case “banana” Indexing is counted from 0 … Read more

java.lang.IllegalStateException: getAttribute: Session already invalidated

I never worked with WebLogic, but from JavaDoc here I can tell that calling getPortletSession() is already wrong idea if you want to invalidate existing session, because it’s said in JavaDocs: Returns the current portlet session or, if there is no current session, creates one and returns the new session. So, it creates a new … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)