> The keepLogicalLogs( true ) parts need to be there for the part of  
> the code
> where you do the backups.
What does it means in my case? My part of code is not correct? Because  
if I understand, you mean that I need to use the code  
"keepLogicalLogs( true )" in the same class where I do my backup?
Sorry for my misunderstanding,

Best,
Bat

>
> Cheers,
> Tobias
>
> On Thu, Jun 10, 2010 at 10:16 AM, Batistuta Gabriel <
> batistutagabrielf...@gmail.com> wrote:
>
>> I progress slowly...but I have a new error.
>> Here is my code :
>> //create the graph
>> neo = new EmbeddedGraphDatabase(CONSTANTS.GRAPH_PATH);
>> graph = ObjectGraphFactory.instance().get(neo);
>>
>> for (String datasource : new String[]{"nioneodb", "lucene"}) {
>>       neo.getConfig().getTxModule().getXaDataSourceManager()
>>       .getXaDataSource( datasource ).keepLogicalLogs( true );
>> }
>>
>>
>> graph.close();
>> neo.shutdown();
>> /*
>> * here, I put my code to copy the content of the graph directory to
>> the backup directory
>> **/
>>
>> //open again the graph
>> neo = new EmbeddedGraphDatabase(CONSTANTS.GRAPH_PATH);
>> graph = ObjectGraphFactory.instance().get(neo);
>>
>> /**
>> * I create the backup graph
>>  **/
>> EmbeddedGraphDatabase neo = GraphJo4neo.getGraphDatabaseService();
>> EmbeddedGraphDatabase backupGraphDb = new
>> EmbeddedGraphDatabase( CONSTANTS.GRAPH_BACKUP_PATH );
>> IndexService backupIndexService = new
>> LuceneIndexService( backupGraphDb );
>> Backup backup = new Neo4jBackup( neo, backupGraphDb,
>>       new ArrayList<String>()
>>               {
>>                 {
>>                     add( "nioneodb" );
>>                     add( "lucene" );
>>                 }
>>               } );
>>
>> try {
>>       backup.enableFileLogger();
>>       backup.setLogLevelDebug();
>>        backup.doBackup();  //  /!!\ : ERROR HERE
>> } catch (IOException e) {}
>> backupIndexService.shutdown();
>> backupGraphDb.shutdown();
>>
>>
>> But I obtain this error :
>> java.lang.RuntimeException: Missing log entry in backup source: [10]
>> in resource [nioneodb]. Can not perform backup.
>>        at org.neo4j.onlinebackup.Neo4jBackup
>> $Neo4jBackupTask.prepare(Neo4jBackup.java:362)
>>        at
>> org.neo4j.onlinebackup.Neo4jBackup.runMultiBackup(Neo4jBackup.java:
>> 262)
>>       at  
>> org.neo4j.onlinebackup.Neo4jBackup.doBackup(Neo4jBackup.java:196)
>>        at util.BackupNeo4j.run(BackupNeo4j.java:53)
>>       at java.util.TimerThread.mainLoop(Timer.java:512)
>>       at java.util.TimerThread.run(Timer.java:462)
>>
>>
>> Many thanks for your attention,
>>
>> Bat
>>
>> Le 09-juin-10 à 18:01, Tobias Ivarsson a écrit :
>>
>>> The exception really says it all. You are trying to backup to a
>>> target that
>>> does not have the same origin as the source.
>>>
>>> You need to create the target Neo4j store by either letting the
>>> online-backup component create it, using the
>>> Neo4jBackup(EmbeddedGraphDatabase, String, ...) constructors, or
>>> manually
>>> create a copy of the store on the file system level before you do  
>>> the
>>> initial copying.
>>>
>>> Cheers,
>>> Tobias
>>>
>>> On Wed, Jun 9, 2010 at 5:41 PM, Batistuta Gabriel <
>>> batistutagabrielf...@gmail.com> wrote:
>>>
>>>> I fixed one problem. But I still have a problem.
>>>>
>>>> My classes are starded from BlazeDS. It's a server-based Java
>>>> remoting
>>>> installed on Glassfish. So, I can not see the packages of neo4j on
>>>> the
>>>> classpath.
>>>> However, I use this packages :
>>>> lucene-core-2.9.1.jar
>>>> neo4j-remote-graphdb-0.5.jar
>>>> neo4j-commons-0.4.jar
>>>> neo4j-index-1.0-b1.jar
>>>> neo4j-kernel-1.0-rc.jar
>>>> neo4j-shell-1.0-rc.jar
>>>> neo4j-apoc-examples-0.5.jar
>>>> neo4j-online-backup-0.5.jar
>>>> neo4j-remote-graphdb-0.5.jar
>>>>
>>>> when I run my program, now I obtain this error :
>>>> java.lang.RuntimeException: Source[1276097996318,1276097996318] is
>>>> not
>>>> same as destination[1276097998894,1276097998894] for resource
>>>> [nioneodb]
>>>>       at org.neo4j.onlinebackup.Neo4jBackup
>>>> $Neo4jBackupTask.prepare(Neo4jBackup.java:329)
>>>>      at
>>>> org.neo4j.onlinebackup.Neo4jBackup.runMultiBackup(Neo4jBackup.java:
>>>> 262)
>>>>      at
>>>> org.neo4j.onlinebackup.Neo4jBackup.doBackup(Neo4jBackup.java:196)
>>>>       at util.BackupNeo4j.run(BackupNeo4j.java:49)
>>>>
>>>> Thanks
>>>>
>>>> Le 09-juin-10 à 14:21, Tobias Ivarsson a écrit :
>>>>
>>>>> You could also use this code to print the classpath:
>>>>>
>>>>>      //Get the System Classloader
>>>>>      ClassLoader sysClassLoader =
>>>>> ClassLoader.getSystemClassLoader();
>>>>>
>>>>>      //Get the URLs
>>>>>      URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();
>>>>>
>>>>>      *for*(*int *i=0; i< urls.length; i++)
>>>>>      {
>>>>>          System.out.println(urls[i].getFile());
>>>>>      }
>>>>>
>>>>> This might give a slightly more complete view of the paths from
>>>>> where
>>>>> classes are loaded.
>>>>> (if, for example you have added the Neo4j jar files in your Java
>>>>> extension
>>>>> library directory, they might not appear in the "java.class.path"
>>>>> property)
>>>>>
>>>>> From
>>>>>
>>>>
>> http://www.java-tips.org/java-se-tips/java.lang/how-to-print-classpath.html
>>>>>
>>>>> On Wed, Jun 9, 2010 at 2:09 PM, Johan Svensson <
>> jo...@neotechnology.com
>>>>>> wrote:
>>>>>
>>>>>> What was the output of
>>>>>> "System.out.println(System.getProperty("java.class.path"));" as
>>>>>> Tobias
>>>>>> asked you to do?
>>>>>>
>>>>>> On Wed, Jun 9, 2010 at 1:56 PM, Batistuta Gabriel
>>>>>> <batistutagabrielf...@gmail.com> wrote:
>>>>>>> However, I obtain this error :
>>>>>>> java.lang.NoSuchMethodError:
>>>>>>> org.neo4j.onlinebackup.AbstractResource.<init>(Lorg/neo4j/ 
>>>>>>> kernel/
>>>>>>> impl/
>>>>>>> transaction/x
>>>>>>> aframework/XaDataSource;)V
>>>>>>>     at
>>>>>>> org
>>>>>>> .neo4j
>>>>>>> .onlinebackup
>>>>>>> .EmbeddedGraphDatabaseResource
>>>>>>> .<init>(EmbeddedGraphDatabaseResource.java:31)
>>>>>>>     at
>>>>>> org.neo4j.onlinebackup.Neo4jBackup.doBackup(Neo4jBackup.java:164)
>>>>>>>     at util.BackupNeo4j.run(BackupNeo4j.java:49)
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Neo4j mailing list
>>>>>> User@lists.neo4j.org
>>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Tobias Ivarsson <tobias.ivars...@neotechnology.com>
>>>>> Hacker, Neo Technology
>>>>> www.neotechnology.com
>>>>> Cellphone: +46 706 534857
>>>>> _______________________________________________
>>>>> Neo4j mailing list
>>>>> User@lists.neo4j.org
>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>
>>>> _______________________________________________
>>>> Neo4j mailing list
>>>> User@lists.neo4j.org
>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>
>>>
>>>
>>>
>>> --
>>> Tobias Ivarsson <tobias.ivars...@neotechnology.com>
>>> Hacker, Neo Technology
>>> www.neotechnology.com
>>> Cellphone: +46 706 534857
>>> _______________________________________________
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> -- 
> Tobias Ivarsson <tobias.ivars...@neotechnology.com>
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to