Weblogic 10.3.5 Web应用程序启动错误

时间:2012-10-29 13:55:33

标签: java java-ee weblogic-10.x

我正在尝试将Web应用程序部署到Weblogic 10.3.5中,当我尝试启动应用程序时,我收到以下错误:

####<Oct 29, 2012 5:27:12 AM PDT> <Warning> <HTTP> <ip-0A2E9E72> <AdminServer> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> 
<<WLS Kernel>> <> <> <1351513632838> <BEA-101162> 
<User defined listener artemispm.web.ui.gwt.server.A7WebStartupListener failed: java.lang.NullPointerException.
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at java.util.Properties.setProperty(Properties.java:143)
at java.lang.System.setProperty(System.java:729)

上述错误是由以下代码摘录引起的,该代码摘录是ServiceContextListener类实现的一部分:

System.setProperty(A7WebConstants.PROP_OUTPUT_DIR_PATH, outputDirPath);

outputDirPath变量不为null所以任何人都知道这里发生了什么?我正在使用JDK6,并且该应用程序在Tomcat 6和7上也运行得非常好。另外,我没有更改web.xml文件中的任何配置。

**更新:

我刚刚注意到,当我尝试部署我的应用时,我得到了这个错误,在上面的错误之前:

####<Oct 29, 2012 7:03:25 AM PDT> <Error> <Console> <ip-0A2E9E72> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <9fceb15ac10fa447:5dceb4c5:13aac5c55aa:-7ff7-0000000000000005> <1351519405088> <BEA-240003> <Console encountered the following error java.lang.IllegalArgumentException: Getting Deployment configuration...
at com.bea.console.utils.DeploymentConfigurationHelper.getDeploymentConfiguration(DeploymentConfigurationHelper.java:911)
at com.bea.console.utils.DeploymentConfigurationHelper.isSchemaBased(DeploymentConfigurationHelper.java:1930)
at com.bea.console.actions.app.DeploymentPlanAction.execute(DeploymentPlanAction.java:136)

谢谢,

木桥

1 个答案:

答案 0 :(得分:3)

最好的猜测是,密钥为null,因为java.util.Properties.set正在使用HashTable.put操作,请参阅javadoc: http://docs.oracle.com/javase/6/docs/api/java/util/Hashtable.html#put%28K,%20V%29

如果不是这种情况,您可以查看System.getProperty("dummy")返回的内容吗? 如果下面的代码片段中的道具为null(来自java源代码),那么上面的内容也会抛出NullPointer

package java.lang;
...
import java.util.Properties;
...
private static Properties props;
....
public static String setProperty(String key, String value) {
checkKey(key);
SecurityManager sm = getSecurityManager();
    if (sm != null) {
    sm.checkPermission(new PropertyPermission(key,
    SecurityConstants.PROPERTY_WRITE_ACTION));
}

return (String) props.setProperty(key, value); //line 729
}