2016-08-04 13 views
3

Ich versuche, eine sehr einfache Spring-Boot-App für WebSphere 8.5.5.8 (mit IBM J6 VM, unter Java 1.6.0) bereitzustellen. Die gleiche App funktioniert auf Glassfish, löst aber auf Websphere eine Ausnahme aus. Ich habe versucht, jedem Führer im Netz zu folgen, um es zum Laufen zu bringen, aber immer noch ohne Erfolg. Könnte jemand bitte etwas Licht auf das werfen, was ich falsch verstanden habe?Bereitstellen der SpringBoot-App für Websphere 8.5.5.8

Das Ausnahmeprotokoll ist wie folgt:

[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 Version Info unter:

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 

Meine POM-Datei:

<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> 
meine Hauptklasse 10

Und schließlich:

@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); 
    } 
} 

Antwort

3

Das Problem hier sieht aus wie Ihre ServletInitializer Klasse mit einer anderen Version als WebSphere kompiliert wurde ausgeführt wird. Nach this table, 8.5.5.8 mit 68 mit Java ausgeliefert wurde

an Ihrem pom.xml suchen, haben Sie Ihr ServletInitializer Gebäude mit Java 7:

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

dass So stoßen bis zu <java.version>1.6</java.version> und hoffentlich, dass wird dein Problem lösen.

Randbemerkung:
Sie haben eine Abhängigkeit in Ihrem pom.xml für Java EE 7, aber WebSphere traditionell ist nicht EE7 konform bis Version 9.0, also würde ich empfehlen Ihnen, Ihre javaee-api Version stoßen bis zu 6.0.

+1

Danke! Mein Server läuft tatsächlich auf Java 6, nachdem ich deine Antwort angeschaut habe. Ich habe die Java - Version heruntergestuft, was mir jetzt einen weiteren Fehler bringt ... Ich denke, das hat mich zur nächsten Stufe meiner Probleme gebracht ... – John

+0

oops, falsch gelesen Tabelle - WAS 8558 sollte auf Java 6 und nicht auf Java 8 laufen. Ich werde meine Antwort aktualisieren. –

Verwandte Themen