using external jar

121 views
Skip to first unread message

András Csányi

unread,
Mar 10, 2011, 4:05:47 PM3/10/11
to google-we...@googlegroups.com
Hi all!

I think I lost a little bit. I would like to use and external jar in
my gwt project. Basically, this jar contains the DTO classes which
used by EJB Entity and gwt classes. So, because of this I made a new
project and I put here my DTOs. I've found this [1] article about how
can I use external jar. My problem is that, this method isn't working
for me.

I got this error message:

[ERROR] Errors in
'file:/D:/PRIVATE/Projects/SATT/SATT2/SATTClient/SATTClient/src/java/hu/sayusi/java/satt/client/stability/DeleteResultList.java'
[ERROR] Line 30: No source code is available for type
hu.sayusi.java.satt.library.dto.TestResultDTO; did you forget to
inherit a required module?

Which means there is a typo. I've checked my files many times and
everything is fine.

My projects are in the SATT directory:

SATT/SATTClient/SATTClient
SATT/SATTLib/SATTLib
SATT/SATTServer/SATTServer

My client.gwt.xml file contains this and placed here:

SATT/SATTClient/SATTClient/src/hu/sayusi/java/satt

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit
1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.google.gwt.user.User"/>
<inherits name="com.google.gwt.http.HTTP"/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name="com.google.gwt.user.theme.standard.Standard"/>
<inherits name="hu.sayusi.java.satt.library.dto"/>
<!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/> -->
<!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->
<entry-point class="hu.sayusi.java.satt.client.clientEntryPoint"/>
<!-- Do not define servlets here, use web.xml -->
</module>

I would like to use the hu.sayusi.java.satt.library.dto.TestResultDTO
class which placed in
SATT/SATTLib/SATTLib/hu/sayusi/java/satt/library/dto/ directory

The dto.gwt.xml file contains this and placed here:
SATT/SATTLib/SATTLib/hu/sayusi/java/satt/library/

<module>
<inherits name="com.google.gwt.user.User"/>
<source path="dto"></source>
</module>

I went through many times and it should be working but isn't. I'm
using Netbeans and the SATTLib project is added to SATTClient project.

[1]: http://www.vogella.de/articles/GWT/article.html#modules

I'm appreciating your kind help!

András

--
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

azuniga

unread,
Mar 10, 2011, 5:31:51 PM3/10/11
to Google Web Toolkit
Andras,

If you are going to be using external jars on the client side, you
have to have the source code for those jars, and you have to create
a .gwt.xml file for each one. If you already have this then I'll look
deeper into your problem. Otherwise, if you don't have the source code
then you can't use those jars on the client side.

On Mar 10, 4:05 pm, András Csányi <sayusi.a...@gmail.com> wrote:
> Hi all!
>
> I think I lost a little bit. I would like to use and external jar in
> my gwt project. Basically, this jar contains the DTO classes which
> used by EJB Entity and gwt classes. So, because of this I made a new
> project and I put here my DTOs. I've found this [1] article about how
> can I use external jar. My problem is that, this method isn't working
> for me.
>
> I got this error message:
>
>  [ERROR] Errors in
> 'file:/D:/PRIVATE/Projects/SATT/SATT2/SATTClient/SATTClient/src/java/hu/say usi/java/satt/client/stability/DeleteResultList.java'
>          [ERROR] Line 30: No source code is available for type
> hu.sayusi.java.satt.library.dto.TestResultDTO; did you forget to
> inherit a required module?
>
> Which means there is a typo. I've checked my files many times and
> everything is fine.
>
> My projects are in the SATT directory:
>
> SATT/SATTClient/SATTClient
> SATT/SATTLib/SATTLib
> SATT/SATTServer/SATTServer
>
> My client.gwt.xml file contains this and placed here:
>
> SATT/SATTClient/SATTClient/src/hu/sayusi/java/satt
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit
> 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source...">
> --  Csanyi Andras (Sayusi Ando)  --http://sayusi.hu--http://facebook.com/andras.csanyi

András Csányi

unread,
Mar 11, 2011, 4:33:20 AM3/11/11
to google-we...@googlegroups.com
Hi Allesandro,

You are very kind! This problem is solved because the external jar didn't contains the source. Now, it's working fine.

Thanks again!

András

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu -- http://facebook.com/andras.csanyi
Reply all
Reply to author
Forward
0 new messages