[JBoss AOP] - Re: howto hotswap ?
by flaviarnn
Hi, Birgen!
To enable the hotswap feature, you need to execute you system with the java 5 agent enabled, and pass the "hotSwap" parameter to this agent, like this:
java your_app your_params -javaagent:jboss-aop-jdk50.jar=-hotSwap
You can have more instructions on this page:
http://labs.jboss.com/portal/jbossaop/docs/1.5.0.GA/docs/aspect-framework...
To use the hotswap, all you need to do is invoke the dynamic AOP operations provided by JBoss AOP. Everytime you add or remove an aspect to the system the changes will be performed through hotswap.
To give you an example, suppose you want to add an Interceptor to JBoss AOP. Consider your interceptor is called MyInterceptor. So, you can add both to the system like this:
| // create a binding, defining a pointcut expression
| AdviceBinding binding = new AdviceBinding("execution(public * POJO->method())", null);
|
| // this line associates MyInterceptor to your advice binding
| binding.addInterceptor(MyInterceptor.class);
|
| //finally, add this binding tho the JBoss AOP system
| AspectManager.addBinding(binding);
|
|
The last line deploys the binding, and results in the hotswap of all classes affected by this binding. If you want to specify a cflow constraint, you can pass the cflow expression as the second argument of the AdviceBinding constructor.
Another example adds a binding associated with an advice, instead of an interceptor (suppose your advice method is MyAspect.myAdvice()):
| // create a binding again, defining a pointcut expression
| AdviceBinding binding = new AdviceBinding("execution(public * POJO->method())", null);
|
| // these lines deploy your aspect to the system, the parameter is the name of your class; the second parameter should not be used by end users
| AspectFactory af = new GenericAspectFactory("MyAspect", null);
| AspectDefinition ad = new AspectDefinition("MyAspect", Scope.PER_VM, af);
| AspectManager.addAspectDefinition(ad);
|
| // this line adds the advice to this binding
| binding.addInterceptorFactory(new AdviceFactory(ad, "myAdvice");
|
| //finally, add this binding tho the JBoss AOP system
| AspectManager.addBinding(binding);
|
Notice you can define the Scope as you wish, like Scope.PER_CLASS, Scope.PER_INSTANCE, and others.
Besides, you can play along with these examples, adding interceptors and advices to one single binding.
To remove the binding, invoke the removeBiding method of AspectManager class.
If you have any more questions, or problems to use hotswap, please, ask again.
Regards,
Flavia
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973999#3973999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973999
19 years, 7 months
[JBossWS] - null pointer exception during web services deployment
by chee_torr@yahoo.com
hi,
here is the excerpt from the server.log file when deploying a simple pojo based webservice packaged in the war
| 2006-09-26 00:27:01,828 DEBUG [org.jboss.deployment.MainDeployer] Undeploying file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:03,312 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] stop: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:04,421 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:05,906 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] destroy: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:05,984 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:06,250 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.web.deployment:id=1363851585,war=celsius.war dependent services are: []
| 2006-09-26 00:27:06,562 DEBUG [org.jboss.web.WebModule] Destroying jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:06,687 DEBUG [org.jboss.web.WebModule] Destroyed jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:07,640 DEBUG [org.jboss.system.ServiceController] removing service: jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:08,312 DEBUG [org.jboss.system.ServiceController] removing already unregistered jboss.web.deployment:id=1363851585,war=celsius.war from server
| 2006-09-26 00:27:09,015 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Unregistering cl=org.jboss.mx.loading.UnifiedClassLoader3@1b5eba4{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/ ,addedOrder=39}
| 2006-09-26 00:27:09,296 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(true) org.jboss.mx.loading.UnifiedClassLoader3@1b5eba4{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/ ,addedOrder=39}
| 2006-09-26 00:27:09,875 DEBUG [org.jboss.deployment.DeploymentInfo] Cleaned Deployment: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35697celsius-exp.war/
| 2006-09-26 00:27:09,953 DEBUG [org.jboss.deployment.MainDeployer] Undeployed file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:10,140 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:10,140 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:10,156 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war -> C:\jboss-4.0.4.GA\server\default\tmp\deploy\tmp35698celsius.war
| 2006-09-26 00:27:10,484 DEBUG [org.jboss.deployment.MainDeployer] using deployer MBeanProxyExt[jboss.web:service=WebServer]
| 2006-09-26 00:27:10,484 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Begin init
| 2006-09-26 00:27:11,328 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Unpacking war to: C:\jboss-4.0.4.GA\server\default\tmp\deploy\tmp35698celsius-exp.war
| 2006-09-26 00:27:12,156 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Replaced war with unpacked contents
| 2006-09-26 00:27:12,156 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Was unable to delete war file
| 2006-09-26 00:27:12,234 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] webContext: null
| 2006-09-26 00:27:12,234 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] warURL: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/
| 2006-09-26 00:27:15,843 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] End init
| 2006-09-26 00:27:15,875 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:name=Default,service=LoaderRepository, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
| 2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@c4aad3, cl=org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
| 2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@c4aad3, cl=org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
| 2006-09-26 00:27:15,937 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@1d590d{ url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/ ,addedOrder=0}
| 2006-09-26 00:27:16,000 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:16,078 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:16,109 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:16,109 DEBUG [org.jboss.ws.server.WebServiceDeployerJSE] create: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| 2006-09-26 00:27:16,109 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] create, celsius.war
| 2006-09-26 00:27:16,906 DEBUG [org.jboss.system.ServiceController] Creating service jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:16,921 DEBUG [org.jboss.system.ServiceController] adding depends in ServiceController.register: []
| 2006-09-26 00:27:17,046 DEBUG [org.jboss.web.WebModule] Creating jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:17,046 DEBUG [org.jboss.web.WebModule] Created jboss.web.deployment:id=1363851585,war=celsius.war
| 2006-09-26 00:27:17,046 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: jboss.web.deployment:id=1363851585,war=celsius.war dependents are: []
| 2006-09-26 00:27:17,250 DEBUG [org.jboss.ws.metadata.JSR109ServerMetaDataBuilder] START buildMetaData: [url=file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/WEB-INF/webservices.xml]
| 2006-09-26 00:27:19,437 DEBUG [org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory] parse: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp35698celsius-exp.war/WEB-INF/wsdl/CelsiusService.wsdl
| 2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] new WSDLInterface
| 2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] setName: Celsius
| 2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLInterface] setQName: {http://converters/}Celsius
| 2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] new WSDLBinding
| 2006-09-26 00:27:21,359 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setQName: {http://converters/}CelsiusBinding
| 2006-09-26 00:27:21,375 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setName: CelsiusBinding
| 2006-09-26 00:27:21,375 DEBUG [org.jboss.ws.metadata.wsdl.WSDLBinding] setInterfaceName: CelsiusBinding
| 2006-09-26 00:27:22,171 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war
| java.lang.NullPointerException
| at org.jboss.ws.metadata.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:131)
| at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:189)
| at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
| at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
| 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 $Proxy31.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| 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 $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| 2006-09-26 00:27:23,593 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@514ab941{ url=file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war, deployedLastModified=1159209702000 }
| org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/celsius.war; - nested throwable: (java.lang.NullPointerException)
| at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:975)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| 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 $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: java.lang.NullPointerException
| at org.jboss.ws.metadata.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:131)
| at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:189)
| at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
| at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
| 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 $Proxy31.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| ... 20 more
|
|
|
wsdl file
<?xml version="1.0" encoding="UTF-8"?>
|
| <definitions name="CelsiusService" targetNamespace="http://converters/" xmlns:tns="http://converters/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
| <types/>
| <message name="Celsius_toCelsius">
| <part name="float_1" type="xsd:float"/></message>
| <message name="Celsius_toCelsiusResponse">
| <part name="result" type="xsd:float"/></message>
| <portType name="Celsius">
| <operation name="toCelsius" parameterOrder="float_1">
| <input message="tns:Celsius_toCelsius"/>
| <output message="tns:Celsius_toCelsiusResponse"/></operation></portType>
| <binding name="CelsiusBinding" type="tns:Celsius">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
| <operation name="toCelsius">
| <soap:operation soapAction=""/>
| <input>
| <soap:body use="literal" namespace="http://converters/"/></input>
| <output>
| <soap:body use="literal" namespace="http://converters/"/></output></operation></binding>
| <service name="CelsiusService">
| <port name="CelsiusPort" binding="tns:CelsiusBinding">
| <soap:address location="http://localhost:8080/celsius/Celsius"/></port></service></definitions>
|
webservices.xml file
| <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd" version="1.1">
| <webservice-description >
| <webservice-description-name>CelsiusService</webservice-description-name>
| <wsdl-file>WEB-INF/wsdl/CelsiusService.wsdl</wsdl-file>
| <jaxrpc-mapping-file>WEB-INF/mapping.xml</jaxrpc-mapping-file>
| <port-component >
| <port-component-name>Celsius</port-component-name>
| <wsdl-port >
| <namespaceURI>http://converters/</namespaceURI>
| <localpart>Celsius</localpart>
| </wsdl-port>
| <service-endpoint-interface>converters.Celsius</service-endpoint-interface>
| <service-impl-bean >
| <servlet-link>CelsiusServlet</servlet-link>
| </service-impl-bean>
| </port-component>
| </webservice-description>
| </webservices>
|
mapping file
| <?xml version="1.0" encoding="UTF-8"?>
| <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
| <package-mapping>
| <package-type>converters</package-type>
| <namespaceURI>http://converters/types</namespaceURI>
| </package-mapping>
| <package-mapping>
| <package-type>converters</package-type>
| <namespaceURI>http://converters/</namespaceURI>
| </package-mapping>
| <service-interface-mapping>
| <service-interface>converters.CelsiusService</service-interface>
| <wsdl-service-name xmlns:serviceNS="http://converters/">serviceNS:CelsiusService</wsdl-service-name>
| <port-mapping>
| <port-name>CelsiusPort</port-name>
| <java-port-name>CelsiusPort</java-port-name>
| </port-mapping>
| </service-interface-mapping>
| <service-endpoint-interface-mapping>
| <service-endpoint-interface>converters.Celsius</service-endpoint-interface>
| <wsdl-port-type xmlns:portTypeNS="http://converters/">portTypeNS:Celsius</wsdl-port-type>
| <wsdl-binding xmlns:bindingNS="http://converters/">bindingNS:CelsiusBinding</wsdl-binding>
| <service-endpoint-method-mapping>
| <java-method-name>toCelsius</java-method-name>
| <wsdl-operation>toCelsius</wsdl-operation>
| <method-param-parts-mapping>
| <param-position>0</param-position>
| <param-type>float</param-type>
| <wsdl-message-mapping>
| <wsdl-message xmlns:wsdlMsgNS="http://converters/">wsdlMsgNS:Celsius_toCelsius</wsdl-message>
| <wsdl-message-part-name>float_1</wsdl-message-part-name>
| <parameter-mode>IN</parameter-mode>
| </wsdl-message-mapping>
| </method-param-parts-mapping>
| <wsdl-return-value-mapping>
| <method-return-value>float</method-return-value>
| <wsdl-message xmlns:wsdlMsgNS="http://converters/">wsdlMsgNS:Celsius_toCelsiusResponse</wsdl-message>
| <wsdl-message-part-name>result</wsdl-message-part-name>
| </wsdl-return-value-mapping>
| </service-endpoint-method-mapping>
| </service-endpoint-interface-mapping>
| </java-wsdl-mapping>
|
|
web.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
| version="2.4">
| <servlet>
| <servlet-name>CelsiusServlet</servlet-name>
| <servlet-class>converters.CelsiusServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>CelsiusServlet</servlet-name>
| <url-pattern>/Celsius</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
|
Could'nt figured out why this null pointer is coming...
please advice
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973992#3973992
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973992
19 years, 7 months
[Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub
by ablevine1
Since I have the same ejb's in two different clusters, I am using the jboss.xml approach with
<clustered>true</clustered>
for each of my sesion beans.
see: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91189
The jboss failover code does not seem to be working though, and I get the following exception stack trace when I shutdown one of the servers in the cluster that the client had been making calls to:
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy1.loadObject(Unknown Source)
| at com.squaretrade.managed.AbstractManager.loadObject(AbstractManager.java:37)
| at com.squaretrade.person.PersonManager.loadPerson(PersonManager.java:52)
| at com.squaretrade.person.RecurringPersonLoader.main(RecurringPersonLoader.java:44)
| Caused by: org.jboss.aop.NotFoundInDispatcherException: Object with oid: jboss.j2ee:ear=batch.ear,jar=beans-batch.jar,name=PersonManagerSessionImpl,service=EJB3 was not found in the Dispatcher
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| ... 4 more
|
note that loadObject is the session bean call. and that is where it is failing. As soon as I create a new InitialContext using port 1100 and then lookup the session bean again, the call goes through. Although, I thought that the stub was supposed to do this for me.
here is the entry in jboss.xml for one of my sesion beans:
| <session>
| <ejb-name>PersonManagerSessionImpl</ejb-name>
| <clustered>true</clustered>
| <cluster-config>
| <partition-name>${jboss.partition.name}</partition-name>
| <load-balance-policy>org.jboss.ha.framework.interfaces.FirstAvailable</load-balance-policy>
| </cluster-config>
| </session>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973991#3973991
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973991
19 years, 7 months