12-20-2011 12:25 PM
I'm still trying to get the sample-initiator from the push sdk source building. New problem is an exception during the .war deployment on the EC2 server hosting it:
Dec 20, 2011 3:40:26 PM org.apache.tomcat.util.modeler.Registry registerComponent SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/sample-push-initiator,J2EEApplication=none,J 2EEServer=none Dec 20, 2011 3:40:26 PM org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying web application archive sample-push-initiator.war java.lang.UnsupportedClassVersionError: net/rim/pushsdk/sampleapp/SampleApplication : Unsupported major.minor version 51.0 (unable to load class net.rim.pushsdk.sampleapp.SampleApplication) at org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:2822) at org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:1159) at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1647) at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1526) at org.apache.catalina.startup.WebAnnotationSet.loadA pplicationServletAnnotations(WebAnnotationSet.java :108) at org.apache.catalina.startup.WebAnnotationSet.loadA pplicationAnnotations(WebAnnotationSet.java:58) at org.apache.catalina.startup.ContextConfig.applicat ionAnnotationsConfig(ContextConfig.java:297) at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1078) at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4611) at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:601) at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:943) at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:778) at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:504) at org.apache.catalina.startup.HostConfig.check(HostC onfig.java:1383) at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:306) at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.backgroundP rocess(ContainerBase.java:1385) at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1649) at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.processChildren(ContainerBase.ja va:1658) at org.apache.catalina.core.ContainerBase$ContainerBa ckgroundProcessor.run(ContainerBase.java:1638) at java.lang.Thread.run(Thread.java:636)
I can't see anywhere within SampleApplication that can be throwing an unsupported class exception. Also this .war deploys on my local (admittedly windows, rather than unix) machine without problems. Do I have to build on the same machine as it's deployed (this seems like something inconsistent with the Java ethos though)?
The code is exactly as the sample application is provided, where could this exception be going off from?
James
12-23-2011 10:52 AM
This is not an SDK error but it a Java error. This means you have a mismatch between the versions of Java that you are using to compile vs run the application. Even if you think you are convinced its right - triple check cause you'll always find a mismatch somewhere when you use this error.
01-08-2012 06:39 AM
Thanks massimo_olive, I'm still unsure where the version mismatch is coming from. The only difference I can find now is that the server is using the OpenJDK and client is using the Sun JDK. Versions are the same. Problem is that I can't change the Java version on the server, and I can't build on the server..
Now checking pre-built libs one by one (sigh).
James
01-16-2012 12:18 PM
It seems that the apache server was trying to re-deploy an old .war, I couldn't find a way to clobber the old one (deleting the old one in webapps doesn't work, restarting the server doesn't work, deleting the entire webapp/sample-push-initiator directory doesn't work), so ended up re-installing the SDK. This is probably because this is my first time using apache and I don't know what I'm doing.
Anyway when I tried again with a fresh install I got another new exception during deployment, so I've given up on getting 'sample-push-initiator-1.1.0.16-sources.jar' deploying. The debug_portal should do what I need for now.
James