Monday 20 May 2019

java.util.regex.Matcher.appendReplacement(Matcher.java:857) : IllegalArgumentException

threw exception
java.lang.IllegalArgumentException: Illegal group reference
    at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
    at com.famposo.web.lib.HTML5TemplateEnigne.parse(HTML5TemplateEnigne.java:200)
    at com.famposo.web.view.Page.index(Page.java:36)
 
Solution: 
 
 
 matcher.appendReplacement(sb, text);
 
replace with 
  
m.appendReplacement(sb, Matcher.quoteReplacement(text));
 
it works 
 
i found this ref here 
 
 https://www.javamex.com/tutorials/regular_expressions/search_replace_loop.shtml

Saturday 18 May 2019

WARNING! Powershell script execution unavailable

C:\cassandra\bin>cassandra.bat start
WARNING! Powershell script execution unavailable.
Please use 'powershell Set-ExecutionPolicy Unrestricted'
on this user-account to run cassandra with fully featured
functionality on this platform.

https://stackoverflow.com/questions/29259347/cassandra-powershell-issue

Get-ExecutionPolicy -Scope CurrentUser

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

///finally////
C:\cassandra\bin>cassandra.bat
Detected powershell execution permissions. Running with enhanced startup scripts.
///////for security reason // you can revoke after the execution of cassandra .bat
 

Set-ExecutionPolicy -ExecutionPolicy restricted -Scope CurrentUser


Problem while loading CDI Extensions using Tom EE plus

19-May-2019 02:32:20.745 SEVERE [http-nio-8080-exec-6] org.apache.webbeans.service.DefaultLoaderService.load Problem while loading CDI Extensions
java.util.ServiceConfigurationError: javax.enterprise.inject.spi.Extension: Provider org.apache.bval.cdi.BValExtension could not be instantiated


Caused by: java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration()Ljavax/validation/BootstrapConfiguration;

//////////////Sol//////////////////////////////////
https://stackoverflow.com/questions/47504253/tomee-error-while-loading-cdi-extensions
Check you use a compatible bean validation version (1.1).



https://stackoverflow.com/questions/35798765/bean-validation-api-needed-when-using-hibernate-validator-engine


<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.2.4.Final</version>
<scope>provided</scope>
</dependency>



<version>5.2.4.Final</version> change the version to what is already added as dependecy by kundera module


<version>4.3.0.Final</version> one i have added


problem resolved