Netbeans 中部署运行Webservice出错

 

错误如下

at java.lang.StackTraceElement

at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()

at java.lang.Throwable

at java.lang.Exception

at java.sql.SQLException

at private java.sql.SQLException wsdb.jaxws.SQLExceptionBean.nextException

at wsdb.jaxws.SQLExceptionBean

 

原因

Web Method 一般不抛出异常,如果要抛出异常,必须自己定义异常的处理方式

 

 Screen Shot 2014-06-30 at 10.15.14 AM

去掉抛出异常,

Screen Shot 2014-06-30 at 10.29.42 AM

加上try catch

Screen Shot 2014-06-30 at 10.29.56 AM

 

问题解决!

Also see:

http://stackoverflow.com/questions/7232331/unable-to-create-jaxbcontext-creating-my-wsdl/24482215#24482215

posted @ 2014-06-30 10:47  有奈了  阅读(277)  评论(0编辑  收藏  举报