Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPArqlMap on Windows #33

Open
priya-gitTest opened this issue Feb 6, 2018 · 7 comments
Open

SPArqlMap on Windows #33

priya-gitTest opened this issue Feb 6, 2018 · 7 comments

Comments

@priya-gitTest
Copy link

Has anyone tride SPARQLMap on Windows environment with MSSQL Server.

Cant seem to get it working with the instructions here.

thanks

@tomatophantastico
Copy link
Owner

Hi,

when adding the mssql jdbc driver, this should work, as SparqlMap is programmed against JDBC, but neither SQLServer nor windows are in the test/build pipeline, so problems might come up.

Please be more specific on what is not working.

@priya-gitTest
Copy link
Author

thanks for the quick reply.
for starting up, I cannot figure out, where is sparqlmap in the bin directory/which Jar to use for this stuff below on Windows --> ./bin/sparqlmap

Creation of a Mapping
Creating a R2RML representation of a default mapping is as easy as this, just change the action:

./bin/sparqlmap --action=directmapping --ds.type=JDBC --ds.url="jdbc:mysql://192.168.59.103:3306/sparqlmaptest" --ds.username=s

@tomatophantastico
Copy link
Owner

in the bin folder there is a sparqlmap.bat, did you try this one?

@priya-gitTest
Copy link
Author

Hi Tom, there are only 2 shell scripts in the sparqlmap-cli-0.6.3-snapshot.zip that I have downloaded.
They are dump.sh and generateMapping.sh. Could it be that the zip file is incorrect or I have downlaoded the wrong stuff.

@tomatophantastico
Copy link
Owner

Please use the latest pre-release build, the docs are referring to them and quite a lot has recently changed.

@priya-gitTest
Copy link
Author

Jbdc driver for SQL Server was placed in the directory : \lib\sqljdbc42.jar
Input : sparqlmap --action=dump --ds.type=JDBC --ds.url="jdbc:sqlserver://DBServer:1433;databaseName=dbname;integratedSecurity=true;" --ds.username="domain\db_user" --ds.password=dbpwd --r2rmlFile=mapping.ttl

Output : For data sources that require authentication:
Error processing command line options: Was passed main parameter 'xxx' --> was the password provided as parameter
but no main parameter was defined in your arg class
For data sources that require authentication: Usage:

[options]

So, this one works in connecting to DB, but check the error and suggest.
sparqlmap --action=dump --ds.type=JDBC --ds.url="jdbc:sqlserver://DBServer:1433;databaseName=dbname;integratedSecurity=false;user=db_user;password=dbpwd;" --r2rmlFile=mapping.ttl

Output :
WARN SparqlMapBuilder$SparqlMapMappingBuilder : C
annot bind col "pk_dim_time_id" in mapping http://DBServer/mapping/mapping/di
m_time_mapping
Cannot bind col "pk_dim_time_id" in mapping http://DBServer/mapping/mapping/d
im_time_mapping
java.lang.IllegalArgumentException: column=null
at org.apache.metamodel.query.SelectItem.(SelectItem.java:171)
at org.apache.metamodel.query.SelectItem.(SelectItem.java:125)
at org.apache.metamodel.query.SelectItem.(SelectItem.java:114)
at org.apache.metamodel.query.Query.select(Query.java:97)
at org.aksw.sparqlmap.backend.metamodel.translate.MetaModelSelectiveDump
.lambda$createQueryUsingTable$35(MetaModelSelectiveDump.java:161)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Sou
rce)
at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
at java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Sour
ce)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknow
n Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at org.aksw.sparqlmap.backend.metamodel.translate.MetaModelSelectiveDump
.createQueryUsingTable(MetaModelSelectiveDump.java:153)
at org.aksw.sparqlmap.backend.metamodel.translate.MetaModelSelectiveDump
.createQuery(MetaModelSelectiveDump.java:125)
at org.aksw.sparqlmap.backend.metamodel.translate.MetaModelSelectiveDump
.(MetaModelSelectiveDump.java:80)
at org.aksw.sparqlmap.backend.metamodel.translate.MetaModelQueryDump.str
eamFast(MetaModelQueryDump.java:65)
at org.aksw.sparqlmap.backend.metamodel.DumperMetaModel.dump(DumperMetaM
odel.java:159)
at org.aksw.sparqlmap.backend.metamodel.DumperMetaModel.dump(DumperMetaM
odel.java:113)
at org.aksw.sparqlmap.cli.SparqlMapCli.run(SparqlMapCli.java:79)
at org.springframework.boot.SpringApplication.callRunner(SpringApplicati
on.java:791)
at org.springframework.boot.SpringApplication.callRunners(SpringApplicat
ion.java:781)
at org.springframework.boot.SpringApplication.afterRefresh(SpringApplica
tion.java:771)
at org.springframework.boot.SpringApplication.run(SpringApplication.java
:316)
at org.aksw.sparqlmap.cli.SparqlMapStarter.startSparqlMap(SparqlMapStart
er.java:154)
at org.aksw.sparqlmap.cli.SparqlMapStarter.main(SparqlMapStarter.java:49
)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.devtools.restart.RestartLauncher.run(Restart
Launcher.java:49)
null

@tomatophantastico
Copy link
Owner

Thanks for pointing that out, i'll check it.
Further, the column pk_dim_time_id does exist? Can you also try with all capital letters? Internal, DBMS specific column renaming can sometimes mess this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants