0 امتیاز
قبل در برنامه نویسی توسط (0 امتیاز)
ویرایش شده قبل توسط

با سلام

من جهت ارسال sms از یک webservice استفاده میکنم که از tomcat مشکلی وجود ندارد ولی زمانی که در jboss7 اجرا می کنم خطای:

 javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

15:53:20,529 ERROR [ir.tamin.insurance.insuranceorder.services.impl.ElectOrderServiceImpl] (null#0) Unexpected error in send sms:org.apache.cxf.service.factory.ServiceConstructionException: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
	at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:334) [cxf-rt-frontend-jaxws-2.7.1.jar:2.7.1]
	at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:319) [cxf-rt-frontend-jaxws-2.7.1.jar:2.7.1]
	at javax.xml.ws.Service.getPort(Service.java:99) [jboss-jaxws-api_2.2_spec-2.0.1.Final.jar:2.0.1.Final]
	at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.sso.common.service.contactcenter.ContactCenterService_Service.getContactCenterService(ContactCenterService_Service.java:72) [classes:]
	at ir.tamin.insurance.insuranceorder.services.sms.smsService.sendSms(smsService.java:24) [classes:]
	at ir.tamin.insurance.insuranceorder.services.impl.ElectOrderServiceImpl.SendToMaster(ElectOrderServiceImpl.java:399) [classes:]
	at ir.tamin.insurance.insuranceorder.services.impl.ElectOrderServiceImpl.handleNextReadyForSend(ElectOrderServiceImpl.java:328) [classes:]
	at ir.tamin.insurance.insuranceorder.services.impl.ElectOrderServiceImpl$$FastClassByCGLIB$$f3fbee0.invoke(<generated>) [cglib-nodep-2.2.2.jar:]
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [cglib-nodep-2.2.2.jar:]
	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at ir.tamin.insurance.insuranceorder.services.impl.ElectOrderServiceImpl$$EnhancerByCGLIB$$d4b5f90f.handleNextReadyForSend(<generated>) [cglib-nodep-2.2.2.jar:]
	at ir.tamin.insurance.insuranceorder.services.schedular.OrderMessageJob.handleNextReadyForSend(OrderMessageJob.java:45) [classes:]
	at ir.tamin.insurance.insuranceorder.services.schedular.OrderMessageJob.run(OrderMessageJob.java:36) [classes:]
	at ir.tamin.insurance.insuranceorder.services.schedular.OrderMessageJob$$FastClassByCGLIB$$c06066fd.invoke(<generated>) [cglib-nodep-2.2.2.jar:]
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [cglib-nodep-2.2.2.jar:]
	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
	at ir.tamin.insurance.insuranceorder.services.schedular.OrderMessageJob$$EnhancerByCGLIB$$2bd64e26.run(<generated>) [cglib-nodep-2.2.2.jar:]
	at ir.asta.wise.core.util.timer.JobScheduler$ScheduledJobThread.run(JobScheduler.java:132) [wise-core-4.2.1.WGA.jar:]

مشاهده می شود.

لطفا راهنمایی فرمایید.

try {
    smsService.sendSms(listuser);
    logger.fatal("Sucessfully Sent SMS to All Users");
   } catch (Exception e) {
    // TODO Auto-generated catch block
    {
     logger.fatal("Unexpected error in send sms." + e.getMessage() + " " + e.getStackTrace());
    }
   }

 

قبل توسط (0 امتیاز)
ghesmate  Unexpected error in send marboot be code khodame
org.apache.cxf.service.factory.ServiceConstructionException [Ljava.lang.StackTraceElement;@eafd1c
قبل توسط (1.2هزار امتیاز)
لطفاً برای لاگ زدن از دستور زیر استفاده کنید:
logger.error("Unexpected error in send sms:" + e.getMessage(), e);

1 پاسخ

+1 امتیاز
قبل توسط (1.2هزار امتیاز)

با توجه به خطوط زیر در لاگ خطا به نظر می رسد شما دو کلاس مشابه به نام SendSms دارید که cxf نمی تواند تشخیص بدهد از کدامیک استفاده کند.

Two classes have the same XML type name "{http://services.smsservice.tamin.ir/}sendSms". Use @XmlType.name and @XmlType.namespace to assign different names to them.
	this problem is related to the following location:
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.sso.common.service.contactcenter.jaxws_asm.SendSms
	this problem is related to the following location:
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.SendSms
		at public ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.SendSms ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.ObjectFactory.createSendSms()
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.ObjectFactory
Two classes have the same XML type name "{http://services.smsservice.tamin.ir/}sendSmsResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
	this problem is related to the following location:
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.sso.common.service.contactcenter.jaxws_asm.SendSmsResponse
	this problem is related to the following location:
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.SendSmsResponse
		at public ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.SendSmsResponse ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.ObjectFactory.createSendSmsResponse()
		at ir.tamin.insurance.insuranceorder.services.sms.smswebserviceImpl.ir.tamin.smsservice.services.ObjectFactory

 

سوالات مشابه

+1 امتیاز
0 پاسخ 908 بازدید
0 امتیاز
1 پاسخ 411 بازدید
+1 امتیاز
1 پاسخ 371 بازدید
+1 امتیاز
1 پاسخ 540 بازدید
0 امتیاز
0 پاسخ 401 بازدید
+1 امتیاز
1 پاسخ 409 بازدید
سوال شده 4 سال قبل در برنامه نویسی توسط Simpath (187 امتیاز)
0 امتیاز
1 پاسخ 402 بازدید
سوال شده 5 سال قبل در برنامه نویسی توسط یوری (426 امتیاز)
+1 امتیاز
1 پاسخ 1.5هزار بازدید
0 امتیاز
0 پاسخ 299 بازدید
...