Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Push Development

Reply
New Contributor
MrNorris
Posts: 8
Registered: 12-20-2011
My Carrier: O2

Version mismatch in deployment

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,J2EEServer=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.findClassInternal(WebappClassLoader.java:2822)
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
	at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1078)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4611)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.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(HostConfig.java:1383)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.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

 

Please use plain text.
Developer
massimo_olive
Posts: 234
Registered: 11-08-2010

Re: Version mismatch in deployment

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.

Please use plain text.
New Contributor
MrNorris
Posts: 8
Registered: 12-20-2011
My Carrier: O2

Re: Version mismatch in deployment

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

 

Please use plain text.
New Contributor
MrNorris
Posts: 8
Registered: 12-20-2011
My Carrier: O2

Re: Version mismatch in deployment

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

 

 

Please use plain text.