500 Server Error based on HardDeadlineExceededError - spring

I have a simple spring web application that only has spring mvc and spring roo setup. For some reason on all of my old app instances, when I uploaded this sample application, it always gets a "hanging/exceeded time" error in the logs. Even in the case of basic spring mvc setup. The logs I've seen are below. I am a bit confused since the same application was working previously until today, and now even the simple deployments to google app engine are returning a 500 error. Any help would be appreciated, but I just want to see if this is an issue people are seeing with spring mvc specifically or with the latest google app engin sdk?:
Uncaught exception from servlet
com.google.apphosting.runtime.HardDeadlineExceededError: This request (c22ac44effde64c8) started at 2012/03/13 15:39:52.285 UTC and was still executing at 2012/03/13 15:40:54.889 UTC.
at com.google.appengine.runtime.Request.process-c22ac44effde64c8(Request.java)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1200(ZipFile.java:57)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:476)
at java.util.zip.ZipFile$1.fill(ZipFile.java:259)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.Resource.getBytes(Resource.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:273)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.springframework.web.servlet.view.tiles2.SpringTilesApplicationContextFactory.createApplicationContext(SpringTilesApplicationContextFactory.java:55)

Try using warmup requests.

This is a localized problem - app engine seems to be having problems system wide, especially badly for M/S applications. See https://groups.google.com/forum/?fromgroups#!topic/google-appengine/js5CeRWLQZ0

Related

Spring boot crashes after few hours with the exception "java.util.zip.ZipException: invalid distance too far back"

I have a standalone spring boot (1.5.1) application using castor 1.2, spring integration, kafka publishers, and couchbase functionalities. After running for few hours in Linux (java version "1.8.0_191") the app starts getting the below error -
Failed to load configuration from classpath: /org/castor/core/castor.core.properties
java.util.zip.ZipException: invalid distance too far back
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipInflaterInputStream.java:52)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at java.util.Properties$LineReader.readLine(Properties.java:435)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at org.castor.core.util.Configuration.loadFromClassPath(Configuration.java:187)
at org.castor.core.util.Configuration.loadDefaultProperties(Configuration.java:136)
This is not happening during the start up, the app starts fine keeps on running for few hours and then suddenly the error pops up and never recovers. We need to manually restart the process.
Can you please suggest?

EclipseLink MOXy: Intermittent NullPointerException / MarshalException with concurrent calls

I've got a set of JAX-RS endpoints that are accessed asynchronously from an AngularJS-based application.
About the project...
Apache CXF JAX-RS, Non-Spring Servlet Implementation: 2.7.7
Hibernate JPA: 4.3.5.Final
EclipseLink Moxy: 2.5.1
Spring: 4.2.1.RELEASE
Tomcat 7
MOXy is currently configured by registering the
org.eclipse.persistence.jaxb.rs.MOXyJsonProvider class to the JAX-RS
Application, with a jaxb.properties file included in the JPA Entity
classes' package; the contents of the file:
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
If I access an endpoint by itself, everything functions as expected.
If I access the Angular client via the browser on my Windows-based localhost, everything functions as expected.
However, as soon as I test the application in a Linux-based test environment, I sometimes get exceptions, such as the following:
10:57:38.390 [tomcat-http--27] WARN o.a.c.j.i.WebApplicationExceptionMapper - javax.ws.rs.WebApplicationException: javax.xml.bind.MarshalException
- with linked exception:
[java.lang.NullPointerException]
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:842)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1317)
at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:282)
at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:155)
at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:86)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[java.lang.NullPointerException]
at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:457)
at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.writeTo(MOXyJsonProvider.java:840)
... 33 more
Caused by: java.lang.NullPointerException
at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshal(XMLCompositeObjectMappingNodeValue.java:145)
at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:401)
at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:240)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshalSingleValue(XMLCompositeCollectionMappingNodeValue.java:328)
at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshal(XMLCompositeCollectionMappingNodeValue.java:108)
at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:149)
at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:401)
at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:240)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshalSingleValue(XMLCompositeObjectMappingNodeValue.java:249)
at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshal(XMLCompositeObjectMappingNodeValue.java:150)
at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:401)
at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:240)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshalSingleValue(XMLCompositeObjectMappingNodeValue.java:249)
at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshal(XMLCompositeObjectMappingNodeValue.java:150)
at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:401)
at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:240)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:751)
at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:571)
at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshalStreamOrWriter(XMLMarshaller.java:1107)
at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:919)
at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:862)
at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:455)
... 34 more
The only relevant information I've been able to find about my issue is in this related StackOverflow question/answer: Null pointer exception only on application startup org.eclipse.persistence.jaxb.JAXBMarshaller.marshal
This didn't start happening until I migrated my project to use Spring for Hibernate JPA EntityManager transaction management.
I'm at a complete loss. I could refactor my client to only issue synchronous calls, but even then, this issue will still occur when multiple users attempt to use the application simultaneously. Why is MOXy misbehaving in this way? It does seem like this happens less often after multiple refreshes of the Angular client, so the concept of "priming" the system does seem like it somewhat accurately explains what's going on. However, even then, this behavior is not consistent! There doesn't seem to be a way to reliably predict when this exception condition will occur.
Is there something additional that I need to do, now that Spring is managing transactions, to get MOXy to properly initialize when called from concurrent threads in rapid succession?
Summary:
Never happens when individual JAX-RS RESTful endpoints are accessed (regardless of server environment)
Never happens on Windows-based localhost
Sometimes happens on Linux-based test server, and only when multiple endpoints are being accessed concurrently
Sometimes doesn't happen at all, even under these condtitions
Only started happening after a migration from manual/custom application-managed Hibernate EntityManager transaction management to Spring-based transaction management
According to the bug report at https://bugs.eclipse.org/bugs/show_bug.cgi?id=404951, a fix for this issue was checked in to the 2.5.x branch. I checked the stable MOXy releases, and sure enough, version 2.5.2 was released a few months ago.
I switched my project from 2.5.1 to 2.5.2 and I no longer experience this issue.
Note about the different behaviors between localhost and test server...
I was proxying endpoint requests through grunt-connect-proxy so that
I could maintain relative pathing for endpoint URLs while using
grunt-contrib-connect for livereload functionality.
When I removed this intermediate proxy, and the Angular client
accessed the endpoints directly, I was able to duplicate the issue
locally.

Web services deployment in IBM Web sphere

Good Morning all,
I have problem while deploying my web app in IBM WAS.
I have spring ws and during the deployment, I get the below error,
Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Unable to create SAAJ meta-factorycom.ibm.ws.webservices.engine.soap.SAAJMetaFactoryImpl incompatible with javax.xml.soap.SAAJMetaFactory
at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.afterPropertiesSet(SaajSoapMessageFactory.java:145)
I have packaged the saaj-api 1.3 and saaj impl 1.3 jars in my application and i can see them in the lib folder.
I have set the class loading properties in the WAS to parent last.
Any clue or Where am I going wrong?
I'm using WAS version 7.0.0.11
I added this entry to the MANIFEST file to solve this issue,
DisableIBMJAXWSEngine: true
Hope this helps some one.

spring jdbc suddenly throws class not found error on SingleColumnRowMapper

I have been developing a Spring project about 6 months. This project is built with maven and spring. Suddenly today i discovered that jdbc sections of the code throwing the error below. I made some changes to my web services in the project lately but I did not change any maven configurations or spring configurations since the last time the application worked stable. Where should I start to look for the error?
Any comment is appreciated.
Caused by: java.lang.NoClassDefFoundError: org/springframework/jdbc/core/SingleColumnRowMapper
at org.springframework.jdbc.core.JdbcTemplate.getSingleColumnRowMapper(JdbcTemplate.java:1184)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:744)
at com.pozitron.bkmtransfer.core.dao.AcsKeyAliasDaoImpl.findRsaPubKeyByBankId(AcsKeyAliasDaoImpl.java:43)
at com.pozitron.bkmtransfer.services.core.CipherActionImpl.verify(CipherActionImpl.java:97)
at com.pozitron.bkmtransfer.services.TransferActionImpl.transferMoney(TransferActionImpl.java:67)
at com.pozitron.bkmtransfer.ws.endpoints.TransferEndPoint.transferMoney(TransferEndPoint.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
At first make sure that you have this class (jar) on your classpath. If you do then make sure that you have only one version of this class in your classpath. It might be that new jar was included if you changed/added some dependencies.
Also, if you're starting your app from the eclipse then the only thing you might be needing is to do project->clean
P.S. Are you getting this error at compile time or runtime?

smartgwt + gwt-rpc or REST + spring

Hi
I am currently working on a project and basing my design proposal on a SOA architecture and am including GWT components for UI . I am new to GWT and after reading through a week of posts of GWT and SmartGWT and trying out samples i would like to introduce SmartGWT into my organization w/o the server-side integration. That is because we already have spring services and would like them to remain re-usable through the organization. So my main interest is in the ui components of Smart GWT and in some fashion (either gwt-rpc or REST ) connect to the backend exposed services.
I am developing on SmartGWT 2.4 and gwt2.2+ . I have gone through the posts on GWT-rpc and tried using the sample api presented. However i ran into a couple issues .
Running the ListGridSample 'as is' i get the following ERROR although the application runs.
Am using the sample from here
23:31:37.101 [ERROR] [listgridtest] 23:31:37.088:RDQ5:WARN:ResultSet:isc_ResultSet_0 (created by: isc_OID_1):get: invalid index -1
com.smartgwt.client.core.JsObject$SGWT_WARN: 23:31:37.088:RDQ5:WARN:ResultSet:isc_ResultSet_0 (created by: isc_OID_1):get: invalid index -1 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:513)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
I next wanted to remove all the redundant jars present in the example project and update the smartgwt jars and gwt-servlet jar to see if it is still compatible. I received this
23:37:06.584 [ERROR] [listgridtest] Unable to load module entry point class mytest.client.YourEntryPoint (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object Object] has no method 'getNextGlobalIDForClass'
stack: TypeError: Object [object Object] has no method 'getNextGlobalIDForClass'
at unknown source
at __gwt_jsInvoke (ttp://127.0.0.1:8888/listgridtest/hosted.html?listgridtest:76:35)
at ttp://127.0.0.1:8888/listgridtest/hosted.html?listgridtest:280:16
at z (ttp://127.0.0.1:8888/listgridtest/listgridtest.nocache.js:2:144)
at ttp://127.0.0.1:8888/listgridtest/listgridtest.nocache.js:8:589
arguments: getNextGlobalIDForClass,[object Object]
type: undefined_method
__gwt_ObjectId: 2
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.smartgwt.client.util.SC.generateID(SC.java)
at com.smartgwt.client.widgets.BaseWidget.<init>(BaseWidget.java:102)
at com.smartgwt.client.widgets.Canvas.<init>(Canvas.java:75)
at mytest.client.YourEntryPoint.onModuleLoad(YourEntryPoint.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
at java.lang.Thread.run(Thread.java:619)
I read somewhere on the smartclient forums not to mix the smartgwtee and smartgwt jars so i double checked (because i was evaluating the ee edition b4this but that required a learning in the datasource concept ). So i am using gwt2.2+ and smart-gwt2.4.
I have read through the quick start pdf (quickly) and decided that although the server side integration may have benefits for a quick introduction within my organization it would not work.
So from an system standpoint if i understand correctly you could define your datasource for your partricular widgets and then use the GenericGwtService to pass on to your business services before or after you send back the DSresponse.
Can you kindly point me to a quick sample which actually does this in the latest version or a document which specifies exactly how to do it ? or an api or a forum post which addresses this for the latest versions.
Hopefully that would help me springify the sample miniapp.. which would help me POC.
Any input appreciated.
Thanks,
Answered something similar here - Smartgwt DataSource with gwt requestfactory etc
You can also look at JSON datasources
http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/data/XJSONDataSource.html

Resources