Problem with GWT 2.4 rc1 RequestFactory on tomcat - gwt

We have our gwt application working fine on the development mode with gwt 2.4rc1 but when we deployed on tomcat 6 we get the following exception on the server side when the first requestfactory call is made.
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:225)
at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:203)
at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)
at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)
at com.sample.ads.server.service.AdsRequestFactoryServlet.doPost(AdsRequestFactoryServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
On the client side, 500 (Internal Server Error)

The wire format has changed between GWT 2.3 and 2.4 to support obfuscated (and therefore much shortened) type identifiers. You have a 2.3 client trying to talk to the 2.4 server and there's a bug in the RC1 that makes that case fail in an unhelpful manner. The fix is to recompile your client code against the updated requestfactory code.

In order to have an android app working with google app engine, you must create the App Engine connected Android project in Eclipse with GWT 2.3.0 configurated by default:
Windows -> Preferences -> Google -> Web Toolkit (and not 2.4.0rc1)
If you try change the GWT version from 2.4.0rc1 to 2.3.0 after having created a project, you will always have this error with the android app (web app will work)

Related

IBM TRIRIGA BIRT Features not displaying after install in Eclipse 3.6.2

Up until two days ago, my install of Eclipse Helios with BIRT (from the all-in-one 2.6.2 package) worked just fine. While creating a report, my install froze. I restarted and then BIRT tools were no longer available. I deleted my eclipse folder along with my .metadata and .eclipse folders, and unzipped the package again.
Went through the normal setup - Help>Install Software, installed the 'IBM TRIRIGA BIRT Features' and then restarted. Still no tools available. Also tried to install older and newer versions of the all-in-one to no avail.
I've changed workspaces numerous times, the logs aren't showing any errors. The BIRT features appear in the 'Installed' list, too.
Thanks in advance.
EDIT:
There are errors in the log file in the .metadata folder of my workspace, and there are errors there. All of the cached jars that are over 2000KB throw the following error:
org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at file:/C:/Eclipse_Helios/eclipse/p2/org.eclipse.equinox.p2.repository/cache/content625995868.jar.
and then (after the stacktrace):
Caused by: java.io.IOException: Parser has reached the entity expansion limit "64,000" set by the Application.
I've looked around and found a couple of solutions (one is about the settings in eclipse, to set the jre above 1.4 (which hasn't been working), or to create a file called jaxp.properties and place it ${java.home}/lib/jaxp.properties.
EIDT II:
So I've uninstalled all java versions, and I've found the following:
The official IBM TRIRIGA report writer pdf says to have java 1.5 installed.
I have tried multiple versions of 1.5, and all install well, no errors in the log files whatsoever. However (and this is the most perplexing) - the IBM TRIRIGA feature doesn't show in preferences. No errors any where, just no plugin showing.
I tried java 1.6, and the feature shows, but when I try to connect to the DB, it throws a connection error:
!ENTRY com.tririga.platform.birt.preferences 4 0 2015-10-23 09:19:27.376
!MESSAGE Connection Failed
!STACK 0
com.tririga.platform.clientserver.reqresp.RequestResponseException: An Error Occurred. Contact your System Administrator. -- [MID-2406107507]
at com.tririga.platform.clientserver.shared.http.ObjectSerializer.marshallError(ObjectSerializer.java:47)
at com.tririga.platform.clientserver.shared.http.ObjectSerializer.marshall(ObjectSerializer.java:57)
at com.tririga.platform.clientserver.server.http.HTTPClientConnectionHandler.doPost(HTTPClientConnectionHandler.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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 com.tririga.platform.context.ContextFilter$2.execute(ContextFilter.java:130)
at com.tririga.platform.context.ContextServiceImpl.runInNewReadOnlyContext(ContextServiceImpl.java:146)
at com.tririga.platform.context.ContextFilter.doFilterInternal(ContextFilter.java:116)
at com.tririga.platform.context.ContextFilter.doFilter(ContextFilter.java:65)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.tririga.web.filter.XSSDecodingFilter.doFilter(XSSDecodingFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.tririga.web.filter.XSSURLEncodeFilter.doFilter(XSSURLEncodeFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.tririga.web.filter.EncodingFilter.doFilter(EncodingFilter.java:29)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.tririga.platform.clientserver.reqresp.RequestResponseException:
at com.tririga.platform.clientserver.shared.http.ObjectSerializer.marshallError(ObjectSerializer.java:46)
Back to java 1.4, and the feature doesn't show, and te original "64000" error shows.
Dammit.
Apparently this is a problem with the Java XML parser. It has a limit of 64,000 "entities" it can process (sources aplenty, e.g., GraphDB FAQ).
Try passing the entityExpansionLimit=128000 system property to the JVM at start. That is, either start Eclipse from the command line, adding the system property
eclipse -DentityExpansionLimit=128000
Or add it to the eclipse.ini file (at the bottom):
-vmargs
-XX:MaxPermSize=128m
-Xms40m
-Xmx512m
-DentityExpansionLimit=128000
If this doesn't work, try toying around with the actual property value.
Also, note that the above-mentioned source also says the following about running applications in Tomcat instances (not sure where the error actually appears, Eclipse or the server?).
Don't forget that if running in Tomcat then this must be passed to the Tomcat instance using the CATALINA_OPTS environment variable.
-DentityExpansionLimit=128000

Class cast exception when invoking a web service in Jboss 4.2.3 GA

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

Running OSGI from within jboss invoking jax-ws service

I have created some OSGI bundles that I was running in Felix with no problems. I have a bundle that invokes a call to a jaxws service. All the stubs for the osgi bundle were generated using cxf-codegen-plugin. Everything works fine if I startup felix directly and execute my application.
I have recently moved this to having everything running inside of a jboss application server(JBoss 5.1.0.GA). I am using the servlet-bridge, and starting up felix when my servlet is registered. Everything starts up find, and all of my bundles are started without error. However when I execute my application I get the following error:
22:23:40,688 ERROR [[proxy]] Servlet.service() for servlet proxy threw exception
javassist.NotFoundException: com.service.ws.Parameters
at javassist.ClassPool.get(ClassPool.java:436)
at org.jboss.ws.core.jaxws.DynamicWrapperGenerator.addProperty(DynamicWrapperGenerator.java:226)
at org.jboss.ws.core.jaxws.DynamicWrapperGenerator.generate(DynamicWrapperGenerator.java:122)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.processWebMethod(JAXWSMetaDataBuilder.java:796)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.processWebMethods(JAXWSMetaDataBuilder.java:920)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:298)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:269)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:200)
at javax.xml.ws.Service.getPort(Service.java:99)
at com.service.ws.JasperService_Service.getJasperServicePort(JasperService_Service.java:46)
at com.service.ws.JasperReportImpl.initializeServer(JasperReportImpl.java:56)
at com.web.ui.ReportWindow.handleParameters(ReportWindow.java:122)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
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.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:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
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:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
I'm not sure why the javassist classes are not able to find that class. It is part of the same bundle the call to getPort is made from, and all of this works fine when running from felix directly.
*UPDATE
I can get past this initial error if I put the jar(bundle) containing the class that is being looked for in the jboss lib directory, thus putting it on the global classpath. However once I get past that initial resolution error, I then get another error as follows:
22:05:10,823 ERROR [ServiceDelegateImpl] Cannot create proxy for SEI com.service.ws.JasperService from: file:/home/work/appservers/osgi/bundle/com.jasper-server-ws-client-1.0-SNAPSHOT.jar
22:05:10,824 ERROR [[proxy]] Servlet.service() for servlet proxy threw exception
java.lang.IllegalArgumentException: interface com.service.ws.JasperService 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.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:400)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:273)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:200)
at javax.xml.ws.Service.getPort(Service.java:99)
So something is screwed up with the classpath. I'm not sure why, but it appears that the class pathing for my bundles might be incorrect in some way, but i'm not sure where.
Your current problem, as raised in your first update, is one of Java reflection.
The secret here is to update your MANIFEST.MF file to expose com.service.ws.JasperService to the class loader. Following this guide, you might try something like:
Export-Package: com.service.ws.JasperService
Best of luck with your project.

setProperty must be overridden by all subclasses of SOAPMessage error using JBoss 4.2.2GA

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

org.apache.jasper.JasperException: Unable to compile class for JSP

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.