[appengine-java] Re: JAXB Support

2010-04-11 Thread Raj
I was facing similar issue and use of 2.1.12 version of JAXB reference
implementaion fixed the issue..Thanks

On Apr 6, 10:41 pm, Toby Reyelts to...@google.com wrote:
 It looks like you're bundling the latest 2.2 JAXB RI. Apparently they made a
 change in that release which requires access to the protected method,
 ClassLoader.findLoadedClass. This makes it incompatible with App Engine. If
 you can use the previous release (2.1.2), a built-in version of JAXB, or
 even possibly a different implementation of 2.2, then you shouldn't see this
 problem anymore.

 On Tue, Apr 6, 2010 at 7:43 AM, Brian hannawaybr...@googlemail.com wrote:
  I've been working with the tutorial mentioned above and it runs fine
  in my local environment, but when I deploy to GAE JAXB is throwing the
  exception detailed above. I'm baffled as to why this is running
  locally but failing on GAE. I though the local environment was
  supposed to replicate the actual GAE production environment?

 The local environment is just a simulation of the production environment. We
 put a lot of effort into emulating it, but there are some edge-cases that
 are much more difficult to handle than others.



   Does
  anyone have any ideas? I'm really stuck with this one...

  On 2 Apr, 17:37, L. Kirven lrkir...@gmail.com wrote:
   Brian,

   I am doing exactly the same thing.  I followed the blog below and didn't
   have any problems.  I hope that this helps.

  http://tugdualgrall.blogspot.com/2010/02/create-and-deploy-jax-rs-res...

   On Fri, Apr 2, 2010 at 9:55 AM, Brian hannawaybr...@googlemail.com
  wrote:
Hi,
I've run into an issue with JAXB on GAE. I have set up a simple
project using Jersey to expose a RESTful web service and am using JAXB
for marshalling/unmarshalling. The project runs fine in my local
eclipse environment but when I upload to GAE and send a request to the
web service I am getting a JAXB exception (see stack trace below). I
am using the latest version of JAXB and the latest version of GAE SDK.
According to the white list JAXB should now be supported so I'm not
sure what's going on. Any help to resolve this issue would be greatly
appreciated.

Uncaught exception from servlet
java.lang.ExceptionInInitializerError
       at

  com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorIn
  jector.java:
79)
       at

  com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(Optimi
  zedAccessorFactory.java:
165)
       at com.sun.xml.bind.v2.runtime.reflect.Accessor
$FieldReflection.optimize(Accessor.java:256)
       at

  com.sun.xml.bind.v2.runtime.property.ArrayProperty.init(ArrayProperty.jav
  a:
65)
       at

  com.sun.xml.bind.v2.runtime.property.ArrayERProperty.init(ArrayERProperty
  .java:
84)
       at

  com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.init(ArrayEleme
  ntProperty.java:
96)
       at

  com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.init(ArrayE
  lementNodeProperty.java:
58)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
       at
  sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
       at
  java.lang.reflect.Constructor.newInstance(Constructor.java:33)
       at

  com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory
  .java:
124)
       at

  com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.init(ClassBeanInfoImpl.java
  :
179)
       at

  com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.jav
  a:
515)
       at

  com.sun.xml.bind.v2.runtime.JAXBContextImpl.init(JAXBContextImpl.java:
330)
       at com.sun.xml.bind.v2.runtime.JAXBContextImpl
$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
       at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
154)
       at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
121)
       at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
202)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
  Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at
  javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:159)
       at javax.xml.bind.ContextFinder.find(ContextFinder.java:311)
       at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
       at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
       at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
       at

  

[appengine-java] JSP problem with forced naming when trying to pass init-param to JSP

2010-04-11 Thread powell...@gmail.com
In volume 2 of CoreServlets and JavaServer Pages, Marty Hall
recommends using a url-pattern for the JSP to match its original URL.
However, I cannot do this in Appengine and provide init-param for the
JSP page.

If I have a InitPage.jsp shown below in the war folder, (war/
InitPage.jsp)  and if I have a url-pattern of /InitPage.jsp  shown in
below web.xml then I will get a 500 Server Error each time with a
error log description of  java.lang.IllegalStateException: No forced
path servlet for /InitPage.jsp

Is there any way that I can have a jsp in the war folder with the same
name for a URL-Pattern and pass intialization parameters to the page.

Thanks
Dave

InitPage.jsp
=
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEADTITLEJSP Init Test/TITLE/HEAD
BODY BGCOLOR=#FDF5E6
H2Init Parameters:/H2
UL
  LIFirst name: %= firstName %
  LIEmail address: %= emailAddress %
/UL
/BODY/HTML
%!
private String firstName = First name is missing.;
private String emailAddress = Email address is missing;

public void jspInit() {
  ServletConfig config = getServletConfig();
  if (config.getInitParameter(firstName) != null) {
firstName = config.getInitParameter(firstName);
  }
  if (config.getInitParameter(emailAddress) != null) {
emailAddress = config.getInitParameter(emailAddress);
  }
}
%

web.xml
===
?xml version=1.0 encoding=utf-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://
java.sun.com/xml/ns/javaee/web-app_2_5.xsd
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
  version=2.5

  servlet
servlet-nameInitPage/servlet-name
jsp-file/InitPage.jsp/jsp-file
init-param
  param-nameemailAddress/param-name
  param-valuega...@oracle.com/param-value
/init-param
init-param
  param-namefirstName/param-name
  param-valueBill/param-value
/init-param
  /servlet
  servlet-mapping
servlet-nameInitPage/servlet-name
url-pattern/InitPage.jsp/url-pattern
  /servlet-mapping
/web-app

-- 
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-j...@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: Appstats not working. /stats = 404

2010-04-11 Thread Taylor Leese
Using /appstats/stats is still redirecting back to /appstats/stats for
me. It ends up giving a 404 error because it's not redirecting
properly. These are the http headers showing the infinite redirect
loop. Is this working for other people?

http://mysite.appspot.com/appstats/stats

GET /appstats/stats HTTP/1.1
Host: mysite.appspot.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: USER_LOCALE=en_US; JSESSIONID=POTIUPPpEmjHZoaNDWOSTA;
ACSID=AJKiYcHiwT8jH7e01V9O5iFu3kpBhDd3k3oBwwxylv5u0DbJ-
utvdpsgdb4Xim2WXwobkJmgTGGljvuh94_yVQ__-
VPnBsTtUAhRjSyZ2Lv3G7oUHAxTsCWHJIMChGT3-
XUyUNx8wxwvJisL_RTXH8Hc4TTLh_rVHm2k8gk8kgdbVZXexSV0K-
a3coELTecWIBolt0qLd5L-5vALm382KsqbHorPXqoZMPTvR_06g_mR1cbmF2Ihnk6YhP7no58BNpESM9HvFyKNKXODo39hF4oaZCcW0Q9TBqUMgsrBqlcIh3-
VvC7qvH0n_nAtrLTBbK_swnOFvCDcaf3whT9ty0CJ0VRNuNqIPOLHIeQAMgwXUNMr89P64EsgmuyONHR67glCQXEPOGXIaT1vcBJFwFoeNUqjdp824fHvoVhaL7Xlav-
LTIFuM3f_ymHLmibk57PRuXUYEaAG

HTTP/1.1 302 Found
Location: http://mysite.appspot.com/appstats/stats
X-AppEngine-Estimated-CPM-US-Dollars: $0.645553
X-AppEngine-Resource-Usage: ms=18965 cpu_ms=27884 api_cpu_ms=0
Set-Cookie:
ACSID=AJKiYcF_YA7PB18b3T5OO7vEMo31f1hFhO8xKqFRiBUGrCr4YABAAyugZXcDfKMOM-
r0FiK8xlOPfQWx3tOWIJ6ueOqK89X8M9YfHIs8WKUcSs6PwNZSKV0HKxvbqeWxfZI_cpo2YoS73s_RPlyEvjaYLOf6iXPpWeYyKTAbSqPOEBnVnTk3oso6ur66CIj3FnN8vsHfbanqY4sbaRsNj9pLjWZco0quYLOK1fd4wRZx_oAvk3jOlfAj7BZ7p9L1bO8oVCMpVn19cwT6zvO2-9RSjfiOPAacw7Cg0MT30r7Fr7SCj7VcSPAye4lc7tb9KL9ztZEk0xbEX-9vC6vHM_VfPJ54Kb_FycxE6lACsKTE4hj0bOa2-2quaOP0NSxfoH9ozLlQQCsGhpWBnlu__W06D0GqDqxcDUu2HocYqWuLi91aoa-
aRTkqB_qo4aAa3OvHeKoFgwrS; expires=Mon, 12-Apr-2010 19:41:49 GMT;
path=/
Date: Sun, 11 Apr 2010 19:42:08 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, must-revalidate
Content-Type: text/html
Server: Google Frontend
Content-Length: 0
--
http://mysite.appspot.com/appstats/stats

GET /appstats/stats HTTP/1.1
Host: mysite.appspot.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:
1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cookie: USER_LOCALE=en_US; JSESSIONID=POTIUPPpEmjHZoaNDWOSTA;
ACSID=AJKiYcF_YA7PB18b3T5OO7vEMo31f1hFhO8xKqFRiBUGrCr4YABAAyugZXcDfKMOM-
r0FiK8xlOPfQWx3tOWIJ6ueOqK89X8M9YfHIs8WKUcSs6PwNZSKV0HKxvbqeWxfZI_cpo2YoS73s_RPlyEvjaYLOf6iXPpWeYyKTAbSqPOEBnVnTk3oso6ur66CIj3FnN8vsHfbanqY4sbaRsNj9pLjWZco0quYLOK1fd4wRZx_oAvk3jOlfAj7BZ7p9L1bO8oVCMpVn19cwT6zvO2-9RSjfiOPAacw7Cg0MT30r7Fr7SCj7VcSPAye4lc7tb9KL9ztZEk0xbEX-9vC6vHM_VfPJ54Kb_FycxE6lACsKTE4hj0bOa2-2quaOP0NSxfoH9ozLlQQCsGhpWBnlu__W06D0GqDqxcDUu2HocYqWuLi91aoa-
aRTkqB_qo4aAa3OvHeKoFgwrS

HTTP/1.1 302 Found
Location: http://mysite.appspot.com/appstats/stats
X-AppEngine-Estimated-CPM-US-Dollars: $0.002243
X-AppEngine-Resource-Usage: ms=64 cpu_ms=93 api_cpu_ms=0
Date: Sun, 11 Apr 2010 19:42:08 GMT
Content-Type: text/html
Server: Google Frontend
Content-Length: 0

-- 
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-j...@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] Hibernate support for Google App Engine (Cloud2db)

2010-04-11 Thread Sandeep Sathaye
Hi Everyone,

Cloud2db http://www.cloud2db.com/ is pleased to announce the availability
of Hibernate framework on Google App Engine. Now you can use Hibernate to
access Cloud2db instances running on Google App Engine (Bigtable Datastore).
You can also use Hibernate tools like database reverse engineering plugin
directly against Cloud2db instances running on Google App Engine.

You will need to install Cloud2db and register your appspot prior to
deploying the Hibernate framework. Here are links to Download
http://cloud2db.appspot.com/website/download.htmland
Registrationhttp://cloud2db.appspot.com/website/registration.html
.

Here are the links to Hibernate distribution and a code sample.

http://cloud2db.appspot.com/website/distributions/hibernate_dist.zip
http://cloud2db.appspot.com/website/distributions/hibernate_sample.zip

Please deploy Hibernate JAR files and sample code in your GAE environment.

Please run the TestServer.java Servlet from the sample code to test the
Hibernate functionality. Please make sure that this Servlet is accessed as
an Admin resource by using the following entry in your web.xml file (use
your servlet URL in url-pattern tag).

  security-constraint
web-resource-collection
 url-pattern/url-pattern
/web-resource-collection
auth-constraint
   role-nameadmin/role-name
/auth-constraint
  /security-constraint

Thanks,

Sandeep Sathaye
Founder and Chief Architect
Cloud2db

-- 
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-j...@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] Spring LTW (load time weaving)

2010-04-11 Thread Felipe
Anyone knows if I can use GAE with Spring LTW???

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-j...@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: Error while Using the Datastore with JDO

2010-04-11 Thread Smitha Kamath
Hi,

It works fine now. @PersistenceCapable made it work. This was the only
line missing in the class that I had written. Thanks a ton for your help.

Regards,
Smitha.

On Sat, Apr 10, 2010 at 9:09 PM, Smitha Kamath namrat...@gmail.com wrote:

 Thanks a lot for your response.I will check that again and if it still
 doesn't work I shall post the class.
 The fact is that I tried out the Greetings sample in another project and it
 worked fine. So I was trying to develop one of my own.

 Thanks again for both your responses. I will get back to you at the earlist
 with more details.

 Thanks  Regards,
 Smitha.


 On 4/10/10, Ikai L (Google) ika...@google.com wrote:

 That's my suspicion as well. Guess we'll have to wait and see.


 On Fri, Apr 9, 2010 at 2:01 PM, David Sowerby 
 david.sowe...@virgin.netwrote:

 I usually find I get this when the class I am trying to persist
 doesn't have the @PersistenceCapable annotation, or more often, where
 one of its ancestors hasn't.

 On Apr 9, 6:47 pm, Ikai L (Google) ika...@google.com wrote:
  Can you post the class?
 
 
 
 
 

   On Fri, Apr 9, 2010 at 5:49 AM, Smitha namrat...@gmail.com wrote:
   I'm trying to create a JDO object, create a table and assign values
 to
   it.
 
   But I'm getting the following error when i try to run it although I
   have enhanced it and I'm using the Google Plugin for eclipse to build
   it.
 
   The class The class com.store.db.UserDetails is not persistable.
   This means that it either hasnt been enhanced, or that the enhanced
   version of the file is not in the CLASSPATH (or is hidden by an
   unenhanced version), or the Meta-Data/annotations for the class are
   not found. is not persistable. This means that it either hasnt been
   enhanced, or that the enhanced version of the file is not in the
   CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data
   for the class is not found.
   RequestURI=/signUser
 
   Caused by:
 
   org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException:
   The class The class com.store.db.UserDetails is not persistable.
   This means that it either hasnt been enhanced, or that the enhanced
   version of the file is not in the CLASSPATH (or is hidden by an
   unenhanced version), or the Meta-Data/annotations for the class are
   not found. is not persistable. This means that it either hasnt been
   enhanced, or that the enhanced version of the file is not in the
   CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data
   for the class is not found.
  at
 

  
 org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(Nuc
 leusJDOHelper.java:
   241)
  at
 
  
 org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceM
 anager.java:
   674)
 
   Please let me know if you need any more details.
   Thanks in advance.
   Smitha.
 
   --
   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-j...@googlegroups.com.
   To unsubscribe from this group, send email to

   google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B
 unsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine-java?hl=en.
 
  --
  Ikai Lan

  Developer Programs Engineer, Google App Enginehttp://
 googleappengine.blogspot.com|http://twitter.com/app_engine

 --
  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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.






 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 http://googleappengine.blogspot.com | http://twitter.com/app_engine

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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.lang.RuntimeException: java.io.NotSerializableException: + objectify framework

2010-04-11 Thread aditya rathi
HI,

I am using dwr and objectify framework to get the arraylist of string
from datastore.
But I am getting error.

java.lang.RuntimeException: java.io.NotSerializableException

It will be helpful if any one has faced the similar problem and know
the solution.


Thanks,
Aditya Rathi

-- 
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-j...@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.