cancel
Showing results for 
Search instead for 
Did you mean: 

AAAR java.io.File parameter must be a directory

kossel
Champ in-the-making
Champ in-the-making
Hi I'm trying to get AAAR work with my current alfresco, the install step is done without erros (repository.xml created, database created)

but when I run AAAR_extract.bat I get following message:


You are going to execute this command:
Kitchen.bat /rep:"AAAR_Kettle" /job:"Get all" /dir:/Alfresco /user:postgres /pas
s:postgrespassword /param:get_parents="false" /log="D:\AAAR.log" /level:Basic

Press any key to continue . . .

DEBUG: Using JRE_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jre7
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jre7\bin\java.exe
2014/09/22 16:47:38 - Kitchen - Logging is at level : Basic logging
2014/09/22 16:47:38 - Kitchen - Start of run.
2014/09/22 16:47:41 - RepositoriesMeta - Reading repositories XML file: C:\Users
\Administrator\.kettle\repositories.xml
Processing stopped because of an error:
Error connecting to the repository!

Error occured while trying to connect to the database
java.io.File parameter must be a directory. [C:\Users\Administrator\simple-jndi]



ERROR: Kitchen can't continue because the job couldn't be loaded.


it says cannot connect database, but I don't understand what does "java.io.File parameter must be a directory"  mean  is it connection related?  also what does /dir means?

thanks
7 REPLIES 7

fcorti
Elite Collaborator
Elite Collaborator
Hi kossel,

Your problem is on the Pentaho side.
Try to take a look here:
http://forums.pentaho.com/showthread.php?83077-4-1-0-java-io-File-parameter-must-be-a-directory-simp...

'/dir' is the subdirectory of the repository you can ignore now because your error is not related in any way to this.

Do you have the 'C:\Users\Administrator\simple-jndi' folder in your environment?

kossel
Champ in-the-making
Champ in-the-making
Hi

thanks for your link. now I understand the problem, so since I'm in windows server, I created a system variable  "%KETTLE_JNDI_ROOT%"  pointing to D:\data-integration where the default simple-jndi is. and I found some "AAAR_DataMart.AAAR_DataMart"  properties being commented inside the file  jdbc.properties. so I uncomment them to:



SampleData/type=javax.sql.DataSource
SampleData/driver=org.hsqldb.jdbcDriver
SampleData/url=jdbc:hsqldb:hsql://localhost/sampledata
SampleData/user=pentaho_user
SampleData/password=password
Quartz/type=javax.sql.DataSource
Quartz/driver=org.hsqldb.jdbcDriver
Quartz/url=jdbc:hsqldb:hsql://localhost/quartz
Quartz/user=pentaho_user
Quartz/password=password
Hibernate/type=javax.sql.DataSource
Hibernate/driver=org.hsqldb.jdbcDriver
Hibernate/url=jdbc:hsqldb:hsql://localhost/hibernate
Hibernate/user=hibuser
Hibernate/password=password
Shark/type=javax.sql.DataSource
Shark/driver=org.hsqldb.jdbcDriver
Shark/url=jdbc:hsqldb:hsql://localhost/shark
Shark/user=sa
Shark/password=
AAAR_DataMart.AAAR_DataMart/type=javax.sql.DataSource
AAAR_DataMart/driver=org.postgresql.Driver
AAAR_DataMart/url=jdbc:postgresql://127.0.0.1:5432/AAAR_DataMart
AAAR_DataMart/user=postgres
AAAR_DataMart/password=my_postgres_password
AAAR_Kettle.AAAR_Kettle/type=javax.sql.DataSource
AAAR_Kettle/driver=org.postgresql.Driver
AAAR_Kettle/url=jdbc:postgresql://127.0.0.1:5432/AAAR_Kettle
AAAR_Kettle/user=postgres
AAAR_Kettle/password=my_postgres_password


when I run AAAR_extract.bat again I got another error…


javax.naming.ContextNotEmptyException
        at org.pentaho.commons.launcher.Launcher.main (Launcher.java:134)
        at java.lang.reflect.Method.invoke (null:-1)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke (null:-1)
        at sun.reflect.NativeMethodAccessorImpl.invoke (null:-1)
        at sun.reflect.NativeMethodAccessorImpl.invoke0 (null:-2)
        at org.pentaho.di.kitchen.Kitchen.main (Kitchen.java:280)
        at org.pentaho.di.repository.kdr.KettleDatabaseRepository.connect (KettleDatabaseRepository.java:180)
        at org.pentaho.di.repository.kdr.KettleDatabaseRepository.connect (KettleDatabaseRepository.java:194)
        at org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate.connect (KettleDatabaseRepositoryConnectionDelegate.java:143)
        at org.pentaho.di.core.database.Database.connect (Database.java:294)
        at org.pentaho.di.core.database.Database.connect (Database.java:306)
        at org.pentaho.di.core.database.Database.connect (Database.java:353)
        at org.pentaho.di.core.database.Database.normalConnect (Database.java:399)
        at org.pentaho.di.core.database.Database.connectUsingClass (Database.java:457)
        at org.pentaho.di.core.database.Database.initWithNamedDataSource (Database.java:429)
        at org.pentaho.di.core.database.util.DatabaseUtil.getNamedDataSource (DatabaseUtil.java:57)
        at org.pentaho.di.core.database.util.DatabaseUtil.getDataSourceFromJndi (DatabaseUtil.java:83)
        at javax.naming.InitialContext.<init> (null:-1)
        at javax.naming.InitialContext.init (null:-1)
        at javax.naming.InitialContext.getDefaultInitCtx (null:-1)
        at javax.naming.spi.NamingManager.getInitialContext (null:-1)
        at org.osjava.sj.SimpleContextFactory.getInitialContext (SimpleContextFactory.java:69)
        at org.osjava.sj.SimpleContext.<init> (SimpleContext.java:98)
        at org.osjava.sj.loader.JndiLoader.loadDirectory (JndiLoader.java:104)
        at org.osjava.sj.loader.JndiLoader.loadDirectory (JndiLoader.java:156)
        at org.osjava.sj.loader.JndiLoader.load (JndiLoader.java:279)
        at org.osjava.sj.loader.JndiLoader.jndiPut (JndiLoader.java:316)
        at org.osjava.sj.jndi.AbstractContext.destroySubcontext (AbstractContext.java:558)
        at org.osjava.sj.jndi.AbstractContext.destroySubcontext (AbstractContext.java:548)


any idea? thanks

kossel
Champ in-the-making
Champ in-the-making
Ok I put, seems it's picking simple-jndi folder wherever you execute the AAAR_extract.bat. so I did cd d:\data-integration and run the script, now I get:


2014/09/23 15:47:58 - RepositoriesMeta - Reading repositories XML file: C:\Users\Administrator\.kettle\repositories.xml
Processing stopped because of an error:
Error connecting to the repository!

Error occured while trying to connect to the database
Required subelement 'driver'


ERROR: Kitchen can't continue because the job couldn't be loaded.


I did some search and tried to renamed jdbc.properties to  jdbc.ini default.ini default properties and not working…

kossel
Champ in-the-making
Champ in-the-making
I found that I have to remove the "AAAR_DataMart."  from  AAAR_DataMart.AAAR_DataMart/type=javax.sql.DataSource line

then I get

2014/09/23 16:14:41 - RepositoriesMeta - Reading repositories XML file: C:\Users\Administrator\.kettle\repositories.xml
Processing stopped because of an error:
Incorrect password or login

ERROR: Kitchen can't continue because the job couldn't be loaded.


I m pretty sure it not the database login error… what does the  /user:Admin /passSmiley Tongueassword  parameter mean in AAAR_extract.bat  mean? is it the pentaho user, database user or alfresco user?

fcorti
Elite Collaborator
Elite Collaborator
Hi kossel,

Too many errors… it's quite strange, but you are doing a great work so let's go ahead.
/user and /pass are Kettle repository username and password.
They are stored in the AAAR_Kettle database that is installed during AAAR installation.
So, if you don't have had problems during the installation, nothing should be done.

kossel
Champ in-the-making
Champ in-the-making
I finally managed AAAR working resolving all error I found Smiley Very Happy

but I'm kind of hopping to have a report which shows viewed docuements and how many times  by user in a specific time. how hard to implement this report? 😕

fcorti
Elite Collaborator
Elite Collaborator
Hi kossel,

Congrats!

Please take a look to this thread for your need:
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/business-reporting...

Don't esitate to contact me if interested.