J'ai une application sur java, je l'ai créé le fichier de guerre et je téléchargé sur WebSphere 8.0, mais quand je lance l'application WebSphere montre ceci: Screenshot of errorsComment changer de jre environnement sur websphere 8.0?
Ces références d'erreurs:
<%
int proceso = (Integer) request.getAttribute("proceso");
String id = (String) request.getAttribute("id");
int user = (Integer) request.getAttribute("user");
String ruta = (String) request.getAttribute("ruta");
String carpeta = (String) request.getAttribute("carpetaServer");
String budgetId = (String) request.getAttribute("budgetId");
List<String> encabezado = (List<String>) request.getAttribute("encabezado");
List<Combo> secciones = (List<Combo>) request.getAttribute("secciones");
List<Combo> imagenes = (List<Combo>) request.getAttribute("imagenes");
%>
J'utilise Java 1.6 donc je ne sais pas quel est le problème. Je suppose que c'est la version jre, mais je ne pouvais pas trouver quelle version est l'utilisation.
systemout.log montrent ceci:
************ Start Display Current Environment ************
WebSphere Platform 8.0.0.0 [BASE 8.0.0.0 n1118.03] running with process name XMBX248PCNode03Cell\XMBX248PCNode03\server1 and process id 7404
Host Operating System is Windows 7, version 6.1
Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
was.install.root = C:\Program Files (x86)\IBM\WebSphere8\AppServer
user.install.root = C:\Program Files (x86)\IBM\WebSphere8\AppServer\profiles\AppSrv01
Java Home = C:\Program Files (x86)\IBM\WebSphere8\AppServer\java\jre
ws.ext.dirs = C:\Program Files (x86)\IBM\WebSphere8\AppServer/java/lib;C:\Program Files (x86)\IBM\WebSphere8\AppServer\profiles\AppSrv01/classes;C:\Program Files (x86)\IBM\WebSphere8\AppServer/classes;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib;C:\Program Files (x86)\IBM\WebSphere8\AppServer/installedChannels;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/ext;C:\Program Files (x86)\IBM\WebSphere8\AppServer/web/help;C:\Program Files (x86)\IBM\WebSphere8\AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = C:\Program Files (x86)\IBM\WebSphere8\AppServer\profiles\AppSrv01/properties;C:\Program Files (x86)\IBM\WebSphere8\AppServer/properties;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/startup.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/bootstrap.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/jsf-nls.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/lmproxy.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/urlprotocols.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/deploytool/itp/batchboot.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/deploytool/itp/batch2.jar;C:\Program Files (x86)\IBM\WebSphere8\AppServer/java/lib/tools.jar
Java Library path = C:\Program Files (x86)\IBM\WebSphere8\AppServer/lib/native/win/x86_64/;C:\Program Files (x86)\IBM\WebSphere8\AppServer\java\jre\bin\default;C:\Program Files (x86)\IBM\WebSphere8\AppServer\java\jre\bin;.;C:\Program Files (x86)\IBM\WebSphere8\AppServer\lib\native\win\x86_64;C:\Program Files (x86)\IBM\WebSphere8\AppServer\bin;C:\Program Files (x86)\IBM\WebSphere8\AppServer\java\bin;C:\Program Files (x86)\IBM\WebSphere8\AppServer\java\jre\bin;C:\ProgramData\Oracle\Java\javapath;C:\oracle\ora92\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\IBM\Informix\Client-SDK\bin;C:\Program Files (x86)\ibm\gsk7\bin;C:\Program Files (x86)\ibm\gsk7\lib;C:\Bitnami\subversion-1.8.16-0\subversion\bin;C:\Program Files\TortoiseSVN\bin;C:\maven\bin;C:\Program Files\Java\jdk1.7.0_79\bin;C:\apache-tomcat-7.0.81\bin;;
Orb Version = IBM Java ORB build orb626fp1-20110419.00
Version de websphere: Version Websphere 8.0
Le les erreurs dans la capture d'écran indiquent clairement qu'il ne voit pas le code comme Java 5 (ou supérieur). Comment construisez-vous le fichier de guerre? Avez-vous sélectionné des options "JSP précompilées"? – dbreaux
(Notez également que votre Integer à int "unboxing" peut lancer une exception NullPointerException si l'attribut n'est pas trouvé dans la requête.) – dbreaux
Oui, j'ai sélectionné l'option JSP précompilée dans websphere. Cependant c'est ok, déjà j'ai déployé la guerre avec succès. Dans netbeans, les options clean et build utilisaient jre7, donc, j'ai changé pour jdk 6 dans les options de compilation et fonctionne. – Gesser