Getting java.lang.NoClassDefFoundError

17 views
Skip to first unread message

jamz2010

unread,
Jul 31, 2009, 9:13:13 AM7/31/09
to Google App Engine
Hi all,

I am currently getting the java.lang.NoClassDefFoundError when I try
and run my Google Wave Robot. I have checked and I have defiantly
copied the jar to /war/WEBINF/lib and included this in my build path:

package srp;

import java.io.IOException;
import javax.servlet.http.*;
import com.google.wave.api.*;
import srpProject.GoogleWaveWSServiceLocator;
import srpProject.GoogleWaveWSPortBindingStub;

public class SRPProjectServlet extends AbstractRobotServlet {
private int theState = 0;

@Override
public void processEvents(RobotMessageBundle bundle) {
Wavelet wavelet = bundle.getWavelet();

if (bundle.wasSelfAdded()) {
Blip blip = wavelet.appendBlip();
TextView textView = blip.getDocument();
textView.append("I'm alive!");
}

for (Event e: bundle.getEvents()) {
if (e.getType() == EventType.WAVELET_PARTICIPANTS_CHANGED) {
Blip blip = wavelet.appendBlip();
TextView textView = blip.getDocument();
textView.append("Hi, everybody!");
} else if (e.getType() == EventType.BLIP_SUBMITTED) {
String sResponse = "";
String sXML = "";
String sLastBlip = e.getBlip().getDocument().getText();

Blip blip = wavelet.appendBlip();
TextView textView = blip.getDocument();

try {
GoogleWaveWSPortBindingStub stub = new
GoogleWaveWSPortBindingStub();
textView.append("HI");
} catch (Exception ex) {
textView.append(ex.getMessage());
}
}
}
}
}

The import works ok but the error comes when it tries to create a new
instance of the GoogleWaveWSPortBindingStub. Does anyone have any
ideas on what I have dont wrong? I'm pretty sure I haven't included
the jar correctly but I cant see what I have done wrong.

Thanks

James

TheSmile

unread,
Sep 2, 2009, 7:10:36 PM9/2/09
to Google App Engine
Hi James,

I came across the same problem but the solution was simple:
Check, if you are currentliy running the newest version of your app.

At the top left of your app engine account/dashboard there is
"Application: <yourApplicationName>" and next to it there is a
dropdown menu with your versions (or under Administration > Versions).
If you uploaded a new version, your engine did not start using the
newest. You have to tell your engine what version you want to be
online.

Hope this helps ... did I read the tutorial too fast or didn't anyone
tell me that new versions are not automatically set? (still, good
feature NOT using the lastest as greatest)

Regards
Norbert
Reply all
Reply to author
Forward
0 new messages