[jboss-user] [JBoss AOP] - Re: Jboss AOP with web services upon jboss
abdujaparov
do-not-reply at jboss.com
Wed Oct 24 14:21:35 EDT 2007
Ok then, I've created the war file that contains the web services and it's composed in this way:
An empty directory META-INF;
A directory WEB-INF with this web.xml:
| <web-app version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
| <servlet>
| <servlet-name>ServiceAOP</servlet-name>
| <servlet-class>service.ServiceAOP</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>ServiceAOP</servlet-name>
| <url-pattern>/*</url-pattern>
| </servlet-mapping>
| </web-app>
|
In the WEB-INF there is also the directory "classes" that contain the packages and the classes of my web service:
package service:
-ServiceAOP.class
-ServiceAOP$fattoriale_9086071828619756113.class (I haven't written this classe, this classe is generated by eclipse JbossAOP IDE when I apply the aspect to a method fattoriale;
(originally in this package there was ServiceAOPAspect.class, the aspect that now is in the aop file)
package xml:
-XMLJDomWriterStat.class
-XMLSaxReaderStat.class
The packages service and xml are in the directory "classes".
I've ceated the war archive with the directory META-INF and WEB-INF and I put it in the directory jboss-4.2.1.GA/server/default/deploy.
The web service run, but when I invoke the method fattoriale or another method of my web service from a client a riceive this error message:
| Exception in thread "main" AxisFault
| faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
| faultSubcode:
| faultString: org.xml.sax.SAXParseException: Premature end of file.
| faultActor:
| faultNode:
| faultDetail:
| {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Premature end of file.
| at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
| at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
| at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
| at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
| at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
| at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
| at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
| at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
| at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
| at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
| at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
| at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
| at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
| at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
| at org.apache.axis.client.Call.invoke(Call.java:2767)
| at org.apache.axis.client.Call.invoke(Call.java:2443)
| at org.apache.axis.client.Call.invoke(Call.java:2366)
| at org.apache.axis.client.Call.invoke(Call.java:1812)
| at clientSAOP.ServiceAOPBindingStub.fattoriale(ServiceAOPBindingStub.java:161)
| at Test.main(Test.java:25)
|
| {http://xml.apache.org/axis/}hostname:angelinux
|
| org.xml.sax.SAXParseException: Premature end of file.
| at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
| at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
| at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
| at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
| at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
| at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
| at org.apache.axis.client.Call.invoke(Call.java:2767)
| at org.apache.axis.client.Call.invoke(Call.java:2443)
| at org.apache.axis.client.Call.invoke(Call.java:2366)
| at org.apache.axis.client.Call.invoke(Call.java:1812)
| at clientSAOP.ServiceAOPBindingStub.fattoriale(ServiceAOPBindingStub.java:161)
| at Test.main(Test.java:25)
| Caused by: org.xml.sax.SAXParseException: Premature end of file.
| at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
| at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
| at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
| at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
| at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
| at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
| at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
| at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
| at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
| at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
| at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
| ... 10 more
|
|
And in the shell of jboss I read this message:
| 19:18:06,516 ERROR [[ServiceAOP]] Servlet.service() for servlet ServiceAOP threw exception
| java.lang.IllegalArgumentException
| at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:464)
| at org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:594)
| at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
| at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
| at org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
| at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
| at service.ServiceAOP.<clinit>(ServiceAOP.java)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at java.lang.Class.newInstance0(Class.java:350)
| at java.lang.Class.newInstance(Class.java:303)
| at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.java:75)
| at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:90)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
| at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
|
When I start jboss I receive these messages:
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.aop:service=AspectManager
| State: FAILED
| Reason: java.lang.NullPointerException
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.aop:service=AspectManager
| State: FAILED
| Reason: java.lang.NullPointerException
|
I hope these messages tell something.
Thanks a lot.
Bye bye.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098477#4098477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098477
More information about the jboss-user
mailing list