简体   繁体   English

无法启动部署在 websphere 8.5.5 上的 springboot 应用程序

[英]unable to launch springboot application deployed on websphere 8.5.5

I have made a java application with spring boot 1.4.3.release (starter parent dependency) and hibernate 5.0.12 along with a database connection to Oracle 11g which is to be deployed on Websphere 8.5.5.我制作了一个带有 spring boot 1.4.3.release(starter parent 依赖项)和 hibernate 5.0.12 的 java 应用程序,以及到要部署在 Websphere 8.5.5 上的 Oracle 11g 的数据库连接。 The problem is that the war file of the above app gets deployed on websphere but on starting it error is shown as per the below image.问题是上述应用程序的 war 文件被部署在 websphere 上,但在启动时错误如下图所示。

在此处输入图片说明

  • Things I have tried:我尝试过的事情:
    1. Successfully deployed a war file without any database dependency成功部署了一个没有任何数据库依赖的war文件
    2. Successfully deployed a war file with embedded database (H2, Derby)成功部署了一个带有嵌入式数据库的war文件(H2,Derby)
    3. Providing 3rd party persistence provider on Websphere 8.5.5在 Websphere 8.5.5 上提供 3rd 方持久性提供程序
    4. Tried with JNDI Datasource尝试使用 JNDI 数据源

I have also tried checking for any issues with Hibernate version and JPA problems.我还尝试检查 Hibernate 版本和 JPA 问题的任何问题。

The list of dependencies I have added:我添加的依赖项列表:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.4.3.RELEASE</version>
</parent>

<properties>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>

 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>



    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- hot swapping, disable cache for template, enable live reload -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>



    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi</artifactId>
        <version>3.15</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.15</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>1.3.2</version>
    </dependency>

     <dependency>  
        <groupId>com.googlecode.json-simple</groupId>  
        <artifactId>json-simple</artifactId>  
    </dependency> 

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>  
    </dependency> 



    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0.3</version>
    </dependency>
    <!-- Optional, for bootstrap -->
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
        <version>3.3.7</version>
    </dependency>

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



</dependencies>
<build>
  <finalName>oracleapp</finalName>
    <plugins>
        <!-- Package as an executable jar/war -->
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Please help me out.请帮帮我。

Given below is the project structure下面给出的是项目结构

在此处输入图片说明

The problem you are having is an issue of where your Main class is located at.您遇到的问题是您的 Main 类位于何处。 You need to move it to the root package, where it can see all other packages.您需要将它移动到根包,在那里它可以看到所有其他包。 Something like the following structure.类似于以下结构。

src/main/java
    -> SpringBootWebApplication (which I believe is your Main class)
        -> All other packages

This will allow your main to find the files you are looking for.这将使您的主文件找到您要查找的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 应用程序不是从websphere 8.5.5开始,但在tomcat中工作正常 - Application is not starting in websphere 8.5.5 but works fine in tomcat 无法在 websphere 8.5.5 中启动我的应用程序 - failed to start my application in websphere 8.5.5 在Websphere应用程序服务器8.5.5上运行liferay portlet - running liferay portlet on websphere application server 8.5.5 WebSphere Application Server 8.5.5上的自定义领域 - Custom Realm on WebSphere Application Server 8.5.5 作为WAR应用程序在Websphere 8.5.5上进行Solr部署 - Solr Deployment on Websphere 8.5.5 as WAR application 无法在不设置数据源的情况下启动springboot应用程序 - Unable to launch springboot application without setting datasource 将应用程序从 Websphere 7.0 迁移到 Websphere 8.5.5 时遇到的问题 - Facing issues while Migrating application from Websphere 7.0 to Websphere 8.5.5 无法在 WebSphere Application Server 8.5.5 中运行 JSF 1.1 应用程序 - cannot run JSF 1.1 application in WebSphere Application Server 8.5.5 部署在PCF上的springboot应用如何从Websphere MQ读取消息 - How can a springboot application deployed on PCF read messages from Websphere MQ 如何在 websphere 8.5.5 中部署 spring boot web 应用程序 - How to deploy spring boot web application in websphere 8.5.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM