[appengine-java] using login and admin console on the dev server with guice enabled

2010-02-06 Thread Sudhir
I'm using GAE and Guice, but I'm running into problems on the dev
server. This is my web.xml


  guiceFilter
  com.google.inject.servlet.GuiceFilter


  guiceFilter
  /*

Everything works great until I decide to login, at which point it
throws up a 404 cause it can't handle pages that start with /_ah. This
means I can't do logins on the dev server or look at the admin
console.

Any ideas? I can't find how to add an exclusion filter to the URL
matcher, and don't know which servlet GAE uses to serve development
login and console :-/

-- 
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: using login and admin console on the dev server with guice enabled

2010-02-07 Thread Sudhir
Okay, i fixed it myself am ignoring urls that start with _ah using
serveRegex in the guice module.

Sudhir

On Feb 7, 2:21 am, Sudhir  wrote:
> I'm using GAE and Guice, but I'm running into problems on the dev
> server. This is my web.xml
>
> 
>   guiceFilter
>   com.google.inject.servlet.GuiceFilter
> 
> 
>   guiceFilter
>   /*
> 
> Everything works great until I decide to login, at which point it
> throws up a 404 cause it can't handle pages that start with /_ah. This
> means I can't do logins on the dev server or look at the admin
> console.
>
> Any ideas? I can't find how to add an exclusion filter to the URL
> matcher, and don't know which servlet GAE uses to serve development
> login and console :-/

-- 
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: Google Plugin for Eclipse 1.3 plans

2010-02-11 Thread Sudhir
Has anyone else noticed that installing GAE SDK 1.3.1 screws up the
Google Plugin? It keeps throwing class loader exceptions and renders
the run configs useless.

On Feb 11, 9:23 pm, Keith Platfoot  wrote:
> Hi Marcel,
>
> The Eclipse plugin has a different release cycle than the App Engine SDK, so
> no, the current plugin version remains 1.2.  Look the 1.3 version of the
> plugin to be released in March (with a preview build available near the end
> of this month).
>
> Keith
>
> On Thu, Feb 11, 2010 at 9:09 AM, Marcel Overdijk
> wrote:
>
>
>
> > SDK 1.3.1 was released today, so I was wondering if the 1.3 plugin is
> > also released, and more importantly if it contains better support for
> > maven as described in Keith's post.
>
> > On Feb 9, 10:11 pm, Hannu Leinonen  wrote:
> > > Allright,
>
> > > As I've stated before on the list, Maven + GAE Eclipse plugin
> > > integration is already possible! Exact instructions can be found in my
> > > blog post athttp://
> > hamandeggs.wordpress.com/2010/01/26/how-to-gae-eclipse-maven/I
> > > also have made an archetype for such a project. I'm currently using
> > > pretty much the same configuration in one of my projects and it works
> > > quite well (only downside being that you're required to clean the
> > > project on every Eclipse startup).
>
> > > Just type:
> > > mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate
> > \
> > >   -DarchetypeGroupId=org.beardedgeeks \
> > >   -DarchetypeArtifactId=gae-eclipse-maven-archetype \
> > >   -DarchetypeVersion=1.1.1 \
>
> > > -DarchetypeRepository=
> >http://beardedgeeks.googlecode.com/svn/repository/releases
>
> > > -Hannu
>
> > > On 8.2.2010 20:35, Jake wrote:
>
> > > > I'm hoping for a good way to resolve workspace dependencies in
> > > > Eclipse.  The m2eclipse plugin does this well, but that doesn't play
> > > > nicely with the maven-war-plugin, so it doesn't work for GAE.  Running
> > > > a Maven Install on each workspace dependency before deploying,
> > > > however, is still nicer than having to manually generate/copy jar
> > > > files.  I'm pretty new to Eclipse/Maven/GAE, so I don't know if it's
> > > > possible, but I'm hopeful! :)
>
> > > > Jake
>
> > > > On Feb 6, 12:40 pm, 杨浩  wrote:
> > > >> Where's the lastest plugin update sites for GAE Plugin?
> > > >> I will to test it!
>
> > > >> 2010/2/6 Philippe Marschall 
>
> > > >>> Sounds like a good start. Ideally the maven eclipse plugin [1] could
> > > >>> be configured to automatically generate the configuration for the
> > > >>> Google Plugin and M2Eclipse [2] picking that up as well. Also an
> > > >>> archetype would help quick starting. I assume you're aware that you
> > > >>> get the most benefit out of that only when there are up to date Maven
> > > >>> artifacts wit good metadata in a publicly available repo, preferably
> > > >>> Maven central.
>
> > > >>>  [1]http://maven.apache.org/eclipse-plugin.html
> > > >>>  [2]http://m2eclipse.sonatype.org/
>
> > > >>> 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-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > 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-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: Google Plugin for Eclipse 1.3 plans

2010-02-11 Thread Sudhir
Yeah... I've raised an issue
http://code.google.com/p/googleappengine/issues/detail?id=2758&sort=-opened&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component%20Opened
with the stacktrace.

On Feb 11, 11:51 pm, Rajeev Dayal  wrote:
> Can you provide a stack trace?
>
>
>
> On Thu, Feb 11, 2010 at 1:29 PM, Sudhir  wrote:
> > Has anyone else noticed that installing GAE SDK 1.3.1 screws up the
> > Google Plugin? It keeps throwing class loader exceptions and renders
> > the run configs useless.
>
> > On Feb 11, 9:23 pm, Keith Platfoot  wrote:
> > > Hi Marcel,
>
> > > The Eclipse plugin has a different release cycle than the App Engine SDK,
> > so
> > > no, the current plugin version remains 1.2.  Look the 1.3 version of the
> > > plugin to be released in March (with a preview build available near the
> > end
> > > of this month).
>
> > > Keith
>
> > > On Thu, Feb 11, 2010 at 9:09 AM, Marcel Overdijk
> > > wrote:
>
> > > > SDK 1.3.1 was released today, so I was wondering if the 1.3 plugin is
> > > > also released, and more importantly if it contains better support for
> > > > maven as described in Keith's post.
>
> > > > On Feb 9, 10:11 pm, Hannu Leinonen  wrote:
> > > > > Allright,
>
> > > > > As I've stated before on the list, Maven + GAE Eclipse plugin
> > > > > integration is already possible! Exact instructions can be found in
> > my
> > > > > blog post athttp://
> > > > hamandeggs.wordpress.com/2010/01/26/how-to-gae-eclipse-maven/I
> > > > > also have made an archetype for such a project. I'm currently using
> > > > > pretty much the same configuration in one of my projects and it works
> > > > > quite well (only downside being that you're required to clean the
> > > > > project on every Eclipse startup).
>
> > > > > Just type:
> > > > > mvn
> > org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate
> > > > \
> > > > >   -DarchetypeGroupId=org.beardedgeeks \
> > > > >   -DarchetypeArtifactId=gae-eclipse-maven-archetype \
> > > > >   -DarchetypeVersion=1.1.1 \
>
> > > > > -DarchetypeRepository=
> > > >http://beardedgeeks.googlecode.com/svn/repository/releases
>
> > > > > -Hannu
>
> > > > > On 8.2.2010 20:35, Jake wrote:
>
> > > > > > I'm hoping for a good way to resolve workspace dependencies in
> > > > > > Eclipse.  The m2eclipse plugin does this well, but that doesn't
> > play
> > > > > > nicely with the maven-war-plugin, so it doesn't work for GAE.
> >  Running
> > > > > > a Maven Install on each workspace dependency before deploying,
> > > > > > however, is still nicer than having to manually generate/copy jar
> > > > > > files.  I'm pretty new to Eclipse/Maven/GAE, so I don't know if
> > it's
> > > > > > possible, but I'm hopeful! :)
>
> > > > > > Jake
>
> > > > > > On Feb 6, 12:40 pm, 杨浩  wrote:
> > > > > >> Where's the lastest plugin update sites for GAE Plugin?
> > > > > >> I will to test it!
>
> > > > > >> 2010/2/6 Philippe Marschall 
>
> > > > > >>> Sounds like a good start. Ideally the maven eclipse plugin [1]
> > could
> > > > > >>> be configured to automatically generate the configuration for the
> > > > > >>> Google Plugin and M2Eclipse [2] picking that up as well. Also an
> > > > > >>> archetype would help quick starting. I assume you're aware that
> > you
> > > > > >>> get the most benefit out of that only when there are up to date
> > Maven
> > > > > >>> artifacts wit good metadata in a publicly available repo,
> > preferably
> > > > > >>> Maven central.
>
> > > > > >>>  [1]http://maven.apache.org/eclipse-plugin.html
> > > > > >>>  [2]http://m2eclipse.sonatype.org/
>
> > > > > >>> 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,

[appengine-java] Re: 1.4 eclipse plugin

2010-12-05 Thread Sudhir
Same issue here... does anyone have a fix that doesn't involve re-
installing eclipse and recreating the entire project step by step?

Sudhir

On Dec 4, 4:37 pm, GoSharp Lite  wrote:
> I solve my jsp compilation issue by using below steps.
>
> 1) Download and install "eclipse-java-helios-SR1-win32.zip".
> 2) Install plugins from "http://dl.google.com/eclipse/plugin/3.6";.
> 3) Download and install "java_ee_sdk-6u1-jdk-windows.exe".
> 4) Create a new and empty app using same project name and package as
> my old app.
> 5) Carefully copy all files in src and war from my old app into the
> new app.
> 6) Import all external libs from my old app into the new app.
> 7) Set Properties-Google-App Engine-ORM to server files which need
> enhancement.
> 8) Debug and no more "Unable to compile class for JSP".
>
> On Dec 4, 11:47 am, Jerome  wrote:
>
>
>
>
>
>
>
> > Sorry, no solution but a very similar issue with Eclipse Helios SR 1:
>
> > org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> > An error occurred at line: 9 in the generated java file
> > org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type
>
> > An error occurred at line: 10 in the generated java file
> > org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a
> > type
>
> > An error occurred at line: 12 in the generated java file
> > JspFactory cannot be resolved to a type
>
> > An error occurred at line: 12 in the generated java file
> > JspFactory cannot be resolved
>
> > An error occurred at line: 23 in the generated java file
> > javax.el.ExpressionFactory cannot be resolved to a type
>
> > An error occurred at line: 24 in the generated java file
> > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > An error occurred at line: 31 in the generated java file
> > _el_expressionfactory cannot be resolved
>
> > An error occurred at line: 31 in the generated java file
> > _jspxFactory cannot be resolved
>
> > An error occurred at line: 31 in the generated java file
> > The method getServletConfig() is undefined for the type plans_jsp
>
> > An error occurred at line: 32 in the generated java file
> > _jsp_annotationprocessor cannot be resolved
>
> > An error occurred at line: 32 in the generated java file
> > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > An error occurred at line: 32 in the generated java file
> > The method getServletConfig() is undefined for the type plans_jsp
>
> > An error occurred at line: 32 in the generated java file
> > org.apache.AnnotationProcessor cannot be resolved to a type
>
> > An error occurred at line: 38 in the generated java file
> > HttpServletRequest cannot be resolved to a type
>
> > An error occurred at line: 38 in the generated java file
> > HttpServletResponse cannot be resolved to a type
>
> > An error occurred at line: 39 in the generated java file
> > ServletException cannot be resolved to a type
>
> > An error occurred at line: 41 in the generated java file
> > PageContext cannot be resolved to a type
>
> > An error occurred at line: 42 in the generated java file
> > HttpSession cannot be resolved to a type
>
> > An error occurred at line: 43 in the generated java file
> > ServletContext cannot be resolved to a type
>
> > An error occurred at line: 44 in the generated java file
> > ServletConfig cannot be resolved to a type
>
> > An error occurred at line: 45 in the generated java file
> > JspWriter cannot be resolved to a type
>
> > An error occurred at line: 47 in the generated java file
> > JspWriter cannot be resolved to a type
>
> > An error occurred at line: 48 in the generated java file
> > PageContext cannot be resolved to a type
>
> > An error occurred at line: 53 in the generated java file
> > _jspxFactory cannot be resolved
>
> > An error occurred at line: 1,315 in the generated java file
> > SkipPageException cannot be resolved to a type
>
> > An error occurred at line: 1,322 in the generated java file
> > _jspxFactory cannot be resolved
>
> > Stacktrace:
> >         at
> > org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandl 
> > er.java:
> > 92)
> >         at
> > org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:
> > 330)
> >         at
> > org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:
> > 439)
> >         at org.apache.jasper.comp

[appengine-java] Re: JPA - User Defined Types

2009-09-21 Thread || Sudhir Nimavat ||


 Does any one has any idea ? 

  

Sudhir NimavatSenior software engineer. 
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India

Personally I'm always ready to learn, although I do not always like being taught
  





From: "sud...@jsptube.com" 
To: Google App Engine for Java 
Sent: Monday, 21 September, 2009 4:10:18 PM
Subject: [appengine-java] JPA - User Defined Types


Is it possible to create custom user defined types as explained in
this article
http://www.datanucleus.org/extensions/rdbms_java_types.html

I need to create custom types like Gender, Height Income etc...

Thanks


  Keep up with people you care about with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/connectmore
--~--~-~--~~~---~--~~
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] Eclipse plugin requires fixed location for src directory

2010-04-19 Thread Sudhir Ramanandi
I can not change the source folder (/src) to anything else, otherwise
enhancer will not be able to find source folder and enhance entity classes
I just created
http://code.google.com/p/googleappengine/issues/detail?id=3111

is it me only or other too have same issue?

Thanks
Sudhir

-- 
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] What's wrong with my JPA Entity

2010-04-19 Thread Sudhir Ramanandi
I have just started with GAE+JPA. However I find it difficult to grasp the
primary key things.
I have created a very simple entity and a test to verify that the primary
key is generated automatically.

Entity

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.google.appengine.api.datastore.Key;
import com.szczytowski.genericdao.api.IEntity;

@Entity
public class Profile implements IEntity {

@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Key _id;

@Basic
private int _age;

@Basic
@Temporal(TemporalType.DATE)
private Date _dob;

public Profile() {
}

public Key getId() {
return _id;
}

public void setId(Key id) {
_id = id;
}

public int getAge() {
return _age;
}

public void setAge(int age) {
_age = age;
}

public Date getDob() {
return _dob;
}

public void setDob(Date dob) {
_dob = dob;
}
}


Test Class

import java.util.Date;

import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.ramanandi.matri.infrastructure.jpa.EMF;

import
com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import
com.google.appengine.tools.development.testing.LocalServiceTestHelper;

public class ProfileDaoTest extends TestCase {

private final LocalServiceTestHelper helper = new
LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
private ProfileDao dao = new ProfileDao();


@Before
public void setUp() {
helper.setUp();
}

@After
public void tearDown() {
helper.tearDown();
}
private void doTest() {
dao.setEntityManager(EMF.get().createEntityManager());
Profile p = new Profile();
p.setAge(20);
p.setDob(new Date());
dao.save(p);
assertNotNull(p.getId());


}

@Test
public void testInsert1() {
doTest();
}

}

ButassertNotNull(p.getId()); fails. Why the primary key is not generated
automatically? What's wrong.

Thanks
SN

-- 
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] Can not send mails

2010-04-20 Thread Sudhir Ramanandi
Hello mods,

I subscribed since two days, Still my messages aren't delivered to group.
Please do the needful and approve my message.


SN

-- 
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] Eclipse plugin requires fixed location for src directory

2010-04-20 Thread Sudhir Ramanandi
I just created a new GPE issue "Eclipse plugin requires fixed location for
src directory"
http://code.google.com/p/googleappengine/issues/detail?id=3111

Is it just me, or others also have the same issue?

Can any one try to reproduce it.

Thanks
SN

-- 
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] What's wrong with my JPA Entity

2010-04-20 Thread Sudhir Ramanandi
Yes, Dao Saves is properly. I just found that the Key will be generated on
EntityManager.flush()

I modified the code, and now it works fine.

public void testPkGeneration() {

Profile p1 = new Profile();
p1.setAge(20);
p1.setDob(new Date());

EntityManager em = EMF.get().createEntityManager();
EntityTransaction tx = em.getTransaction();
dao.setEntityManager(em);
tx.begin();
dao.save(p1);
em.flush();
tx.commit();

List profiles = dao.getAll();
assertNotNull(profiles.get(0));
assertNotNull(p1.getId());

}



On Wed, Apr 21, 2010 at 1:25 AM, Ikai L (Google)  wrote:

> Are you sure that the entity is being saved?
>
> Can you post your ProfileDAO?
>
> On Mon, Apr 19, 2010 at 9:52 AM, Sudhir Ramanandi wrote:
>
>> I have just started with GAE+JPA. However I find it difficult to grasp the
>> primary key things.
>> I have created a very simple entity and a test to verify that the primary
>> key is generated automatically.
>>
>> Entity
>>
>> import java.util.Date;
>>
>> import javax.persistence.Basic;
>> import javax.persistence.Entity;
>> import javax.persistence.GeneratedValue;
>> import javax.persistence.GenerationType;
>> import javax.persistence.Id;
>> import javax.persistence.Temporal;
>> import javax.persistence.TemporalType;
>>
>> import com.google.appengine.api.datastore.Key;
>> import com.szczytowski.genericdao.api.IEntity;
>>
>> @Entity
>> public class Profile implements IEntity {
>>
>> @Id
>> @GeneratedValue(strategy=GenerationType.IDENTITY)
>> private Key _id;
>>
>> @Basic
>> private int _age;
>>
>> @Basic
>> @Temporal(TemporalType.DATE)
>> private Date _dob;
>>
>> public Profile() {
>> }
>>
>> public Key getId() {
>> return _id;
>> }
>>
>> public void setId(Key id) {
>> _id = id;
>> }
>>
>> public int getAge() {
>> return _age;
>> }
>>
>> public void setAge(int age) {
>> _age = age;
>> }
>>
>> public Date getDob() {
>> return _dob;
>> }
>>
>> public void setDob(Date dob) {
>> _dob = dob;
>> }
>> }
>>
>>
>> Test Class
>>
>> import java.util.Date;
>>
>> import junit.framework.TestCase;
>>
>> import org.junit.After;
>> import org.junit.Before;
>> import org.junit.Test;
>> import org.ramanandi.matri.infrastructure.jpa.EMF;
>>
>> import
>> com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
>> import
>> com.google.appengine.tools.development.testing.LocalServiceTestHelper;
>>
>> public class ProfileDaoTest extends TestCase {
>>
>> private final LocalServiceTestHelper helper = new
>> LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
>> private ProfileDao dao = new ProfileDao();
>>
>>
>> @Before
>> public void setUp() {
>> helper.setUp();
>> }
>>
>> @After
>> public void tearDown() {
>> helper.tearDown();
>> }
>> private void doTest() {
>> dao.setEntityManager(EMF.get().createEntityManager());
>> Profile p = new Profile();
>> p.setAge(20);
>> p.setDob(new Date());
>> dao.save(p);
>> assertNotNull(p.getId());
>>
>>
>> }
>>
>> @Test
>> public void testInsert1() {
>> doTest();
>> }
>>
>> }
>>
>> ButassertNotNull(p.getId()); fails. Why the primary key is not
>> generated automatically? What's wrong.
>>
>> Thanks
>> SN
>>
>> --
>> 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.
>>
>
>
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter: http://twitter.com/ikai
> Delicious: http://delicious.com/ikailan
>
> 
> Google App Engine links:
> Blog: http://googleappengine.blogspot.com
> Twit

Re: [appengine-java] LocalDatastoreTest Error

2010-04-21 Thread Sudhir Ramanandi
Are you sure you have all the required jar files in classpath mentioned here
http://code.google.com/appengine/docs/java/tools/localunittesting.html

On Wed, Apr 21, 2010 at 7:13 PM, CodeMan  wrote:

> Hi,
>
> I am trying to unit testing. I copied the sample code on the site as
> is, but I get the error below.
>
> Here is the unit test code
>
> import com.google.appengine.api.datastore.DatastoreService;
> import com.google.appengine.api.datastore.DatastoreServiceFactory;
> import com.google.appengine.api.datastore.Entity;
> import com.google.appengine.api.datastore.Query;
> import
>
> com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
> import
> com.google.appengine.tools.development.testing.LocalServiceTestHelper;
>
> import org.junit.After;
> import org.junit.Before;
> import org.junit.Test;
> import static org.junit.Assert.*;
>
> public class LocalDatastoreTest {
>
>private final LocalServiceTestHelper helper =
>new LocalServiceTestHelper(new
> LocalDatastoreServiceTestConfig());
>
>@Before
>public void setUp() {
>helper.setUp();
>}
>
>@After
>public void tearDown() {
>helper.tearDown();
>}
>
>// run this test twice to prove we're not leaking any state across
> tests
>private void doTest() {
>DatastoreService ds =
> DatastoreServiceFactory.getDatastoreService();
>assertEquals(0, ds.prepare(new Query("yam")).countEntities());
>ds.put(new Entity("yam"));
>ds.put(new Entity("yam"));
>assertEquals(2, ds.prepare(new Query("yam")).countEntities());
>}
>
>@Test
>public void testInsert1() {
>doTest();
>}
>
>@Test
>public void testInsert2() {
>doTest();
>}
> }
>
> Here is the error
>
> com.google.apphosting.api.ApiProxy$CallNotFoundException: The API
> package 'datastore_v3' or call 'Count()' was not found.
>at
>
> com.google.appengine.tools.development.ApiProxyLocalImpl.makeSyncCall(ApiProxyLocalImpl.java:
> 109)
>at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:83)
>at
>
> com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
> 52)
>at com.google.appengine.api.datastore.DatastoreServiceImpl
> $PreparedQueryImpl.countEntities(DatastoreServiceImpl.java:379)
>at
> com.chinua.Test.demo.LocalDatastoreTest.doTest(LocalDatastoreTest.java:
> 34)
>at
>
> com.chinua.Test.demo.LocalDatastoreTest.testInsert1(LocalDatastoreTest.java:
> 46)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>at java.lang.reflect.Method.invoke(Method.java:597)
>at org.junit.runners.model.FrameworkMethod
> $1.runReflectiveCall(FrameworkMethod.java:44)
>at
>
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
> 15)
>at
>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
> 41)
>at
>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:
> 20)
>at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
> 28)
>at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
> 31)
>at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
> 76)
>at
>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
> 50)
>at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>at
>
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:
> 46)
>at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
> 38)
>at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> 467)
>at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> 683)
>at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
> 390)
>at
>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
> 197)
>
> java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/dev/
> LocalDatastoreService
>at
>
> com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig.tearDown(LocalDatastoreServiceTestConfig.java:
> 12

Re: [appengine-java] Blobstore upload files from CKEditor?

2010-04-21 Thread Sudhir Ramanandi
I am also looking for some thing similar, A file manager for GAE that can be
integrated in any app.
Could CMS has a similar tool http://cloudcms.sheelapps.com/manage.html. You
might get ideas by looking at the code.

Thanks
SN

On Wed, Apr 21, 2010 at 2:08 PM, lycnsc  wrote:

> This is my first time to program for Google App Engine for Java. I
> want to make a CMS and store user uploaded data using Blobstore. I'd
> like to use CKEditor as web rich text editor in my program.
>
> upload configuration example of CKEditoris is:
>
> http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)#Other_Resources
>
>CKEDITOR.replace( 'editor1',
>{
>filebrowserBrowseUrl : '/browser/browse.php',
>filebrowserUploadUrl : '/uploader/upload.php'
>});
>
> Uploading a Blob using the Blobstore example is:
> http://code.google.com/intl/en/appengine/docs/java/blobstore/overview.html
>
> 
>"
> method="post" enctype="multipart/form-data">
>
>
>
> 
>
>
> I do not know how to do it. Could anyone help me?
>
> 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.
>
>

-- 
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] Freemarker: Run local: OK. Run on cloud: Error

2010-04-26 Thread Sudhir Ramanandi
First of all, Currently normal release of freemarker will not run on GAE as
it has dependency on javax.swing package
If you solve the problem you just mentioned, sooner or later you will get
other problems

See this
http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/

You will have to download a GAE compatible version of freemarker. see above
link for download link.


Thanks
SN

On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen  wrote:

> Hi guys:
> I'm having spring-mvc + apache tiles + freemarker in my Gae
> Application.
> Everything works fine in my local machine after several nightmare of
> trying to figuring out the appropriate version of apache tiles to use.
>
> I can recall that I had it successfully run on the cloud few months
> ago (when the latest version of sdk is still 1.3.1)
>
> Funny thing is that, after several improvements and adaptation, I'm
> now at 1.3.3.1 and my app work fine on local server. However, when I
> upload it onto the cloud, here is what I got:
>
> java.lang.VerifyError: (class: freemarker/ext/jsp/
> FreeMarkerJspApplicationContext, method:  signature: ()V)
> Incompatible argument to function
>at
> com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:109)
>at freemarker.ext.jsp.FreeMarkerJspFactory21.class$
> (FreeMarkerJspFactory21.java:13)
>at
>
> freemarker.ext.jsp.FreeMarkerJspFactory21.(FreeMarkerJspFactory21.java:
> 12)
>at
>
> freemarker.ext.jsp.FreeMarkerPageContext21.(FreeMarkerPageContext21.java:
> 29)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:109)
>at
> freemarker.ext.jsp.PageContextFactory.(PageContextFactory.java:
> 26)
>at
> freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:
> 99)
>at freemarker.core.Environment.visit(Environment.java:286)
>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
>at freemarker.core.Environment.visit(Environment.java:210)
>at freemarker.core.MixedContent.accept(MixedContent.java:92)
>at freemarker.core.Environment.visit(Environment.java:210)
>at freemarker.core.Environment.process(Environment.java:190)
>at freemarker.template.Template.process(Template.java:237)
>at
> freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:
> 452)
>at
> freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:
> 391)
>
> I'm dying. How on earth? I would probably get fired tomorrow.
>
> --
> 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.
>
>

-- 
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] Freemarker - java.lang.VerifyError

2010-04-27 Thread Sudhir Ramanandi
I am using freemarker-gae-pre2.jar and I get following error when I deploy
to GAE. Its working fine on my local machine
I am using spring MVC + freemarker.

java.lang.VerifyError: (class:
freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: 
signature: ()V) Incompatible argument to function
at 
com.google.appengine.runtime.Request.process-814a4fa105eb62da(Request.java)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:109)
at 
freemarker.ext.jsp.FreeMarkerJspFactory21.class$(FreeMarkerJspFactory21.java:13)
at 
freemarker.ext.jsp.FreeMarkerJspFactory21.(FreeMarkerJspFactory21.java:12)
at 
freemarker.ext.jsp.FreeMarkerPageContext21.(FreeMarkerPageContext21.java:30)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:109)
at 
freemarker.ext.jsp.PageContextFactory.getPageContextImpl(PageContextFactory.java:21)
at 
freemarker.ext.jsp.PageContextFactory.(PageContextFactory.java:15)
at 
freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:99)
at freemarker.core.Environment.visit(Environment.java:286)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Macro$Context.runMacro(Macro.java:172)
at freemarker.core.Environment.visit(Environment.java:603)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:256)
at 
org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366)
at 
org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283)
at 
org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233)
at 
org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at 
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at 
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
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:511)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at 
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
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 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
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 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.

Re: [appengine-java] Freemarker: Run local: OK. Run on cloud: Error

2010-04-27 Thread Sudhir Ramanandi
Aah, freemarker-gae-pre2.jar won't work either. I got the same error.
Asked to freemarker mailing list. Lets see what comes up.

Does any one else has any idea?

Thanks
SN

On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi wrote:

> First of all, Currently normal release of freemarker will not run on GAE as
> it has dependency on javax.swing package
> If you solve the problem you just mentioned, sooner or later you will get
> other problems
>
> See this
> http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/
>
> You will have to download a GAE compatible version of freemarker. see above
> link for download link.
>
>
> Thanks
> SN
>
>
> On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen wrote:
>
>> Hi guys:
>> I'm having spring-mvc + apache tiles + freemarker in my Gae
>> Application.
>> Everything works fine in my local machine after several nightmare of
>> trying to figuring out the appropriate version of apache tiles to use.
>>
>> I can recall that I had it successfully run on the cloud few months
>> ago (when the latest version of sdk is still 1.3.1)
>>
>> Funny thing is that, after several improvements and adaptation, I'm
>> now at 1.3.3.1 and my app work fine on local server. However, when I
>> upload it onto the cloud, here is what I got:
>>
>> java.lang.VerifyError: (class: freemarker/ext/jsp/
>> FreeMarkerJspApplicationContext, method:  signature: ()V)
>> Incompatible argument to function
>>at
>>
>> com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java)
>>at java.lang.Class.forName0(Native Method)
>>at java.lang.Class.forName(Class.java:109)
>>at freemarker.ext.jsp.FreeMarkerJspFactory21.class$
>> (FreeMarkerJspFactory21.java:13)
>>at
>>
>> freemarker.ext.jsp.FreeMarkerJspFactory21.(FreeMarkerJspFactory21.java:
>> 12)
>>at
>>
>> freemarker.ext.jsp.FreeMarkerPageContext21.(FreeMarkerPageContext21.java:
>> 29)
>>at java.lang.Class.forName0(Native Method)
>>at java.lang.Class.forName(Class.java:109)
>>at
>> freemarker.ext.jsp.PageContextFactory.(PageContextFactory.java:
>> 26)
>>at
>> freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:
>> 99)
>>at freemarker.core.Environment.visit(Environment.java:286)
>>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
>>at freemarker.core.Environment.visit(Environment.java:210)
>>at freemarker.core.MixedContent.accept(MixedContent.java:92)
>>at freemarker.core.Environment.visit(Environment.java:210)
>>at freemarker.core.Environment.process(Environment.java:190)
>>at freemarker.template.Template.process(Template.java:237)
>>at
>> freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:
>> 452)
>>at
>> freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:
>> 391)
>>
>> I'm dying. How on earth? I would probably get fired tomorrow.
>>
>> --
>> 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.
>>
>>
>

-- 
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] Freemarker: Run local: OK. Run on cloud: Error

2010-04-27 Thread Sudhir Ramanandi
Aah, freemarker-gae-pre2.jar won't work either. I got the same error.
Asked to freemarker mailing list. Lets see what comes up.

Does any one else has any idea?

Thanks
SN

On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi wrote:

> First of all, Currently normal release of freemarker will not run on GAE as
> it has dependency on javax.swing package
> If you solve the problem you just mentioned, sooner or later you will get
> other problems
>
> See this
> http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/
>
> You will have to download a GAE compatible version of freemarker. see above
> link for download link.
>
>
> Thanks
> SN
>
>
> On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen wrote:
>
>> Hi guys:
>> I'm having spring-mvc + apache tiles + freemarker in my Gae
>> Application.
>> Everything works fine in my local machine after several nightmare of
>> trying to figuring out the appropriate version of apache tiles to use.
>>
>> I can recall that I had it successfully run on the cloud few months
>> ago (when the latest version of sdk is still 1.3.1)
>>
>> Funny thing is that, after several improvements and adaptation, I'm
>> now at 1.3.3.1 and my app work fine on local server. However, when I
>> upload it onto the cloud, here is what I got:
>>
>> java.lang.VerifyError: (class: freemarker/ext/jsp/
>> FreeMarkerJspApplicationContext, method:  signature: ()V)
>> Incompatible argument to function
>>at
>>
>> com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java)
>>at java.lang.Class.forName0(Native Method)
>>at java.lang.Class.forName(Class.java:109)
>>at freemarker.ext.jsp.FreeMarkerJspFactory21.class$
>> (FreeMarkerJspFactory21.java:13)
>>at
>>
>> freemarker.ext.jsp.FreeMarkerJspFactory21.(FreeMarkerJspFactory21.java:
>> 12)
>>at
>>
>> freemarker.ext.jsp.FreeMarkerPageContext21.(FreeMarkerPageContext21.java:
>> 29)
>>at java.lang.Class.forName0(Native Method)
>>at java.lang.Class.forName(Class.java:109)
>>at
>> freemarker.ext.jsp.PageContextFactory.(PageContextFactory.java:
>> 26)
>>at
>> freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:
>> 99)
>>at freemarker.core.Environment.visit(Environment.java:286)
>>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
>>at freemarker.core.Environment.visit(Environment.java:210)
>>at freemarker.core.MixedContent.accept(MixedContent.java:92)
>>at freemarker.core.Environment.visit(Environment.java:210)
>>at freemarker.core.Environment.process(Environment.java:190)
>>at freemarker.template.Template.process(Template.java:237)
>>at
>> freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:
>> 452)
>>at
>> freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:
>> 391)
>>
>> I'm dying. How on earth? I would probably get fired tomorrow.
>>
>> --
>> 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.
>>
>>
>

-- 
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: Freemarker: Run local: OK. Run on cloud: Error

2010-04-27 Thread Sudhir Ramanandi
Attila has created an issue here
http://code.google.com/p/googleappengine/issues/detail?id=3157
Vote for it.


Thanks
SN

On Tue, Apr 27, 2010 at 6:55 PM, Phuong Nguyen  wrote:

> The fix provided in the blog above some how shoots (or hide???) the
> inner problem. But the outer problem (cannot create
> PageContextFactory) is still there. I get this exception after deploy
> the *fixed* version to the cloud:
>
> java.lang.NoClassDefFoundError: Could not initialize class
> freemarker.ext.jsp.PageContextFactory
> at
> freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:
> 99)
>at freemarker.core.Environment.visit(Environment.java:286)
>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
>at freemarker.core.Environment.visit(Environment.java:210)
>at freemarker.core.MixedContent.accept(MixedContent.java:92)
>at freemarker.core.Environment.visit(Environment.java:210)
>at freemarker.core.Environment.process(Environment.java:190)
> at freemarker.template.Template.process(Template.java:256)
> at
> freemarker.ext.servlet.FreemarkerServlet.process(FreemarkerServlet.java:
> 452)
>at
> freemarker.ext.servlet.FreemarkerServlet.doGet(FreemarkerServlet.java:
> 391)
>
>
> I think Google didn't keep a good consistency here. The local GAE
> should mimic the cloud in at least *stop* bugs like these.
> I'm just commenting on FreeMarker guy blog. Hope that they can release
> another fix soon.
>
> On Apr 27, 6:20 pm, Sudhir Ramanandi  wrote:
> > Aah, freemarker-gae-pre2.jar won't work either. I got the same error.
> > Asked to freemarker mailing list. Lets see what comes up.
> >
> > Does any one else has any idea?
> >
> > Thanks
> > SN
> >
> > On Tue, Apr 27, 2010 at 11:29 AM, Sudhir Ramanandi  >wrote:
> >
> >
> >
> > > First of all, Currently normal release of freemarker will not run on
> GAE as
> > > it has dependency on javax.swing package
> > > If you solve the problem you just mentioned, sooner or later you will
> get
> > > other problems
> >
> > > See this
> > >http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-depen.
> ..
> >
> > > You will have to download a GAE compatible version of freemarker. see
> above
> > > link for download link.
> >
> > > Thanks
> > > SN
> >
> > > On Tue, Apr 27, 2010 at 8:31 AM, Phuong Nguyen  >wrote:
> >
> > >> Hi guys:
> > >> I'm having spring-mvc + apache tiles + freemarker in my Gae
> > >> Application.
> > >> Everything works fine in my local machine after several nightmare of
> > >> trying to figuring out the appropriate version of apache tiles to use.
> >
> > >> I can recall that I had it successfully run on the cloud few months
> > >> ago (when the latest version of sdk is still 1.3.1)
> >
> > >> Funny thing is that, after several improvements and adaptation, I'm
> > >> now at 1.3.3.1 and my app work fine on local server. However, when I
> > >> upload it onto the cloud, here is what I got:
> >
> > >> java.lang.VerifyError: (class: freemarker/ext/jsp/
> > >> FreeMarkerJspApplicationContext, method:  signature: ()V)
> > >> Incompatible argument to function
> > >>at
> >
> > >>
> com.google.appengine.runtime.Request.process-5cb3cd85ccb06a68(Request.java)
> > >>at java.lang.Class.forName0(Native Method)
> > >>at java.lang.Class.forName(Class.java:109)
> > >>at freemarker.ext.jsp.FreeMarkerJspFactory21.class$
> > >> (FreeMarkerJspFactory21.java:13)
> > >>at
> >
> > >>
> freemarker.ext.jsp.FreeMarkerJspFactory21.(FreeMarkerJspFactory21.java:
> > >> 12)
> > >>at
> >
> > >>
> freemarker.ext.jsp.FreeMarkerPageContext21.(FreeMarkerPageContext21.java:
> > >> 29)
> > >>at java.lang.Class.forName0(Native Method)
> > >>at java.lang.Class.forName(Class.java:109)
> > >>at
> > >>
> freemarker.ext.jsp.PageContextFactory.(PageContextFactory.java:
> > >> 26)
> > >>at
> > >> freemarker.ext.jsp.TagTransformModel.getWriter(TagTransformModel.java:
> > >> 99)
> > >>at freemarker.core.Environment.visit(Environment.java:286)
> > >>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
> > >> 

[appengine-java] VerifyError on no-op default constructor

2010-04-27 Thread Sudhir Ramanandi
Can anyone from google explain what
java.lang.VerifyError: (class:
freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: 
signature: ()V) Incompatible argument to function, means?

See the issue http://code.google.com/p/googleappengine/issues/detail?id=3157

I have attached the source of class FreeMarkerJspApplicationContext here.

The line that throws above error is "FreeMarkerJspApplicationContext.class.
getName();"

What's wrong with this class? The class doesn't seems to have any thing
unusual. Why this weird behavior?

Seems google will never let freemarker to run on GAE

Thanks
SN

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



FreeMarkerJspApplicationContext.java
Description: Binary data


[appengine-java] Re: VerifyError on no-op default constructor

2010-04-29 Thread Sudhir Ramanandi
If the issue can't be fixed, can any one explain this strange behavior
atlest ! thn we can fix our code.

Thanks
SN

On Wed, Apr 28, 2010 at 11:06 AM, Sudhir Ramanandi wrote:

> Can anyone from google explain what
> java.lang.VerifyError: (class:
> freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: 
> signature: ()V) Incompatible argument to function, means?
>
> See the issue
> http://code.google.com/p/googleappengine/issues/detail?id=3157
>
> I have attached the source of class FreeMarkerJspApplicationContext here.
>
> The line that throws above error is "FreeMarkerJspApplicationContext.class
> .getName();"
>
> What's wrong with this class? The class doesn't seems to have any thing
> unusual. Why this weird behavior?
>
> Seems google will never let freemarker to run on GAE
>
> Thanks
> SN
>
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Unowned relationships using aliases

2010-04-30 Thread Sudhir Ramanandi
I tried to implement unowned one to many relationship using column alias as
explained here
 http://gae-java-persistence.blogspot.com/2010/02/truth-about-joins.html

Here's my code

@Entity
public class User extends BaseEntity implements UserDetails {

   @Basic
private Set _roles = new HashSet();

@OneToMany()
@Column(name="roles", insertable=false, updatable=false)
private Set _roleAlias;

 --- getters, setters
}

Here the entities have encoded strings as primary keys.

But it does not work, id's of role is saved in _roles. when object is
fetched again, role ids would be available in _roles list
but _roleAlias would be always empty.

What's going wrong !!

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Unowned relationships using aliases

2010-05-01 Thread Sudhir Ramanandi
Can any one help me..

On Fri, Apr 30, 2010 at 10:46 PM, Sudhir Ramanandi wrote:

> I tried to implement unowned one to many relationship using column alias as
> explained here
>  http://gae-java-persistence.blogspot.com/2010/02/truth-about-joins.html
>
> Here's my code
>
> @Entity
> public class User extends BaseEntity implements UserDetails {
>
>@Basic
> private Set _roles = new HashSet();
>
> @OneToMany()
> @Column(name="roles", insertable=false, updatable=false)
> private Set _roleAlias;
>
>  --- getters, setters
> }
>
> Here the entities have encoded strings as primary keys.
>
> But it does not work, id's of role is saved in _roles. when object is
> fetched again, role ids would be available in _roles list
> but _roleAlias would be always empty.
>
> What's going wrong !!
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Unowned relationship confusion

2010-05-01 Thread Sudhir Ramanandi
The doc says

"A relationship between persistent objects can be described as owned, where
one of the objects cannot exist without the other, or unowned, where both
objects can exist independently of their relationship with one another"

The confusion is how to identify weather it is owned or unowned

Lets take an example

*- Each user can have zero or more roles assigned to it - *

That mean user can have or can not have a role assigned to it. so,
user.roles collection might be empty. Does that mean it is an owned
relationship

*- Each user can have one or more profile*
- user has atleast one profile, profile can not exist without user. Does
that mean it is owned relationship ?

In simplest word

*- Zero or more  = unowned relationship*
*- Atleast one or more = owned relationship*

is it true ?

- Can we have owned relationship with *Zero or more* child
- Can we have owned relationship with *CASCADE = NONE*


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Unowned relationship confusion

2010-05-01 Thread Sudhir Ramanandi
Thanks for response,

Still it does not answer the question I have (or may be, I din't explain my
question well).

*Google says "unowned relationship is not supported"*
What does it mean? *How datastore  identify that *it is unowned
relationship**?

As per the doc "*Unowned relationship is: where both objects can exist
independently of their relationship with one another*"

In our example,

- User may or may not have a role assigned to it. And a role may or may not
have been assigned to any user
- Role can be created/deleted independently of user
- User can be created/deleted without any role.
- **List roles** might be empty in user.

In above example, If I implement it as normal relationship, as shown in
below code, What will happen?.

@Entity
public class User extends BaseEntity {


   @OneToOne(fetch=FetchType.LAZY)
private List _roles;


}

public class Role extends BaseEntity {
   @Basic
   String _name;
}

@Entity
@MappedSuperclass
public abstract class BaseEntity implements IEntity {

@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
private String _id;

}


- Can datastore identify it as unowned relationship and through error?
- When *user._roles list is empty* can it support the *save*
- Can it support *delete* on user?

In simple words, how datastore will handle above relationship?
Can I create/delete role and users independent of each other? (user may or
may not have any role) and still the relationship will be handled by
datastore.


Thanks
SN

On Sat, May 1, 2010 at 9:05 PM, datanucleus wrote:

> You will only find "unowned relationships" terminology in Google docs.
> This "unowned relationships" in the GAE/J docs is where you have a
> field that is a "Key" or a Collection/Map/array of keys. So no *real*
> relation, just some implicit relation by that "key". You have to
> manage these keys yourself, and you tie your code to GAE/J by using
> them.
>
> JDO/JPA specs do not mention such a thing; they only refer to
> relationships ... "owned" relationships ... real relationships. This
> is where a persistable class has a field that is of a persistable
> type, or a Collection/Map/array of a persistable type. i.e 0-N related
> objects. JDO provides managed relationships to keep both sides of a
> bidirectional relation consistent (under some circumstances).
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Unowned relationship confusion

2010-05-01 Thread Sudhir Ramanandi
>How can it possibly identify it as an unowned relationship? You have
>references to real objects so its a real (i.e "owned") relationship.
>You have no references to keys (or object identities).

Aah, this is the point.. I am talking about.

- The example I gave earlier is an unowned relationship ryt?
*"Role can exist without user, user can exist without role, but user can
have one or more roles"*

>  You have references to real objects so its a real (i.e "owned")
relationship.

If I store real references instead of Keys' does it become *Owned*, and If I
store keys instead of *references* does it become *unowned* !!!.

Then why would I take the trouble of unowned, I will store real references
for all the relations, and all is well.

- The question is, *When I must use Keys (unowned) instead of references,
otherwise datastore will not support/handle it and through exception or
whatever.*

The answer to above question will implicitly explain "What is unowned
relationship" and what is "unowned relationship is not supported"*

Thanks
SN

On Sat, May 1, 2010 at 9:46 PM, datanucleus wrote:

> > *Google says "unowned relationship is not supported"*
> > What does it mean? *How datastore  identify that *it is unowned
> relationship**?
>
> No idea. It's a Google special. It's not part of any spec so it's for
> them to answer.
>
> > In above example, If I implement it as normal relationship, as shown in
> > below code, What will happen?.
> > - Can datastore identify it as unowned relationship and through error?
>
> How can it possibly identify it as an unowned relationship? You have
> references to real objects so its a real (i.e "owned") relationship.
> You have no references to keys (or object identities).
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Unowned relationship confusion

2010-05-01 Thread Sudhir Ramanandi
Okey, I got the answer of, what is "Unowned relationships are not supported"

In our example it will through exception.
*
javax.persistence.PersistenceException: Detected attempt to establish
User(2) as the parent of Role(1) but the entity identified by Role(1) has
already been persisted without a parent.  A parent cannot be established or
changed once an object has been persisted.*

*Datanucleus* Got it?

Now the easiest solution to handle unowned relationships is *use aliases* as
explained here
http://gae-java-persistence.blogspot.com/2010/02/truth-about-joins.html

But don't know why it does not work in my case
http://groups.google.com/group/google-appengine-java/browse_thread/thread/aefd4e8b918af4f2

*Max*, can you please explain. I believe most of us don't know that way of
managin unowned relation. Please help.


On Sat, May 1, 2010 at 10:02 PM, Sudhir Ramanandi wrote:

> >How can it possibly identify it as an unowned relationship? You have
> >references to real objects so its a real (i.e "owned") relationship.
> >You have no references to keys (or object identities).
>
> Aah, this is the point.. I am talking about.
>
> - The example I gave earlier is an unowned relationship ryt?
> *"Role can exist without user, user can exist without role, but user can
> have one or more roles"*
>
>
> >  You have references to real objects so its a real (i.e "owned")
> relationship.
>
> If I store real references instead of Keys' does it become *Owned*, and If
> I store keys instead of *references* does it become *unowned* !!!.
>
> Then why would I take the trouble of unowned, I will store real references
> for all the relations, and all is well.
>
> - The question is, *When I must use Keys (unowned) instead of references,
> otherwise datastore will not support/handle it and through exception or
> whatever.*
>
> The answer to above question will implicitly explain "What is unowned
> relationship" and what is "unowned relationship is not supported"*
>
> Thanks
> SN
>
>
> On Sat, May 1, 2010 at 9:46 PM, datanucleus wrote:
>
>> > *Google says "unowned relationship is not supported"*
>> > What does it mean? *How datastore  identify that *it is unowned
>> relationship**?
>>
>> No idea. It's a Google special. It's not part of any spec so it's for
>> them to answer.
>>
>> > In above example, If I implement it as normal relationship, as shown in
>> > below code, What will happen?.
>> > - Can datastore identify it as unowned relationship and through error?
>>
>> How can it possibly identify it as an unowned relationship? You have
>> references to real objects so its a real (i.e "owned") relationship.
>> You have no references to keys (or object identities).
>>
>> --
>> 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.
>>
>>
>
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: VerifyError on no-op default constructor

2010-05-03 Thread Sudhir Ramanandi
Google, atleast speak, *what does this exception mean, *then I can fix the
freemarker code.


SN

On Fri, Apr 30, 2010 at 10:57 AM, Sudhir Ramanandi wrote:

> If the issue can't be fixed, can any one explain this strange behavior
> atlest ! thn we can fix our code.
>
> Thanks
> SN
>
>
> On Wed, Apr 28, 2010 at 11:06 AM, Sudhir Ramanandi 
> wrote:
>
>> Can anyone from google explain what
>> java.lang.VerifyError: (class:
>> freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: 
>> signature: ()V) Incompatible argument to function, means?
>>
>> See the issue
>> http://code.google.com/p/googleappengine/issues/detail?id=3157
>>
>> I have attached the source of class FreeMarkerJspApplicationContext here.
>>
>> The line that throws above error is "FreeMarkerJspApplicationContext.
>> class.getName();"
>>
>> What's wrong with this class? The class doesn't seems to have any thing
>> unusual. Why this weird behavior?
>>
>> Seems google will never let freemarker to run on GAE
>>
>> Thanks
>> SN
>>
>>
>>
>
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: VerifyError on no-op default constructor

2010-05-03 Thread Sudhir Ramanandi
Thanks for response Don, very much appreciated.

I don't know how to give you the war. It's a basic demonstration of Spring +
freemarker.
The class in concern is from freemarker. The size of war is 47 MB.

I will try to reproduce the issue with a simple servlet+freemarker setup.
and attach the war to the issue.

Thanks
SN

On Mon, May 3, 2010 at 9:24 PM, Don Schwarz  wrote:

> I suspect that this is due to the way we make
> javax.servlet.jsp.JspApplicationContext available to application code but do
> not currently make javax.el.* available.  Thus, the javax.el.ELResolver
> class that you are providing in your application is not the same class that
> your JspApplicationContext implementation should reference.
>
> I don't know that there is anything you can do in your application to work
> around this for the moment (short of not implementing the
> JspApplicationContext interface), but coincidentally we are already planning
> to fix this in an upcoming release.
>
> If you can provide me with a compiled war directory for your test
> application (either privately or by attaching to the bug), I can determine
> whether our solution will work for your case as well.
>
> On Mon, May 3, 2010 at 8:45 AM, Sudhir Ramanandi wrote:
>
>> Google, atleast speak, *what does this exception mean, *then I can fix
>> the freemarker code.
>>
>>
>> SN
>>
>>
>> On Fri, Apr 30, 2010 at 10:57 AM, Sudhir Ramanandi 
>> wrote:
>>
>>> If the issue can't be fixed, can any one explain this strange behavior
>>> atlest ! thn we can fix our code.
>>>
>>> Thanks
>>> SN
>>>
>>>
>>> On Wed, Apr 28, 2010 at 11:06 AM, Sudhir Ramanandi >> > wrote:
>>>
>>>> Can anyone from google explain what
>>>> java.lang.VerifyError: (class:
>>>> freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: 
>>>> signature: ()V) Incompatible argument to function, means?
>>>>
>>>> See the issue
>>>> http://code.google.com/p/googleappengine/issues/detail?id=3157
>>>>
>>>> I have attached the source of class FreeMarkerJspApplicationContext
>>>> here.
>>>>
>>>> The line that throws above error is "FreeMarkerJspApplicationContext.
>>>> class.getName();"
>>>>
>>>> What's wrong with this class? The class doesn't seems to have any thing
>>>> unusual. Why this weird behavior?
>>>>
>>>> Seems google will never let freemarker to run on GAE
>>>>
>>>> Thanks
>>>> SN
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Sudhir Ramanandi
>>> http://www.ramanandi.org
>>>
>>
>>
>>
>> --
>> Sudhir Ramanandi
>> http://www.ramanandi.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-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.
>>
>
>  --
> 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.
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Max Ross - Truth about joins

2010-05-04 Thread Sudhir Ramanandi
Alias does not get initialized..

@Entity
public class Foo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long id;

@Basic
public Key bar;

@OneToOne(fetch = FetchType.LAZY)
@Column(name = "bar", insertable = false, updatable = false)
public Bar barAlias;
}

@Entity
public class Bar {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Key key;

@Basic
public String name;
}

public class UnOwnedRelationshipTest extends BaseDataStoreTest {

public void testRelation() throws EntityNotFoundException {

Bar bar = new Bar();
beginTx();
getEntityManager().persist(bar);
commitTx();

beginTx();
Foo pojo = new Foo();
pojo.bar = bar.key;
getEntityManager().persist(pojo);
commitTx();

pojo = getEntityManager().find(Foo.class, pojo.id);
com.google.appengine.api.datastore.Entity e = DatastoreServiceFactory
.getDatastoreService().get(KeyFactory.createKey("Foo", pojo.id));
assertTrue(e.hasProperty("bar"));

//this fails
assertNotNull(pojo.barAlias);

}
}

The test fails, alias is not initialized..
It does not work even when I use getters/setters to access alias, Neither it
works for @oneToMany as you explained in example.

I use GAE SDK 1.3.2

When using joins,  From Foo result returned, can I do
foor.getBarAlias().getName() !??
-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Supported JSP/Servlet API version not mentioned any where

2010-05-06 Thread Sudhir Ramanandi
Which Servlet/JSP version are supported on app engine is not mentioned
anywhere (or may be not easy to find)
Is it servlet 2.5 ? Who can tell me !

Thanks

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Sudhir Ramanandi
I have life cycle listeners working proper locally.. not tried on cloud
yet..

On Thu, May 6, 2010 at 2:32 PM, Simon  wrote:

> Has anyone managed to get the JPA lifecycle callbacks to work?
>
> I've annotated methods with @PrePersist and @PostLoad and the methods
> just never get called.  I followed the documentation at
>
> http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_callbacks.html
> just to make sure that my methods had the correct signatures.
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Supported JSP/Servlet API version not mentioned any where

2010-05-06 Thread Sudhir Ramanandi
Aah, din't notice that..

Thanks
SN

On Fri, May 7, 2010 at 4:13 AM, Rahul Ravikumar  wrote:

> It is servlet 2.5. If you looked at the web.xml then you would see a
> declaration:
>
> 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">
>
> On May 6, 12:43 am, Sudhir Ramanandi  wrote:
> > Which Servlet/JSP version are supported on app engine is not mentioned
> > anywhere (or may be not easy to find)
> > Is it servlet 2.5 ? Who can tell me !
> >
> > Thanks
> >
> > --
> > Sudhir Ramanandihttp://www.ramanandi.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-j...@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-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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Freemarker + Sitemesh - jsp decorators will not work

2010-05-10 Thread Sudhir Ramanandi
Found one more problem with Freemarker + GAE + sitemesh..

I use sitemesh to decorate pages, the decorator is a jsp file..the pages
which are being decorated are freemarker templates..
it's fine because sitemash just care about the HTML.

The setup runs fine on local environment.. where as when deployed to GAE it
gives me this error..

javax.servlet.ServletContext log: Unhandled exception occurred whilst
decorating page
java.lang.UnsupportedOperationException
at 
freemarker.ext.jsp.FreeMarkerJspFactory.releasePageContext(FreeMarkerJspFactory.java:41)
at 
org.apache.jsp.WEB_002dINF.decorators.default_002ddecorator_jsp._jspService(default_002ddecorator_jsp.java:99)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
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.servlet.Dispatcher.include(Dispatcher.java:192)
at 
com.opensymphony.sitemesh.compatability.OldDecorator2NewDecorator.render(OldDecorator2NewDecorator.java:46)
at 
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:33)
at 
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)



 Seems that app engine is doing some thing strange with FreeMarkerJspFactory
or reusing it in someway which isn't expected.
Any ideas ?

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Potential bug with jetty JspFactory

2010-05-12 Thread Sudhir Ramanandi
See this thread for details
http://sourceforge.net/mailarchive/forum.php?thread_name=628524.81703.qm%40web95503.mail.in.yahoo.com&forum_name=freemarker-devel

I am using freemarker + sitemesh. The decorator is a jsp file where as
actual pages are written in JSP.
That mean i am mixing JSP and freemarker with JSP taglibs in same project.

Every request will cause to render both freemarker templates and
jsp(decorator) as the ftl template output will be decorated by a jsp file.
This is fine and works normally but not on GAE
unless I execute a JSP file before any freemarker templates are executed.

Here's when it works

- I created a hello.jsp file directly under root
- Deploy the application to cloud
- call the hello.jsp file by typing the url in browser
- That's it, from now onward every thing will work as Jetty would have
registered it's own JspFactory. However if I don't do this, it won't work
and give errors.

 See this thread for more details
http://sourceforge.net/mailarchive/forum.php?thread_name=628524.81703.qm%40web95503.mail.in.yahoo.com&forum_name=freemarker-devel

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] gae with spring 2.5.6 , jpa and maven problem

2010-05-15 Thread Sudhir Ramanandi
>>webAppRootKey
>>crud.sandcode.root
>>
>>
>> 
>>log4jConfigLocation
>>/WEB-INF/classes/log4j.properties
>>
>>
>>   
>>index.jsp
>>   
>>
>>
>>
>>
>>
>>
>> So can someone help me , i have included the contextListener but
>> eclipse or maven doesnt seem to notice .
>> 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.
>>
>>
>
>
> --
> --
> Davide Cerbo
> ---
> http://davide.cerbo.born-to-co.de
> http://jesty.it
> ---
> http://www.exmachina.ch
> + 39 329 70 81 927
> ---
>
> --
> 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.
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Spring 3.0.2 wants to use blacklisted javax.naming.Context when using factory-method ...workaround?

2010-05-21 Thread Sudhir Ramanandi
pplicationHandler.handleRequest(BlockingApplicationHandler.java:
> 24)
>at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 398)
>at com.google.net.rpc.impl.Server$2.run(Server.java:852)
>at
> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
> 56)
>at
>
> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
> 576)
>at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
>at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
>at
>
> com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
> 442)
>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:
> 474)
>at
>
> com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
> 831)
>at
> com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
> 207)
>at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> 103)
>at
> com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
> 251)
>at com.google.apphosting.runtime.JavaRuntime
> $RpcRunnable.run(JavaRuntime.java:413)
>at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: javax.naming.Context
>at
>
> com.google.apphosting.runtime.security.UserClassLoader.loadClass(UserClassLoader.java:
> 445)
>at java.lang.ClassLoader.loadClass(Unknown Source)
>at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
>at
> org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:
> 291)
>... 50 more
>
> Anybody has encountered this already? I know JNDI is not allowed on
> GAE, but can Spring be made to not to use it?
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Jetty Bug : Freemarker + Sitemsh (JSP decorators) Will not work

2010-05-23 Thread Sudhir Ramanandi
See http://code.google.com/p/googleappengine/issues/detail?id=3252

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Jetty Bug : Freemarker + Sitemsh (JSP decorators) Will not work

2010-05-24 Thread Sudhir Ramanandi
Can any dev confirm this as a bug ?

On Sun, May 23, 2010 at 1:09 PM, Sudhir Ramanandi wrote:

> See http://code.google.com/p/googleappengine/issues/detail?id=3252
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Using a Custom Domain

2010-06-03 Thread Sudhir Ramanandi
I don't see any way to map my app engine application to the base custom
domain but just the sub domains.
Lets say, I want to map my application to example.com not any subdomain of
example.com

Is it possible?

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Using a Custom Domain

2010-06-03 Thread Sudhir Ramanandi
Just found - Naked domain are not supported

Sad

On Thu, Jun 3, 2010 at 2:42 PM, Sudhir Ramanandi wrote:

> I don't see any way to map my app engine application to the base custom
> domain but just the sub domains.
> Lets say, I want to map my application to example.com not any subdomain of
> example.com
>
> Is it possible?
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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.sql.Time is not a supported property type

2010-06-03 Thread Sudhir Ramanandi
I got this error when querying for an entity that has
@Temporal(TemporalType.TIME)

*Field*

@Basic
@Temporal(TemporalType.TIME)
private Date time;


*Query *
Query q = em.createQuery("select from " + entity.class.getName() + " entity
where entity.time=?1");
q.setParameter(1, date, TemporalType.TIME);
q.getResultList();

And got error

java.lang.IllegalArgumentException: time: java.sql.Time is not a
supported property type.
at 
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedSingleValue(DataTypeUtils.java:174)
at 
com.google.appengine.api.datastore.DataTypeUtils.checkSupportedValue(DataTypeUtils.java:155)
at 
com.google.appengine.api.datastore.Query$FilterPredicate.(Query.java:545)
at com.google.appengine.api.datastore.Query.addFilter(Query.java:231)
at 
org.datanucleus.store.appengine.query.DatastoreQuery.addLeftPrimaryExpression(DatastoreQuery.java:1138)
at 
org.datanucleus.store.appengine.query.DatastoreQuery.addExpression(DatastoreQuery.java:866)
at 
org.datanucleus.store.appengine.query.DatastoreQuery.addFilters(DatastoreQuery.java:827)
at 
org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:228)
at 
org.datanucleus.store.appengine.query.JPQLQuery.performExecute(JPQLQuery.java:77)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
at org.datanucleus.store.query.Query.executeWithMap(Query.java:1398)
at org.datanucleus.jpa.JPAQuery.getResultList(JPAQuery.java:163)



Is this unsupported feature, or I am doing some thing wrong !! (With GAE, it
is difficult to figure out, weather I am wrong, or unsupported ;)

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] AspectJ + Spring

2010-06-06 Thread Sudhir Ramanandi
Hello,

Is any one successfully using Spring + Aspectj for dependency injection in
domain objects
as explained here
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/aop.html#aop-atconfigurable


Does aspectj Load time weaving works properly on GAE

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: AspectJ + Spring

2010-06-07 Thread Sudhir Ramanandi
I Got

Error creating bean with name
'org.springframework.context.weaving.AspectJWeavingEnabler#0':
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'loadTimeWeaver': Initialization of bean failed; nested exception
is java.lang.IllegalStateException: ClassLoader
[com.google.appengine.tools.development.IsolatedAppClassLoader] does NOT
provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom
LoadTimeWeaver or start your Java virtual machine with Spring's agent:
-javaagent:org.springframework.instrument.jar:

On Mon, Jun 7, 2010 at 11:24 AM, Sudhir Ramanandi wrote:

> Hello,
>
> Is any one successfully using Spring + Aspectj for dependency injection in
> domain objects
> as explained here
> http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/aop.html#aop-atconfigurable
>
>
> Does aspectj Load time weaving works properly on GAE
>
> --
> Sudhir Ramanandi
> http://www.ramanandi.org
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] JPA entity listner callbacks are not invoked when using Query API

2010-06-08 Thread Sudhir Ramanandi
When an entity is loaded using query, postLoad() call back is not invoked.
postLoad() works only with entityManager.find(clazz, id)

As per the JPA specification:
"The PostLoad method is invoked before a query result is returned or
accessed or before an association is traversed."

Example:

@EntityListeners(value={FooEntityListner.class})
@Entity
public class Foo extends BaseEntity {

}

public class UnownedRelationLoader {
public void postLoad(BaseEntity entity) {
---
}

Query q = getEntityManager().createQuery("select from " +
Foo.class.getName());

callback will not be called in above case.

Reported the issue here
http://code.google.com/p/googleappengine/issues/detail?id=3326
Please vote for it.

-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-08 Thread Sudhir Ramanandi
Ohh, sorry.. in the example, I gave a wrong class name
"UnownedRelationLoader"
Its FooEntityListner and still it does not work

public class FooEntityListner {
public void postLoad(BaseEntity entity) {
---
}

-- Forwarded message ------
From: Sudhir Ramanandi 
Date: Tue, Jun 8, 2010 at 2:37 PM
Subject: JPA entity listner callbacks are not invoked when using Query API
To: google-appengine-java@googlegroups.com


When an entity is loaded using query, postLoad() call back is not invoked.
postLoad() works only with entityManager.find(clazz, id)

As per the JPA specification:
"The PostLoad method is invoked before a query result is returned or
accessed or before an association is traversed."

Example:

@EntityListeners(value={FooEntityListner.class})
@Entity
public class Foo extends BaseEntity {

}

public class UnownedRelationLoader {
public void postLoad(BaseEntity entity) {
---
}

Query q = getEntityManager().createQuery("select from " +
Foo.class.getName());

callback will not be called in above case.

Reported the issue here
http://code.google.com/p/googleappengine/issues/detail?id=3326
Please vote for it.

-- 
Sudhir Ramanandi
http://www.ramanandi.org



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-09 Thread Sudhir Ramanandi
Really.. using JPA has been a tragedy for me...  I doubt if a real project
can be built on App engine's current JPA support..

On Wed, Jun 9, 2010 at 2:03 PM, Simon  wrote:

> I've had the same problem and to be honest my solution was to move
> away from using JPA onto Objectify - at least there I know what is
> happening, rather than relying on a partial implementation of the JPA
> spec.  It's much better suited to the underlying datastore anyway,
> since JPA just isn't a good fit for BigTable.
>
> On Jun 8, 10:10 am, Sudhir Ramanandi  wrote:
> > Ohh, sorry.. in the example, I gave a wrong class name
> > "UnownedRelationLoader"
> > Its FooEntityListner and still it does not work
> >
> > public class FooEntityListner {
> > public void postLoad(BaseEntity entity) {
> > ---
> >
> >
> >
> > }
> > -- Forwarded message --
> > From: Sudhir Ramanandi 
> > Date: Tue, Jun 8, 2010 at 2:37 PM
> > Subject: JPA entity listner callbacks are not invoked when using Query
> API
> > To: google-appengine-java@googlegroups.com
> >
> > When an entity is loaded using query, postLoad() call back is not
> invoked.
> > postLoad() works only with entityManager.find(clazz, id)
> >
> > As per the JPA specification:
> > "The PostLoad method is invoked before a query result is returned or
> > accessed or before an association is traversed."
> >
> > Example:
> >
> > @EntityListeners(value={FooEntityListner.class})
> > @Entity
> > public class Foo extends BaseEntity {
> >
> > }
> >
> > public class UnownedRelationLoader {
> > public void postLoad(BaseEntity entity) {
> > ---
> > }
> >
> > Query q = getEntityManager().createQuery("select from " +
> > Foo.class.getName());
> >
> > callback will not be called in above case.
> >
> > Reported the issue herehttp://
> code.google.com/p/googleappengine/issues/detail?id=3326
> > Please vote for it.
> >
> > --
> > Sudhir Ramanandihttp://www.ramanandi.org
> >
> > --
> > Sudhir Ramanandihttp://www.ramanandi.org- 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-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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-09 Thread Sudhir Ramanandi
Thanks Simon, I will have a look at Objectify.. However I am more inclined
toward using JPA..

Thanks
SN

On Wed, Jun 9, 2010 at 7:21 PM, Simon  wrote:

> If you're not trying to write a cross-platform app, I'd really
> recommend giving Objectify or one of the alternatives (Twig, SimpleDS)
> a try.
>
> My conversion from JPA to Objectify took me very little time,
> primarily due to the excellent documentation.  Spin-up time on GAE
> reduced significantly as well!
>
> On Jun 9, 10:17 am, Sudhir Ramanandi  wrote:
> > Really.. using JPA has been a tragedy for me...  I doubt if a real
> project
> > can be built on App engine's current JPA support..
> >
> >
> >
> >
> >
> > On Wed, Jun 9, 2010 at 2:03 PM, Simon  wrote:
> > > I've had the same problem and to be honest my solution was to move
> > > away from using JPA onto Objectify - at least there I know what is
> > > happening, rather than relying on a partial implementation of the JPA
> > > spec.  It's much better suited to the underlying datastore anyway,
> > > since JPA just isn't a good fit for BigTable.
> >
> > > On Jun 8, 10:10 am, Sudhir Ramanandi  wrote:
> > > > Ohh, sorry.. in the example, I gave a wrong class name
> > > > "UnownedRelationLoader"
> > > > Its FooEntityListner and still it does not work
> >
> > > > public class FooEntityListner {
> > > > public void postLoad(BaseEntity entity) {
> > > > ---
> >
> > > > }
> > > > -- Forwarded message --
> > > > From: Sudhir Ramanandi 
> > > > Date: Tue, Jun 8, 2010 at 2:37 PM
> > > > Subject: JPA entity listner callbacks are not invoked when using
> Query
> > > API
> > > > To: google-appengine-java@googlegroups.com
> >
> > > > When an entity is loaded using query, postLoad() call back is not
> > > invoked.
> > > > postLoad() works only with entityManager.find(clazz, id)
> >
> > > > As per the JPA specification:
> > > > "The PostLoad method is invoked before a query result is returned or
> > > > accessed or before an association is traversed."
> >
> > > > Example:
> >
> > > > @EntityListeners(value={FooEntityListner.class})
> > > > @Entity
> > > > public class Foo extends BaseEntity {
> >
> > > > }
> >
> > > > public class UnownedRelationLoader {
> > > > public void postLoad(BaseEntity entity) {
> > > > ---
> > > > }
> >
> > > > Query q = getEntityManager().createQuery("select from " +
> > > > Foo.class.getName());
> >
> > > > callback will not be called in above case.
> >
> > > > Reported the issue herehttp://
> > > code.google.com/p/googleappengine/issues/detail?id=3326
> > > > Please vote for it.
> >
> > > > --
> > > > Sudhir Ramanandihttp://www.ramanandi.org
> >
> > > > --
> > > > Sudhir Ramanandihttp://www.ramanandi.org-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-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.
> >
> > --
> > Sudhir Ramanandihttp://www.ramanandi.org- 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-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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: How active is GAE team in fixing bugs?

2010-06-10 Thread Sudhir Ramanandi
As far as I know, there is very low activity in fixing bugs, especially in
datanuclues plugin..
I am monitoring few bugs since last six or more months and there's no
activity.. even though bugs are accepted.
Few are very primitive bugs..

On Fri, Jun 11, 2010 at 2:35 AM, Ikai L (Google)  wrote:

> It's internal. You should continue to use the public tracker.
>
> On Thu, Jun 10, 2010 at 1:50 PM, Greg  wrote:
>
>> Not sure I understand this answer. Ikai, are you saying you don't use
>> the issues tracking list provided on googleappengine/issues ?  If not,
>> is there a "real" list we can use somewhere?  If not, why not?
>>
>>
>> On Jun 10, 2:00 pm, "Ikai L (Google)"  wrote:
>> > Pretty active. We don't use that issue tracker, so we occasionally have
>> to
>> > scrub it. It's all a question of balancing priorities.
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Jun 9, 2010 at 12:57 AM, Marc Guillemot 
>> wrote:
>> > > Hi,
>> >
>> > > I wonder how active GAE team is to fix bugs. I see only a very very
>> limited
>> > > activity in the bugs I've reported and in the numerous ones I've
>> starred.
>> >
>> > > Cheers,
>> > > Marc.
>> > > --
>> > > Blog:http://mguillem.wordpress.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-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.
>> >
>> > --
>> > 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- 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-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.
>>
>>
>
>
> --
> 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
>
>  --
> 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.
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Spring JPA problems

2010-06-10 Thread Sudhir Ramanandi
I remember I had encountered the same error.. I don't remember what I did.
But here's a part of my application context.. and yest It works :)











classpath:META-INF/persistence.xml














Let me know if it solves your proble.

Thanks
SN

On Fri, Jun 11, 2010 at 8:00 AM, Cleber Dantas Silva wrote:

> Hi everybody !
>
> Im using SDK 1.3.4  Spring ORM 3.0.2
>
> Im with some problems using  on GAE.
>
> Im with the follow config:(applicationContext-dao.xml)
>
>  class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
>   class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>   
>
>
> 
>   class="org.springframework.orm.jpa.JpaTransactionManager">
> 
>  
>
> 
> 
>  
>  
>
>
> When i start the application, it returns:
>
> SEVERE: Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'myEmf' defined in ServletContext resource
> [/WEB-INF/applicationContext-dao.xml]: Invocation of init method failed;
> nested exception is javax.persistence.PersistenceException: Provider error.
> Provider: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
>  at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
>
> Did you experience this error?
>
> Thanks !
> Cleber
>
>
>
>
>
>  --
> 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.
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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] Spring Security + GAE

2010-06-12 Thread Sudhir Ramanandi
I have Spring security running properly on GAE...  But I don't use GWT..
What help are you looking for...


On Fri, Jun 11, 2010 at 11:39 PM, Cleber Dantas Silva wrote:

> Hi!
>
> I need help to integrate Spring Security 3.0.2 with GWT RPC Methods.
>
> Do you have any sample project or configuration to help me?
>
> Thanks!
> Cleber
>
> --
> 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.
>



-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: javaassist, AspectJ, Will it play?

2010-06-13 Thread Sudhir Ramanandi
I tried AspectJ+Spring and it works.. AspectJ load time weaving does not
work.. you have to use AspectJ compile time weaving.

SN

On Mon, Jun 14, 2010 at 10:33 AM, Vlad Skarzhevskyy
wrote:

> Javaassit works fine.  We use it to create classes at run-time.
>
> The problem is with current start-up time on GAE, adding code
> generation in our application was slowing us down by 2 sec. So we
> moved all the code generation to build time.  We still use Javaassit
> in GAE development environment .
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: Prerelease SDK 1.3.5 is out!

2010-06-16 Thread Sudhir Ramanandi
Congratulations for the release..

But It's to sad to see no updates on datanucleus/JPA side. Really google is
giving too little attention to Datanucleus plugin

~SN

On Thu, Jun 17, 2010 at 9:19 AM, Andrei  wrote:

> What is "Remote API commands"?
>
> On Jun 16, 2:06 pm, "Ikai L (Google)"  wrote:
> > Hey developers!
> What >
> > We've release the prerelease SDK for 1.3.5. Get it here:
> >
> > http://code.google.com/p/googleappengine/downloads/list
> >
> > If you want to try out new features locally before they go live, here's
> your
> > chance. We welcome any feedback you have. Release notes for Java are
> below:
> >
> > Version 1.3.5
> > =
> > - Ability to configure the Task Queue storage limit with the
> >   total-storage-limit field in the queue.xml file.
> > - Task Queues now support up to 50 qps per queue, up from 50 qps per app.
> > - Developers can programmatically access Blobs with BlobstoreInputStream,
> > which
> >   provides an InputStream view of a blob in Blobstore
> > - Content-range headers for Blobs are supported.
> > - Bulkloader transform helpers for lists and hierarchical keys were
> added.
> > - Remote API commands can be sent over HTTPS or HTTP.
> > - Admin Console logs now include information on request time latency.
> > - Fixed an issue where requesting /appstats would not properly direct to
> >   /appstats/.
> > - Fixed an issue with inconsistent URL mappings between the SDK and
> > production.
> >http://code.google.com/p/googleappengine/issues/detail?id=2598
> >
> > --
> > 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
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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: JDO/JPA Snippets That Work - Creating a bidirectional, owned, one-to-many relationship

2010-06-30 Thread Sudhir Ramanandi
Same here..
With JDO/JPA you solve one issue/limitation and you encounter 2 another.


On Wed, Jun 30, 2010 at 8:51 PM, Ian Marshall wrote:

> Hello James,
>
> 4 hours? Is that all? I would be far too embarrassed to tell you how
> long it took me!
>
>
> On Jun 29, 8:13 pm, James  wrote:
> > I'd love to see Max Ross continue on these posts.  I've burned about 4
> > hrs now trying to get JDO owned, bidirectional relationships working.
> > It seems like every issue I fix, another pops up.  Whack a mole...
> > I'm experiencing everything from:
> >
> > - Child entities persisting, but not subsequently loading (even with
> > fetch groups, fetch depths)
> > - Bidirectional reference being lost on detachCopy
> > - Reconnecting a detached object throwing random errors in the
> > ArrayList wrapper
> >
> > I'm tired of feeling my way around in the dark and would LOVE a full
> > example (CRUD, including detached entities).  Barring that, Twig, here
> > I come.
> >
> > Frustrated,
> >
> > James
>
> --
> 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.
>
>


-- 
Sudhir Ramanandi
http://www.ramanandi.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-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.