[06-5-28 8:46:11:594 CST] 00000041 ExceptionUtil E CNTR0020E: 在调用 bean“BeanId(AFCDAS_EAR#AFCDAS_FACADE.jar#LoginFacade, null)”上的方法“loginRegister”期间,EJB 抛出意外(未声明的)异常。异常数据:java.lang.NullPointerException
at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:2179)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1830)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1782)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:171)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2048)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2427)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:51)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
at com.mtrc.afcdas.dao.base.HibernateDAOImpl.create(HibernateDAOImpl.java:70)
at com.mtrc.afcdas.ejb.session.LoginFacadeBean.loginRegister(LoginFacadeBean.java:141)
at com.mtrc.afcdas.ejb.session.EJSLocalStatelessLoginFacade_4ee4fc9e.loginRegister(EJSLocalStatelessLoginFacade_4ee4fc9e.java:152)
at com.mtrc.afcdas.delegate.LoginDelegate.loginResgister(LoginDelegate.java:61)
at com.mtrc.afcdas.web.struts.action.LoginAction.loginAction(LoginAction.java:78)
at com.mtrc.afcdas.web.struts.action.LoginAction.appExecute(LoginAction.java:48)
at com.mtrc.afcdas.framework.web.AppBaseAction.execute(AppBaseAction.java:55)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
websphere v6有自己默认的日志处理。
这里引用一段译自文章(http://www.webspherepower.com/issues/issue200405/00001281001.html )的话:
大部分的Log实现都有五种标准的日志消息级别,他们是DEBUG, INFO, WARN, ERROR, 和 FATAL。
IBM的TrLog(Trace Log的简写) 支持这五种级别,并且还额外支持一种级别TRACE。Trace级别比Debug要低,如果你设置你的日志级别为Debug ,那么Trace级别的信息就不会输出到Log中。Trace 只是额外提供了一种用于解决复杂问题的日志级别。
要控制Trlog中的Trace级别的日志只能通过WAS的管理控制台。不像Log4J等其他的日志实现使用属性文件来配置参数,TrLog直接响应来自于控制台的操纵。控制台操作员可以通过内置于管理控制台的工具来修改不同日志的日志级别。
如果想用自定义的输出方式来输出日志信息(如:apache的commons-logging),需以下几个步骤配置:
1)在一个公共的项目(其他的项目都会引用它)中引入common-logging.jar ,log4j.jar
并且把配置好的common-logging.properties 和log4j.properties 放在根目录下面
2)在websphere自己提供的集成开发环境RAD中,在EAR项目的应用程序部署描述描述符中,选择“部署”页,在应用程序区域,
选中EAR项目,并将其类载入方式由原来的Parent_First改为Parent_Last ,其他的维持不变
3)在管理控制台中有待尝试,这里先引用他人的一段话(http://forum.javaeye.com/bloglist.php?userid=8514)
在控制台中的"环境->共享库"页面中添加一个共享库,类路径指向要采用的日志文件,这里是添加commons-logging.jar和Log4j.jar,保存设置.
在"企业应用程序 > 你的应用程序 > 库引用"下添加刚才创建的共享库,将"类装入器方式 "改为最后装入父类
参考的文章有:
Utilizing the IBM Trace Log in Websphere Appliation Server (
http://www.webspherepower.com/issues/issue200405/00001281001.html
)
Integrating Jakarta Commons Loggin
(
http://www-1.ibm.com/support/docview.wss?uid=swg27004610
)
虽然这些文章里面介绍的是基于WAS 5 ,但是原理都是相同的