Re: Creating a sample application of 3 different pages

2009-10-22 Thread Romeo Sanchez
Thanks everyone. After this discussion, I went ahead and read some
documentation, and implemented some small cases. It is kind of clear to me
know. Thanks everyone for your comments and time you took to respond our
questions.

One final question:
- Is it possible to load entrypoint modules with arguments?

Thanks for your help

Romeo


On Tue, Oct 20, 2009 at 1:26 PM, Ian Bambury  wrote:

> That's not quite how I understood your original question which asked about
> a single project with multiple modules and entry points.
> Both are possible in so far as the above case will work (just inherit the
> modules) and in your second post (use -noserver, different ports for each
> project, and have a number of web servers running on your development
> machine.
>
> Whether you can transmit data between them, I have no idea. Sorry.
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/10/20 Romeo Sanchez 
>
> Basically, each Module will be deployed in a different Web Server. Each web
>> server will communicate to a Central module through HTTP requests or
>> something alike (whatever GWT framework permits). They will transmit data
>> each other only.
>>
>> However, during development, I would like to simulate such an environment
>> in hosted mode. That is, load all different modules inside Eclipse, have
>> them in separate hosted-mode browser windows, and transmit the data between
>> them. I was just wondering if this is possible, since I believe simulating
>> my environment will speed testing and debugging of my application.
>>
>> Any ideas, I am new into the GWT framework, so I really do not know if
>> something like this is possible
>>
>> Thanks in advance
>>
>> Romeo
>>
>>
>>
>>
>> On Sat, Oct 17, 2009 at 11:02 AM, Ian Bambury wrote:
>>
>>> Hi Romeo,
>>> Why would you want to do this?
>>>
>>> Ian
>>>
>>> http://examples.roughian.com
>>>
>>>
>>> 2009/10/17 Mariano 
>>>
>>>
>>>> Hi Romeo,
>>>>
>>>> You can inherit from different modules which contains different entry
>>>> points.
>>>> Take a look at
>>>> http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideBootstrap
>>>> At the bottom of the page you'll see a section called: 'A Note on
>>>> Multiple GWT Modules and EntryPoints' that will exactly explain what
>>>> you're asking for:
>>>>
>>>> "If you have multiple EntryPoints (the interface that defines
>>>> onModuleLoad()) within a module, they will all be called in sequence
>>>> as soon as that module (and the outer document) is ready.
>>>>
>>>> If you are loading multiple GWT modules within the same page, each
>>>> module's EntryPoint will be called as soon as both that module and the
>>>> outer document is ready. Two modules' EntryPoints are not guaranteed
>>>> to fire at the same time, or in the same order in which their
>>>> selection scripts were specified in the host page."
>>>>
>>>> regards,
>>>> Mariano
>>>>
>>>> On Oct 16, 3:13 pm, Romeo Sanchez  wrote:
>>>> > Hi,
>>>> >
>>>> > Does somebody know if you can run an application/project
>>>> having/inheriting
>>>> > multiple modules having each one an entrypoint in hosted mode?
>>>> >
>>>> > I have searched a lot about a tutorial, and I have not found anything.
>>>> Could
>>>> > you please send the link to your tutorial page?, I am going to
>>>> translate it
>>>> > somehow.
>>>> >
>>>> > Thanks
>>>> >
>>>> > RSN
>>>> >
>>>> > On Fri, Oct 16, 2009 at 4:06 AM, Alex  wrote:
>>>> >
>>>> > > I've searched a lot, but unfortunately I couldn't find a tutorial or
>>>> > > so, so I wrote one myself for my students (I'm a teacher) .
>>>> > > The tutorial however is in written in Dutch and not meant to be
>>>> spread
>>>> > > around; at least not in the form that it's now.
>>>> >
>>>> > > But here are the steps you have to take to work with multiple HTML
>>>> > > pages.
>>>> > > I assume that you already have a GWT project with a single HTML
>>>> file,
>>>> > > and that HTML file con

Re: Creating a sample application of 3 different pages

2009-10-20 Thread Romeo Sanchez
Basically, each Module will be deployed in a different Web Server. Each web
server will communicate to a Central module through HTTP requests or
something alike (whatever GWT framework permits). They will transmit data
each other only.

However, during development, I would like to simulate such an environment in
hosted mode. That is, load all different modules inside Eclipse, have them
in separate hosted-mode browser windows, and transmit the data between them.
I was just wondering if this is possible, since I believe simulating my
environment will speed testing and debugging of my application.

Any ideas, I am new into the GWT framework, so I really do not know if
something like this is possible

Thanks in advance

Romeo



On Sat, Oct 17, 2009 at 11:02 AM, Ian Bambury  wrote:

> Hi Romeo,
> Why would you want to do this?
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/10/17 Mariano 
>
>
>> Hi Romeo,
>>
>> You can inherit from different modules which contains different entry
>> points.
>> Take a look at
>> http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideBootstrap
>> At the bottom of the page you'll see a section called: 'A Note on
>> Multiple GWT Modules and EntryPoints' that will exactly explain what
>> you're asking for:
>>
>> "If you have multiple EntryPoints (the interface that defines
>> onModuleLoad()) within a module, they will all be called in sequence
>> as soon as that module (and the outer document) is ready.
>>
>> If you are loading multiple GWT modules within the same page, each
>> module's EntryPoint will be called as soon as both that module and the
>> outer document is ready. Two modules' EntryPoints are not guaranteed
>> to fire at the same time, or in the same order in which their
>> selection scripts were specified in the host page."
>>
>> regards,
>> Mariano
>>
>> On Oct 16, 3:13 pm, Romeo Sanchez  wrote:
>> > Hi,
>> >
>> > Does somebody know if you can run an application/project
>> having/inheriting
>> > multiple modules having each one an entrypoint in hosted mode?
>> >
>> > I have searched a lot about a tutorial, and I have not found anything.
>> Could
>> > you please send the link to your tutorial page?, I am going to translate
>> it
>> > somehow.
>> >
>> > Thanks
>> >
>> > RSN
>> >
>> > On Fri, Oct 16, 2009 at 4:06 AM, Alex  wrote:
>> >
>> > > I've searched a lot, but unfortunately I couldn't find a tutorial or
>> > > so, so I wrote one myself for my students (I'm a teacher) .
>> > > The tutorial however is in written in Dutch and not meant to be spread
>> > > around; at least not in the form that it's now.
>> >
>> > > But here are the steps you have to take to work with multiple HTML
>> > > pages.
>> > > I assume that you already have a GWT project with a single HTML file,
>> > > and that HTML file contains a link toward another HTML file which also
>> > > should make use of the GWT.
>> > > Let's assume that the HTML file you are linking to is called
>> > > info.html, and that the page doesn't exists yet.
>> > > To add the page follow the following steps:
>> >
>> > > - Start by adding the packages info and info.client into the src tree.
>> > > - Add into the package info a new google webtoolkit module called info
>> > > - Add into the package info.client a new Entry Point Class that uses
>> > > the module info.info
>> > > - Finally add in the war directory a new HTML page info.html that uses
>> > > only the module info.info
>> >
>> > > I suggest to use the Google Plugin for Eclipse, to do this; because
>> > > lots of stuff will then be generated for you if you add the module,
>> > > class & html page using the plugin.
>> >
>> > > Good luck,
>> >
>> > > Alex
>> >
>> > > On Oct 16, 9:21 am, neerou  wrote:
>> > > > Thank you for your reply Alex.
>> >
>> > > > Regarding the 3rd item you enumerated, mulitiple entry points and
>> > > > module, is there some tutorial i could follow for it?
>> > > > Since am having issue to implement the different entry points into
>> the
>> > > > xml
>> >
>> > > > With thanks,
>> > > > Neerou
>> >
>> > > > On Oct 15, 4:42 pm, Alex  w

Re: Creating a sample application of 3 different pages

2009-10-16 Thread Romeo Sanchez
Hi,

Does somebody know if you can run an application/project having/inheriting
multiple modules having each one an entrypoint in hosted mode?

I have searched a lot about a tutorial, and I have not found anything. Could
you please send the link to your tutorial page?, I am going to translate it
somehow.

Thanks

RSN

On Fri, Oct 16, 2009 at 4:06 AM, Alex  wrote:

>
> I've searched a lot, but unfortunately I couldn't find a tutorial or
> so, so I wrote one myself for my students (I'm a teacher) .
> The tutorial however is in written in Dutch and not meant to be spread
> around; at least not in the form that it's now.
>
> But here are the steps you have to take to work with multiple HTML
> pages.
> I assume that you already have a GWT project with a single HTML file,
> and that HTML file contains a link toward another HTML file which also
> should make use of the GWT.
> Let's assume that the HTML file you are linking to is called
> info.html, and that the page doesn't exists yet.
> To add the page follow the following steps:
>
> - Start by adding the packages info and info.client into the src tree.
> - Add into the package info a new google webtoolkit module called info
> - Add into the package info.client a new Entry Point Class that uses
> the module info.info
> - Finally add in the war directory a new HTML page info.html that uses
> only the module info.info
>
> I suggest to use the Google Plugin for Eclipse, to do this; because
> lots of stuff will then be generated for you if you add the module,
> class & html page using the plugin.
>
> Good luck,
>
> Alex
>
>
> On Oct 16, 9:21 am, neerou  wrote:
> > Thank you for your reply Alex.
> >
> > Regarding the 3rd item you enumerated, mulitiple entry points and
> > module, is there some tutorial i could follow for it?
> > Since am having issue to implement the different entry points into the
> > xml
> >
> > With thanks,
> > Neerou
> >
> > On Oct 15, 4:42 pm, Alex  wrote:
> >
> > > As far as I know there are three ways to archive that goal (resp. an
> > > impression that there are multiple pages).
> >
> > > 1. You could use the DeckPanel. This way you app reacts very fast on
> > > the user, but your design is hidden in the java code.
> > > 2. You could put your different pages into a single HTML file and wrap
> > > each page into a DIV element and use your GWT code to set the
> > > visibilty of the DIV elements. This way you site still reacts fast,
> > > and lots of HTML code is within the HTML file.
> > > 3. You could use different HTML pages, but than you have to define a
> > > Module and corresponding Entry Point Class for each page in which you
> > > would like to use the GWT. Not the fastest way, but I think it's a
> > > good way to work together with designers who don't know anything about
> > > Java/GWT and work the traditional way (Designers design the site in
> > > separate HTML files -> Developers adds functionality -> The customer
> > > reviews the result and changes may result in applying this cycle
> > > again)
> >
> > > Good luck,
> >
> > > Alex
> >
> > > On Oct 15, 12:38 pm,neerou wrote:
> >
> > > > Any one has an idea abt the issue below?
> >
> > > > On Oct 14, 4:23 pm,neerou wrote:
> >
> > > > > Hello,
> > > > > I am novice to GWT. Since now I have been trying the exercises  on
> the
> > > > > Code.google site.  I would now want to create different pages in
> the
> > > > > application.
> > > > > 1) a login page
> > > > > 2) a list of items
> > > > > 3) a list of users
> >
> > > > > Do i need to create 3 different modules for the 3 different pages?
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Mutiple EntryPoint Modules in Hosted Mode under Eclipse? is it Possible?

2009-10-16 Thread Romeo Sanchez
Yes, this is what I want to do. I was hoping we could do it directly from
hosted mode.

I do not know if I understood well, but what you are basically saying is
that We can not run an application/project that involves multiple modules,
each one having a different entrypoint in hosted mode? Did I parse correctly
what you said?

Thanks for clarifying.

RSN.

On Thu, Oct 15, 2009 at 8:38 PM, Davis Ford wrote:

> Hi, I'm not sure you can do this in hosted mode, but I had a similar
> situation that I solved, and now it is a set and forget.
>
> To be up front -- I am a maven bigot.  I think Ant is fine if it is done
> right, but maven makes my life so much easier that I use it for all new
> projects.
>
> That said, I had to develop an app that would have several different
> "features" depending on the user/role -- significantly the login would
> define that (and the role), but the login page was also different for each
> user role.  I also wanted to share a lot of the code between these different
> apps for obvious reasons.
>
> I could have made multiple maven projects and made re-usable components to
> inherit and share the code that way -- but this would mean several different
> projects, and the maintenance, overhead, headache of dealing with all that.
> My needs were simpler.  I wanted all the code in one project...but I wanted
> different entry points.  Really, the only thing that was different was the
> entry point that bootstrapped the code specific for that app.  I separated
> it out via URL, so you can hit:
>
> http://localhost/app1
>
> or
>
> http://localhost/app2
>
> So, in the end my project uses multiple modules and URL filtering to
> control access to a particular app.  The only real downside is that it takes
> longer to compile when I deploy, but that is no big deal for me.  I can't
> run hosted mode in parallel like you are asking for, but hosted mode is for
> quick dev. anyway, so I don't find that to be a limitation.
>
> To run app1, I do:
>
> mvn gwt:run -DrunTarget=my.package.App1/App1.html
>
> To run app2, I do:
>
> mvn gwt-run -DrunTarget=my.package.App2/App2.html
>
> ...or I create a Run/Debug target inside Eclipse and launch it with the GWT
> eclipse plugin that way.
>
> Anyway, I wrote up a blog and sample project you can take a look at as a
> skeleton here: http://zenoconsulting.wikidot.com/blog:16  -- if it helps
> you/someone..great.
>
> Regards,
> Davis
>
>
> On Wed, Oct 14, 2009 at 8:20 PM, RSN  wrote:
>
>>
>> I am kind of new with GWT, and I was hoping someone could clarify my
>> following questions, or at least point me out to some light. Thanks
>> for any help.
>>
>> The setting is as follows:
>>
>> - Eclipse 3.4.2 , GWT 1.7.1 and plugin.
>>
>> - Created two basic GWT modules with GWT Plugin under Eclipse. Both
>> are just copies of the GreetService application that gets generated by
>> default when you create a new GWT project using the plugin Wizard.
>>
>> The modules are:
>> -Security
>> -Main
>>
>> The Main module is going to inherit the Security one. So, I modified
>> the Main.gwt.xml file to inherit the security module.
>> 
>>
>> In addition to this, Eclipse complained about the build path for the
>> Main module when I did this change. So, I had to add the Security
>> module as a "Required project on the build path" of the Main module.
>> This step removed any problems in compilation time.
>>
>> So, I proceed to run the Main module. When, I ran the project, only
>> one single Hosted-mode browser window opened. And, these are the
>> problems encountered:
>>
>> - The single browser window contained elements (buttons, textboxes,
>> etc) from both of the modules. So, I could see all html elements in a
>> single window.
>>
>> First questions:
>> Is this the desired behavior?
>> Can we open more than one browser window, one per each module that has
>> an entrypoint and refers to a html page?
>> Is there a way to let each module know on which port each application
>> will run? In other words, both of the modules are running in
>> localhost, but I would like to set them to run in different ports such
>> that there is no conflict.
>>
>> Then, I proceed to test the functionality of the elements in the
>> single browser window. I clicked the button of the Main application
>> that greets the Server. It worked well. No problems.
>> Then, I clicked in the second button from the Security module to make
>> an RPC to the server, and it got the default message: "An error
>> occurred while attempting to contact the server. Please check network
>> connection ..."
>> I am guessing that the Server side of the Security module did not load
>> because of the port issue. Is this true, or is there something else
>> that I am missing?
>>
>> I get in the Hosted Mode Window also the following:
>> 404 - POST /main/greet (127.0.0.1) 1396 bytes
>>
>> I notice that the main module do not have a "greet" servlet (since I
>> refactored it). However, the Security module kept that servlet name,
>> should not be 

Re: Mutiple EntryPoint Modules in Hosted Mode under Eclipse? is it Possible?

2009-10-15 Thread Romeo Sanchez
Thanks a lot for your help. I am going to take a look at your pointers.

Sincerely,

RSN

On Thu, Oct 15, 2009 at 4:53 AM, Ian Bambury  wrote:

> I'm still not really clear on what you are doing, but is this any help?
> In 1.7 you can run 2 individual projects at the same time from within
> Eclipse if you use -noserver.
>
> You'll need 2 local web servers (I use Abyss) each having their document
> root pointed at one of the war folders of the projects, and each running on
> a different port.
>
> You'll need to use the -port switch in the launch file to point each
> project at the right server. Works in 2.0, too, but you also need to set
> different -portHosted settings or they'll clash.
>
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/10/15 Romeo Sanchez 
>
> Basically, in my scenario, each project provides services. In theory, they
>> can be deployed individually to different servers. One of the projects, lets
>> say Project A, collects some data and sends the data to Project B. Project A
>> is basically requiring Project B to fulfill one of its goals.
>>
>> I know that I can deploy first project B somewhere, and use HTTP POST
>> requests or something alike in Project A to transmit my data to the deployed
>> Project B. However, I would like to be able to run the whole thing in hosted
>> mode, in other words, to be able to simulate the environment during
>> development, testing and debugging.
>>
>> For example, I can do that directly with two different JAVA projects in
>> Eclipse. I can manipulate both at the same time, compile and run
>> configurations, debug the projects, and see the effects of my changes. I was
>> just wondering if something similar is possible for GWT. Where, I have both
>> projects being loaded in hosted mode, the main project and the dependency
>> project. And then test cross-module functionality among them. In my case, I
>> will be transmitting data, but it could be something else.
>>
>> I do not know if I am not being clear, or if I really need to go to some
>> intensive GWT training. I understand the concept of importing modules
>> (inheriting), but I was just wondering if while inheriting you could also be
>> testing and developing not only in the main but also in the inherited
>> modules.
>>
>> Thanks for your help, I really appreciate it.
>>
>> RSN
>>
>>
>>
>>
>>
>> On Wed, Oct 14, 2009 at 5:39 PM, Ian Bambury wrote:
>>
>>> I think you need to (or, anyway, I need you to) take a step back and
>>> explain what you are trying to achieve here.
>>> Why do you need two projects? The usual reason is that you need to reuse
>>> code and widgets from the included project in two or more others (e.g. you
>>> are building a framework of some kind, or want to use some widgets you have
>>> developed in more than one top-level project.
>>>
>>> Ian
>>>
>>> http://examples.roughian.com
>>>
>>>
>>> 2009/10/15 RSN 
>>>
>>>
>>>> I am kind of new with GWT, and I was hoping someone could clarify my
>>>> following questions, or at least point me out to some light. Thanks
>>>> for any help.
>>>>
>>>> The setting is as follows:
>>>>
>>>> - Eclipse 3.4.2 , GWT 1.7.1 and plugin.
>>>>
>>>> - Created two basic GWT modules with GWT Plugin under Eclipse. Both
>>>> are just copies of the GreetService application that gets generated by
>>>> default when you create a new GWT project using the plugin Wizard.
>>>>
>>>> The modules are:
>>>> -Security
>>>> -Main
>>>>
>>>> The Main module is going to inherit the Security one. So, I modified
>>>> the Main.gwt.xml file to inherit the security module.
>>>> 
>>>>
>>>> In addition to this, Eclipse complained about the build path for the
>>>> Main module when I did this change. So, I had to add the Security
>>>> module as a "Required project on the build path" of the Main module.
>>>> This step removed any problems in compilation time.
>>>>
>>>> So, I proceed to run the Main module. When, I ran the project, only
>>>> one single Hosted-mode browser window opened. And, these are the
>>>> problems encountered:
>>>>
>>>> - The single browser window contained elements (buttons, textboxes,
>>>> etc) from both of the modules. So, I could see all html elements in a
>>>> s

Re: Mutiple EntryPoint Modules in Hosted Mode under Eclipse? is it Possible?

2009-10-14 Thread Romeo Sanchez
Basically, in my scenario, each project provides services. In theory, they
can be deployed individually to different servers. One of the projects, lets
say Project A, collects some data and sends the data to Project B. Project A
is basically requiring Project B to fulfill one of its goals.

I know that I can deploy first project B somewhere, and use HTTP POST
requests or something alike in Project A to transmit my data to the deployed
Project B. However, I would like to be able to run the whole thing in hosted
mode, in other words, to be able to simulate the environment during
development, testing and debugging.

For example, I can do that directly with two different JAVA projects in
Eclipse. I can manipulate both at the same time, compile and run
configurations, debug the projects, and see the effects of my changes. I was
just wondering if something similar is possible for GWT. Where, I have both
projects being loaded in hosted mode, the main project and the dependency
project. And then test cross-module functionality among them. In my case, I
will be transmitting data, but it could be something else.

I do not know if I am not being clear, or if I really need to go to some
intensive GWT training. I understand the concept of importing modules
(inheriting), but I was just wondering if while inheriting you could also be
testing and developing not only in the main but also in the inherited
modules.

Thanks for your help, I really appreciate it.

RSN




On Wed, Oct 14, 2009 at 5:39 PM, Ian Bambury  wrote:

> I think you need to (or, anyway, I need you to) take a step back and
> explain what you are trying to achieve here.
> Why do you need two projects? The usual reason is that you need to reuse
> code and widgets from the included project in two or more others (e.g. you
> are building a framework of some kind, or want to use some widgets you have
> developed in more than one top-level project.
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/10/15 RSN 
>
>
>> I am kind of new with GWT, and I was hoping someone could clarify my
>> following questions, or at least point me out to some light. Thanks
>> for any help.
>>
>> The setting is as follows:
>>
>> - Eclipse 3.4.2 , GWT 1.7.1 and plugin.
>>
>> - Created two basic GWT modules with GWT Plugin under Eclipse. Both
>> are just copies of the GreetService application that gets generated by
>> default when you create a new GWT project using the plugin Wizard.
>>
>> The modules are:
>> -Security
>> -Main
>>
>> The Main module is going to inherit the Security one. So, I modified
>> the Main.gwt.xml file to inherit the security module.
>> 
>>
>> In addition to this, Eclipse complained about the build path for the
>> Main module when I did this change. So, I had to add the Security
>> module as a "Required project on the build path" of the Main module.
>> This step removed any problems in compilation time.
>>
>> So, I proceed to run the Main module. When, I ran the project, only
>> one single Hosted-mode browser window opened. And, these are the
>> problems encountered:
>>
>> - The single browser window contained elements (buttons, textboxes,
>> etc) from both of the modules. So, I could see all html elements in a
>> single window.
>>
>> First questions:
>> Is this the desired behavior?
>> Can we open more than one browser window, one per each module that has
>> an entrypoint and refers to a html page?
>> Is there a way to let each module know on which port each application
>> will run? In other words, both of the modules are running in
>> localhost, but I would like to set them to run in different ports such
>> that there is no conflict.
>>
>> Then, I proceed to test the functionality of the elements in the
>> single browser window. I clicked the button of the Main application
>> that greets the Server. It worked well. No problems.
>> Then, I clicked in the second button from the Security module to make
>> an RPC to the server, and it got the default message: "An error
>> occurred while attempting to contact the server. Please check network
>> connection ..."
>> I am guessing that the Server side of the Security module did not load
>> because of the port issue. Is this true, or is there something else
>> that I am missing?
>>
>> I get in the Hosted Mode Window also the following:
>> 404 - POST /main/greet (127.0.0.1) 1396 bytes
>>
>> I notice that the main module do not have a "greet" servlet (since I
>> refactored it). However, the Security module kept that servlet name,
>> should not be /security/greet instead?, where is the application
>> getting confused? Why the call is going to the main servlet to look
>> for the "greet" service instead of going to the Security module
>> servlet services?
>>
>> Is this feasible? I mean, can we debug and test functionality of cross
>> referenced GWT modules/projects in Eclipse?
>> I am a newbie, so is there somewhere a discussion, tutorial,
>> documentation that I am missing?
>>
>> Thanks,
>> p.s. Hope I could put some smal

Re: Problem connecting to a Postgresql Database under Google GWT when APP Engine enabled

2009-09-16 Thread Romeo Sanchez
Yes, I found out that is a security restriction from the App Engine, and not
from the GWT Part. I still can connect from the App Engine to another web
server that will query the database and send back data to my App Engine
Application, or the other way around.

Thanks,

On Tue, Sep 15, 2009 at 3:48 PM, Isaac Truett  wrote:

>
> Basically, no. You can't do what you want to do. You can't connect to
> your database from App Engine. That has nothing to do with GWT.
>
>
>
> On Thu, Sep 10, 2009 at 3:21 AM, Romeo Sanchez 
> wrote:
> > My problem is exactly the same as the one described at:
> >
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/244850e9cde1c733/da5c6bfeb61c8109?show_docid=da5c6bfeb61c8109
> >
> > Basically, I get the following exception when trying to establish a
> > connection to a Postgresql Database from a GWT project using app engine.
> >
> > org.postgresql.util.PSQLException: Your security policy has prevented the
> > connection from being attempted.  You probably need to grant the connect
> > java.net.SocketPermission to the database server host and port that you
> wish
> > to connect to.
> > at org.postgresql.Driver.connect(Driver.java:282)
> > at java.sql.DriverManager.getConnection(DriverManager.java:582)
> > at java.sql.DriverManager.getConnection(DriverManager.java:154)
> > 
> > ...
> > Caused by: java.security.AccessControlException: access denied
> > (java.net.SocketPermission myhost.com resolve)
> >
> > Users in the google group thread suggest to uncheck the App Engine
> feature
> > of the project. It seems this simple action fixes the problem.
> > Unfortunately, my project requires the App Engine feature. I have
> verified
> > the configuration files of the database server, and everything seems to
> be
> > fine. I made a simpler project (which does not use GWT) to test the
> > connection to the DB server and to query the database, and it works well.
> > However, the same code does not work when it is invoked inside the server
> > side of my GWT/APP engine application.
> >
> > Is this a known bug of GWT? is App Engine conflicting with the DB Driver?
> I
> > am using the latest DB driver for Postgresql.
> >
> > If I split my project and I create a GWT module that connects to the DB
> > server  (and does not use App Engine), and then inherit this module into
> the
> > main project (the one using App Engine), would that solve my problem? If
> so,
> > is there any other solution instead of doing this??
> >
> > Thanks, I really appreciate any help from you guys. I am new on GWT/App
> > Engine, and I really did not expect that connecting to Postgresql
> databases
> > would be a problem.
> >
> > RSN
> >
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Problem connecting to a Postgresql Database under Google GWT when APP Engine enabled

2009-09-10 Thread Romeo Sanchez
My problem is exactly the same as the one described at:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/244850e9cde1c733/da5c6bfeb61c8109?show_docid=da5c6bfeb61c8109

Basically, I get the following exception when trying to establish a
connection to a Postgresql Database from a GWT project using app engine.

org.postgresql.util.PSQLException: Your security policy has prevented the
connection from being attempted.  You probably need to grant the connect
java.net.SocketPermission to the database server host and port that you wish
to connect to.
at org.postgresql.Driver.connect(Driver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)

...
Caused by: java.security.AccessControlException: access denied
(java.net.SocketPermission myhost.com resolve)

Users in the google group thread suggest to uncheck the App Engine feature
of the project. It seems this simple action fixes the problem.
Unfortunately, my project requires the App Engine feature. I have verified
the configuration files of the database server, and everything seems to be
fine. I made a simpler project (which does not use GWT) to test the
connection to the DB server and to query the database, and it works well.
However, the same code does not work when it is invoked inside the server
side of my GWT/APP engine application.

Is this a known bug of GWT? is App Engine conflicting with the DB Driver? I
am using the latest DB driver for Postgresql.

If I split my project and I create a GWT module that connects to the DB
server  (and does not use App Engine), and then inherit this module into the
main project (the one using App Engine), would that solve my problem? If so,
is there any other solution instead of doing this??

Thanks, I really appreciate any help from you guys. I am new on GWT/App
Engine, and I really did not expect that connecting to Postgresql databases
would be a problem.

RSN

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---