Thats good news! Well obviously I am doing something wrong. When i discovered that I have to remove the appengine jar from my classpath - to avoid problem with dataNucleus - yesterday, I also tried the same in my dev branch with OpenJPA. I saw some other exception. But now that I know it should work, i can continue investigating.
It's definitly a filebased instance of Derby DB. My connection string points to "C:\bin\apache-james\..." cheers On 30 Mai, 19:27, Patrick Julien <[email protected]> wrote: > OpenJPA works fine with GWT. Your issues have to do with the fact > you're running on AppEngine. I don't even see how it's possible you > got derby running on AppEngine unless you're using an all memory > database. > > > > > > > > On Mon, May 30, 2011 at 12:31 PM, roman <[email protected]> wrote: > > allright. your push made me look into it a little deeper :-) > > My solution to the "NoClassDefFoundError: java.io.FileOutputStream is > > a restricted class" is disabling the usage of Google's App engine > > under Project - Properties | Google | App Engine | Use Google App > > Engine --> uncheck > > > After that i got "ClassCastException: > > org.datanucleus.store.rdbms.RDBMSManager cannot be cast to > > org.datanucleus.store.appengine.DatastoreManager" which made me > > banning the datanucleus-appengine-1.0.8.final.jar from the projects > > classpath as well. > > I have no clue if this is a good idea, but my code is running so far > > and I am able to make calls to the Derby database. > > > Which brings me back to my other question: > > Is it utterly impossible to have the persistence layer running with > > OpenJPA along with a GWT frontend? As I fear Apache James is dependent > > on its familiar JPA technology. > > > again, thanks for your advice. you helped me loads > > alltogether I spent already a week on these issues, and I'm craving > > for answers > > cheers > > > On 30 Mai, 14:48, Patrick Julien <[email protected]> wrote: > >> I think that's specific enough: > > >> "Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream > >> is a restricted class. Please see the Google App Engine developer's > >> guide for more details." > > >> On Mon, May 30, 2011 at 4:29 AM, roman <[email protected]> wrote: > >> > Thank you for your quick response. > >> > I followed your advise and changed the underlying technology of my JPA > >> > layer to DataNucleus. > > >> > But i ran into a different problem > > >> > log4j:WARN No appenders could be found for logger > >> > (DataNucleus.Connection). > >> > log4j:WARN Please initialize the log4j system properly. > >> > [ERROR] javax.servlet.ServletContext log: unavailable > >> > javax.persistence.PersistenceException: Provider error. Provider: > >> > org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider > >> > at > >> > javax.persistence.Persistence.createFactory(Persistence.java:176) > >> > ... > >> > at > >> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > >> > at > >> > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: > >> > 409) > >> > at org.mortbay.thread.QueuedThreadPool > >> > $PoolThread.run(QueuedThreadPool.java:582) > >> > Caused by: javax.jdo.JDOFatalInternalException: Unexpected exception > >> > caught. > >> > NestedThrowables: > >> > java.lang.reflect.InvocationTargetException > >> > at > >> > javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java: > >> > 1186) > >> > at > >> > javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: > >> > 803) > >> > at > >> > javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java: > >> > 698) > >> > ... > >> > Caused by: java.lang.NoClassDefFoundError: java.io.FileOutputStream is > >> > a restricted class. Please see the Google App Engine developer's > >> > guide for more details. > >> > at > >> > com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java: > >> > 51) > >> > at > >> > org.apache.derby.impl.services.stream.SingleStream.PBmakeFileHPW(Unknown > >> > Source) > >> > at org.apache.derby.impl.services.stream.SingleStream.run(Unknown > >> > Source) > > >> > Well I see that i probably have got an error in the configuration of > >> > the DataStorePersistenceProvider. Unfortunately, I am not sure what > >> > the error could be. Is there any way to get a more specific > >> > description of what is causing the problem? > > >> > cheers, roman > > >> > On 27 Mai, 15:28, Patrick Julien <[email protected]> wrote: > >> >> If you wan't to use JPA with AppEngine, you have to use the JPA that > >> >> comes with AppEngine which is based on datanucleus. See > > >> >>http://code.google.com/appengine/docs/java/datastore/jpa/overview.html > > >> >> for an overview > > >> >> On Fri, May 27, 2011 at 5:56 AM, roman <[email protected]> wrote: > >> >> > Hi, > >> >> > I'm trying to implement a UserManagement based on GoogleWebToolkit > >> >> > (Adding, deleting, assigning privileged; nothing special there). The > >> >> >GWT-module is using a serparate persistence module, which I included > >> >> > as a jar-file and which is based onOpenJPA. > > >> >> > The persistence layer is working fine as long is I run it standalone. > >> >> > But when I wire it to myGWTproject, I can't create the > >> >> > EntityManagerFactory any more. I get a NullPointerException in one of > >> >> > theOpenJPAclasses, which I think is because that Google App Engine > >> >> > replaced the default java.lang.ClassLoader. > > >> >> > Is it a bad idea to useOpenJPAwithGWT? Is there anything to > >> >> > consider when combining these libraries? > > >> >> > For better understanding find the source code attached. > >> >> > Any help would be greatly appreciated. > >> >> > thx, roman > > >> >> > The server is running athttp://localhost:8888/ > >> >> > [WARN] Error for /usermgmtui/userInformation > >> >> > java.lang.ExceptionInInitializerError > >> >> > at > >> >> > org.apache.openjpa.kernel.Bootstrap.invokeFactory(Bootstrap.java: > >> >> > 116) > >> >> > at > >> >> > org.apache.openjpa.kernel.Bootstrap.getBrokerFactory(Bootstrap.java: > >> >> > 96) > >> >> > at > >> >> > org.apache.openjpa.persistence.OpenJPAPersistence.getEntityManagerFactory(OpenJPAPersistence.java: > >> >> > 92) > >> >> > at > >> >> > com.mycompany.commons.jpa.JpaUserManagement.<init>(JpaUserManagement.java: > >> >> > 64) > >> >> > at > >> >> > com.mycompany.commons.UserManagementImpl.setDatasoure(UserManagementImpl.java: > >> >> > 71) > >> >> > at > >> >> > com.mycompany.ui.server.UserInformationServiceImpl.<init>(UserInformationServiceImpl.java: > >> >> > 36) > >> >> > at > >> >> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > >> >> > Method) > >> >> > at > >> >> > sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > >> >> > Source) > >> >> > at > >> >> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown > >> >> > Source) > >> >> > at java.lang.reflect.Constructor.newInstance(Unknown Source) > >> >> > at java.lang.Class.newInstance0(Unknown Source) > >> >> > at java.lang.Class.newInstance(Unknown Source) > >> >> > at > >> >> > org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) > >> >> > at > >> >> > org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java: > >> >> > 428) > >> >> > at > >> >> > org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java: > >> >> > 339) > >> >> > at > >> >> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: > >> >> > 487) > >> >> > at org.mortbay.jetty.servlet.ServletHandler > >> >> > $CachedChain.doFilter(ServletHandler.java:1166) > >> >> > at > >> >> > com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java: > >> >> > 35) > >> >> > at org.mortbay.jetty.servlet.ServletHandler > >> >> > $CachedChain.doFilter(ServletHandler.java:1157) > >> >> > at > >> >> > com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java: > >> >> > 58) > >> >> > 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 > >> >> > com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java: > >> >> > 122) > >> >> > at org.mortbay.jetty.servlet.ServletHandler > >> >> > $CachedChain.doFilter(ServletHandler.java:1157) > >> >> > at > >> >> > com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java: > >> >> > 94) > >> >> > 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.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java: > >> >> > 70) > >> >> > at > >> >> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: > >> >> > 152) > >> >> > at com.google.appengine.tools.development.JettyContainerService > >> >> > $ApiProxyHandler.handle(JettyContainerService.java:351) > >> >> > 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.content(HttpConnection.java:938) > >> >> > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) > >> >> > at > >> >> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) > >> >> > at > > ... > > Erfahren Sie mehr » -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
