mercredi 14 novembre 2018

cxf deployment :No services have been found.

No services have been found.

This problem occurs when you want to deploy a web service using cxf on server like tomcat:

and you have a deployment descriptor like this:

<servlet>
 <servlet-name>cxfservlet</servlet-name>
 <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
 <load-on-startup>1</load-on-startup>
 </servlet>

  <servlet-mapping>
 <servlet-name>cxfservlet</servlet-name>
 <url-pattern>/services/*</url-pattern>
 </servlet-mapping>


And a configuration file for cxf .This file must have the name cxf-servlet.xml and this is a rule .

So to resolve this problem of  "No services have been found", you must verify the name of that file,first of all.

mardi 30 octobre 2018

Encoded password does not look like BCrypt

Encoded password does not look like BCrypt

This error occurs,if you user JWT for authentification when you develop Using SpringBoot.

if you are using in your pom.xml for example like this:


<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>


and these dependencies:

<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
    <version>2.0.7.RELEASE</version>
</dependency>

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-jwt</artifactId>
    <version>1.0.4.RELEASE</version>
</dependency>


change the parent version to 1.5.4.RELEASE, and it will be like this:

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

and others put their versions like this:

<dependency>
    <groupId>org.springframework.security.oauth</groupId>
    <artifactId>spring-security-oauth2</artifactId>
   </dependency>

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-jwt</artifactId>
  
</dependency>