2016-08-04 50 views
3

Websphere 8.5.5.8(Java 1.6.0ではIBM J6 VMの場合)に非常に基本的なスプリングブートアプリケーションを配備しようとしています。同じアプリはGlassfishで動作しますが、Websphereでは例外がスローされます。私はそれを稼働させるためにネット上のすべてのガイドに従うことを試みてきましたが、まだ役に立たない、誰かが私が間違っているものについていくつかの光を発することができますか?SpringBootアプリケーションをWebsphere 8.5.5.8にデプロイする

例外ログは以下の通りです:

[8/4/16 9:36:52:031 HKT] 00000094 SystemErr  R com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: Failed to load webapp: Unable to load configuration filesnull 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:433)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1382)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:971)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379)null 
[8/4/16 9:36:52:032 HKT] 00000094 SystemErr  R  at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189)null 

以下WebSphereバージョン情報:

Installation 
-------------------------------------------------------------------------------- 
Product Directory  /opt/IBM/WebSphere/AppServer 
Version Directory  /opt/IBM/WebSphere/AppServer/properties/version 
DTD Directory   /opt/IBM/WebSphere/AppServer/properties/version/dtd 
Log Directory   /var/ibm/InstallationManager/logs 

Product List 
-------------------------------------------------------------------------------- 
ND      installed 

Installed Product 
-------------------------------------------------------------------------------- 
Name     IBM WebSphere Application Server Network Deployment 
Version    8.5.5.8 
ID     ND 
Build Level   cf081545.03 
Build Date   11/12/15 
Package    com.ibm.websphere.ND.v85_8.5.5008.20151112_0939 
Architecture   x86-64 (64 bit) 
Installed Features IBM 64-bit WebSphere SDK for Java 
         WebSphere Application Server Full Profile 
         EJBDeploy tool for pre-EJB 3.0 modules 
         Embeddable EJB container 
         Stand-alone thin clients and resource adapters 

マイPOMファイル:

<packaging>war</packaging> 

<name>test-server</name> 

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

<properties> 
    <start-class>com.test.ServletInitializer</start-class> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <java.version>1.6</java.version> 
</properties> 

<dependencies> 
    <dependency> 
     <groupId>javax</groupId> 
     <artifactId>javaee-api</artifactId> 
     <version>6.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
     <exclusions> 
      <exclusion> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-starter-tomcat</artifactId> 
      </exclusion> 
     </exclusions> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
      <executions> 
       <execution> 
        <goals> 
         <goal>repackage</goal> 
        </goals> 
        <configuration> 
         <skip>true</skip> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

     <plugin> 
      <artifactId>maven-resources-plugin</artifactId> 
     </plugin> 
    </plugins> 
</build> 

そして最後に私のメインクラス:WebSphereが実行されているよりも、あなたのServletInitializerクラスが別のバージョンでコンパイルされたよう

@SpringBootApplication(exclude = MessageSourceAutoConfiguration.class) 
public class ServletInitializer extends SpringBootServletInitializer { 

    /*public static void main(String[] args) { 
     SpringApplication.run(ServletInitializer.class, args); 
    }*/ 

    @Override 
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 
     return application.sources(ServletInitializer.class); 
    } 
} 

答えて

3

問題ここには見えます。

<properties> 
    <start-class>com.test.ServletInitializer</start-class> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <java.version>1.7</java.version> 
</properties> 

だから<java.version>1.6</java.version>にそれをダウンバンプとうまくいけば、その:this tableによると、あなたのpom.xmlを見るとJavaの68

とに同梱8.5.5.8 WASは、Java 7を使用してServletInitializer建物を持っていますあなたの問題を解決します。

サイドノート:
は、Java EE 7のためのあなたのpom.xmlでの依存関係を持っている、が、WebSphere伝統的には、バージョン9.0までEE7準拠していないので、私はあなたがダウンし6.0にごjavaee-apiバージョンバンプお勧めします。

+1

ありがとうございました!あなたの答えを見た後、私のサーバーは実際にJava 6で動作しています。私はJavaのバージョンをダウングレードしました。これで別のエラーが発生します...私の問題の次の段階に私をもたらしたと思います... – John

+0

oops、misread the表 - WAS 8558はJava 8ではなくJava 6で実行する必要があります。私は自分の答えを更新します。 –

関連する問題