首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在“更新服务器部署扫描器: WildFly 23”期间发生了内部错误

在“更新服务器部署扫描器: WildFly 23”期间发生了内部错误
EN

Stack Overflow用户
提问于 2021-09-02 09:34:36
回答 2查看 3.7K关注 0票数 5

我试图连接到我的http://localhost:8080/spring test/ui,但不幸的是,我失败了,因为我在Eclips上有错误。WildFly 23理论上有效,因为我通常会得到他们的本地主机

代码语言:javascript
复制
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

当我尝试将standalone.xml中的目录重定向到具有META和WEB的目标时,我遇到了两个错误。

代码语言:javascript
复制
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

代码语言:javascript
复制
    <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

代码语言:javascript
复制
    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

代码语言:javascript
复制
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

代码语言:javascript
复制
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

代码语言:javascript
复制
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);
    }

}
EN

回答 2

Stack Overflow用户

发布于 2021-10-04 03:36:35

在尝试从Eclipse (2021-09)启动Wildflix19.1.0容器时,我也犯了同样的错误。这个容器似乎开始成功了,但是这个信息让我发疯了。

过了一段时间,我在野生苍蝇谷歌群组上看到了这条消息,这解决了我的问题!

将--add-opens=java.base/java.security=ALL-UNNAMED添加到eclipse.ini解决了我这边的问题

感谢原作者拉希姆·阿利扎达( Rahim Alizada )在OuPrpsF2pY/m/xLit6u-IfBgAJ

选项--add-opens在运行时打开通知模块(所有类型和成员),允许来自目标模块的深度反射(在本例中,所有其他模块都未命名)。

9月261中有更多关于这个选项的信息。

我试着在我的系统中只使用Java 8运行Eclipse,如果我清楚地记住它,我就让它正常工作,但是在这些较新的Eclipse版本上的一些模块需要正确加载Java 11。

票数 7
EN

Stack Overflow用户

发布于 2022-03-08 11:45:07

在eclipse中部署通配符23服务器时,我遇到了这个错误。

在“更新服务器部署扫描器: WildFly 23”期间发生了内部错误。无法初始化类org.wildfly.security.auth.client.DefaultAuthenticationContextProvider

这也解决了我将--add-opens=java.base/java.security=ALL-UNNAMED添加到eclipse.ini中的问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69027688

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档