I am trying to integrate SpagoBI into my existing web application via the .jar files inside the SpagoBISDK.
I downloaded their All-In-One-SpagoBI which consists of their BI Server which is already configured with apache tomcat 6.0.18. It worked fine as I tested it via this link on the web browser: localhost:8080/SpagoBI
After which, I download their sample project, SpagoBISDK.war. When I placed the .war file inside the "BI server-configured" apache-tomcat-6.0.18/webapps folder and start tomcat. It worked fine as I tested it via this link on the web browser: localhost:8080/SpagoBISDK.
Link to download All-In-One-SpagoBI: http://forge.ow2.org/project/download.php?group_id=204&file_id=18770
Link to download SpagoBISDK: http://forge.ow2.org/project/download.php?group_id=204&file_id=18561
Note: the All-In-One-SpagoBI is required for the SpagoBISDK to work. In addition, the SpagoBISDK.war is like a sample web app project.
Problem:
When I import the SpagoBI.war as a project into Eclipse, use the "BI server-configured" apache-tomcat-6.0.18 to run the project, I encountered the following error:
INFO: Server startup in 444 ms
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (404)Not Found
faultActor:
faultNode:
faultDetail:
{}:return code: 404
<html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /SpagoBI/sdk/TestConnectionService</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/SpagoBI/sdk/TestConnectionService</u></p><p><b>description</b> <u>The requested resource (/SpagoBI/sdk/TestConnectionService) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>
{http://xml.apache.org/axis/}HttpErrorCode:404
(404)Not Found
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
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 it.eng.spagobi.sdk.test.stub.TestConnectionServiceSoapBindingStub.connect(TestConnectionServiceSoapBindingStub.java:100)
at it.eng.spagobi.sdk.proxy.TestConnectionServiceProxy.connect(TestConnectionServiceProxy.java:67)
at org.apache.jsp.documentsList_jsp._jspService(documentsList_jsp.java:95)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
I googled for similar problems faced by other people. And many mentioned that the links to the web services are incorrect. However, I tested the links via the web browser by running the SpagoBI.war file inside the webapps folder (Step 2 as mentioned above) and they worked fine.
I would appreciate if anyone could explain to me why is that so and hopefully, how can I go about resolving the issue.
Thanks a lot!
With regards to my problem, I have already solved it.
By default, Eclipse uses "Use workspace metadata (does not modify Tomcat installation)". You have to change the server location to "Use Tomcat installation (takes control of Tomcat installation) in order for the SpagoBI SDK sample project to work after you export it into Eclipse. See link - Tomcat started in Eclipse but unable to connect to http://localhost:8085/
In case you are unable to change the settings, someone else provided an instruction on how to do it. See link - Eclipse "Server Locations" section disabled and need to change to use Tomcat installation
Hope this helps!
Related
I've a strange problem. I created the plain vanilla Greetings example with the webAppCreator of gwt. That means I created a project called Test and after that I did not modify it in any way. Then I created a war file with "ant war" and deployed this on my local tomcat 7. The server starts fine and the Grettings page is loaded properly. But, when clicking on the Send button I get the following error:
There a no error messages in the tomcat logs. However in the development mode the stuff works fine. I'm using gwt 2.5. Any idea what could cause this problem?
Edit: Maybee this gives some further insights:
I found a stack trace:
java.lang.UnsupportedClassVersionError: com/server/GreetingServiceImpl : Unsupported major.minor version 51.0 (unable to load class com.server.GreetingServiceImpl)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:680)
But what does it mean?
Okay, I found the problem.
The error UnsupportedClassVersionError means that I tried to run a compiled java file with an older runtime, i.e. I compiled the servlets with java 7 and tried to run them with java 6.
I repaired this by setting the correct JAVA_HOME path to my .bash_profiles file like this
export JAVA_HOME=/path/to/java_7/Home
That was it, now everything runs fine. Thanks for reading anyway.
I feel really stupid right now but I've been struggling all day long and I don't have a clue, some help would be kindly appreciated :)
I've developped a struts2 webapp which works fine when I run it through eclipse (indigo sr2) related to my servelt server apache tomcat 7.0.27 installed on my own computer. All I do is : right click on the folder of my webapp --> run as --> run on server. Then it runs nicely either in eclipse browser, or in other browser (chrome, firefox) when I copy and path the url adress of my servlets.
Now all I'd like to do is make it run without eclipse. So I exported my webapp in a .war file (right click on the webapp folder --> export --> War file), and tried to deploy it using the app manager tomcat web interface : all it asked me to do was to browse for the war file through my computer and to click on the deploy button. Easy going so far !
Then my webapp appears in the applications tab of the app manager interface, but when I click on the "run" button, all I get is this message :
Failure : application for the context path /MMSProject could not start
(the original message is in French, I did not find how to change tomcat7 language, so this might not be the exact message you'd have in english, I hope this translation is close enough. MMSProject is the name of my webapp).
Therefore, I downloaded some struts2 webapp examples on the struts2 website and tried to deploy struts2-blank on tomcat7 using the same process. This one works perfectly fine : I can run it from tomcat app manager. So I guess my problem comes from my own war file and not from tomcat itself, but since it's generated by eclipse it seems weird to me that this part of the process could go wrong.
And so I'm stuck with that. Would you guys know :
How can I get more information about what's going wrong (I looked in tomcat logs but did not find any error message). This could help me a lot to solve the problem !
Any reason for what my webapp would run from eclipse but not directly from tomcat ?
How can I make it run from tomcat ? :)
Thank you very much in advance for any help ! I'm kind of desperate right now, did not think deployment would be such a pain !
EDIT :
I've double checked tomcat's log and actually found this in catalina.[date].log:
Grave: Error filterStart
juin 21, 2012 1:48:42 PM org.apache.catalina.core.StandardContext startInternal
Severe: Context [/MMSproject] startup failed due to previous errors
juin 21, 2012 1:48:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/MMSproject] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#2de3bcb5]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#427a269c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
juin 21, 2012 1:48:42 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Grave: The web application [/MMSproject] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10#617ceddc]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;#50e43884]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
and this in localhost.[date].localhost :
juin 21, 2012 1:48:42 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NullPointerException
at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:191)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:747)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:222)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ok, so I found the anwser and wanted to post it in order to help someone who would have te same issue !
It's a tiny detail but it may save you a lot of struggling and praying time once you know it: before deploying don't forget to switch the struts devMode to false (in struts.xml file) if you had decided to use it at the begining of you development (ie : maybe some few hard coding weeks ago !).
So basically this is what you wanna have in struts.xml :
<constant name="struts.devMode" value="false" />
instead of :
<constant name="struts.devMode" value="true" />
Good luck everybody !
We have created a web service in Netbeans 7.1 which is running fine on glassfish 3.1.1. Now I have to move my service application to Jboss 4.2.3 GA-JDK6. There is no problem found when deploying the web service on Jboss, but however invoking the web service causes an exception: -
"setProperty must be overridden by all subclasses of SOAPMessage class". To overcome this problem I had added jboss-native-saaj.jar in the JBOSS_HOME/lib/endorsed. which resolved the problem and the service got invoked but failed to return the response, but it resulted in a new exception: -
Caused by: java.lang.ClassCastException: com.sun.xml.messaging.saaj.soap.ver1_1.Envelope1_1Impl cannot be cast to org.jboss.ws.core.soap.SOAPElementImpl
at org.jboss.ws.core.soap.SOAPEnvelopeImpl.<init>(SOAPEnvelopeImpl.java:60)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:124)
at org.jboss.ws.core.soap.EnvelopeBuilderDOM.build(EnvelopeBuilderDOM.java:96)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:280)
at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:84)
at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:518)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:307)
... 54 more
Also I want to tell that I'm actually invoking a webservice from within a webservice.
Please help in this, as there no documentation or solution available for the same.
Thanks in Advance
Adding the complete stacktrace of the previously occurred error:-
javax.xml.ws.WebServiceException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:404)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:314)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
at $Proxy183.authenticateUser(Unknown Source)
at com.liaison.soi.sts.usermgmt.service.impl.UserManagementServiceImpl.authenticateUser(UserManagementServiceImpl.java:46)
at com.liaison.soi.sts.usermgmt.service.impl.UserManagementServiceImpl.authenticateUser(UserManagementServiceImpl.java:25)
at com.liaison.soi.sts.auth.AuthenticationHandler.validate(AuthenticationHandler.java:24)
at com.sun.xml.wss.impl.callback.PasswordValidationCallback.getResult(PasswordValidationCallback.java:80)
at com.sun.xml.wss.impl.misc.DefaultSecurityEnvironmentImpl.authenticateUser(DefaultSecurityEnvironmentImpl.java:1166)
at com.sun.xml.ws.security.opt.impl.incoming.UsernameTokenHeader.validate(UsernameTokenHeader.java:160)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.handleSecurityHeader(SecurityRecipient.java:341)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.cacheHeaders(SecurityRecipient.java:275)
at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:225)
at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:450)
at com.sun.xml.wss.jaxws.impl.SecurityServerTube.processRequest(SecurityServerTube.java:295)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:314)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:608)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:213)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
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:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:454)
at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:83)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171)
at org.jboss.ws.core.CommonSOAP11Binding.createMessage(CommonSOAP11Binding.java:59)
at org.jboss.ws.core.CommonSOAPBinding.bindRequestMessage(CommonSOAPBinding.java:158)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:291)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
I think your problem is in following.
The implementation SOAPMessageImpl was packaged in jboss-native-saaj.jar only till JBoss 3.2.2.GA (check here). Latest JBoss has this class in jbossws-native-core.jar. So you create a class conflict when you put jboss-native-saaj.jar into server/libs (or package with your application). So the solution will be: just remove jboss-native-saaj.jar, as jbossws-native-core.jar is (I believe) already there.
To make sure check META-INF for jboss-native-saaj.jar: was it packaged for JBoss 4.2.3? what is that date of packaging? This will take you to right decision.
This can be easily googled.
See https://issues.jboss.org/browse/JBWS-1439 and https://community.jboss.org/message/618306.
It's a well-known issue under Java 6 caused by obsolete jax-ws jars bundled within.
You'll have to play with moving some jars to endorsed dir as noted in above issue.
An alternative solution is to upgrade to JBossWS-3.1.1 (the last one supporting JBoss AS 4.2.3.GA).
Same issue in JBoss 5.1.2 is resolved with the addition of
jboss-as/lib/endorsed/jbossws-native-factories-3.1.2.SP11.jar
I was trying to implement web services using the jboss. I had written server side files and tried to generate the wsdl file by placing the files in deploy folder. On running the JBoss(4.2.2GA), wsdl is getting created and I am able to access the wsdl by giving the link in internet explorer. Then I created the source files by using the Web Services/Web Service Client Wizard in Eclipse.
When I was trying to call the exposed methods from the client side code, am getting the following error:
ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)
at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:67)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:207)
at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:185)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:389)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
I had found this link which deals with the same topic 'http://lists.jboss.org/pipermail/jbossws-issues/2009-May/005421.html'
I am not understanding what to do.
Need help !!!
Thanks
-Aj
The issue has been resolved.
Configuration I used:
Eclipse IDE 3.3.0
JBoss-4.2.2 GA
3.Libraries used in lib/endorsed :
jboss-saaj.jar
jboss-jaxws.jar
jboss-jaxrpc.jar
jaxb-api-2.1.9.jar
xercesImpl.jar
xalan.jar
serializer.jar
Make sure the VM configuration is given for the client file from which the call to the wsdl exposed methods is done.
That is, including of '-Djava.endorsed.dirs=jboss-4.2.2.GA\lib\endorsed' at VM arguments.
I tried running the client file by having saaj.jar and jboss-saaj.jar. It was giving rise to conflicts, and on removing saaj.jar, the problem was solved and the issue resolved.
Thanks
-Aj
I'm new to using libraries, but i need to be able to send an email to users who forget their password. I'm trying to use the JavaMail and Apache Commons Email to implement this. However, I think I must be importing the libraries wrongly.
When I try to send an email, I get the following message:
Apr 17, 2011 11:54:33 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 60 in the jsp file: /sendpw.jsp
The type javax.mail.Authenticator cannot be resolved. It is indirectly referenced from required .class files
the code:
57: EmailAuthentication ea = new EmailAuthentication();
58: String authUser = ea.getUser();
59: String authPw = ea.getPw();
60: email.setAuthenticator(new DefaultAuthenticator(authUser, authPw));
61: email.setTLS(true);
62: email.setFrom(authUser+"#gmail.com");
63: email.setSubject("Your Last Love Password");
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:662)
I've tried a few things:
Copied the org.apache.commons.mail folder containing all the .java files into the source file of my netbeans project, and then adding the javamail library to the project. This worked the first time and I was able to send a few successful emails, but someway down the road it stopped working (perhaps because I cleaned and built the project) and i get the above message.
Created a new library with the jar files in the bin version of the commons-email-1.2 just like i did with the javamail, and add it to the project. This one doesnt seem to work, because when I open up the defaultauthenticator.java, it cannot import javax.mail.Authenticator, although i've added both libraries to the same netbeans project.
Added mail.jar and all the other .jars (dsn.jar, imap.jar, pop3.jar etc) from javamail into the same library as the apache common-email-1.2, meaning 2 classpath files (mail.jar and commons-email-1.2.jar) and 6 source files. This time, there was no error in the defaultauthenticator.java but still cannot send any email (same server error as above).
The part of the code involved is:
HtmlEmail email = new HtmlEmail();
email.setHostName("smtp.gmail.com");
email.setSmtpPort(587);
......
email.setAuthenticator(new DefaultAuthenticator(authUser, authPw));
email.setTLS(true);
email.setFrom(authUser+"#gmail.com");
email.setSubject("Your Password");
....
I am using Netbeans 6.9.1, tomcat 6.0.26.
What am I doing wrongly?
You need the mail.jar - and probably the activation.jar - library to be accessible from within your web application, so they should be either
in the tomcat6/lib, or
in the yourwebapp/WEB-INF/lib
folder.
If someone is using Maven Project and faces this error, then remove jasper properties and dependency from Pom.xml.