[Jcrbrowser-developers] Re: Unable to connect to Jackrabbit with VCBrowser
Brought to you by:
sandro_boehme
From: <san...@gm...> - 2006-05-17 21:06:38
|
Hello Andre, thanks for the information. I will try to include postgresql support in the next major version of the JCRBrowser. > In my application I use Spring as a session factory in a very standard > configuration that just points to my repository.xml file, I don't think > that > could be relevant since VCBrowser runs outside my application but I can > send > it to you if you want. Yes, I'm definetly interested. Looking forward to it. Thanks. Bye, Sandro Andre van der Schyff wrote: > Hi Sandro, > > Can you please send me the configuration instructions for your postgresql > >> database? > > > > It's a blank installation of postgresql 8.1, with a database that I've > created called 'db1'. I haven't done any custom configurations, since > Jackrabbit sets up the tables and so forth. The jar file I use is the JDBC3 > driver called postgresql-8.1-404.jdbc3.jar, available for download from the > postgresql site. The persistence manager entry in the repository.xml looks > as follows: > > <PersistenceManager class=" > org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager"> > <param name="driver" value="org.postgresql.Driver"/> > <param name="url" value="jdbc:postgresql://localhost:5432/db1"/> > <param name="schema" value="postgresql"/> > <param name="user" value="user"/> > <param name="password" value="*********"/> > <param name="schemaObjectPrefix" value="${wsp.name}_"/> > <param name="externalBLOBs" value="false"/> > </PersistenceManager> > > In my application I use Spring as a session factory in a very standard > configuration that just points to my repository.xml file, I don't think > that > could be relevant since VCBrowser runs outside my application but I can > send > it to you if you want. > > Please let me know if you require anything further. > > Thanks, > Andre > > On 5/15/06, Sandro Böhme <san...@gm...> wrote: > >> >> Hi Andre, >> to 1.: Too bad. >> to 2.: You are right, adding every database driver in every version will >> not work. >> The idea is, to maybe offer to most used database driver. >> The way you describe (an "add jar to classpath" dialog) will probably be >> the >> most elegant one. But I think I would need to write an own >> classloader. In >> both cases additional vm parameter will probably be needed by the user. >> At the moment I think the easiest way is to simply add a few database >> jar's >> and I will definetly keep your elegant version in mind for the next >> major version >> of the JCRBrowser. >> Can you please send me the configuration instructions for your postgresql >> database? I will try to add support for it if it's a recent version. >> to 3.: You are right, RMI is slower because of the communication >> overhead. >> Maybe you can connect to the server by JNDI this way should be much >> faster. >> >> Ciao, >> >> Sandro >> BTW: I sent this mail also to the mailing list. >> >> Andre van der Schyff wrote: >> >> > Hi Sandro, >> > >> > Thanks for your response. Regarding the different options: >> > >> > 1. Short-term solution: I've tried this, and could not get it to >> work. I >> > still get the same error. I added entries in the manifest and the >> > build.properties. >> > >> > 2. Long-term solution: I'm not sure if this would be the right way to >> > go, if >> > that would mean that you would need a test scenario for each type of >> > database server (unless I'm misunderstanding what you're saying). >> > Perhaps it >> > would be simpler to provide a dialog where the user can specify his >> > specific >> > driver, for example where I can provide the location of the postgresql >> > jar >> > file and driver name. >> > >> > In any event, the simplest description of my configuration is a model 1 >> > configuration as described in >> > http://jackrabbit.apache.org/doc/deploy/howto-model1.html, pointing >> to a >> > postgresql database. I would happily provide any other info you >> require. >> > >> > 3. Being independent: I've thought about this, but ran across the >> > following >> > in the setup instructions at >> > http://jackrabbit.apache.org/doc/deploy/howto-model3.html: >> > >> > *Warning:* The current JCR-RMI library is designed for simplicity, not >> > performance. You will probably experience major performance issues if >> you >> > try running any non-trivial applications on top of JCR-RMI. >> > >> > This unfortunately prevents me from going this route since my >> > repository is >> > fairly bulky and complex. >> > >> > Thanks, >> > Andre >> > >> > On 5/14/06, Susanne Schneider <sch...@gm...> wrote: >> > >> >> >> >> Hello Andre, >> >> >> >> thanks for the nice feedback. >> >> Yes, you are right, the postgresql driver is missing. >> >> The reason is, that I only support the derby >> SimpleDBPersistanceManager >> >> in the local Jackrabbit Plugin at the moment. I will mention it in the >> >> next version of the >> >> readme.txt file. >> >> >> >> ++ short term solution ++ >> >> But it might work if you put the postgresql library the in the root of >> >> the plugin folder of >> >> the local Jackrabbit Plugin >> >> "org.visualcontent.repository.model1JackrabbitRepository_0.7.0" >> >> and add an according entry in the META-INF\MANIFEST.MF >> >> file similar to the derby library. >> >> >> >> ++ long term solution ++ >> >> A probably better solution in the long term would be to reproduce your >> >> configuration at my side and add support for it in the JCRBrowser. If >> >> you >> >> want, you can send me all needed information to create a test-szenario >> >> at my side >> >> and I will try to add support for it in the next possible version of >> the >> >> JCRBrowser. >> >> >> >> ++ being independent ++ >> >> The only way of being independent from the repository configuration is >> >> using the >> >> remote repository plugin which connects to a repository via RMI and >> does >> >> not need >> >> a reference to Jackrabbit at all. For using this, you would need to >> >> configure your >> >> repository in the Jackrabbit server contribution and uncomment the RMI >> >> configuration >> >> in the web.xml. >> >> >> >> Ciao, >> >> >> >> Sandro >> >> >> >> >> >> Andre van der Schyff wrote: >> >> >> >> > Hi Sandro, >> >> > >> >> > Firstly thanks for developing this plugin, something like this is >> >> > seriously >> >> > needed. >> >> > >> >> > I've got a problem connecting to Jackrabbit that is not addressed >> >> in the >> >> > readme. It creates the following stack trace in the PDE error log: >> >> > >> >> > It was not possible to login. Please check the credentials. >> >> > >> >> > javax.jcr.RepositoryException: Cannot instantiate persistence >> manager >> >> > org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager: >> >> > org.postgresql.Driver: org.postgresql.Driver >> >> > at >> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager >> ( >> >> > RepositoryImpl.java:1035) >> >> > at org.apache.jackrabbit.core.RepositoryImpl.createVersionManager( >> >> > RepositoryImpl.java:285) >> >> > at >> >> > org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java >> >> :234) >> >> > at >> >> > org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java >> >> :483) >> >> > at org.apache.jackrabbit.core.TransientRepository$2.getRepository( >> >> > TransientRepository.java:241) >> >> > at org.apache.jackrabbit.core.TransientRepository.startRepository( >> >> > TransientRepository.java:261) >> >> > at org.apache.jackrabbit.core.TransientRepository.login( >> >> > TransientRepository.java:329) >> >> > at >> >> org.visualcontent.repository.localjr.Model1JackrabbitRepository.login >> >> ( >> >> > Model1JackrabbitRepository.java:59) >> >> > at >> >> > >> >> >> org.visualcontent.authentication.simplecredentials.SimpleAuthenticationService.login >> >> >> >> >> > >> >> > (SimpleAuthenticationService.java:36) >> >> > at org.visualcontent.ui.nodetree.SessionLoginAction.run( >> >> > SessionLoginAction.java:49) >> >> > at >> >> > >> >> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java >> :246) >> >> > at >> >> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection >> >> ( >> >> > ActionContributionItem.java:538) >> >> > at org.eclipse.jface.action.ActionContributionItem.access$2( >> >> > ActionContributionItem.java:488) >> >> > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent( >> >> > ActionContributionItem.java:441) >> >> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) >> >> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021) >> >> > at >> >> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867) >> >> > at >> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572) >> >> > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java >> :1699) >> >> > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) >> >> > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench( >> >> Workbench.java >> >> > :367) >> >> > at >> >> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) >> >> > at >> >> > >> >> >> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) >> >> > at org.eclipse.core.internal.runtime.PlatformActivator$1.run( >> >> > PlatformActivator.java:226) >> >> > at >> >> > >> >> >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java >> >> > :376) >> >> > at >> >> > >> >> >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java >> >> > :163) >> >> > 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:585) >> >> > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) >> >> > at org.eclipse.core.launcher.Main.basicRun(Main.java:278) >> >> > at org.eclipse.core.launcher.Main.run(Main.java:973) >> >> > at org.eclipse.core.launcher.Main.main(Main.java:948) >> >> > Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver >> >> > at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass( >> >> > BundleLoader.java:405) >> >> > at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass( >> >> > BundleLoader.java:350) >> >> > at >> >> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass >> >> ( >> >> > AbstractClassLoader.java:78) >> >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) >> >> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) >> >> > at java.lang.Class.forName0(Native Method) >> >> > at java.lang.Class.forName(Class.java:164) >> >> > at >> >> org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.init( >> >> > SimpleDbPersistenceManager.java:295) >> >> > at >> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager >> ( >> >> > RepositoryImpl.java:1031) >> >> > ... 33 more >> >> > java.lang.ClassNotFoundException: org.postgresql.Driver >> >> > at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass( >> >> > BundleLoader.java:405) >> >> > at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass( >> >> > BundleLoader.java:350) >> >> > at >> >> org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass >> >> ( >> >> > AbstractClassLoader.java:78) >> >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) >> >> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) >> >> > at java.lang.Class.forName0(Native Method) >> >> > at java.lang.Class.forName(Class.java:164) >> >> > at >> >> org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.init( >> >> > SimpleDbPersistenceManager.java:295) >> >> > at >> org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager >> ( >> >> > RepositoryImpl.java:1031) >> >> > at org.apache.jackrabbit.core.RepositoryImpl.createVersionManager( >> >> > RepositoryImpl.java:285) >> >> > at >> >> > org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java >> >> :234) >> >> > at >> >> > org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java >> >> :483) >> >> > at org.apache.jackrabbit.core.TransientRepository$2.getRepository( >> >> > TransientRepository.java:241) >> >> > at org.apache.jackrabbit.core.TransientRepository.startRepository( >> >> > TransientRepository.java:261) >> >> > at org.apache.jackrabbit.core.TransientRepository.login( >> >> > TransientRepository.java:329) >> >> > at >> >> org.visualcontent.repository.localjr.Model1JackrabbitRepository.login >> >> ( >> >> > Model1JackrabbitRepository.java:59) >> >> > at >> >> > >> >> >> org.visualcontent.authentication.simplecredentials.SimpleAuthenticationService.login >> >> >> >> >> > >> >> > (SimpleAuthenticationService.java:36) >> >> > at org.visualcontent.ui.nodetree.SessionLoginAction.run( >> >> > SessionLoginAction.java:49) >> >> > at >> >> > >> >> org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java >> :246) >> >> > at >> >> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection >> >> ( >> >> > ActionContributionItem.java:538) >> >> > at org.eclipse.jface.action.ActionContributionItem.access$2( >> >> > ActionContributionItem.java:488) >> >> > at org.eclipse.jface.action.ActionContributionItem$6.handleEvent( >> >> > ActionContributionItem.java:441) >> >> > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) >> >> > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1021) >> >> > at >> >> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2867) >> >> > at >> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2572) >> >> > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java >> :1699) >> >> > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) >> >> > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench( >> >> Workbench.java >> >> > :367) >> >> > at >> >> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) >> >> > at >> >> > >> >> >> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) >> >> > at org.eclipse.core.internal.runtime.PlatformActivator$1.run( >> >> > PlatformActivator.java:226) >> >> > at >> >> > >> >> >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java >> >> > :376) >> >> > at >> >> > >> >> >> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java >> >> > :163) >> >> > 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:585) >> >> > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) >> >> > at org.eclipse.core.launcher.Main.basicRun(Main.java:278) >> >> > at org.eclipse.core.launcher.Main.run(Main.java:973) >> >> > at org.eclipse.core.launcher.Main.main(Main.java:948) >> >> > >> >> > >> >> > I assume that the problem is that it cannot find the postgresql >> >> driver, >> >> > however I cannot tell how to provide the driver location. The driver >> >> > is in >> >> > the build path of the project. >> >> > >> >> > Thanks, >> >> > Andre >> >> > >> >> >> >> >> > >> >> >> > |