I also have a exception of classNotFound. And I see your advice but I don't know how to do it。

11 views
Skip to first unread message

victor QIN

unread,
Aug 13, 2010, 10:14:23 AM8/13/10
to gwtai
can not find com.vizalia.framework.eventbus.impl.SyncAppApplet.class。
java.lang.ClassNotFoundException:
com.vizalia.framework.eventbus.impl.SyncAppApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager
$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://
localhost:8080/com/vizalia/framework/eventbus/impl/SyncAppApplet.java/
com/vizalia/framework/eventbus/impl/SyncAppApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
异常:java.lang.ClassNotFoundException:
com.vizalia.framework.eventbus.impl.SyncAppApplet.class

And

kilkenny

unread,
Aug 13, 2010, 11:14:23 AM8/13/10
to gwtai
Hi Victor

So that is when running the 'com.google.gwt.dev.DevMode' in Eclipse -
right? Did you try to do a full build and deploy it to a standalone
webserver (Apache for instance)? I see this kind of error message much
to often lately :-( I have to play around with DevMode some more...

Can you mayby post you applet interface class (the one with all the
annotations)?

Have a good weekend!
Adrian

victor QIN

unread,
Aug 14, 2010, 7:17:17 AM8/14/10
to gw...@googlegroups.com

2010/8/13 kilkenny <a.bu...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "gwtai" group.
To post to this group, send email to gw...@googlegroups.com.
To unsubscribe from this group, send email to gwtai+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwtai?hl=en.

Adrian,
Thank you for your reply
I'm sorry for not giving you the complete information. I use netbeans. And I find if I use implementingClass, it will show the following error: Caused by: java.io.IOException: open HTTP connection failed:http://
localhost:8080/com/vizalia/
framework/eventbus/impl/SyncAppApplet.java/
com/vizalia/framework/eventbus/impl/SyncAppApplet/class.class
what I have done are : 1. I created an independent project containing a gwt module. I put the interface in client side and impelementation class in another package. 2. in second gwt web project, I want to use it, but I can not,classNotFound exception. 3. for the interface, I just copy the Accounter in your demo.
Looking forward for your reply
Thanks a lot
Victor

kilkenny

unread,
Aug 18, 2010, 2:09:26 AM8/18/10
to gwtai
Hi Victor

I'm a longtime Eclipse user, so I'm not very Netbeans savvy. However I
managed to setup a working GwtAI project in Netbeans.

1. I used the Netbeans GWT plugin to create a new Java Web project. In
the 'New project' wizard I have add GWT as a framework.
2. I created a folder 'lib' and placed the GwtAI Jar files in there.
3. Netbeans does create a 'build.xml' file which can be customized. In
this file I have added the following target:

---
<?xml version="1.0" encoding="UTF-8"?>

<project name="InitApplet" default="default" basedir=".">

<import file="nbproject/build-gwt.xml"/>
<import file="nbproject/build-impl.xml"/>

<target name="-post-compile">
<echo level="info">Preparing applet JAR files</echo>

<jar destfile="${build.web.dir}/${ant.project.name}.jar"
compress="true">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="$
{ant.project.name}"/>
<attribute name="Implementation-Title" value="$
{ant.project.name}"/>
<attribute name="Implementation-Version" value="1.0"/>
</manifest>
</jar>

<copy file="${file.reference.GwtAI-Core.jar}" tofile="$
{build.web.dir}/GwtAI-Core.jar" />

<signjar jar="${build.web.dir}/${ant.project.name}.jar" alias="Adrian
Buerki" storepass="gwtaigwtai" keystore=".keystore" />
<signjar jar="${build.web.dir}/GwtAI-Core.jar" alias="Adrian Buerki"
storepass="gwtaigwtai" keystore=".keystore" />
</target>

</project>
---

4. Run your project, the browser comes up... And there you go :-)

Make sure you get the Jar signing stuff right. Otherwise you will get
a signing error from the Java plugin in the browser. Have a look at
the 'signjar' task in the above build. Jar signing can also be done
with command line tools (these tools are included in the JDK). See the
the official Oracle Tutorials to do so:
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html

Hope that helps.

Regards, Adrian

On 14 Aug., 13:17, victor QIN <bienvenue...@gmail.com> wrote:
> 2010/8/13 kilkenny <a.bue...@gmail.com>
> > gwtai+un...@googlegroups.com <gwtai%2Bunsu...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages