Hi,
I am trying to deploy application using spring and jdo, however I am
getting NamingException. I understand that google app engine doesn't
support JNDI and I have tried to follow the suggestions and define
internalPersistenceAnnotationProcessor in the application context,
however that doesn't seem to affect anything.

I am using the latest version of spring 2.5.6.SEC01 and datanucleus
APIs provided by the 1.2.2 SDK. Do you have any other suggestions?

Stack trace:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.springframework.context.annotation.internalPersistenceAnnotationProcessor':
Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: javax/naming/NamingException
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:480)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)


applicationContext:

<bean id="pmf"
class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
<property name="configLocation" value="classpath:jdo-
google.properties"/>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jdo.JdoTransactionManager">
  <property name="persistenceManagerFactory">
    <ref local="pmf"/>
  </property>
</bean>
<bean id="taskManager"
class="com.examples.tasks.core.impl.TaskManagerImpl">
  <property name="persistenceManagerFactory">
    <ref local="pmf" />
      </property>
</bean>
<context:annotation-config/>
<tx:annotation-driven/>
<bean
id="org.springframework.context.annotation.internalPersistenceAnnotationProcessor"
  class="java.lang.String" />


JDO Google properties:
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory
javax.jdo.option.ConnectionURL=appengine
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.NontransactionalWrite=true
javax.jdo.option.RetainValues=true
datanucleus.appengine.autoCreateDatastoreTxns=true


Sample controller:

@Controller
public class SiteEntryController {
        private final Logger logger = Logger.getLogger
(SiteEntryController.class);

        @Autowired
        private TaskManager taskMgr;

        @RequestMapping(value="/index.htm")
        public ModelAndView handleIndex() {
                taskMgr.addTask(new Task("Task 1", "Drink coffee"));
                taskMgr.addTask(new Task("Task 2", "Drink beer"));
                taskMgr.addTask(new Task("Task 3", "Sleep"));

                Collection<Task> tasks =  taskMgr.findTasks();
                ModelMap map = new ModelMap();
                map.addAttribute("tasks", tasks);
                return new ModelAndView("index", map);
        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to