回复: [appengine-java] Re: i have crea te a gwt project ,now when deploy the project w ith gae ,some problem has appear

2009-09-12 Thread 陈生
are you woman

 




发件人: 郑杰 tom@gmail.com
收件人: google-appengine-java@googlegroups.com
已发送: 2009/9/1(周二), 下午7:07:00
主题: [appengine-java] Re: i have create a gwt project ,now when deploy the 
project with gae ,some problem has appear

thank you,leszek,you are a good men!


2009/9/1 leszek leszek.ptokar...@gmail.com


It is a common problem. Read this thread:

http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/bce6630a3f01f23a/62cb1c4d38cc06c7?lnk=gstq=com.google.gwt.user.client.rpc.SerializationException%3A+Type+%27org.datanucleus.store.appengine.query.StreamingQueryResult%27+was+not+included+in+the+set+of+types+which+can+be+serialized+by+this+SerializationPolicy






  ___ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.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
-~--~~~~--~~--~--~---



[appengine-java] Re: sending binary data (serialized object) via TaskOptions.payload()

2009-09-12 Thread stumpy

Thanks for posting your solution. I ran up against this problem a few
days ago and thought I was missing something so started using GET
instead.


On Sep 11, 4:11 am, Vince Bonfanti vbonfa...@gmail.com wrote:
 After two days of banging my head against this, it turns out to be a
 bug in the development environment, but works fine on the production
 servers. Silly me for thinking you should make things work in
 development first before deploying to production...  ;-)

 Issue #2097 in case anyone's interested in the gory details.

 Vince

 On Wed, Sep 9, 2009 at 8:20 AM, Vince Bonfanti vbonfa...@gmail.com wrote:
  I'm trying to send binary data--a serialized Java object--via the
  TaskOptions.payload() method, but can't figure out how to send and/or
  read the data properly. First, I serialized an object to a byte[],
  which I know is working properly. Then I set the byte[] as the task
  payload via:

     TaskOptions.payload( byte[], contentType );

  I've tried different values for contentType;
  application/octet-stream and application/x-java-serialized-object
  seemed like the two most reasonable, but this seems to have no effect.

  In my task handler (a servlet), I read the data into a byte[] prior to
  object deserialization via the following:

    byte[] bytesIn = new byte[ req.getContentLength() ];
    req.getInputStream().readLine( bytesIn, 0, bytesIn.length );

  However, the byte[] I read in is not the same as the byte[] I wrote
  out. Here are the first few bytes of the array as I wrote it to
  TaskOptions.payload (this is cut-and-paste from the Eclipse debugger):

    -84, -19, 0, 5, 115, 114, 0, 38, 99, 111, 109, 46, 103, 111,

  and here are the first few bytes I read in, which is tantalizingly
  close to what was written out:

     63,  63, 5, 115, 114, 38, 99, 111, 109, 46, 103, 111

  So then I tried a different tack. I converted the byte[] to a string
  in the outward direction:

    TaskOptions.payload( new String( byte[] ) );

  and then used req.getReader() to read it in my task handler:

    byte[] bytesIn = req.getReader().readLine().getBytes();

  This time I got even closer to my original byte[], but it's still
  missing all of the 0 bytes:

    -84, -19,  5, 115, 114,  38, 99, 111, 109, 46, 103, 111, 111

  Note that in both cases, the content length reported in the request
  header is smaller than the byte[] length when I invoked
  TaskOptions.payload().

  How do I send a byte[] as the task payload? Any clues would be appreciated.

  Vince
--~--~-~--~~~---~--~~
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't deploy my first guestbook application

2009-09-12 Thread yellowblood

I followed the tutorial perfectly, yet I can't seem to deploy my
application.
At first, the deployment failed because it didn't find the javac
file, so I copied it. I also
Following some instructions I found, I edited the appcfg.cmd so it
points now to the real javac location (in C:\Program Files\Java
\jdk1.6.0_16\bin), and I also copied a file called tools.jar to the
app-engine SDK.

I'm running Windows XP, and using Esclipe +  Java App Engine + App
Engine Plugin.

Googled for hours and nothing.
Thanks.


Creating staging directory
Scanning for jsp files.
Compiling jsp files.
Compiling java files.
com.google.appengine.tools.admin.JspCompilationException: Failed to
compile the generated JSP java files.
12/09/2009 14:01:21 org.apache.jasper.JspC processFile
INFO: Built File: \guestbook.jsp
java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread main Could not find the main class:
com.sun.tools.javac.Main.  Program will exit.
Error while executing: C:\Program Files\Java\jre6\bin\javac.exe -
classpath /C:/Program Files/Eclipse/plugins/
com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031/appengine-
java-sdk-1.2.5/lib/impl/appengine-api-labs.jar;/C:/Program Files/
Eclipse/plugins/
com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031/appengine-
java-sdk-1.2.5/lib/impl/appengine-api-stubs.jar;/C:/Program Files/
Eclipse/plugins/
com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031/appengine-
java-sdk-1.2.5/lib/impl/appengine-api.jar;/C:/Program Files/Eclipse/
plugins/com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031/
appengine-java-sdk-1.2.5/lib/impl/appengine-local-runtime.jar;C:
\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\appengine-local-runtime-shared.jar;C:
\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\geronimo-el_1.0_spec-1.0.1.jar;C:\Program
Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\geronimo-jsp_2.1_spec-1.0.1.jar;C:\Program
Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\geronimo-servlet_2.5_spec-1.2.jar;C:\Program
Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-ant-1.6.5.jar;C:
\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-ant-
launcher-1.6.5.jar;C:\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-commons-
el-1.0.jar;C:\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-commons-
logging-1.1.1.jar;C:\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-jasper-
compiler-5.0.28.jar;C:\Program Files\Eclipse\plugins
\com.google.appengine.eclipse.sdkbundle_1.2.5.v200909021031\appengine-
java-sdk-1.2.5\lib\shared\jsp\repackaged-appengine-jasper-
runtime-5.0.28.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\classes;C:\DOCUME~1\yb
\LOCALS~1\Temp\appcfg5145010290416497529.tmp\WEB-INF\lib\appengine-
api-1.0-sdk-1.2.5.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\appengine-api-
labs-1.2.5.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\datanucleus-
appengine-1.0.3.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\datanucleus-
core-1.1.5.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\datanucleus-jpa-1.1.5.jar;C:
\DOCUME~1\yb\LOCALS~1\Temp\appcfg5145010290416497529.tmp\WEB-INF\lib
\geronimo-jpa_3.0_spec-1.1.1.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\geronimo-
jta_1.1_spec-1.1.1.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\jdo2-api-2.3-eb.jar;C:
\DOCUME~1\yb\LOCALS~1\Temp\appcfg5145010290416497529.tmp\WEB-INF\lib
\repackaged-appengine-ant-1.6.5.jar;C:\DOCUME~1\yb\LOCALS~1\Temp
\appcfg5145010290416497529.tmp\WEB-INF\lib\repackaged-appengine-ant-

[appengine-java] Re: Bulk update throws exception

2009-09-12 Thread Anita

Hi Jason,

Our schema looks as follows:
 ProductType 1-M Product 1M Release

Data is inserting into Release table. But while fetching data from
release table i am getting following exception:

Field com.ensarm.server.domain.Release.products should be able to
provide a reference to its parent but the entity does not have a
parent.  Did you perhaps try to establish an instance of
com.ensarm.server.domain.Release as the child of an instance of
com.ensarm.server.domain.Products after the child had already been
persisted?
org.datanucleus.exceptions.NucleusUserException: Field
com.ensarm.server.domain.Release.products should be able to provide a
reference to its parent but the entity does not have a parent.  Did
you perhaps try to establish an instance of
com.ensarm.server.domain.Release as the child of an instance of
com.ensarm.server.domain.Products after the child had already been
persisted?
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.lookupParent
(DatastoreRelationFieldManager.java:302)
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.fetchRelationField
(DatastoreRelationFieldManager.java:289)
at
org.datanucleus.store.appengine.DatastoreFieldManager.fetchObjectField
(DatastoreFieldManager.java:271)
at org.datanucleus.state.AbstractStateManager.replacingObjectField
(AbstractStateManager.java:1197)
at com.ensarm.server.domain.Release.jdoReplaceField(Release.java)
at com.ensarm.server.domain.Release.jdoReplaceFields(Release.java)
at org.datanucleus.state.JDOStateManagerImpl.replaceFields
(JDOStateManagerImpl.java:2772)
at org.datanucleus.state.JDOStateManagerImpl.replaceFields
(JDOStateManagerImpl.java:2791)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject
(DatastorePersistenceHandler.java:349)
at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo
(DatastoreQuery.java:384)
at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo
(DatastoreQuery.java:345)
at org.datanucleus.store.appengine.query.DatastoreQuery.access$700
(DatastoreQuery.java:96)
at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply
(DatastoreQuery.java:454)
at org.datanucleus.store.appengine.query.DatastoreQuery$5.apply
(DatastoreQuery.java:453)
at
org.datanucleus.store.appengine.query.StreamingQueryResult.resolveNext
(StreamingQueryResult.java:137)
at org.datanucleus.store.appengine.query.StreamingQueryResult
$1.computeNext(StreamingQueryResult.java:163)
at
org.datanucleus.store.appengine.query.AbstractIterator.tryToComputeNext
(AbstractIterator.java:132)
at org.datanucleus.store.appengine.query.AbstractIterator.hasNext
(AbstractIterator.java:127)
at org.datanucleus.store.appengine.query.StreamingQueryResult
$AbstractListIterator.hasNext(StreamingQueryResult.java:229)
at com.ensarm.server.servlet.GetData.getRelease(GetData.java:87)
at com.ensarm.server.servlet.GetData.doGet(GetData.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:124)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at 

[appengine-java] Re: Startup takes forever

2009-09-12 Thread stumpy

I have also noticed long startup times and spent some time attempting
to diagnose the problem.

The first thing I found was that the first time a jar file is used/
referenced a significant overhead is incurred, Typically 1-2 seconds
but sometimes as long as 30 in rare occasions (resulting in a
timeout). I hypothesis that jar files are being loaded from across the
network and are subject to the same timeouts and failures as accessing
the datastore.

By removing third party jar dependencies from my project and relying
more on standard jre libraries, startup time has improved.

Another thing worth nothing is that the java app engine sdk jar
contains useful libraries under the 'repackaged' package. I have
switch from using my own protocol buffer jar to using the app engine
repackaged version and this shaved a further second from startup time.

Secondly I would recommend minimising the size and count of 'resource'
files. By deafult everything in the war file is considered a resource.
By being more specific I shared a further 0.5 seconds from startup
presumably due to the decreased file transfer/copy/initialisation
overhead.

I eagery await the  future optimizations you mention as the current
situation is badly effecting the user experience.

Hope these suggestions help.

Ian
--~--~-~--~~~---~--~~
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] Howto configure datastore XML-mapping?

2009-09-12 Thread c0d3x

Hi,

I want to do the JDO (or maybe JPA) datastore mapping with XML insted
of annotations. I wrote an XML file like they did in the examples of
the DataNucleus documentation.

How do I configure the enhancer to find the XML file? I suppose I have
to configure this in the jdoconfig.xml, but I was not able to find
some documentation about this.

I can't believe I am the first one who wants to do this. Did I miss
something?

Any help would be appreciated. Thanks in advance.
--~--~-~--~~~---~--~~
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: [gae] [appengine-java] Howto configure datastore XML-mapping?

2009-09-12 Thread Allen Firstenberg
You're not the first one.  See this message from back in May:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/e3f87e4a9ae9b5c6/14384a8ec061a443?q=group:google-appengine-java+insubject:MetaData+insubject:XML#14384a8ec061a443

http://groups.google.com/group/google-appengine-java/browse_thread/thread/e3f87e4a9ae9b5c6/14384a8ec061a443?q=group:google-appengine-java+insubject:MetaData+insubject:XML#14384a8ec061a443And
this feature request:

http://code.google.com/p/googleappengine/issues/detail?id=1628
http://code.google.com/p/googleappengine/issues/detail?id=1628

On Sat, Sep 12, 2009 at 8:18 AM, c0d3x h3r0.c0...@googlemail.com wrote:


 Hi,

 I want to do the JDO (or maybe JPA) datastore mapping with XML insted
 of annotations. I wrote an XML file like they did in the examples of
 the DataNucleus documentation.

 How do I configure the enhancer to find the XML file? I suppose I have
 to configure this in the jdoconfig.xml, but I was not able to find
 some documentation about this.

 I can't believe I am the first one who wants to do this. Did I miss
 something?

 Any help would be appreciated. Thanks in advance.
 


--~--~-~--~~~---~--~~
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: Bulk writes to datastore

2009-09-12 Thread P64

Exactly!

I was hoping this update ( 
http://code.google.com/p/datanucleus-appengine/issues/detail?id=7
) would seriously improve bulk inserts. As it seems in practice you
can now do roughly 2-3 times as many inserts in the same ammount of
real and CPU time.

However this is still poor compared to what we're used to with
relational databases on a relatively poor hardware.

At the moment I can do a batch input of up to 300 entities (with a
couple of Integer and String properties) in a 30 second time window
and it costs me around 18 seconds of CPU time.

I have a roughly 1.5MB file which I have to download, parse it's
15.000 lines and insert them in database. I need no transactions in
this case, all entities can be standalone, I don't mine the order in
which they are written, could be parallel aswell as fas as I am
concerned. As it seems now, I have to download this file, slice it in
chunks of 300 lines, store each chunk in a database. Than I need to
put 50 tasks in a queue, each taking 30 seconds to read a chunk from
database, parse it in 300 seperate entities and store as such.

Just database writes to do that would cost me well over 15 CPU
minutes, not to mention the overhead caused by all the task spawning
and so on.

All that for an operation which litteraly takes seconds on my old box
running relational DB, which I use for testing purposes.

It's to complicated and it uses way to many resources to update 1000+
entities - and there are lots of applications that need to update data
from different sources (XML, SQL dumps, ...) on a daily basis.

On 12 sep., 02:30, Larry Cable larry.ca...@gmail.com wrote:
 So now, I am hitting Datastore timeouts and Request timeouts ...

 I really really think you guys need to add a mechanism that allows
 developers to simply do bulk uploads of data into their GAE
 applications (from Java thank 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
-~--~~~~--~~--~--~---



[appengine-java] java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.io)

2009-09-12 Thread Ravi Mandliya

Hello everyone I just uploaded my first application, its running, and
seems to be working fine,
but there is a problem, I get the following error when onblur() on the
textbox is activated, I have applied ajax which fetches the data from
Database(IBM DB2). It generates the following error:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.io)
Full error code is following:

java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:
117)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:
69)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.sql.DriverManager.getCallerClass(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.jsp.validate_jsp._jspService(validate_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at com.google.appengine.tools.development.PrivilegedJspServlet.access
$101(PrivilegedJspServlet.java:23)
at com.google.appengine.tools.development.PrivilegedJspServlet$2.run
(PrivilegedJspServlet.java:59)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.PrivilegedJspServlet.service
(PrivilegedJspServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)

--~--~-~--~~~---~--~~
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] Java Security Error

2009-09-12 Thread Ravi Mandliya

Hello everyone I just uploaded my first application, its running, and
seems to be working fine,
but there is a problem, I get the following error when onblur() on
the
textbox is activated, I have applied ajax which fetches the data from
Database(IBM DB2). It generates the following error:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.io)
Full error code is following:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
at java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
at java.lang.SecurityManager.checkPackageAccess(Unknown
Source)
at org.apache.jasper.servlet.JasperLoader.loadClass
(JasperLoader.java:
117)
at org.apache.jasper.servlet.JasperLoader.loadClass
(JasperLoader.java:
69)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.sql.DriverManager.getCallerClass(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.jsp.validate_jsp._jspService(validate_jsp.java:
65)
at org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
806)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service
(JspServlet.java:236)
at
com.google.appengine.tools.development.PrivilegedJspServlet.access
$101(PrivilegedJspServlet.java:23)
at com.google.appengine.tools.development.PrivilegedJspServlet
$2.run
(PrivilegedJspServlet.java:59)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.appengine.tools.development.PrivilegedJspServlet.service
(PrivilegedJspServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
806)
at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter
(ServletHandler.java:1093)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:121)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle
(WebAppContext.java:
405)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:54)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at
com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:313)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest
(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete
(HttpConnection.java:830)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:
514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
381)
at org.mortbay.io.nio.SelectChannelEndPoint.run
(SelectChannelEndPoint.java:396)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run
(BoundedThreadPool.java:442)

Thanks in advance
Regards
--~--~-~--~~~---~--~~
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 

[appengine-java] trailing /

2009-09-12 Thread markybob

is there a way to configure things so that a trailing slash is not
required for subdirectories?
for example, right now wheatoneye-web.appspot.com/album gives a 404,
and i'd like it to just go to wheatoneye-web.appspot.com/album/
instead of giving an error.  any help is much appreciated
--~--~-~--~~~---~--~~
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: Google AppEngine app deploy error: Unable to upload app: Unknown

2009-09-12 Thread gsw

Updated to java appengine sdk 1.2.5 and now still get similar: Unable
to upload app: null
--~--~-~--~~~---~--~~
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: Bulk writes to datastore

2009-09-12 Thread Larry Cable

I am wondering about writing a Servlet that would form/multi-part
upload large files and cache them in memcache then use the
cron API to trickle persist them into the DS over time ...

could maybe even get adventurous and put a filesystem-like API
over the cache ...

lemme know if anyone would be interested in this ... if there is
enough interest I'll put something together and open source it.

These timeouts in the DS and at the request while understandable
are a total PITA coding around them complicates the application
logic considerably ...

honestly I am begining to wonder if EC2 with a tomcat and a MySQL
or Derby DB in it might be a better way to go if you actually want
to store reasonable amounts of data.

I realize that this is an EA environment, but my feedback would be
that if you are aiming to provide a scalable web app and datastore,
there is little point in having either if the hosted application
cannot
store reasonable amounts of data in the 1st place.


On Sep 12, 8:37 am, P64 primo...@gmail.com wrote:
 Exactly!

 I was hoping this update 
 (http://code.google.com/p/datanucleus-appengine/issues/detail?id=7
 ) would seriously improve bulk inserts. As it seems in practice you
 can now do roughly 2-3 times as many inserts in the same ammount of
 real and CPU time.

 However this is still poor compared to what we're used to with
 relational databases on a relatively poor hardware.

 At the moment I can do a batch input of up to 300 entities (with a
 couple of Integer and String properties) in a 30 second time window
 and it costs me around 18 seconds of CPU time.

 I have a roughly 1.5MB file which I have to download, parse it's
 15.000 lines and insert them in database. I need no transactions in
 this case, all entities can be standalone, I don't mine the order in
 which they are written, could be parallel aswell as fas as I am
 concerned. As it seems now, I have to download this file, slice it in
 chunks of 300 lines, store each chunk in a database. Than I need to
 put 50 tasks in a queue, each taking 30 seconds to read a chunk from
 database, parse it in 300 seperate entities and store as such.

 Just database writes to do that would cost me well over 15 CPU
 minutes, not to mention the overhead caused by all the task spawning
 and so on.

 All that for an operation which litteraly takes seconds on my old box
 running relational DB, which I use for testing purposes.

 It's to complicated and it uses way to many resources to update 1000+
 entities - and there are lots of applications that need to update data
 from different sources (XML, SQL dumps, ...) on a daily basis.

 On 12 sep., 02:30, Larry Cable larry.ca...@gmail.com wrote:



  So now, I am hitting Datastore timeouts and Request timeouts ...

  I really really think you guys need to add a mechanism that allows
  developers to simply do bulk uploads of data into their GAE
  applications (from Java thank you).- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 work around 30 second request time limit?

2009-09-12 Thread hg

Hi,
I have a task that I need to run via cron. It takes a fair amount of
time - is there any way around the 30 second request time limit? I
tried Runtime.getRuntime().exec(java , but I get a permission
denied error.
Does anyone have any ideas?
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
-~--~~~~--~~--~--~---



[appengine-java] Problem to save a float number to Datastore

2009-09-12 Thread damenlon

Hi,

I am using Grails and JPA.

My problem is when saving latitude and longitude to Datastore as
Float, they were changed.

42.089105 was changed to 42.089104

Is there a solution to prevent that?

Thank 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: [giannim] [appengine-java] Any way to work around 30 second request time limit?

2009-09-12 Thread Gianni Mariani
On Sun, Sep 13, 2009 at 5:29 AM, hg hgo...@gmail.com wrote:


 Hi,
 I have a task that I need to run via cron. It takes a fair amount of
 time - is there any way around the 30 second request time limit? I
 tried Runtime.getRuntime().exec(java , but I get a permission
 denied error.
 Does anyone have any ideas?


Using Task Queues may help. The idea is that you break the job into 30
second or less chunks-o-work and queue them.

-- 
Gianni Mariani
Google, Sydney

--~--~-~--~~~---~--~~
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: how to handle multipart data in struts 2 ?

2009-09-12 Thread Dhamu

check this out http://code.google.com/p/gmultipart/ but its for Spring

On Sep 4, 8:45 am, sree sraj...@gmail.com wrote:
 I am unable to get the multipart data (fileetc.) from jsp/request
 (post).

 appengine sdk has been updated to 1.2.5.

 whereas the same can be achieved through servlets as described in How
 do I handle multipart form data? or How do I handlefileuploads to my
 app? in faq section.http://code.google.com/appengine/kb/java.html#fileforms

 how to achieve the above said through struts 2 action ?

 when I try to get thefilethrough the struts 2 action
 the following exception is thrown :

 java.security.AccessControlException: access denied
 (java.io.FilePermission C:\DOCUME~1\SRK~1.001\LOCALS~1\Temp
 \Jetty_127_0_0_1_8180_war-aref0x
 \upload_7ecc51fe_12383ed82aa__8000_.tmp write)
         at java.security.AccessControlContext.checkPermission
 (AccessControlContext.java:323)
         at java.security.AccessController.checkPermission
 (AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
 532)
         at com.google.appengine.tools.development.DevAppServerFactory
 $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139)
         at java.lang.SecurityManager.checkWrite(SecurityManager.java:962)
         at java.io.FileOutputStream.(FileOutputStream.java:169)
         at java.io.FileOutputStream.(FileOutputStream.java:131)
         at
 org.apache.commons.io.output.DeferredFileOutputStream.thresholdReached
 (DeferredFileOutputStream.java:123)
         at
 org.apache.commons.io.output.ThresholdingOutputStream.checkThreshold
 (ThresholdingOutputStream.java:220)
         at org.apache.commons.io.output.ThresholdingOutputStream.write
 (ThresholdingOutputStream.java:127)
         at org.apache.commons.fileupload.util.Streams.copy(Streams.java:101)
         at org.apache.commons.fileupload.util.Streams.copy(Streams.java:64)
         at org.apache.commons.fileupload.FileUploadBase.parseRequest
 (FileUploadBase.java:362)
         at
 org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse
 (JakartaMultiPartRequest.java:90)
         at org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.
 (MultiPartRequestWrapper.java:73)
         at org.apache.struts2.dispatcher.Dispatcher.wrapRequest
 (Dispatcher.java:698)
         at
 org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequ 
 est
 (FilterDispatcher.java:330)
         at org.apache.struts2.dispatcher.FilterDispatcher.doFilter
 (FilterDispatcher.java:390)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:121)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
         at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
--~--~-~--~~~---~--~~
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 

[appengine-java] Re: Get Multipart Data from the request

2009-09-12 Thread Dhamu

This might help http://code.google.com/p/gmultipart/

On Jul 22, 6:41 pm, Jason (Google) apija...@google.com wrote:
 As indicated in the Will it play in App Engine page, you will not be able
 to use the traditional Apache Commons FileUpload API since it relies on
 java.io.File which is not a supported class. App Engine does not allow
 applications to write to the file system, so the DiskFileItem error thrown
 makes sense. You should be able to use the Streaming API or a custom
 solution like the one in this 
 thread:http://groups.google.com/group/google-appengine-java/browse_thread/th...

 - Jason



 On Tue, Jul 21, 2009 at 7:21 AM, sree sraj...@gmail.com wrote:

  How to get multipart data from the request in struts2 action ?

  when a request with multipart data is sent to struts2 action following
  exception is thrown

  Uncaught exception from servlet
  java.lang.NoClassDefFoundError: Could not initialize class
  org.apache.commons.fileupload.disk.DiskFileItem
         at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem
  (DiskFileItemFactory.java:196)
         at org.apache.commons.fileupload.FileUploadBase.parseRequest
  (FileUploadBase.java:358)
         at
  org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse
  (JakartaMultiPartRequest.java:90)
         at
  org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.init
  (MultiPartRequestWrapper.java:73)
         at org.apache.struts2.dispatcher.Dispatcher.wrapRequest
  (Dispatcher.java:698)
         at

  org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequ 
  est
  (FilterDispatcher.java:330)
         at org.apache.struts2.dispatcher.FilterDispatcher.doFilter
  (FilterDispatcher.java:390)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
         at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
  (SaveSessionFilter.java:35)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
         at
  com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
  (TransactionCleanupFilter.java:43)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
  (ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle
  (ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle
  (SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle
  (SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle
  (ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
  405)
         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
  (AppVersionHandlerMap.java:237)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
  (HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at
  org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
  506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
  (HttpConnection.java:830)
         at
  com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
  (RpcRequestParser.java:76)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at

  com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques 
  t
  (JettyServletEngineAdapter.java:139)
         at com.google.apphosting.runtime.JavaRuntime.handleRequest
  (JavaRuntime.java:235)
         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
  $6.handleBlockingRequest(RuntimePb.java:4823)
         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
  $6.handleBlockingRequest(RuntimePb.java:4821)
         at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
  (BlockingApplicationHandler.java:24)
         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
  359)
         at com.google.net.rpc.impl.Server$2.run(Server.java:820)
         at com.google.tracing.LocalTraceSpanRunnable.run
  (LocalTraceSpanRunnable.java:56)
         at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
  (LocalTraceSpanBuilder.java:516)
         at com.google.net.rpc.impl.Server.startRpc(Server.java:775)
         at com.google.net.rpc.impl.Server.processRequest(Server.java:348)
         at com.google.net.rpc.impl.ServerConnection.messageReceived
  (ServerConnection.java:436)
         at com.google.net.rpc.impl.RpcConnection.parseMessages
  (RpcConnection.java:319)
         at com.google.net.rpc.impl.RpcConnection.dataReceived
  (RpcConnection.java:290)
         at com.google.net.async.Connection.handleReadEvent(Connection.java:
  428)
         at com.google.net.async.EventDispatcher.processNetworkEvents
  (EventDispatcher.java:762)
         at com.google.net.async.EventDispatcher.internalLoop
  (EventDispatcher.java:207)
         at 

[appengine-java] How can I use GAE for Java?

2009-09-12 Thread Aizai Taxiang

I have some doubts about ge GAE for java .
On the follow page we can see The Java runtime is now available for
anyone to use, so please give it a try and send us your feedback. But
on the simple chinese page,the introduction is Our support for the
Java language is still under development and we're eager to get your
help and input. For now, access will be limited to the first 10,000
developers who sign up, but we'll be including more as soon as
possible. Give it a try and send us your feedback.
Is it means the GAE for java will not supported for China?

Waiting for the answer,thanks!
http://code.google.com/intl/en/appengine/

--~--~-~--~~~---~--~~
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: Compile and execute at runtime

2009-09-12 Thread Clint

I'm having a similar issue when using the Janino compiler in Drools,
(after I patched Drools' use of unauthorized class loader behavior,
that is).  I'd like to understand better how to patch Janino?

On Aug 31, 11:08 am, Toby Reyelts to...@google.com wrote:
 Thanks for filing the issue. As it stands right now, you won't be able to
 load any classes from javax.tools, regardless of whether your intent is or
 is not to write to the file system. If you want to implement the javax.tools
 API, you'll need to use a different package (e.g. my.javax.tools.*). Another
 possibility is that you can patch janino's
 ReflectionIClass.getDeclaredIClasses2 to work without reflection. You should
 be able to get access to the declared classes just by looking at the class
 files corresponding to a class.

 On Sat, Aug 29, 2009 at 9:17 AM, Albert Attard albertatt...@gmail.comwrote:

  Hey Toby:

  Hope you had a nice weekend.

  Just did: issue 
  2042http://code.google.com/p/googleappengine/issues/detail?id=2042
  What other option do I have? Is it possible to include a library (a jar
  file) similar to janino which makes use of the *javax.tools* but does not
  write to the file system? All persistence happens to the datastore similar
  to the: gaevfs http://code.google.com/p/gaevfs/. I was thinking of
  writing a small API using the *javax.tools* and expose an interface. Then
  will use this interface to compile and execute code at runtime.

  Possible?
  Albert Attard

  Stephen 
  Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html - 
  I detest life-insurance agents: they always argue that I shall some day
  die, which is not so.

  2009/8/29 Toby Reyelts to...@google.com

  Hey Albert,

  I've tracked this down to an oversight on our part. Mind filing an issue?

  On Fri, Aug 28, 2009 at 3:06 AM, Albert Attard 
  albertatt...@gmail.comwrote:

  Hey Toby:
  Thanks for your input.

  Following is the stack trace for the other problem I was talking about.
  Locally Janino compiles this without any issues, but it's throwing the
  following exception when executed on the app-engine.

  JaninoJavaAssessorHelper compile: THROW
  java.security.AccessControlException: access denied 
  (java.lang.RuntimePermission accessDeclaredMembers)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkMemberAccess(Unknown Source)
     at java.lang.Class.checkMemberAccess(Unknown Source)
     at java.lang.Class.getDeclaredClasses(Unknown Source)
     at 
  org.codehaus.janino.ReflectionIClass.getDeclaredIClasses2(ReflectionIClass.java:101)
     at org.codehaus.janino.IClass.getDeclaredIClasses(IClass.java:252)
     at org.codehaus.janino.IClass.findMemberType(IClass.java:617)
     at org.codehaus.janino.IClass.findMemberType(IClass.java:634)
     at org.codehaus.janino.IClass.findMemberType(IClass.java:604)
     at 
  org.codehaus.janino.UnitCompiler.findMemberType(UnitCompiler.java:8011)
     at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:4022)
     at org.codehaus.janino.UnitCompiler.access$102(UnitCompiler.java:3990)
     at 
  org.codehaus.janino.UnitCompiler$16.visitReferenceType(UnitCompiler.java:3936)
     at org.codehaus.janino.Java$ReferenceType.accept(Java.java:1868)
     at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:3969)
     at org.codehaus.janino.UnitCompiler.access$136(UnitCompiler.java:3927)
     at 
  org.codehaus.janino.UnitCompiler$31.getParameterTypes(UnitCompiler.java:6674)
     at org.codehaus.janino.IClass$IMethod.getDescriptor(IClass.java:762)
     at org.codehaus.janino.IClass.getIMethods(IClass.java:180)
     at org.codehaus.janino.IClass.getIMethods(IClass.java:169)
     at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:328)
     at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:313)
     at 
  org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:286)
     at 
  org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:701)
     at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:292)
     at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:270)
     at 
  org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:423)
     at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:231)
     at org.codehaus.janino.Cookable.cook(Cookable.java:72)
     at org.codehaus.janino.Cookable.cook(Cookable.java:64)
     at org.codehaus.janino.Cookable.cook(Cookable.java:114)
     at 
  com.albertattard.askme.server.utils.JaninoJavaAssessorHelper.compile(JaninoJavaAssessorHelper.java:30)
     at 
  com.albertattard.askme.server.BuilderServiceImpl.validateAssessor(BuilderServiceImpl.java:40)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 

[appengine-java] Redirect back to non-SSL

2009-09-12 Thread WY

Hi all,

I managed to configure my web.xml file to redirect all pages ending
with *.dos to be handled by ssl with the following:
   security-constraint
web-resource-collection
url-pattern/*.dos/url-pattern
/web-resource-collection
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

However, I would like it to redirect back to non ssl (http) for all
pages ending with *.do. I tried to define another security constraint
with the following:
security-constraint
web-resource-collection
url-pattern/*.do/url-pattern
/web-resource-collection
user-data-constraint
transport-guaranteeNONE/transport-guarantee
/user-data-constraint
/security-constraint

However, after it successfully goes to https, subsequent pages which
end in *.do doesn't get redirected back to http.
I know that in python, the way to do this is by using secure: never.
Is there an equivalent for the web.xml file?

Thanks for 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] JDO startsWith for Japanese does not work on production server

2009-09-12 Thread Yasuo Higa

Hi all,

JDO startsWith for Japanese works fine on development server,
but it does not work on production server.

The following url is my test application.
http://2.latest.higayasuo.appspot.com/blog/

Test code:
Query query = pm.newQuery(Blog.class, content.startsWith(:content));
ListBlog blogList = (ListBlog)
  query.execute(request.getParameter(content));
request.setAttribute(blogList, blogList);

Blog.java:
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Blog {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName = datanucleus, key = gae.encoded-pk,
value = true)
private String key;

@Persistent
private String title;

@Persistent
private String content;

...
}

My jsp's encoding is UTF-8.

Is there a workaround?

Thanks,

Yasuo Higa

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---