An internal error occurred during: "Updating Deployment Scanners for Server: WildFly 23"
Asked Answered
U

3

5

I'm trying to connect to my http://localhost: 8080/spring-boot-test/ui, but unfortunately I fail because I have errors on Eclips. WildFly 23 theoretically worked, because I normally get their localhost

An internal error occurred during: "Updating Deployment Scanners for Server: WildFly 23".
Could not initialize class org.wildfly.security.auth.client.DefaultAuthenticationContextProvider

An internal error occurred during: "Checking Deployment Scanners for server".
Could not initialize class org.wildfly.security.auth.client.DefaultAuthenticationContextProvider

When I try to redirect the directory in standalone.xml to a target with META-INF and WEB-INF, I come across two ERRORs

ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0011: The deployment scanner found a directory named META-INF that was not inside a directory whose name ends with .ear, .jar, .rar, .sar or .war. This is likely the result of unzipping an archive directly inside the C:\Users\adame\eclipse-workspace\spring-boot-test\target directory, which is a user error. The META-INF directory will not be scanned for deployments, but it is possible that the scanner may find other files from the unzipped archive and attempt to deploy them, leading to errors.
ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0011: The deployment scanner found a directory named WEB-INF that was not inside a directory whose name ends with .ear, .jar, .rar, .sar or .war. This is likely the result of unzipping an archive directly inside the C:\Users\adame\eclipse-workspace\spring-boot-test\target\ directory, which is a user error. The WEB-INF directory will not be scanned for deployments, but it is possible that the scanner may find other files from the unzipped archive and attempt to deploy them, leading to errors.

Pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.adamkaim.spring</groupId>
      <artifactId>spring-boot-test</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      
      <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.3.RELEASE</version>
      </parent>
      
      <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-spring-boot-starter</artifactId>
            <version>1.0.0</version>
        </dependency>
      </dependencies>
      
      <properties>
        <java.version>16</java.version>
      </properties>
      
      <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>
      </build>
      <packaging>war</packaging>
    </project>

App.java

    package com.adamkaim.spring;
     
     import org.springframework.boot.SpringApplication;
     import org.springframework.boot.autoconfigure.SpringBootApplication;
     
     @SpringBootApplication
     public class App {
         public static void main(String[] args) {
     
             SpringApplication.run(App.class, args);
         }
     }

Address.java

package com.adamkaim.spring;

import org.springframework.stereotype.Component;

@Component
public class Address {

    private String address="Wall Street 34";

    public String getAddress() {
        return this.address;
    }
}

Student.java

package com.adamkaim.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Student {

    @Autowired
    private Address address;

    public String showInfo(){
        return this.address.getAddress();
    }
}

MainView.java

package com.adamkaim.spring;

import com.vaadin.annotations.Theme;
import com.vaadin.annotations.Title;
import com.vaadin.server.VaadinRequest;
import com.vaadin.spring.annotation.SpringUI;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

@SuppressWarnings("serial")
@SpringUI(path="/ui")
@Title("Titlett")
@Theme("valo")
public class MainView extends UI{
    
    @Override
    protected void init(VaadinRequest request) {
        final VerticalLayout verticalLayout = new VerticalLayout();
        
        verticalLayout.addComponent(new Label("Welcome"));
        
        Button button = new Button("Click me");
        
        verticalLayout.addComponent(button);
        
        button.addClickListener(new Button.ClickListener() {
            
            @Override
            public void buttonClick(ClickEvent event) {
                verticalLayout.addComponent(new Label("Button is clicked.."));
            }
        });
        
        setContent(verticalLayout);
    }

}
Undoubted answered 2/9, 2021 at 9:34 Comment(0)
I
10

I was having the same error when trying to start a Wildfly 19.1.0 container from Eclipse (2021-09). The container seemed to start successful, but this message was driving me crazy.

After a while I came across this message on the Wildfly Google Groups, and this solved my problems!

Adding --add-opens=java.base/java.security=ALL-UNNAMED to eclipse.ini fixed the issue on my side

Thanks to the original author, Rahim Alizada, in https://groups.google.com/g/wildfly/c/_OuPrpsF2pY/m/xLt6u-IfBgAJ.

The option --add-opens opens up the informed modules (all types and members) at runtime, allowing deep reflection from the target modules (in this case, everyone else - ALL-UNNAMED).

More about this option in the JEP 261.

I tried running Eclipse with only Java 8 in my system, if I remember it well I got it working, but some modules on these newer Eclipse versions require Java 11 to load properly.

Incompetence answered 4/10, 2021 at 3:36 Comment(1)
Works for me, Thanks! I have added this line after my VM section on my eclipse.ini.Trivet
S
2

I came across this error during the deployment of wildfly 23 server in eclipse

An internal error occurred during: "Updating Deployment Scanners for Server: WildFly 23". Could not initialize class org.wildfly.security.auth.client.DefaultAuthenticationContextProvider

This solved my issue too Adding --add-opens=java.base/java.security=ALL-UNNAMED to eclipse.ini

Sandeesandeep answered 8/3, 2022 at 11:45 Comment(0)
G
2

The newest JBoss Tools adds the line --add-opens=java.base/java.security=ALL-UNNAMED to eclipse.ini automatically.

But after installing the JBoss Tools in Eclipse, you have to exit and start Eclipse again - not only push the restart button after installing the JBoss Tools.

Otherwise Eclipse won't read the modified eclipse.ini file.

Griffe answered 15/6, 2023 at 8:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.