Search Results

Search found 1098 results on 44 pages for 'persistence'.

Page 1/44 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Difference between LiveCD, LiveUSB, full-install, and persistence?

    - by Jay
    I am currently running Ubuntu as a guest vm on a Win 7 host via VirtualBox, but I would like to have a portable version of Ubuntu when I am not using my laptop. I am unsure as to the difference between the following: 1)LiveCD with persistence; 2)LiveCD without persistence; 3)LiveUSB with persistence; 4)LiveUSB without persistence; 5)Full-install. I have a USB flash drive (32GB), and I also have empty DVDs lying around. I know that persistence means that data can be saved, but I am unsure as to which option to choose. What is the difference between a LiveUSB and a full-install on a USB thumbdrive and why would I want to pick one over the other? Thanks for any help.

    Read the article

  • java.lang.NoClassDefFoundError: javax/persistence/Persistence

    - by ManWard
    hi , i'm using Netbeans 6.8 and build simple Maven web application project. create Entity and main file for persist Entity [also create persist unit] and use EclipsLink. but when i run main file get this error : Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Persistence at Main.main(Main.java:34) Caused by: java.lang.ClassNotFoundException: javax.persistence.Persistence at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 1 more in netbeans projects window and in my project libraries folder only add this package : javaee-web-api-6.0.jar [provided] please help me for solve this Error thanks

    Read the article

  • Netbeans / persistence API error

    - by Danny
    I am following this tutorial, I'm using netbeans 6.5.1 http://www.netbeans.org/kb/docs/java/gui-db-custom.html When I get to the part where I create the "new entity class from database", which is in the "Customizing the Master/Detail View" section of the tutoiral. I can't ever compile because I get this error in the task list (and I get a runtime error when I run)... Atleast I think these two are related. Error Named queries can be defined only on an Entity or MappedSuperclass class. Countries.java 27 C:/Users/Danny/dev/NetBeansProjects/Test/src/test Error Named queries can be defined only on an Entity or MappedSuperclass class. Products.java 28 C:/Users/Danny/dev/NetBeansProjects/Test/src/test note that all I do is do newentity classes from database, and do exactly as the tutorial says. I stopped on the tutoral at the "Adding Dialog Boxes" heading, because the tutorial writer says the application should be "partially functional" which makes me think it should atleast RUN. I haven't edited the generated code outside of what I've been instructed to do. This is the output produced by the netbeans output console: run: Jun 23, 2009 3:03:23 PM org.jdesktop.application.Application$1 run SEVERE: Application class test.TestApp failed to launch javax.persistence.PersistenceException: No Persistence provider for EntityManager named MyBusinessRecordsPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Local Exception Stack: Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7 Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:643) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:171) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:239) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155) ... 14 more Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228) ... 19 more Caused by: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.ValidationException.invalidMapping(ValidationException.java:1069) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwInvalidMappingEncountered(MetadataValidator.java:275) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:161) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:579) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:512) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:246) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:607) ... 18 more The following providers: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory. at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class test.TestApp failed to launch at org.jdesktop.application.Application$1.run(Application.java:177) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named MyBusinessRecordsPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory: oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Local Exception Stack: Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7 Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:643) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:171) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:239) at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255) at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155) ... 14 more Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: predeploy for PersistenceUnit [MyBusinessRecordsPU] failed. Internal Exception: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228) ... 19 more Caused by: Exception [TOPLINK-7244] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.ValidationException Exception Description: An incompatible mapping has been encountered between [class test.Products] and [class test.Orders]. This usually occurs when the cardinality of a mapping does not correspond with the cardinality of its backpointer. at oracle.toplink.essentials.exceptions.ValidationException.invalidMapping(ValidationException.java:1069) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwInvalidMappingEncountered(MetadataValidator.java:275) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:161) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:579) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:512) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:246) at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:370) at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:607) ... 18 more The following providers: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory. at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at test.TestView.initComponents(TestView.java:337) at test.TestView.(TestView.java:39) at test.TestApp.startup(TestApp.java:19) at org.jdesktop.application.Application$1.run(Application.java:171) ... 8 more BUILD SUCCESSFUL (total time: 2 seconds) I'm thinking my netbeans application must be misconfigured or something, I can't seem to find anyone with the same problem as myself

    Read the article

  • No Persistence provider for EntityManager named ...

    - by Robert A Henru
    I have my persistence.xml with the same name, using toplink, under META-INF directory. Then I have my code calling it with... EntityManagerFactory emfdb = Persistence.createEntityManagerFactory("agisdb"); Yet, I got the following error message 2009-07-21 09:22:41,018 [main] ERROR - No Persistence provider for EntityManager named agisdb javax.persistence.PersistenceException: No Persistence provider for EntityManager named agisdb at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60) Here is the persistence.xml... <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="agisdb"> <class>com.agis.livedb.domain.AddressEntity</class> <class>com.agis.livedb.domain.TrafficCameraEntity</class> <class>com.agis.livedb.domain.TrafficPhotoEntity</class> <class>com.agis.livedb.domain.TrafficReportEntity</class> <properties> <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/agisdb"/> <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/> <property name="toplink.jdbc.user" value="root"/> <property name="toplink.jdbc.password" value="password"/> </properties> </persistence-unit> </persistence> It should have been in the classpath... Yet, I got the above error... Really appreciate any help... Thanks

    Read the article

  • Best Persistence choice for J2EE-App with frequently changing Data Model

    - by Ben-G
    Whenever I develop a J2EE-Application, I at some point decide to switch from my dummy Persistence (Simply Using Lists and other Data Structures) to some Sort of Database Persistence. Mostly when I hope the Data Model is more or less complete. From this point on, changes to the data model become exhausting, but unluckily they occur rather often. I've used different Object-Relational-Mappers (iBatis, Hibernate) for my projects. They definitely reduce the pain coming with Data Model changes, but they anyway let me adjust code/configuration at 3 or 4 places for every single change. To me, that's cumbersome and error prone. I made a better experience with DB4O, which simply persists Java Objects as they are, but I believe it's performance does not scale for huge applications. Is there anyway to maintain performance while letting out all the ugly configuration work? I'm seeking a performant framework which really hides persistence from my code. Wish for thinking? Or am I missing out THE technology? Hope you can help.

    Read the article

  • Invalid XML in persistence.xml : Init method

    - by James.Elsey
    I'm getting the following error when I try to startup my application on google app engine: Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@8fcc7b{/,/base/data/home/apps/sales-tracker/3.340980411948080671} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid XML in persistence unit from URL [file:/base/data/home/apps/sales-tracker/3.340980411948080671/WEB-INF/classes/META-INF/persistence.xml] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:191) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:168) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123) at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:243) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5485) at com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:5483) at com.google.net.rpc.impl.BlockingApplicationHandler.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:536) 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:404) at java.lang.Thread.run(Unknown Source) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid XML in persistence unit from URL [file:/base/data/home/apps/sales-tracker/3.340980411948080671/WEB-INF/classes/META-INF/persistence.xml] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) ... 47 more Caused by: java.lang.IllegalArgumentException: Invalid XML in persistence unit from URL [file:/base/data/home/apps/sales-tracker/3.340980411948080671/WEB-INF/classes/META-INF/persistence.xml] at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.readPersistenceUnitInfos(PersistenceUnitReader.java:151) at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.readPersistenceUnitInfos(DefaultPersistenceUnitManager.java:303) at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.preparePersistenceUnitInfos(DefaultPersistenceUnitManager.java:275) at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.afterPropertiesSet(DefaultPersistenceUnitManager.java:260) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:192) at org.springframework.orm.jpa.AbstractEnti My persistence.xml looks as follows, as taken from the GAE documentation <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"version="1.0"> <persistence-unit name="transactions-optional"> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider> <properties> <property name="datanucleus.NontransactionalRead" value="true" /> <property name="datanucleus.NontransactionalWrite" value="true" /> <property name="datanucleus.ConnectionURL" value="appengine" /> </properties> </persistence-unit> </persistence> Is there something wrong with my persistence file? Or could my errors be caused elsewhere? Can someone please give me some pointers thanks

    Read the article

  • JPA persistence.xml share same jar file

    - by user213855
    Hi! I'm wondering if I can share the same jar file for several persistence units.. I mean: I have two persistence units described in my persistence.xml file and the entities are not in the same JAR. Entities are in a separated JAR file but, in that one, there are entites for both persistence units. I think I red somewhere that I coould use tag something like this: externalEntities.jar#com.mycompany.EntityA so I could separate them. I tried this solution and it doesn't work. Now I guess that it couldn't be done to package all entities (for two different persistence units) in the same JAR file. What do yo think?

    Read the article

  • EJB3 - using 2 persistence units within a transaction (Exception: Local transaction already has 1 no

    - by Sorcha
    I am trying to use 2 persistence units within the same transaction in a JEE application deployed on Glassfish. The 2 persistence units are defined in persistence.xml, as follows: <persistence-unit name="BeachWater"> <jta-data-source>jdbc/BeachWater</jta-data-source> ... <persistence-unit name="LIMS"> <jta-data-source>jdbc/BeachWaterLIMS</jta-data-source> ... These persistence units correspond to JDBC resources and connection pools which I had defined in Glassfish as follows (include one here as both are identical apart from names & database connection info): JDBC Resource: JNDI Name: jdbc/BeachWaterLIMS Pool Name: BEACHWATER_LIMS Connection Pool: Name: BEACHWATER_LIMS Datasource Classname: com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource Resource Type: javax.sql.ConnectionPoolDataSource There are 3 stateless session beans, LimsServiceBean, AnalysisServiceBean and AnalysisDataTransformationServiceBean. Here are the relevant snippets from LimsServiceBean: @PersistenceContext(unitName = "LIMS") EntityManager em; ... public ArrayList<Sample> getLatestLIMSData() { Query q = em.createNamedQuery("Sample.findBySubTypeStatus"); return new ArrayList<Sample>(q.getResultList()); } From AnalysisServiceBean: @PersistenceContext(unitName = "BeachWater") EntityManager em; ... public ArrayList<AnalysisType> getAllAnalysisTypes() { Query q = em.createNamedQuery("AnalysisType.findAll"); return new ArrayList<AnalysisType>(q.getResultList()); } And from AnalysisDataTransformationServiceBean: @EJB private AnalysisService analysisService; @EJB private LimsService limsService; public void transformData() { List<AnalysisType> analysisTypes = analysisService.getAllAnalysisTypes(); ArrayList<Sample> samples = limsService.getLatestLIMSData(); This call to limsService.getLatestLIMSData() caused the following exception: [exec] Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.DatabaseException [exec] Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: java.lang.IllegalStateException: Local transaction already has 1 non-XA Resource: cannot add more resources. Having consulted this page, http://msdn.microsoft.com/en-us/library/ms378484.aspx (among many others), I tried changing the definition of the connection pools to: Connection Pool: Name: BEACHWATER_LIMS Datasource Classname: com.microsoft.sqlserver.jdbc.SQLServerXADataSource Resource Type: javax.sql.XADataSource Ping via the Glassfish admin console succeeds, but call to analysisService.getAllAnalysisTypes() now throws an exception: Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException Any ideas?

    Read the article

  • JPA 2.0, hiberante 3.5, jars & persistence.xml location

    - by phmr
    I'm building a desktop application using hibernate 3.5 & JPA 2.0. I have 2 jars, the lib, which defines every entity and DAO, packages looks like this : org.my.package.models org.my.package.models.dao org.my.package.models.utils In org.my.package.utils I defined my hibernate utility class for getting EM & EMF instances, which means the lib is bound to a Persistence Unit name but that's not a problem for now (anyway you can recommend me a better way to manage that) the second jars is built as follow: org.my.package.app META-INF is defined on the root of the project which means in my jar I can find this directories directly in the root: META-INF/ META-INF/persistence.xml org/ org/my/ ... org/my/package/app/Main.class META-INF/ When I run the app, hibernate doesn't managed to find persistence.xml it throws an exception something like "package or class for PersistenceUnitName not found". I googled a bit about the problem but I can't get the source code organisation right. Any help ?

    Read the article

  • Booting Linux from External HDD, with persistence

    - by Moriarty
    I am trying to install Linux, specifically Lubuntu or BackTrack 5 on an external HDD (Seagate FreeAgent GoFlex) but I have had no luck using YUMI, or Untebootin to get it working. I want the hard drive to be able to save the data within Linux (As in, If I install a program, it will stay there). I also tried doing this with a flash drive, which does boot, but it does not save data (I tried following Pendrive's tutorial on creating a casper-rw file and adding "persistent" to various files, but I cannot get it to save files. Basically, I just want a form of linux on a portable device that will save files and settings between boots Note: I do not have a CD to install from. Any help would be greatly appreciated, Thanks!

    Read the article

  • Why isn't persistence working on Lubuntu 12.04 Live-USB?

    - by Frodik
    I have used Universal-USB-Installer ever since to install different Linux versions to USB flash drive. But now with Lubuntu 12.04 even though I do the same process by selecting persistence file, it gets created but is never used in Lubuntu. Every time I boot into Lubuntu on flash, it is fresh new Lubuntu without my changes I did last time I have booted it. Anyone can help me or give me some hints ? Thanks in advance.

    Read the article

  • ejb3-persistence.jar source

    - by Randy Stegbauer
    Well, I must be brain-damaged, because I can't find the java source for Sun's persistence.jar or JBoss's ejb3-persistence.jar JPA package. They are open-source aren't they? I looked all over the java.sun.com site as well as the GlassFish wiki, but came up empty. I'd like a src.zip or folder like Sun delivers with Java JDKs. Of course, I really don't have to have it, but I think it's fun to browse the source once in a while. And it helps me to debug my code sometimes. Thank you, Randy Stegbauer

    Read the article

  • Creating database desktop application with data manipulation in Netbeans using Java Persistence

    - by Lulu
    It's my first time to use Persistence in developing a Java program because I usually connect via JDBC. I read that for large amounts of data, it is best to use persistence. I tried playing with the CRUD example of Netbeans. It's not very helpful thought because it only connects to the DB and allows addition and deletion of records. I need something that will allow me to manipulate the data like if the value from column C1 of table T1 is such, it will retrieve data from table t2. In short, I need to apply conditions before knowing what to retrieve exactly. The example in CRUD example already has a specific table to retrieve and only acts like a database manager. How is it possible to retrieve a specific item first then from this, will determine the next steps to be done. I'm also using embedded JavaDB/Derby as my database (also my first time to use because I usually use remote mysql)

    Read the article

  • WPF: Reloading app parts to handle persistence as well as memory management.

    - by Ingó Vals
    I created a app using Microsoft's WPF. It mostly handles data reading and input as well as associating relations between data within specific parameters. As a total beginner I made some bad design decision ( not so much decisions as using the first thing I got to work ) but now understanding WPF better I'm getting the urge to refactor my code with better design principles. I had several problems but I guess each deserves it's own question for clarity. Here I'm asking for proper ways to handle the data itself. In the original I wrapped each row in a object when fetched from database ( using LINQ to SQL ) somewhat like Active Record just not active or persistence (each app instance had it's own data handling part). The app has subunits handling different aspects. However as it was setup it loaded everything when started. This creates several problems, for example often it wouldn't be neccesary to load a part unless we were specifically going to work with that part so I wan't some form of lazy loading. Also there was problem with inner persistance because you might create a new object/row in one aspect and perhaps set relation between it and different object but the new object wouldn't appear until the program was restarted. Persistance between instances of the app won't be huge problem because of the small amount of people using the program. While I could solve this now using dirty tricks I would rather refactor the program and do it elegantly, Now the question is how. I know there are several ways and a few come to mind: 1) Each aspect of the program is it's own UserControl that get's reloaded/instanced everytime you navigate to it. This ensures you only load up the data you need and you get some persistancy. DB server located on same LAN and tables are small so that shouldn't be a big problem. Minor drawback is that you would have to remember the state of each aspect so you wouldn't always start at beginners square. 2) Having a ViewModel type object at the base level of the app with lazy loading and some kind of timeout. I would then propegate this object down the visual tree to ensure every aspect is getting it's data from the same instance 3) Semi active record data layer with static load methods. 4) Some other idea What in your opinion is the most practical way in WPF, what does MVVM assume?

    Read the article

  • Errors rose when a Netbean Maven Project tries to run

    - by Zakaria
    Hi everybody, I installed NetBeans 6.8 on Vista and and I'm trying to execute a simple Maven Project. When I ran the project, I got this set of errors: WARNING: You are running embedded Maven builds, some build may fail due to incompatibilities with latest Maven release. To set Maven instance to use for building, click here. Scanning for projects... [#process-resources] [resources:resources] Using default encoding to copy filtered resources. [#compile] [compiler:compile] Nothing to compile - all classes are up to date [exec:exec] [EL Info]: 2010-04-04 18:22:54.907--ServerSession(15532856)--EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931 [EL Severe]: 2010-04-04 18:22:54.929--ServerSession(15532856)--Local Exception Stack: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:392) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) ... 4 more [ERROR]The following mojo encountered an error while executing: [ERROR]Group-Id: org.codehaus.mojo [ERROR]Artifact-Id: exec-maven-plugin [ERROR]Version: 1.1.1 [ERROR]Mojo: exec [ERROR]brought in via: Direct invocation [ERROR]While building project: [ERROR]Group-Id: com.mycompany [ERROR]Artifact-Id: chapter2_ex1 [ERROR]Version: 1.0-SNAPSHOT [ERROR]From file: C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\pom.xml [ERROR]Reason: Result of cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_11\bin\java.exe" -classpath C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\target\classes;C:\Users\Charlotte\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\javax.persistence\2.0.0\javax.persistence-2.0.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\eclipselink\2.0.0-RC1\eclipselink-2.0.0-RC1.jar com.mycompany.chapter2_ex1.Main" execution is: '1'. ------------------------------------------------------------------------ For more information, run with the -e flag ------------------------------------------------------------------------ BUILD FAILED ------------------------------------------------------------------------ Total time: 3 seconds Finished at: Sun Apr 04 18:22:55 CEST 2010 Final Memory: 47M/94M ------------------------------------------------------------------------ Theses exceptions rose even if I can run the database by using the console (ij) and when I connect the Database, no errors are showing. Can you help me please? Thank you very much. Regards.

    Read the article

  • Best Persistence API for use with GWT

    - by KevMo
    What is the best persistence API for use with GWT? Sadly, the application will be hosted on my own java server, as I will need more control than GAE will give me. I know I will need to have two sets of my entities, one for the server side, and some pojo's for the client side. I'm looking to make the mapping of the data as simple as possible between the two, but these will be deeply nested objects so it has to be robust. I was looking at Dozer for my mapping needs. Previously I've used EJB3 with TopLink, so that's very familiar to me, but I would like to get community input on what other API's work well with Dozer and GWT.

    Read the article

  • Persistence provider for Java that supports final fields

    - by naeron84
    I'm very new to Java but I've been developing a habit to use final wherever possible declaring immutability which i think is a good thing. (Consider f#) I've read that JPA does not support final fields. Hibernate, TopLink? I'm not sure about these but i prefer JPA for now. Is that even possible theoretically - let's say through reflection - to modify final fields after creation? My guess would be... NO :) What would be certainly possible for a persistence solution is to support constructors with parameters. At least i see no reason that would make this impossible. Mapping would be a little tricky i guess. This is an alternative solution. Suggestions?

    Read the article

  • Memory-Mapped Files & Transparent Persistence of Java Objects

    - by geeko
    Greeting All, I want to achieve transparent persistence of Java objects through memory-mapped files (utilize the OS paging/swapping mechanism). My problem is: how can I move a Java object to my memory-mapped block ? Plus, how can I force a new object instance to reside in such blocks ? As you all know, a memory-mapped block can be seen as a byte array, and what I am really asking here is how to overlap the address space of Java objects with the one of such arrays ? If Java does not allow me for this, what cross-platform & garbage-collecting OO language would you advise me to use ? Thank you all in advance.

    Read the article

  • Android Activities UI Persistence

    - by aandroid
    I need to have two activities in an Android app that can be switched between each other with UI persistence as follows: Activity A launches Activity B. User triggers some UI changes in Activity B. Activity B returns to Activity A (by a call to onBackPressed() or something similar) Activity A re-launches Activity B. I would like the changes made in step 2 to be visible in step 4. I have tried using the singleInstance activity tag on Activity B to no avail. I would also prefer a more elegant solution than simply writing all object properties to a file or SQLite table. It seems that this behaviour must be easily achievable given that Android does it automatically for calls to onBackPressed() where the parent Activity's UI is saved. Any help is much appreciated.

    Read the article

  • Implementing Transparent Persistence

    - by Jules
    Transparent persistence allows you to use regular objects instead of a database. The objects are automatically read from and written to disk. Examples of such systems are Gemstone and Rucksack (for common lisp). Simplified version of what they do: if you access foo.bar and bar is not in memory, it gets loaded from disk. If you do foo.bar = baz then the foo object gets updated on disk. Most systems also have some form of transactions, and they may have support for sharing objects across programs and even across a network. My question is what are the different techniques for implementing these kind of systems and what are the trade offs between these implementation approaches?

    Read the article

  • What data structure to use / data persistence

    - by Dave
    I have an app where I need one table of information with the following fields: field 1 - int or char field 2 - string (max 10 char) field 3 - string (max 20 char) field 4 - float I need the program to filter on field 1 based upon a segmented control and select a field 2 from a picker. From this data I need to look up field 4 to use in a calculation. Total records will be about 200. I never see it go above 400 - 500. I am going to use a singleton which I am able to do, I just need help with the structure for this with data persistence. What type of data structure should I use for this and should I use NSNumber, NSString, etc. or old data types like float, Char, etc. I thought about a struct put into an array but there is probably a better way. This is new to me so any help or reference to examples would be great. I also thought about a plist or dictionary but it looks like it is just a lookup and a field which obviously won't work. Core data looked like overkill to me. Also, with any recommendation how should I get initial data into it? I want the user to be able to edit and add to the database. Sorry for the old terms, you can see what generation I am from... Thanks in advance!!!!

    Read the article

  • Why put a DAO layer over a persistence layer (like JDO or Hibernate)

    - by Todd Owen
    Data Access Objects (DAOs) are a common design pattern, and recommended by Sun. But the earliest examples of Java DAOs interacted directly with relational databases -- they were, in essence, doing object-relational mapping (ORM). Nowadays, I see DAOs on top of mature ORM frameworks like JDO and Hibernate, and I wonder if that is really a good idea. I am developing a web service using JDO as the persistence layer, and am considering whether or not to introduce DAOs. I foresee a problem when dealing with a particular class which contains a map of other objects: public class Book { // Book description in various languages, indexed by ISO language codes private Map<String,BookDescription> descriptions; } JDO is clever enough to map this to a foreign key constraint between the "BOOKS" and "BOOKDESCRIPTIONS" tables. It transparently loads the BookDescription objects (using lazy loading, I believe), and persists them when the Book object is persisted. If I was to introduce a "data access layer" and write a class like BookDao, and encapsulate all the JDO code within this, then wouldn't this JDO's transparent loading of the child objects be circumventing the data access layer? For consistency, shouldn't all the BookDescription objects be loaded and persisted via some BookDescriptionDao object (or BookDao.loadDescription method)? Yet refactoring in that way would make manipulating the model needlessly complicated. So my question is, what's wrong with calling JDO (or Hibernate, or whatever ORM you fancy) directly in the business layer? Its syntax is already quite concise, and it is datastore-agnostic. What is the advantage, if any, of encapsulating it in Data Access Objects?

    Read the article

  • Web Frameworks caring about persistence?

    - by Mik378
    I have noticed that Play! Framework encompasses persistence strategy (like JPA etc...) Why would a web framework care about persistence ?! Indeed, this would be the job of the server-sides components (like EJB etc...), wouldn't this? Otherwise, client would be too coupled with server's business logic. UPDATE: One answer would be : it's more likely used for simple application including itself the whole business logics. However, for large applications with well-designed layers(services, domain, DAO's etc..), persistence is not recommended within web client layer since there would be several different web(or not) clients.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >