Joe,
I haven't used XML scanner configuration and I am not sure if it is working. For a start, try using properties file configuration(scanner/config.properties).
There are few options that should be set for sql scanner in order to work:
- resourceNme (DatabaseRecource in your case)
- sqlSatement - query that should be executed for retreiving documents from database
- documentType (simple, xml or csv)
There are some other options specific to xml and csv document types. You can also specify an updateStatement that should be executed after documents retreived.
Please refer to Babeldoc user guide for explanation of these option.
Dejan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-10-16
Hi, I neglected to mention that I have already set up the appropriate scanner/config.properties file has already been set up with all the correct parameters that were specified in the documentation("sqlStatement", "ResourceName", etc)
However, when I initiate the command babeldoc scanner -s /..(correct path of scanner), a null pointer exeception occurs, it states that the failiure occurs at sql intialise() in the ScannerWorker class.
I believe that the problem is with accessing the resource/databaseResource.properties file correctly from the scanner/config.properties file, however I am sure I have referenced it correctly, so I have no idea what the problem is?
Also I would be greatful if someone could provide me with working example of an sql scanner, this may help me considerably.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How your complete configuration looks like? I mean folders etc...
You should have folder with subfolders:
scanner
pipeline
resource
...
Iniside scanner folder there should be config.properties file. Also inside resource there should be your db resource file. Here is configuration for connection named mondb:
#-----------------
type=pooled
Inside scanner/config.properties there should be configuration for all workers. For example:
#--------------------
sql.type=sql
sql.period=10000
sql.resourceName=mondb
sql.pipeline=yourPipelineName
sql.sqlStatement=select sysdate from dual
#------------------
I think this configuration should work. For more features consult user guide.
NOTE: I noticed that there was one bug in SqlScanner class that xmlRowTag option refered as mandatory. I have fixed this in CVS. So if you have problems with this, you can get latest CVS version or wait for RC2 (I guess it will be released today or within few days). You can also set this option to any value since it is ignored in case you don't set 'documentType' option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-10-17
Hi, thanks for the help I have managed to get it working correctly now, as I had thought the problem was with the accessing of the resource file from the config file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I am currently attempting set up an sql scanner to an oracle database, but am having difficulty setting it up.
Whenever I attempt to run the scanner from a command line, I keep getting NullPointerException errors
this is my DatabaseResource.config:
dbName=(the user name)
dbPasswd=(the password)
dbDriver=oracle.jdbc.driver.OracleDriver
dbUrl=jdbc:oracle:restofURL
this is my scanner config.xml file, which is probably incorrect
<?xml version="1.0" encoding="iso-8859-1"?>
<document>
<name>DatabaseResource.properties</name>
</document>
the current driver I have for the oracle database is "classes12.zip"
I would be greatful for any help that can be provided.
Joe
furthermore, I believe that the problem is specifically caused by the actual accessing of the DatabaseResource.config file by the scanner config file.
Is there some particular way of accessing it?
Joe,
I haven't used XML scanner configuration and I am not sure if it is working. For a start, try using properties file configuration(scanner/config.properties).
There are few options that should be set for sql scanner in order to work:
- resourceNme (DatabaseRecource in your case)
- sqlSatement - query that should be executed for retreiving documents from database
- documentType (simple, xml or csv)
There are some other options specific to xml and csv document types. You can also specify an updateStatement that should be executed after documents retreived.
Please refer to Babeldoc user guide for explanation of these option.
Dejan
Hi, I neglected to mention that I have already set up the appropriate scanner/config.properties file has already been set up with all the correct parameters that were specified in the documentation("sqlStatement", "ResourceName", etc)
However, when I initiate the command babeldoc scanner -s /..(correct path of scanner), a null pointer exeception occurs, it states that the failiure occurs at sql intialise() in the ScannerWorker class.
I believe that the problem is with accessing the resource/databaseResource.properties file correctly from the scanner/config.properties file, however I am sure I have referenced it correctly, so I have no idea what the problem is?
Also I would be greatful if someone could provide me with working example of an sql scanner, this may help me considerably.
Regards
How your complete configuration looks like? I mean folders etc...
You should have folder with subfolders:
scanner
pipeline
resource
...
Iniside scanner folder there should be config.properties file. Also inside resource there should be your db resource file. Here is configuration for connection named mondb:
#-----------------
type=pooled
dbUser=kl_babel
dbPassword=bab
dbUrl=jdbc:oracle:thin:@o8i:1521:ODBM
dbDriver=oracle.jdbc.driver.OracleDriver
#------------------
Inside scanner/config.properties there should be configuration for all workers. For example:
#--------------------
sql.type=sql
sql.period=10000
sql.resourceName=mondb
sql.pipeline=yourPipelineName
sql.sqlStatement=select sysdate from dual
#------------------
I think this configuration should work. For more features consult user guide.
NOTE: I noticed that there was one bug in SqlScanner class that xmlRowTag option refered as mandatory. I have fixed this in CVS. So if you have problems with this, you can get latest CVS version or wait for RC2 (I guess it will be released today or within few days). You can also set this option to any value since it is ignored in case you don't set 'documentType' option.
Hi, thanks for the help I have managed to get it working correctly now, as I had thought the problem was with the accessing of the resource file from the config file.