Blagoja Chavkoski <baze985@...> writes:

> 
> 
> Hi,You cant use any java.jar file in gwt without having the source code 
included in the jar and having the gwt.xml file pointing to the source 
classes...why u need this?! because gwt compiler needs to compile this classes
> to js! gwt by default compiles all classes in client and all classes in 
> shared 
to js, and bacause u have a import for commons gwt try's to compile this import 
also!!! but there is no source code and no gwt.xml file in the jarIf you dont 
understand what im saying:) open one of the "normal" .jar lib files used in gwt 
and youll see that inside u have all I wrote before! (source classes and 
gwt.xml)Important!!If having a lib that inside uses other lib..than u need the 
same thing for this imported lib:)...so basic dont use in client and shared any 
java lib other then the
> normal java lang libs(the compiler have the source for them by default)...to 
see what im talking...try to add insted of ArrayList... 
ConcurentArrayList...ull 
get the same problem..because the compiler dosent recognize this libs 
also:))regards blaze,Hope i was of help...
> On Sun, Jul 25, 2010 at 10:46 PM, Feldman, Nir (48Upper) <nir.feldman-
[email protected]> wrote:It is not really possible since StringUtils 
is based on java regular expression and the GWT regular expression emulator is 
based on a javascript. You will need to write it by your own
> -----Original Message-----
> From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Arar
> 
> Sent: Friday, July 23, 2010 2:24 AM
> To: Google Web Toolkit
> Subject: GWT. commons.lang.StringUtils
> Hi,
> I am trying to search between two Strings using the
> StringUtils.substringBetween() in my project. I have imported
> org.apache.commons.lang.StringUtils;  in my Entry Point java file . I
> have included common-lang.jar in my lib directory and in my project
> path. I have also modifed my gwt.xml
>  <inherits name="com.googlecode.gwt.commons.long.Long/>. I dont know
> if this is right or wrong.
> The Java Compilation goes through without any Errors . but if i do a
> GWT compile i get the following error
> [ERROR] Line 190: No source code is available for type
> org.apache.commons.lang.StringUtils; did you forget to inherit a
> required module?
> lib/gwtx-1.5.2.jar!/com/googlecode/gwtx/java/util/emul/java/util/regex/
> Pattern.java'
>          [WARN] Line 140: Referencing class
> 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable
> to resolve class, expect subsequent failures
>          [WARN] Line 149: Referencing class
> 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable
> to resolve class, expect subsequent failures
>          [WARN] Line 183: Referencing class
> 'com.googlecode.gwtx.java.util.emul.java.util.regex.Pattern': unable
> to resolve class, expect subsequent failures
> I want to know if its possible to includes
> "org.apache.commons.lang.StringUtils" in GWT  and how can i do the
> inherits in my GWT.XML file or i am digging in the wrong way.
> Please HELP.
> Any help would be appreciated. Thank you very much.
> --
> 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-web-toolkit-
/[email protected].
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe 
<at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-
web-toolkit?hl=en.
> --
> 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-web-toolkit-
/[email protected].
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe 
<at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-
web-toolkit?hl=en.
> 
> 
> 
> 


Hi Blagoja,

What if the class is in 'server'?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:2.3.2:compile (default-compile) on project xyz: Compilation failure: 
Compilation failure:
[ERROR] \eclipse-3.7\workspace\xyz\src\com\x\y\z\server\UserServiceImpl.java:
[20,30] package org.apache.commons.lang does not exist
[ERROR] \eclipse-3.7\workspace\xyz\src\com\x\y\z\server\UserServiceImpl.java:
[248,75] cannot find symbol
[ERROR] symbol  : variable StringUtils
[ERROR] location: class com.rbs.samuraiweb.server.UserServiceImpl
[ERROR] -> [Help 1]

It works if I add lang3 dependency in the pom file and use lang3 instead of 
lang, but that's not what I want to do...
Any way to get org.apache.commons.lang.StringUtils working?

Regards,

Thomas

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

Reply via email to