[Installation, Configuration & Deployment] - JBoss 4.0.5 - Problems with datasource descriptor inside an
by alexandrefvb
Hi,
I have an application packaged in an ear file with the following structrure:
application.ear
|- META-INF
| |-- application.xml
| |-- jboss-app.xml
|- application.war
|- application.jar
|- application-ds.xml
The file application.xml specifies application-ds.xml as a java module.
When I deploy this application in JBoss 4.0.4 the datasource is sucessfully deployed and the application works ok.
Upgrading the version of JBoss to 4.0.5 the deployment fails throwing the following exception when datasource came up:
| 19:20:14,293 WARN [ServiceController] Problem starting service jboss.jca:service=DataSourceBinding,name=CADASTRODS
| java.lang.IllegalArgumentException: interface javax.sql.DataSource is not visible from class loader
| at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
| at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
| at org.jboss.proxy.GenericProxyFactory.createProxy(GenericProxyFactory.java:145)
| at org.jboss.proxy.GenericProxyFactory.createProxy(GenericProxyFactory.java:61)
| at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.createProxy(WrapperDataSourceService.java:290)
| at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.startService(WrapperDataSourceService.java:101)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at org.jboss.system.ServiceController.start(ServiceController.java:435)
| at org.jboss.system.ServiceController.start(ServiceController.java:435)
| at org.jboss.system.ServiceController.start(ServiceController.java:435)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy25.start(Unknown Source)
| at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
|
Can I put my datasource descriptors inside ears on JBoss 4.0.5?
Thank you,
Alexandre Fidélis Vieira Bitencourt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985016#3985016
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985016
19Â years, 7Â months
[Security & JAAS/JBoss] - Re: Attempt to get JBoss to call my custom login module
by jcollins914
Thanks jaikiran.
Incidentally, I read your entire blog as part of my research, since you'd answered some questions on this stuff in the past... My answer wasn't there, but I did find some interesting tidbits, and have bookmarked it for future reference. Don't go changing just to please me.
My endpoint(s) are not EJB's, but rather methods exposed through JBoss's implementation of JAX-WS (JBossWS). An example of one such method is "processMessage()".
The web service is exposed as defined in this fragment of my web.xml file (JBossWS dictates the servlet declaration strategy for the web services):
<servlet-name>CPWebService</servlet-name>
<display-name>CPWebService</display-name>
JAX-WS endpoint - CPWebService
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<security-role-ref>
<role-name>Authenticated</role-name>
<role-link>Authenticated</role-link>
</security-role-ref>
<servlet-mapping>
<servlet-name>CPWebService</servlet-name>
<url-pattern>/CPWebService</url-pattern>
</servlet-mapping>
The method resides in CPWebServiceImpl.java, and appears as follows (complete with annotations):
@WebMethod
@WebResult(name = "processMessageReturn", targetNamespace = "http://ws.cp.gehcit.com")
@RequestWrapper(localName = "processMessage", targetNamespace = "http://ws.cp.gehcit.com", className = "com.gehcit.cp.ws.ProcessMessage")
@ResponseWrapper(localName = "processMessageResponse", targetNamespace = "http://ws.cp.gehcit.com", className = "com.gehcit.cp.ws.ProcessMessageResponse")
public String processMessage(
@WebParam(name = "xmlMessage", targetNamespace = "http://ws.cp.gehcit.com")
String xmlMessage) throws ProcessMessageFaultMsg {
MessageProcessor mp = new MessageProcessor();
try {
return mp.doMessage(xmlMessage);
} catch (Exception e) {
log.error(e, e);
ProcessMessageFaultMsg pmfm = new ProcessMessageFaultMsg(
xmlMessage, null, e);
throw pmfm;
}
}
These are the abbreviated wsdl fragments that pertains to this method is as follows:
<wsdl:definitions targetNamespace="http://ws.cp.gehcit.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://ws.cp.gehcit.com"
xmlns:intf="http://ws.cp.gehcit.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
...
...
</wsdl:types>
...
<wsdl:message name="processMessageRequest">
<wsdl:part element="impl:processMessage" name="parameters" />
</wsdl:message>
<wsdl:message name="processMessageResponse">
<wsdl:part element="impl:processMessageResponse"
name="parameters" />
</wsdl:message>
<wsdl:message name="processMessage_faultMsg">
<wsdl:part name="fault"element="impl:processMessage_fault">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="CPWebService">
<wsdl:operation name="processMessage">
<wsdl:input message="impl:processMessageRequest" name="processMessageRequest" />
<wsdl:output message="impl:processMessageResponse" name="processMessageResponse" />
<wsdl:fault message="impl:processMessage_faultMsg" name="processMessageFault" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CPWebServiceSoapBinding" type="impl:CPWebService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="processMessage">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="processMessageRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="processMessageResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
<wsdl:fault name="processMessageFault">
<wsdlsoap:fault name="processMessageFault" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CPWebServiceService">
<wsdl:port binding="impl:CPWebServiceSoapBinding" name="CPWebService">
<wsdlsoap:address location="http://localhost:8080/CentricityPractice/services/CPWebService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks again, and please do let me know if I can provide you w/ any other information.
Jeff
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985014#3985014
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985014
19Â years, 7Â months
[JBossWS] - getInitParameter
by dsteinbrunn
I'm running jbossws in standalone tomcat, version 5.5.20.
I have an endpoint that extends ServiceLifecycle. I can see from my logs that init is being called and I have access to ServletEndpointContext.
I have a configuration parameter I'm storing in my web.xml for the web service:
| <servlet>
| <servlet-name>MyServiceEndpoint</servlet-name>
| <servlet-class>org.service.MyServiceEndpoint</servlet-class>
| <init-param>
| <param-name>foo</param-name>
| <param-value>bar</param-value>
| </init-param>
| </servlet>
|
I try to access this in MyServiceEndpoint:
| String paramValue = this.getEndpointContext().getServletContext().getInitParameter(foo);
|
but I get nothing.
I noticed that when my service is deployed another initparam is added called ServiceEndpointImpl, which is set to the name of my SEI. I also cannot access this value from within my service.
Has anyone else encountered this issue? It's weird that I'm not seeing any of the init-params, not just the ones I added.
Thanks in advance for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985013#3985013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985013
19Â years, 7Â months