| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 655 人关注过本帖
标题:请教关于ejb方面的异常
只看楼主 加入收藏
ziyehanbin
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2005-10-16
收藏
 问题点数:0 回复次数:1 
请教关于ejb方面的异常

我在学习用jboss,tomcat 搭建ejb服务时,报以下异常,请问这代表什么意思呀!!

谢谢各位了!!

-------------------------------------------------------------
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


root cause

java.lang.ClassCastException
com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
org.apache.jsp.common_jsp.jspInit(common_jsp.java:28)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:78)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:155)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.17

搜索更多相关主题的帖子: ejb 
2006-08-04 20:44
ziyehanbin
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2005-10-16
收藏
得分:0 

出错页程序:

<%@ page import="mypack.*"%>
<%@ page import="java.util.Properties"%>
<%@ page errorPage="errorpage.jsp"%>
<%@ page import="javax.ejb.*"%>
<%@ page import="javax.naming.*"%>
<%@ page import="javax.rmi.PortableRemoteObject"%>
<%@ page import="java.rmi.RemoteException"%>

<%

private BookDBEJB bookDB;

public void jspInit(){

bookDB = (BookDBEJB)getServletContext.getAttribute("bookDB");

if(bookDB==null){

try{

InitialContext ic = new InitialContext();
Object objRef=ic.lookup("java:comp/env/ejb/BookDBEJB");
BookDBEJBHome home=(BookDBEJBHome)PortableRemoteObject.narrow(objRef,mypack.BookDBEJBHome.class);
bookDB=home.create();
getServletContext().setAttribute("bookDB",bookDB);

}catch(RemoteException ex){

System.out.println("Could not create database bean."+ex.getMessage());
}catch(CreateException ex){

System.out.println("Could not create database bean."+ex.getMessage());
}catch(NamingException ex){

System.out.println("Unable to look up home:"+"java:comp/env/ejb/BookDBEJB"+ex.getMessage());
}
}
}

public void jspDestroy(){

bookDB=null;

}

public String convert(String s){

try{

return new String(s.getBytes("ISO-8859-1"),"GB2312");

}catch(Exception e){

return null;

}

}

%>

------------------------------------------------------------------

谢谢!!!!!


2006-08-04 20:46
快速回复:请教关于ejb方面的异常
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.074557 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved