Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread JakeP
here's more about URLFetch
http://code.google.com/appengine/docs/java/urlfetch/overview.html

Also, for code samples, Ikai Lan's blog is great:
http://ikaisays.com/2010/06/29/using-asynchronous-urlfetch-on-java-app-engine/

Happy coding.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread JakeP
Don,

Thanks for helping us out getting backends running.

I tried the backendname parameter and it seems to work 
intermittently.  I tried running the urls that would be run in the task 
queues and get a 503 error (below) every time. Is this something that can 
happen when the backend is busy? Is there a limit to how many requests a 
backend can handle?

Thanks again,
Jake


Error: Server ErrorThe service you requested is not available yet.

Please try again in 30 seconds.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Can we use the bulkuploader on the local environment?

2011-05-16 Thread Heiko Roth
Yes, you can.

http://code.google.com/intl/de-DE/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data

appcfg.py download_data --url=http://127.0.0.1/[remote_api_path] --
filename= --kind=

appcfg.py upload_data --url=http://127.0.0.1/[remote_api_path] --
filename=

On local download, you have to set the kind parameter. On upload you
mustn't.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Ah, I missed the point about it being tasks and didn't realize the
threadsafe only applied to user requests and not  tasks. If indeed that was
the case.

On Mon, May 16, 2011 at 10:44 PM, Juha K  wrote:

> The datanucleus issue has a comment "Then, when my tasks run in parallel,
> initialisation has already been done and the problem doesn't appear any
> more.", so before the threadsafe property, only tasks were run in parallel.
> Probably that's why I didn't see this error before, I didn't have tasks
> doing db access.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: JSP page as Warmup Servlet

2011-05-16 Thread Anders
The documentation doesn't mention it (as far as I could see), but I take it 
that warmup servlets can be given admin auth-constraint.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-16 Thread Stephen Johnson
Hi Ashley,
This isn't the way I would go about structuring this if I'm understanding
the way you've set up your classes. There are a few issues right away that I
see. For one, if you have a couple thousand Order children under the Account
parent and you call getOrders() in your addOrder() method then you're
pulling all that data from the datastore in to the application just to add a
new order to the Account. So this will keep getting slower and slower as you
add Orders to the Account and it looks like you've now reached the max, so
that might be why it's worked up until now. Also, you are reducing the
amount of concurrency that can take place on your Account class so if you
are trying to have multiple orders that could be added to an Account
simultaneously you're going to run in to contention issues.
Stephen

On Mon, May 16, 2011 at 10:30 PM, Ashley Schroder  wrote:

> I have a fairly simple App Engine Java app that has Accounts, Orders and
> OrderItems - nothing crazy.
>
> Just in the last 12 hours I have started getting exceptions thrown out of
> some fairly straight forward code that adds orders to accounts and then
> saves them.
>
> I created a trivial testing servlet to replicate the issue, it looks like
> this:
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>
> String key = req.getParameter("key");
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Account account = pm.getObjectById(Account.class,
> KeyFactory.stringToKey(key));
>
> Order order = new Order();
> order.setExternalOrderID("ASHLEY-TESTING");
>
> Item item = new Item();
> item.setSku("ASHLEY-WIDGET-A");
> item.setQuantity(2);
> Item item2 = new Item();
> item2.setSku("ASHLEY-WIDGET-B");
> item2.setQuantity(2);
>
> order.addItem(item);
> order.addItem(item2);
>
> account.addOrder(order);
> order.setAccount(account);
> pm.makePersistent(order);
> pm.close();
> }
>
> addOrder is implemented as a pretty standard lazy init:
>
> public void addOrder(Order order) {
> if (getOrders() == null) {
> setOrders(new ArrayList());
> }
> getOrders().add(order);
> }
>
> The relevant parts of the entities:
>
> @PersistenceCapable
>
> public class Account {
>
> //...
>
> @Persistent(mappedBy="account")
> @javax.jdo.annotations.Order(extensions =
> @Extension(vendorName="datanucleus", key="list-ordering", value="startDate
> desc"))
> private List stats;
>
> //...
>
> }
>
> and the Order has an account field:
>
> @Persistent
> private Account account;
>
>
> This code is failing on the `account.addOrder()` line. If it is run
> directly in the browser it fails with DeadlineExceededException (after 30s)
> and if I enqueue it to run via a task queue it fails with
> DatastoreTimeoutException after a minute or two. It uses a truck load of CPU
> time in the process.
>
> I would estimate that the Account would have fewer than 2000 Orders
> children under it, each Order with 1-3 OrderItem children.
>
> My question is, why would this all of a sudden start failing it has worked
> to add the 1000's of orders already in there. And have I missed something
> vital? do I need to add indexes? could the data store really be this slow?
> Am I abusing it, should I not have children relationships with this many
> children - perhaps a set of keys would be a better approach?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Juha K
The datanucleus issue has a comment "Then, when my tasks run in parallel, 
initialisation has already been done and the problem doesn't appear any 
more.", so before the threadsafe property, only tasks were run in parallel. 
Probably that's why I didn't see this error before, I didn't have tasks 
doing db access.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Thinking out loud...What's strange about that issue (not this current one
but the one from the past) and the supposed solution is that until just
recently with the introduction of the threadsafe property supposedly only
one request could executing at a time and you can't create your own
additional threads, so how could there have been a race condition before??

On Mon, May 16, 2011 at 10:16 PM, Juha K  wrote:

> Based on your experience it seems to be that the problem is in the access
> to PersistenceManagerFactory.getPersistenceManager()? If your PMF-class
> fixes the problem, then it seems that call to getPersistenceManager() should
> be synchronized in multithreaded apps.
> Can anyone confirm this?
>
> I found this issue:
> http://code.google.com/p/datanucleus-appengine/issues/detail?id=203(Unexpected
>  UnsupportedOperationException when calling getObjectById()) and
> used the workaround proposed there (doing a query in the start up). So far
> it seems to be working ok.
>
>
>
>
> lauantaina 14. toukokuuta 2011 8.26.02 UTC+3 Aaron Shepherd kirjoitti:
>>
>> I'm using this modified PMF class now and it seems to fix this
>> problem, with the caveat that I haven't done any heavy load testing
>> yet.
>>
>> public final class PMF
>> {
>> private static final PersistenceManagerFactory pmfInstance =
>> JDOHelper.getPersistenceManagerFactory("transactions-
>> optional");
>>
>> private PMF()
>> {
>> }
>>
>> public synchronized static PersistenceManagerFactory get()
>> {
>> return pmfInstance;
>> }
>>
>> public synchronized static PersistenceManager
>> getPersistenceManagerInstance()
>> {
>> return pmfInstance.getPersistenceManager();
>> }
>> }
>>
>> Aaron Shepherd
>> OnFast.com
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-16 Thread Ashley Schroder
I have a fairly simple App Engine Java app that has Accounts, Orders and 
OrderItems - nothing crazy.

Just in the last 12 hours I have started getting exceptions thrown out of 
some fairly straight forward code that adds orders to accounts and then 
saves them.

I created a trivial testing servlet to replicate the issue, it looks like 
this:

public void doGet(HttpServletRequest req, HttpServletResponse resp) 
throws IOException {

String key = req.getParameter("key");

PersistenceManager pm = PMF.get().getPersistenceManager();
Account account = pm.getObjectById(Account.class, 
KeyFactory.stringToKey(key));

Order order = new Order();
order.setExternalOrderID("ASHLEY-TESTING");

Item item = new Item();
item.setSku("ASHLEY-WIDGET-A");
item.setQuantity(2);
Item item2 = new Item();
item2.setSku("ASHLEY-WIDGET-B");
item2.setQuantity(2);

order.addItem(item);
order.addItem(item2);

account.addOrder(order);
order.setAccount(account);
pm.makePersistent(order);
pm.close();
}

addOrder is implemented as a pretty standard lazy init:

public void addOrder(Order order) {
if (getOrders() == null) {
setOrders(new ArrayList());
}
getOrders().add(order);
}

The relevant parts of the entities:

@PersistenceCapable

public class Account {

//...

@Persistent(mappedBy="account")
@javax.jdo.annotations.Order(extensions = 
@Extension(vendorName="datanucleus", key="list-ordering", value="startDate 
desc"))
private List stats;

//...

}

and the Order has an account field:

@Persistent
private Account account;


This code is failing on the `account.addOrder()` line. If it is run directly 
in the browser it fails with DeadlineExceededException (after 30s) and if I 
enqueue it to run via a task queue it fails with DatastoreTimeoutException 
after a minute or two. It uses a truck load of CPU time in the process.

I would estimate that the Account would have fewer than 2000 Orders children 
under it, each Order with 1-3 OrderItem children.

My question is, why would this all of a sudden start failing it has worked 
to add the 1000's of orders already in there. And have I missed something 
vital? do I need to add indexes? could the data store really be this slow? 
Am I abusing it, should I not have children relationships with this many 
children - perhaps a set of keys would be a better approach?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Juha K
Based on your experience it seems to be that the problem is in the access to 
PersistenceManagerFactory.getPersistenceManager()? If your PMF-class fixes 
the problem, then it seems that call to getPersistenceManager() should be 
synchronized in multithreaded apps.
Can anyone confirm this?

I found this 
issue: http://code.google.com/p/datanucleus-appengine/issues/detail?id=203 
(Unexpected UnsupportedOperationException when calling getObjectById()) and 
used the workaround proposed there (doing a query in the start up). So far 
it seems to be working ok.




lauantaina 14. toukokuuta 2011 8.26.02 UTC+3 Aaron Shepherd kirjoitti:
>
> I'm using this modified PMF class now and it seems to fix this 
> problem, with the caveat that I haven't done any heavy load testing 
> yet. 
>
> public final class PMF 
> { 
> private static final PersistenceManagerFactory pmfInstance = 
> JDOHelper.getPersistenceManagerFactory("transactions- 
> optional"); 
>
> private PMF() 
> { 
> } 
>
> public synchronized static PersistenceManagerFactory get() 
> { 
> return pmfInstance; 
> } 
>
> public synchronized static PersistenceManager 
> getPersistenceManagerInstance() 
> { 
> return pmfInstance.getPersistenceManager(); 
> } 
> } 
>
> Aaron Shepherd 
> OnFast.com 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] JSP page as Warmup Servlet

2011-05-16 Thread Anders
Oh, only jspInit(), not jspService() that renders the actual page. Hmm... 
Then it's perhaps better to have a separate warmup servlet instead. 
Overriding the jspInit() method sounds like messy coding. Alternatively to 
have 1 for both JSP pages and a separate 
warmup servlet that makes calls to the datastore etc can be used (and not 
map _ah_warmup so that the default warmup logic remains).

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: UserService.getCurrentUser() returning null sometimes

2011-05-16 Thread Aswath Satrasala
Any ideas, on this.  Why does UserService.getCurrentUser() return null
sometimes.
How long is user logged in status valid?  In my application setting, the
cookie expiration is set to 1 day.

-Aswath
www.AccountingGuru.in .


On Sat, May 14, 2011 at 11:14 AM, Aswath Satrasala <
aswath.satras...@gmail.com> wrote:

> Hi,
> I have a GWT application.  For every RPC made, I do
> UserService.getCurrentUser() on the server, and then go ahead with the
> business logic.
> Sometimes, this call is returning null.  Under what circumstances it might
> return null?  This is really causing intermittent errors for my customers.
> Please suggest
>
> Regards,
> -Aswath
> www.AccountingGuru.in.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] JSP page as Warmup Servlet

2011-05-16 Thread Anders Lindman
But if /_ah/warmup is mapped, then the documentation says that the service()
method of the mapped servlet will be called:
http://code.google.com/appengine/docs/java/config/appconfig.html#Using_a_Custom_Servlet

Does the service() method in the compiled JSP servlet make a call to
_jspService()?
Otherwise the JSP page code will not be accessed.

On Tue, May 17, 2011 at 12:43 AM, Don Schwarz  wrote:

> To be clear,  just means the servlet will be *initialized*
> during the warmup request (not executed).
>
> For JSPs, this means that the jspInit() method is called.  If you override
> it to do something expensive this may provide a big benefit, but otherwise
> you will just get the benefit of loading the JSP infrastructure ahead of
> time.
>
> If you really want to execute a JSP as a warmup request, you should declare
> it explicitly with a  using  and them map it to
> /_ah/warmup.
>
> On Mon, May 16, 2011 at 5:36 PM, Ikai Lan (Google) wrote:
>
>> Yes. Warmup servlets are just URL for you to hit:
>>
>>
>> http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests
>>
>>
>> That
>> being said, why would you want to use a JSP as a warmup servlet? The code
>> will be easier to test/maintain in a servlet itself. Worst case scenario you
>> can always use JSP dispatch to the JSP.
>>
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> Blog: http://googleappengine.blogspot.com
>> Twitter: http://twitter.com/app_engine
>> Reddit: http://www.reddit.com/r/appengine
>>
>>
>>
>> On Sun, May 15, 2011 at 11:18 PM, Anders  wrote:
>>
>>> Is it possible to use a JSP page as a warmup Servlet in Google App Engine
>>> for Java?
>>>
>>> Example:
>>>
>>> 
>>> search
>>> /search.jsp
>>> 1
>>> 
>>>
>>> Sice JSP pages are compiled into Servlets this should work in theory,
>>> unless JSP pages and ordinary Servlets are treated differently under the
>>> hood.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] JSP page as Warmup Servlet

2011-05-16 Thread Anders Lindman
Good. I thought it would be convenient to use an already existing JSP page
as a warmup call. Plus, that makes it possible to ensure that the warmup
call actually accesses the real logic of the application. And if/when the
application changes, the warmup call will automatically reflect those
changes without having to maintain a separate warmup servlet.

Another thing that I'm not sure about yet is that maybe JSP pages get
recompiled for every new Google App Engine instance! Then it's important to
make warmup calls to all JSP pages that need to be compiled for fast first
access. For example by having a separate warmup JSP page that does dynamic
include of other JSP pages. Or maybe the compile if very fast nowadays. Or
maybe JSP pages that are already compiled remains compiled when new Google
App Engine instances are started. I have to research that.

JSP dispatch from a separate warmup servlet could be a good idea.

On Tue, May 17, 2011 at 12:36 AM, Ikai Lan (Google) wrote:

> Yes. Warmup servlets are just URL for you to hit:
>
>
> http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests
>
>
> That
> being said, why would you want to use a JSP as a warmup servlet? The code
> will be easier to test/maintain in a servlet itself. Worst case scenario you
> can always use JSP dispatch to the JSP.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>
>
> On Sun, May 15, 2011 at 11:18 PM, Anders  wrote:
>
>> Is it possible to use a JSP page as a warmup Servlet in Google App Engine
>> for Java?
>>
>> Example:
>>
>> 
>> search
>> /search.jsp
>> 1
>> 
>>
>> Sice JSP pages are compiled into Servlets this should work in theory,
>> unless JSP pages and ordinary Servlets are treated differently under the
>> hood.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update

2011-05-16 Thread Nischal
Sent the war to you.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Nischal Shetty
Here's how you GET using URLFetch :


URLFetchService fetchService =
URLFetchServiceFactory.getURLFetchService();
URL fetchURL = null;

HTTPResponse response = null;
String responseString = null;


try {

fetchURL = new URL("http://www.google.com";);
 response = fetchService.fetch(fetchURL);

int statusCode = response.getResponseCode();

if (statusCode == HttpStatus.SC_OK) {
 responseString = new String(response.getContent());
}
} catch (HttpException e) {
 } catch (IOException e) {
}



On 17 May 2011 04:53, Dennis Lo  wrote:

> Hi,
>
> I see.
>
> So a public backend would be:
>
>
> 
> 
> B2
> 5
> 
> true
> true
> 
> 
> 
>
> Also, what is urlfetch?
> I haven't used these before.
> Do you have any blogs, tutorials with a great example which illustrates how
> I could use it to call a backend.
>
> Alternatively, if you don't have any blogs,tutorials etc, could you explain
> with some examples?
>
>
>
> On Tue, May 17, 2011 at 3:49 AM, JakeP  wrote:
>
>> Dennis,
>>
>> I'm still trying to figure out the best way to call the backend
>> programmatically from within GAE. The simplest way I know of is with
>> urlfetch.
>>
>> Your backend has to be marked "public" for you to be able to access it
>> via 'spider' from outside of GAE - i.e. your browser.
>>
>> Thanks for the link.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>



-- 
-Nischal
+91-9920240474
twitter: NischalShetty 
facebook: Nischal 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-16 Thread Vik
   Hie

Trying to send a pdf created using pdfJet throws the exception


class javax.mail.SendFailedException:Send failure
(javax.mail.MessagingException: Converting attachment data failed)



The code is like:

 MimeBodyPart htmlPart = new MimeBodyPart();
htmlPart.setFileName("whatever.pdf");
htmlPart.setContent(out.toByteArray(), "application/pdf");
mp.addBodyPart(htmlPart);


logged issue 
http://code.google.com/p/googleappengine/issues/list?cursor=1764&updated=1764&ts=1305519190
does not seems to help.


Please advise.

Thankx and Regards

Vik
Founder
http://www.sakshum.org
http://blog.sakshum.org


On Sun, May 15, 2011 at 8:26 PM, Erick Fleming  wrote:

> You can use ByteArrayOutputStream 
> [1],
> then attach that to your mail message.  If you are using low-level api, then
> Attrachment 
> [2]
>  has
> a constructor for this.
>
> [1]
> http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html
> [2]
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/mail/MailService.Attachment.html
>
> On Sun, May 15, 2011 at 9:16 AM, Vik  wrote:
>
>>  Hie
>>
>> Just a little question. I am using this pdfJet thing.
>> The requirement for us is to create a pdf and then mail it to a user.
>>
>> So i am done with pdf creation part and at then end i have the code like:
>>
>> OutputStream out = resp.getOutputStream();
>> PDF pdf = new PDF(out);
>>
>> some actual writing.
>>
>>  pdf.flush();
>>  out.close();
>>
>> Now the question i have is after this step how do i actually get handle to
>> the created pdf above and attach it to an email ?
>>
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> http://www.sakshum.org
>> http://blog.sakshum.org
>>
>>
>> On Tue, Apr 20, 2010 at 1:52 PM, Patou 
>> wrote:
>>
>>> Hello
>>>
>>> In App Engine, You can't write a file to the file system. Otherwise
>>> the save method can't be used in GAE.
>>> Use this code to send the pdf to the navigator :
>>>
>>> pdf.wrap();
>>>
>>> String fileName = "Example_03.pdf";
>>>
>>> resp.setContentType("application/pdf");
>>> resp.setHeader("Content-Disposition", "attachment; filename=\"" +
>>> fileName + "\"");
>>> ServletOutputStream outs = resp.getOutputStream();
>>> pdf.getData().writeTo(outs);
>>>
>>> Or to save to the datastore :
>>> new Blob(pdf.getData().toByteArray());
>>>
>>> Bests Regards
>>>
>>> Patrice
>>>
>>> On Apr 20, 4:18 am, jeno  wrote:
>>> > Hi François ,
>>> >
>>> > Thanks for your help. I have used PDFjet (PDFJet.jar  version 2.72)
>>> > PDF class missing save method
>>> > So i cant call pdf.save("d.pdf") method.
>>> >
>>> > Cheers
>>> > jeno
>>> >
>>> > On Apr 19, 6:48 pm, François Masurel  wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Hi Jeno,
>>> >
>>> > > You can try the PDFjet Open Source Edition :
>>> http://pdfjet.com/os/edition.html
>>> >
>>> > > François
>>> >
>>> > > On 19 avr, 01:55, jeno  wrote:
>>> >
>>> > > > Hi Guys,
>>> >
>>> > > > Anyone know open source java  pdf engine for GAE.
>>> >
>>> > > > Thanks
>>> > > > Jeno
>>> >
>>> > > > --
>>> > > > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > > > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > > > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > > > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>> >
>>> > > --
>>> > > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "Google App Engine for Java" group.
>>> > To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> > For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-java@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengi

[appengine-java] Re: unable to send a pdf as attachment in mail

2011-05-16 Thread Vik
hie

anyone on this please?

Thankx and Regards

Vik
Founder
http://www.sakshum.org
http://blog.sakshum.org


On Mon, May 16, 2011 at 9:45 AM, Vik  wrote:

> Hie
>
> Trying to send a pdf created using pdfJet throws the exception
>
>
> class javax.mail.SendFailedException:Send failure 
> (javax.mail.MessagingException: Converting attachment data failed)
>
>
>
> The code is like:
>
>  MimeBodyPart htmlPart = new MimeBodyPart();
> htmlPart.setFileName("whatever.pdf");
> htmlPart.setContent(out.toByteArray(), "application/pdf");
> mp.addBodyPart(htmlPart);
>
>
> logged issue 
> http://code.google.com/p/googleappengine/issues/list?cursor=1764&updated=1764&ts=1305519190
>  does not seems to help.
>
>
> Please advise.
>
>
> Thankx and Regards
>
> Vik
> Founder
> http://www.sakshum.org
> http://blog.sakshum.org
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Dennis Lo
Hi,

I see.

So a public backend would be:



B2
5

true
true




Also, what is urlfetch?
I haven't used these before.
Do you have any blogs, tutorials with a great example which illustrates how
I could use it to call a backend.

Alternatively, if you don't have any blogs,tutorials etc, could you explain
with some examples?


On Tue, May 17, 2011 at 3:49 AM, JakeP  wrote:

> Dennis,
>
> I'm still trying to figure out the best way to call the backend
> programmatically from within GAE. The simplest way I know of is with
> urlfetch.
>
> Your backend has to be marked "public" for you to be able to access it
> via 'spider' from outside of GAE - i.e. your browser.
>
> Thanks for the link.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] JSP page as Warmup Servlet

2011-05-16 Thread Don Schwarz
To be clear,  just means the servlet will be *initialized*
during the warmup request (not executed).

For JSPs, this means that the jspInit() method is called.  If you override
it to do something expensive this may provide a big benefit, but otherwise
you will just get the benefit of loading the JSP infrastructure ahead of
time.

If you really want to execute a JSP as a warmup request, you should declare
it explicitly with a  using  and them map it to
/_ah/warmup.

On Mon, May 16, 2011 at 5:36 PM, Ikai Lan (Google) wrote:

> Yes. Warmup servlets are just URL for you to hit:
>
>
> http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests
>
>
> That
> being said, why would you want to use a JSP as a warmup servlet? The code
> will be easier to test/maintain in a servlet itself. Worst case scenario you
> can always use JSP dispatch to the JSP.
>
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>
>
> On Sun, May 15, 2011 at 11:18 PM, Anders  wrote:
>
>> Is it possible to use a JSP page as a warmup Servlet in Google App Engine
>> for Java?
>>
>> Example:
>>
>> 
>> search
>> /search.jsp
>> 1
>> 
>>
>> Sice JSP pages are compiled into Servlets this should work in theory,
>> unless JSP pages and ordinary Servlets are treated differently under the
>> hood.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] JSP page as Warmup Servlet

2011-05-16 Thread Ikai Lan (Google)
Yes. Warmup servlets are just URL for you to hit:

http://code.google.com/appengine/docs/java/config/appconfig.html#Warmup_Requests

That
being said, why would you want to use a JSP as a warmup servlet? The code
will be easier to test/maintain in a servlet itself. Worst case scenario you
can always use JSP dispatch to the JSP.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Sun, May 15, 2011 at 11:18 PM, Anders  wrote:

> Is it possible to use a JSP page as a warmup Servlet in Google App Engine
> for Java?
>
> Example:
>
> 
> search
> /search.jsp
> 1
> 
>
> Sice JSP pages are compiled into Servlets this should work in theory,
> unless JSP pages and ordinary Servlets are treated differently under the
> hood.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: HTTP request and response sizes have been increased to 32 MB.... NOT

2011-05-16 Thread Ikai Lan (Google)
This currently applies to outbound and inbound HTTP, not URLFetch.

We're working on increasing URLFetch limits but it isn't ready yet.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Thu, May 12, 2011 at 5:15 AM, aptest1 actiprocess wrote:

> Yes, we are also getting same problem.
>
> We are updated latest Google app engine 1.5, then if we try to upload the
> file more than 1 MB Its throwing the following exception.
>
> com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to
> API call urlfetch.Fetch() was too large.
>  at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:439)
> at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:412)
>  at
> com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:391)
>
> Please help us, whether Request size is increased to 32 MB or not ?
>
> Thanks
> Chandrashaker Gattu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Can we use the bulkuploader on the local environment?

2011-05-16 Thread ruskyn
Hi All,

Ive been through this article and it helps understand the concepts.

http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/

However, i do see that this is mostly for production environment. This
is not exactly helpful for me when i am working on my local setup. I
might have various scenarios where i need to save the datastore, flash
it and then again upload the data. For such situations, the uploader
mentioned above might not be useful. What are my options then?

Ikai,

it would be great if you could respond to this question

Thanks,
Arjun

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Enhancement Request - AppEngine Deploy Rollback

2011-05-16 Thread Ikai Lan (Google)
You'll want to star this issue:

http://code.google.com/p/googleappengine/issues/detail?id=1783&q=eclipse%20rollback&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Thu, May 12, 2011 at 5:13 PM, NitrousDigital wrote:

> I was recently deploying to AppEngine using the Google Plugin for
> Eclipse when my internet connection died. When my connection was
> restored, I tried to re-deploy my app and the deployment failed with a
> message stating something like "Someone else is deploying. Rollback
> using the command-line python script appcfg.py".
>
> I managed to repair the situation by using the following command:
>
> appcfg.sh --email=myacco...@gmail.com --passin rollback /path/to/
> application
>
> It would be more user-friendly if the rollback functionality were
> integrated into the GPE.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Unable to upload a New version of a Document in Google Documents - using java api

2011-05-16 Thread Ikai Lan (Google)
In general, you should post a stack trace. That being said, this isn't the
best forum to ask this message. Try asking here:

http://code.google.com/apis/documents/forum.html

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, May 13, 2011 at 3:48 AM, actiprocess actiprocess
wrote:

> Can we upload a new Version of Document to Google docs using the
> Java-GDocs-API?, If we use Following code the document content is getting
> replaced with new content.  but old version of the document is vanished.
>
> We are creating the document using the following code.
>
> *
> URL destFolderUrl = new URL("
> https://docs.google.com/feeds/default/private/full/
> "+libraryResourceId+"/contents");
>  DocumentListEntry newEntry = new DocumentEntry();
>   newEntry.setTitle(new PlainTextConstruct(fileName));
>   DocumentListEntry entry=client.insert(destFolderUrl, newEntry);
>
> *
> We are updating the document using the following code.
>
> *
> DocumentListEntry
> en=getDocumentListEntry(IntermResourceId,fileresid);//Getting the Document
> list entery of the File
>  en.setMediaSource(new MediaStreamSource(in, contentType));//Setting the
> new input stream
> DocumentListEntry updatedEntry = en.updateMedia(true);//updatting the
> entry.
>
> *
>
>
> Is the procedure to upload a new Version is correct.Is any another way to
> upload a new version.
>
>
> Thanks
> Chandrashaker Gattu
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update

2011-05-16 Thread Don Schwarz
This is very strange.  Can one of you send me your war directory?

On Mon, May 16, 2011 at 12:14 PM, Nischal Shetty
wrote:

> @Sean  Let's hope someone from the GAE team helps us. They've been super
> busy the entire last week. Hoping someone helps us out soon.
>
> If you come across a possible solution please do update this thread, I'll
> do the same.
>
>
> On 16 May 2011 00:11, svoeller  wrote:
>
>> I'm experiencing the same issue - stack trace is identical. Also using
>> struts 2.0 and also noticed this after attempting to upgrade to 1.5.
>>
>> On May 13, 11:32 am, Nischal  wrote:
>> > GAE team, need your help here.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>
>
> --
> -Nischal
> +91-9920240474
> twitter: NischalShetty 
> facebook: Nischal 
>
>  
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: basic jsp would not run

2011-05-16 Thread grigory
I have to mention that it runs fine locally in my dev. environment
(Eclipse with Google plugin).

On May 16, 3:38 pm, grigory  wrote:
> I am deploying simple jsp to upload files to blobstore - identical to
> one from the blobstore services introduction by 
> Google:http://code.google.com/appengine/docs/java/blobstore/overview.html
>
> Apparently something is wrong with my web.xml configuration as it
> fails:
>
> javax.servlet.ServletContext log: unavailable
> java.lang.NullPointerException
>         at org.apache.jsp.upload_jsp._jspInit(upload_jsp.java:24)
>         at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:91)
>         at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
> 440)
>         at
> org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
> 339)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 487)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
> 67)
>         at
> com.gwtplatform.dispatch.server.AbstractHttpSessionSecurityCookieFilter.doFilter(AbstractHttpSessionSecurityCookieFilter.java:
> 67)
>         at
> com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
> 129)
>         at
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
> 59)
>         at
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:
> 122)
>         at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
> 110)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
> 97)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>
> I use Guice servlet but I can see that jsp gets processed, it's just
> failing. I am on 1.4.2 version.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] basic jsp would not run

2011-05-16 Thread grigory
I am deploying simple jsp to upload files to blobstore - identical to
one from the blobstore services introduction by Google:
http://code.google.com/appengine/docs/java/blobstore/overview.html

Apparently something is wrong with my web.xml configuration as it
fails:

javax.servlet.ServletContext log: unavailable
java.lang.NullPointerException
at org.apache.jsp.upload_jsp._jspInit(upload_jsp.java:24)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:91)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
440)
at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
67)
at
com.gwtplatform.dispatch.server.AbstractHttpSessionSecurityCookieFilter.doFilter(AbstractHttpSessionSecurityCookieFilter.java:
67)
at
com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:
129)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
59)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:
122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
110)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)

I use Guice servlet but I can see that jsp gets processed, it's just
failing. I am on 1.4.2 version.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???

2011-05-16 Thread Paul Hammant
>
>
>
> I don't see how you can evolve and API is affected by which
> classloader provides it.
>

A config item in application admin panel could indicate which 'container
version' the app should run in.  That or something in the manifest file
inside the WAR file.

It is ultimately an arbitrary decision, no offense intended.

-ph

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Problem with Channel API

2011-05-16 Thread Matthew Smalley
Just tried it and of course the post now returns a 200 instead of 500 
response code, but still no message is sent. When I check the logs in the 
dashboard, I get a neatly reported stacktrace.

Just to make sure I understood you correctly, here's how I changed my 
sendMessage() method:

private void sendMessage(String channelKey, String message) {
ChannelService channelService = 
ChannelServiceFactory.getChannelService();
ChannelMessage theMessage = new ChannelMessage(channelKey, message);
try {
channelService.sendMessage(theMessage);
} catch (Exception e) {
logger.error("Error sending message", e);
}
}



Back to the drawing board :(.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???

2011-05-16 Thread Philippe Marschall


On May 12, 11:56 pm, Toby Reyelts  wrote:
> arjan,
>
> There are two sides to the App Engine API: the client and the server. The
> client side (appengine-api.jar) lives entirely in "user-land". If you so
> chose, you could create your own version of these classes.
> ...

But that's the case the other way too. For example spring-test
implements parts of the servlet-api as stubs for testing reasons.
That's not affected at all by which classloader servlet-api is
provided at runtime.

> Having this separation means that you can evolve the client and server
> independently. For example, dev_appserver and prod obviously have two
> different server backends for the same client API. You can take that one
> step further and even independently implement your own server if you so
> chose. It also means that its trivial to do things like test out and even
> deploy hotfixes for individual applications instead of waiting for full
> releases.

I don't see how you can evolve and API is affected by which
classloader provides it.

Cheers
Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Don Schwarz
On Mon, May 16, 2011 at 12:49 PM, JakeP  wrote:

> Dennis,
>
> I'm still trying to figure out the best way to call the backend
> programmatically from within GAE. The simplest way I know of is with
> urlfetch.
>
>
Yes, urlfetch requests from an app to one of its backends have been
optimized so they should be faster than general urlfetch calls.

However, you can also use the task queue to send tasks to your backends with
the new  option in queues.xml.


> Your backend has to be marked "public" for you to be able to access it
> via 'spider' from outside of GAE - i.e. your browser.
>
> Correct.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: any way to find all the namespaces used ?

2011-05-16 Thread Prashant
thanks :)

On Mon, May 16, 2011 at 5:14 PM, Didier Durand wrote:

> Hi,
>
> to my knowledge, app engine doesn't store used namespaces, it just
> uses the corresponding string as prefix to separate data & structure.
>
> If you want to remember all used namespaces, it's something that you
> have to handle by yourself: you create your system namespace then
> define an entity for describing namepaces( name, creation date, by
> whom, etc.) in this system namespaces and store those entities when
> you create a new user namespace.
>
> I.e. when you set a namepace, you check if not already exist and if
> not store in your system namespace
>
> regards
>
> didier
>
> On May 16, 12:43 pm, Prashant  wrote:
> > hi,
> >
> > is there any way to find out what namespaces i have used in my app ??
> >
> > thanks
> > Prashant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread JakeP
Dennis,

I'm still trying to figure out the best way to call the backend
programmatically from within GAE. The simplest way I know of is with
urlfetch.

Your backend has to be marked "public" for you to be able to access it
via 'spider' from outside of GAE - i.e. your browser.

Thanks for the link.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update

2011-05-16 Thread Nischal Shetty
@Sean  Let's hope someone from the GAE team helps us. They've been super
busy the entire last week. Hoping someone helps us out soon.

If you come across a possible solution please do update this thread, I'll do
the same.


On 16 May 2011 00:11, svoeller  wrote:

> I'm experiencing the same issue - stack trace is identical. Also using
> struts 2.0 and also noticed this after attempting to upgrade to 1.5.
>
> On May 13, 11:32 am, Nischal  wrote:
> > GAE team, need your help here.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
-Nischal
+91-9920240474
twitter: NischalShetty 
facebook: Nischal 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] SpringMVC RESTful + JSP + GAE/J .. 404 not found on JSPs..

2011-05-16 Thread jlc488
I've implemented a site using SpringMVC RESTful approaches. I did not
need any view such as JSP or Velocity and stuff at that time.

For some reason, I needed views using JSPs. Somehow It is showing 404
not found on JSPs or any views include HTMLs on Google AppEngine.

My requirements are

1) It should work as RESTful approach which means It returns JSON
formats of results according to the request. --> working like charm

2) It should be able to show the JSP result pages on such requests
like clicking User status confirmation link. --> 404 not found.

I suspect this would be the ViewResolver problems but I have no clue
about which resolver and how to use it properly.

My configurations are below.

--- start of restTask-servlet.xml -







































- end of restTask-servlet.xml ---

- start of JsonView Class ---

public class JsonView extends  AbstractView{

public static final String DEFAULT_CONTENT_TYPE = "application/json";

private ObjectMapper objectMapper = new ObjectMapper();

private JsonEncoding encoding = JsonEncoding.UTF8;

private boolean prefixJson = false;

private Set renderedAttributes;

public JsonView() {
setContentType(DEFAULT_CONTENT_TYPE);
}

public void setObjectMapper(ObjectMapper objectMapper) {
Assert.notNull(objectMapper, "'objectMapper' must not be null");
this.objectMapper = objectMapper;
}

public void setEncoding(JsonEncoding encoding) {
Assert.notNull(encoding, "'encoding' must not be null");
this.encoding = encoding;
}

public void setPrefixJson(boolean prefixJson) {
this.prefixJson = prefixJson;
}

/**
 * Sets the attributes in the model that should be rendered by this
view. When set, all other model attributes will be
 * ignored.
 */
public void setRenderedAttributes(Set renderedAttributes) {
this.renderedAttributes = renderedAttributes;
}

@Override
protected void prepareResponse(HttpServletRequest request,
HttpServletResponse response) {
response.setContentType(getContentType());
response.setCharacterEncoding(encoding.getJavaName());
}

@Override
protected void renderMergedOutputModel(Map model,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
model = filterModel(model);
JsonGenerator generator =
objectMapper.getJsonFactory().createJsonGenerator(response.getWriter());
if (prefixJson) {
generator.writeRaw("{} && ");
}
objectMapper.writeValue(generator, model);
}

/**
 * Filters out undesired attributes from the given model.
 *
 * Default implementation removes {@link BindingResult} instances
and entries not included in the {@link
 * #setRenderedAttributes(Set) renderedAttributes} property.
 */
protected Map filterModel(Map model)
{
Map result = new HashMap(model.size());
Set renderedAttributes = !
org.springframework.util.CollectionUtils.isEmpty(this.renderedAttributes) ?
this.renderedAttributes : model.keySet();
for (Map.Entry entry : model.entrySet()) {
if (!(entry.getValue() instanceof BindingResult) &&
renderedAttributes.contains(entry.getKey())) {
result.put(entry.getKey(), entry.getValue());
}
}
return result;
}
}

-- end of JsonView class ---

-- start of MyContentNegotiatingViewResolver


public class MyContentNegotiatingViewResolver extends
ContentNegotiatingViewResolver {

@Override
protected List getMediaTypes(HttpServletRequest request) {
List result = super.getMediaTypes(request);
if (result.size() == 1)
result = Arrays.asList(result.get(0));
return result;
}
}
-- end of MyContentNegotiatingViewResolver
--

--- start of web.xml ---


log4jConfigLocation
/WEB

[appengine-java] Sending channel message from task queue

2011-05-16 Thread Erick Fleming
I'm have problems sending a message via Channel API from a TaskQueue 
Handler.

Is it possible or have i missed some restriction in the docs?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Sending channel message from task queue

2011-05-16 Thread Erick Fleming
I figured out my problem, so yes it's possible.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Getting class cast exception in BackendServersFilter after 1.5 sdk update

2011-05-16 Thread svoeller
I'm experiencing the same issue - stack trace is identical. Also using
struts 2.0 and also noticed this after attempting to upgrade to 1.5.

On May 13, 11:32 am, Nischal  wrote:
> GAE team, need your help here.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Aaron Shepherd
I'm using this modified PMF class now and it seems to fix this
problem, with the caveat that I haven't done any heavy load testing
yet.

public final class PMF
{
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory("transactions-
optional");

private PMF()
{
}

public synchronized static PersistenceManagerFactory get()
{
return pmfInstance;
}

public synchronized static PersistenceManager
getPersistenceManagerInstance()
{
return pmfInstance.getPersistenceManager();
}
}

Aaron Shepherd
OnFast.com

On May 13, 11:13 am, Juha K  wrote:
> No, but I have single global instance of PersistenceManagerFactory, and from
> it I call getPersistenceManager() every time I need it.
>
> perjantaina 13. toukokuuta 2011 18.07.22 UTC+3 Ikai L (Google) kirjoitti:
>
>
>
>
>
> > Do you just have a single global instance of persistence manager, or do you
> > use the factory method?
>
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blog:http://googleappengine.blogspot.com
> > Twitter:http://twitter.com/app_engine
> > Reddit:http://www.reddit.com/r/appengine
>
> > On Thu, May 12, 2011 at 1:47 AM, Juha K  wrote:
>
> >> I've been running an application successfully for some time on the app
> >> engine. During last week I've couple of times tried enabling threadsafe in
> >> my app. It seems to randomly cause issues with retrieving or storing data
> >> with JDO. What I see when I start to get these issues is this (I've 
> >> replaced
> >> my apps class names with ---):
> >> java.lang.UnsupportedOperationException
> >> at
> >> org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.jav
> >>  a:62)
> >> at
> >> org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(Data
> >>  storeFieldManager.java:839)
> >>  at
> >> org.datanucleus.store.appengine.DatastoreFieldManager.storeStringField(Data
> >>  storeFieldManager.java:474)
> >> at
> >> org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStat
> >>  eManager.java:1023)
> >>  at ---.jdoProvideField(VAJDO.java)
> >> at ---.jdoProvideFields(VAJDO.java)
> >> at
> >> org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl
> >>  .java:2715)
> >>  at
> >> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProces
> >>  s(DatastorePersistenceHandler.java:341)
> >> at
> >> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(D
> >>  atastorePersistenceHandler.java:251)
> >>  at
> >> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(Da
> >>  tastorePersistenceHandler.java:240)
> >> at
> >> org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateMa
> >>  nagerImpl.java:3185)
> >>  at
> >> org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImp
> >>  l.java:3161)
> >> at
> >> org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.j
> >>  ava:1298)
> >>  at
> >> org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175
> >>  )
> >> at
> >> org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceM
> >>  anager.java:669)
> >>  at
> >> org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceMana
> >>  ger.java:694)
>
> >> I've seen the same exception also when calling
> >> PersistenceManager.getObjectById(). The call to these methods comes 
> >> directly
> >> from servlet requests.
>
> >> The error doesn't always happen, sometimes (especially for writes) when it
> >> starts to happen, it seems to happen to all writes. I've set threadsafe to
> >> false in my appengine-web.xml and the error goes away. But especially now
> >> knowing the upcoming change in the pricing, I'd like to be able to run my
> >> app multithreaded. My question is that is this a bug in the app engine, or
> >> should I be synchronizing JDO use in my app in order to run it with
> >> threadsafe=true?  
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine for Java" group.
> >> To post to this group, send email to google-app...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Problem with Channel API

2011-05-16 Thread Erick Fleming
I had this same error yesterday, but I put a try block around the code that
sends the message and it went away.

On Sun, May 15, 2011 at 3:10 AM, Matthew Smalley
wrote:

> Oops forgot the stack trace:
>
> (this is from the google appengine log viewer):
>
> Uncaught exception from servlet
> com.google.appengine.api.channel.ChannelFailureException: An unexpected error 
> occurred.
>   at 
> com.google.appengine.api.channel.ChannelServiceImpl.getExceptionForError(ChannelServiceImpl.java:112)
>   at 
> com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:68)
>   at 
> com.webstersmalley.chessweb.web.ChannelTestController.sendMessage(ChannelTestController.java:74)
>   at 
> com.webstersmalley.chessweb.web.ChannelTestController.getChannelTestMessage(ChannelTestController.java:68)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:43)
>   at 
> org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
>   at 
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
>   at 
> org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
>   at 
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
>   at 
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
>   at 
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
>   at 
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>   at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>   at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>   at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>   at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>   at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>   at org.mortbay.jetty.Server.handle(Server.java:326)
>   at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:439)
>   at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
>   at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>   at java.lang.Thread.run(Thread.java:636)
> Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: 
> ApplicationError: 2: Unknown
>   at 
> com.google.net.rpc.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:1050)
>   at 
> com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
>   at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
>   at 
> com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.ja

[appengine-java] Re: how to transfer request to a different servlet ?

2011-05-16 Thread Erick Fleming
One way is RequestDispatcher#forward 
[1
]

[1] 
http://download.oracle.com/javaee/5/api/javax/servlet/RequestDispatcher.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] how to transfer request to a different servlet ?

2011-05-16 Thread Erick Fleming
One way is the RequestDispatcher#forward
[1]
method

[1]
http://download.oracle.com/javaee/5/api/javax/servlet/RequestDispatcher.html

On Sun, May 15, 2011 at 7:00 AM, Prashant  wrote:

> hi,
>
> i want to use a common servlet (say MainServlet) to handle all the requests
> and based on url requested i want to transfer request to a different
> servlet. for example:
> if requested url is www.mydomain.com/* i want to send request to
> HomeServlet and if requested url is test.mydomain.com/* i want to send
> request to TestServlet.
>
> is it possible to transfer request from one servlet to another servlet ?
>
> will calling new HomeServlet().doGet() from MainServlet be same as
> MainServlet (or any other servlet configured in web.xml) invocation by GAE ?
>
> any GAE specific solution to this ?
>
>
> thanks in advance :)
>
> --
> Prashant
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Silence System.out and System.err in the logs?

2011-05-16 Thread Brian Henk
Hi all,

All my logging is done through a java.util.Logger, but some not so
nice libraries I'm using are writing to System.out and System.err. Is
there a way to keep those out of the log (preferably using something
in logging.properties)?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-16 Thread Erick Fleming
You can use ByteArrayOutputStream
[1],
then attach that to your mail message.  If you are using low-level api, then
Attrachment 
[2]
has
a constructor for this.

[1]
http://download.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html
[2]
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/mail/MailService.Attachment.html

On Sun, May 15, 2011 at 9:16 AM, Vik  wrote:

> Hie
>
> Just a little question. I am using this pdfJet thing.
> The requirement for us is to create a pdf and then mail it to a user.
>
> So i am done with pdf creation part and at then end i have the code like:
>
> OutputStream out = resp.getOutputStream();
> PDF pdf = new PDF(out);
>
> some actual writing.
>
>  pdf.flush();
>  out.close();
>
> Now the question i have is after this step how do i actually get handle to
> the created pdf above and attach it to an email ?
>
>
> Thankx and Regards
>
> Vik
> Founder
> http://www.sakshum.org
> http://blog.sakshum.org
>
>
> On Tue, Apr 20, 2010 at 1:52 PM, Patou wrote:
>
>> Hello
>>
>> In App Engine, You can't write a file to the file system. Otherwise
>> the save method can't be used in GAE.
>> Use this code to send the pdf to the navigator :
>>
>> pdf.wrap();
>>
>> String fileName = "Example_03.pdf";
>>
>> resp.setContentType("application/pdf");
>> resp.setHeader("Content-Disposition", "attachment; filename=\"" +
>> fileName + "\"");
>> ServletOutputStream outs = resp.getOutputStream();
>> pdf.getData().writeTo(outs);
>>
>> Or to save to the datastore :
>> new Blob(pdf.getData().toByteArray());
>>
>> Bests Regards
>>
>> Patrice
>>
>> On Apr 20, 4:18 am, jeno  wrote:
>> > Hi François ,
>> >
>> > Thanks for your help. I have used PDFjet (PDFJet.jar  version 2.72)
>> > PDF class missing save method
>> > So i cant call pdf.save("d.pdf") method.
>> >
>> > Cheers
>> > jeno
>> >
>> > On Apr 19, 6:48 pm, François Masurel  wrote:
>> >
>> >
>> >
>> >
>> >
>> > > Hi Jeno,
>> >
>> > > You can try the PDFjet Open Source Edition :
>> http://pdfjet.com/os/edition.html
>> >
>> > > François
>> >
>> > > On 19 avr, 01:55, jeno  wrote:
>> >
>> > > > Hi Guys,
>> >
>> > > > Anyone know open source java  pdf engine for GAE.
>> >
>> > > > Thanks
>> > > > Jeno
>> >
>> > > > --
>> > > > You received this message because you are subscribed to the Google
>> Groups "Google App Engine for Java" group.
>> > > > To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> > > > To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> > > > For more options, visit this group athttp://
>> groups.google.com/group/google-appengine-java?hl=en.
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups "Google App Engine for Java" group.
>> > > To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> > > For more options, visit this group athttp://
>> groups.google.com/group/google-appengine-java?hl=en.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Google App Engine for Java" group.
>> > To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> > For more options, visit this group athttp://
>> groups.google.com/group/google-appengine-java?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Map Reduce

2011-05-16 Thread Stephen Johnson
I have two questions on the Java version of mapreduce since the docs seem
pretty sparse.
1.) Is it possible to use mapreduce over a namespace and if so, how do you
configure it?
2.) Is only inputing entity keys and not the entire values supported on the
Java version and if so, how do I configure that as well?
Thanks,
Stephen

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Dennis Lo
Hi Jake,

So I finally got the backends to apper in the Admin UI.

Here is my backends.xml



B2
5

true




But I don't know how to call them.

I read this blog: 
http://pdjamez.com/2011/05/google-app-engine-backends/comment-page-1/

It looks like you just make servlert e.g. LongrunServlet.java and add an 
entry to you web.xml like so:


LongRun
com.example.app.longrunServlet


LongRun
/longrun


But when I try to execute it like:

http://spider.myapp.appspot.com/longrun

Error: Forbidden
Your client does not have permission to get URL / from this server.

Any help?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Dennis Lo
Hi Jake,

So I finally got the backends to apper in the Admin UI.

Here is my backends.xml



B2
5

true




But I don't know how to call them.

I read this blog: 
http://pdjamez.com/2011/05/google-app-engine-backends/comment-page-1/

It looks like you just make servlert e.g. LongrunServlet.java and add an 
entry to you web.xml like so:


LongRun
com.example.app.longrunServlet


LongRun
/longrun


But when I try to execute it like:

http://spider.myapp.appspot.com/longrun

Error: Forbidden
Your client does not have permission to get URL / from this server.

Any help?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: any way to find all the namespaces used ?

2011-05-16 Thread Didier Durand
Hi,

to my knowledge, app engine doesn't store used namespaces, it just
uses the corresponding string as prefix to separate data & structure.

If you want to remember all used namespaces, it's something that you
have to handle by yourself: you create your system namespace then
define an entity for describing namepaces( name, creation date, by
whom, etc.) in this system namespaces and store those entities when
you create a new user namespace.

I.e. when you set a namepace, you check if not already exist and if
not store in your system namespace

regards

didier

On May 16, 12:43 pm, Prashant  wrote:
> hi,
>
> is there any way to find out what namespaces i have used in my app ??
>
> thanks
> Prashant

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Dennis Lo
Hi Jake,

Thanks for you example on how to use the appcfg with backends.

I think the documentation really needs to include some solid examples on how 
to use appcfg.

I found this to be lacking in alot of parts through the Google App Engine 
documentation. 

Now, for the apppcfg parameters:

   -   needs to point to your app's war directory
   - [updates] you can leave blank or you can specify which once to deploy. 
   Other wise if it is black it will deploy all your backends defined in 
   backends.xml
   

For others reading this that are trying to figure out how to get your 
backends.xml to appear in the Admin UI you need to ensure you have the 
following:

1. A valid backends.xml file. This means the class elements and correct 
nesting of elements. Be care of using lower case b's in your class elements.
For example, a lower case b will cause the deploy to fail as it does not 
validate against the backends.xsd:



b2
1



You need to have something like




B2
1



2. Until a is fixes made, you'll probably need to use appcfg to make your 
backends appear in the admin UI.
Find your appcfg.sh and run '*chmod 755*' incase it doesn't have the 
permissions to execute. Then type:
*
*
*./appcfg.sh backends ~/pathToYourApp/AppFoldr/war/ update*

This will deploy your app to Google. It will ask for your email and 
password.

I left the parameter after update blank because I deploy the app with all my 
backends defined in my backends.xml.

You can alternatively use:
*./appcfg.sh backends ~/pathToYourApp/AppFoldr/war/ update spider*

This will target the 'spider' backend (as shown above)

I hope this helps!

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Backends.xml ERROR when deploying

2011-05-16 Thread Dennis Lo
Hi Jake,

Thanks for you example on how to use the appcfg with backends.

I think the documentation really needs to include some solid examples on how 
to use appcfg.

I found this to be lacking in alot of parts through the Google App Engine 
documentation. 

Now, for the apppcfg parameters:

   -   needs to point to your app's war directory
   - [updates] you can leave blank or you can specify which once to deploy. 
   Other wise if it is black it will deploy all your backends defined in 
   backends.xml
   

For others reading this that are trying to figure out how to get your 
backends.xml to appear in the Admin UI you need to ensure you have the 
following:

1. A valid backends.xml file. This means the class elements and correct 
nesting of elements. Be care of using lower case b's in your class elements.
For example, a lower case b will cause the deploy to fail as it does not 
validate against the backends.xsd:



b2
1



You need to have something like




B2
1



2. Until a is fixes made, you'll probably need to use appcfg to make your 
backends appear in the admin UI.
Find your appcfg.sh and run '*chmod 755*' incase it doesn't have the 
permissions to execute. Then type:
*
*
*./appcfg.sh backends ~/pathToYourApp/AppFoldr/war/ update*

This will deploy your app to Google. It will ask for your email and 
password.

I left the parameter after update blank because I deploy the app with all my 
backends defined in my backends.xml.

You can alternatively use:
*./appcfg.sh backends ~/pathToYourApp/AppFoldr/war/ update spider*

This will target the 'sortgames' backend (as shown above)

I hope this helps!

Cheers!


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] any way to find all the namespaces used ?

2011-05-16 Thread Prashant
hi,

is there any way to find out what namespaces i have used in my app ??

thanks
Prashant

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] .svn folders deleted under webapp on application launch

2011-05-16 Thread Mauricio Aristizabal
Hello all, I'm having a really weird issue in Eclipse (actually SpringSource 
Tool Suite 2.6.0), and I can't tell for sure that it's something with the 
Google Eclipse Plugin but that is the main suspect.

Whenever I launch the app locally all the .svn folders get deleted under my 
/webapp directory (but not elsewhere in the project).  It doesn't happen 
when the DataNucleus enhancer runs, or when I change a .jspx and the 
workspace rebuilds.  Can anyone shed some light?

My webapp is under  /src/main/

My views are specifically under 
 /src/main/webapp/WEB-INF/views 

In my project settings for Google/Web Application I have 'This project has a 
WAR directory' checked and pointed to src/main/webapp  

My build output path is set to /target/WEB-INF/classes

The app run config program arguments are: --port= 
/Users/mauricio/Dev/sts3/Commentous/src/main/webapp

This is all as explained in 
http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html
 

I created the project as a Spring Roo project from STS, and never altered 
the directory structure or anything in Maven.  Then I checked it all into 
SVN.


Any help much appreciated.

-Mauricio

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Facebook Login integration with java appengine

2011-05-16 Thread Heiko Roth
We use Janrain, too.
There, you can add a lot of other Logins once you have included
Janrain login.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Adding the Ability to Set a Beta or "Other" Version of an Application To A Domain

2011-05-16 Thread Heiko Roth
+1 for that feature

right now, I call my beta version just beta (beta.latest.appspot.com).
And I always deploy two times in a row (beta and xxx for current
version).
Now our testers test with beta.latest.appspot.com (the url is used in
mobile apps, Java programs and so on).

I would prefer setting up a beta url (beta.saas.de for beta tests and
apps.saas.de for default application), too.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.