`
zjx2388
  • 浏览: 1336989 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

if(!order_address.equals("")&&order_address != null){

    博客分类:
  • J2SE
阅读更多

008-7-7 14:09:24 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet customerInfoManagerment threw exception java.lang.NullPointerException at servlet.CustomerInfoManagerment.service(CustomerInfoManagerment.java:72) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Unknown Source)

这个是今天在tomcat下报的一个错误

我找了好一会才弄清“罪魁祸首”

出错代码:

if(!order_address.equals("")&&order_address != null){

````

}

改正后的代码:

if(order_address != null&&!order_address.equals("")){

````

}

总节;

以后判断都得先判断是否为空对象即null,再判断是否为空值""

分享到:
评论

相关推荐

    C# oracle通用类

    if (this._dataAdapter.SelectCommand.Connection.Equals(this._transaction.Connection)) this._dataAdapter.SelectCommand.Connection = null; } if (this._dataAdapter.InsertCommand != null) { if (this...

    230322-045shopDemo(Swagger通过IFormFile或IFormCollection参数实例实现文件上传)

    public async Task<IActionResult> PostAvatarStream(long customerId, /*IFormCollection collection [FromForm]*/ IFormFile formFile) ..._nopFileProvider.GetFileName(_customer.Avatar).Equals("Default.jpg"))

    VB.NET ListView排序类

    If new_sorting_column.Equals(m_SortingColumn) Then If m_SortingColumn.Text.EndsWith(" △") Then sort_order = SortOrder.Descending Else sort_order = SortOrder.Ascending End If Else sort_order =...

    学生管理系统C#写的

    if(this.valiform.Stu_Address.Text == "") { MessageBox.Show("请填写家庭住址!@_@"); return false; } if(this.valiform.Stu_FixTel.Text == "") { MessageBox.Show("请填写固定电话...

    Test_if_icmpeq.rar_If...

    在本文中,我们将深入探讨`if icmpeq`指令以及它在Linux环境下的应用,同时结合`Test_if_icmpeq.rar_If...`这个测试用例来理解其工作原理。 `if icmpeq`是x86架构处理器上的一个条件分支指令,全称为“比较并等于”...

    File_实用案例_实现文件拷贝_FileCopy.java

    if (parent == null) // If none, use the current directory parent = System.getProperty("user.dir"); File dir = new File(parent); // Convert it to a file. if (!dir.exists()) abort("destination ...

    高仿QQ界面

    } else if (temp_backColor.equals("淡黄")) { att.setBackColor(new Color(255, 255, 200)); } else if (temp_backColor.equals("淡绿")) { att.setBackColor(new Color(200, 255, 200)); } } return ...

    Java编写的简易计算器

    } else if (act.equals("+") || act.equals("-") || act.equals("*") || act.equals("/")) { if (ch != '#') { try { num1 = operation(num1, ch, Double.parseDouble(tf_out.getText())); tf_out.setText...

    C# WinForm控件美化之ImageComboBox

    if (_imageIndexer == null) ...{ _imageIndexer = new ImageComboBoxItemImageIndexer(this); } return _imageIndexer; } } #endregion Methods#region Methods public override string ToString() ...

    表格的增删改查

    if (msg_update.equals("")) { Toast.makeText(act, "ID不能为空", Toast.LENGTH_LONG).show(); return; } User user_update = new User(msg_update, id); // int id_update = Integer.parseInt...

    C#聊天程序

    private TcpListener _tcpl = null; /// /// 保存所有客户端会话的哈希表 /// private Hashtable _transmit_tb = new Hashtable(); #endregion #region 服务器方法 /// /// 关闭监听器并释放资源 ...

    ap6212a0_a33_sc3817r_服务器验证通过_bt已经通了_wifi需要修改配置_需要再次验证_20170626_1549.7z

    #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg...

    align_equals.rar_equals

    "align_equals.rar_equals"这个标题暗示了我们可能正在处理一个与C语言代码对齐和等于运算符有关的项目。描述中的"write everything up to the =s use fputs so no newline printed." 提到了`fputs`函数,这是C语言...

    利用无障碍服务(AccessibilityService)批量清理后台进程_Java_下载.zip

    = null && event.getType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) { String packageName = event.getPackageName().toString(); if ("com.android.settings".equals(packageName)) { // 当系统设置...

    c#编程—计算器

    if ((tbx.Text.Length == 1 && tbx.Text.Equals("0")) || hasOperated) { tbx.Text = num; if (tbx.Text.Equals(".")) tbx.Text = "0."; hasOperated = false; } else tbx.Text += num; }

    Android_0618_Note

    一款手机便宜签,实现存储文本和图片。 String title = title_edt.getText().toString();...title.equals("")) { db.insert("note", null, values); } db.close(); EditActivity.this.finish();

    AMap_Android_Location_SDK_All.zip

    aMapLocation.errorCode.equals("0")) { // 处理定位结果 } } }); locationClient.start(); ``` 在`onLocationChanged`方法中,我们可以获取到用户的经纬度坐标和其他定位信息,例如速度、方向等。为了节省电量...

    cookie后台操作

    if (cookieUtils.getCookie(request, userDao)) { return SUCCESS; } else return "login"; } @Override // 正常登录 public String execute() throws Exception { System.out.println(username + ...

    !!!!ap6212a0_a33_sc3817r_验证通过_修正wifi的配置文件为nvram_ap6212.txt

    #$(call inherit-product-if-exists, hardware/broadcom/wlan/firmware/ap6330/device-bcm.mk) #rtl8723bs bt fw and config #$(call inherit-product, hardware/realtek/bluetooth/rtl8723bs/firmware/rtlbtfw_cfg...

    jmeter--bean shell断言所需要的包

    if((docId[i].equals("1224767876439842995")&&docStatus;[i].equals("70"))||(docId[i].equals("1224767274024546851")&&docStatus;[i].equals("80"))) { Failure = false; FailureMessage = "断言正确"; } ...

Global site tag (gtag.js) - Google Analytics