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

update ClientSemanticLayerDataSource failed #314

Open
peteryuanpan opened this issue Sep 25, 2017 · 6 comments
Open

update ClientSemanticLayerDataSource failed #314

peteryuanpan opened this issue Sep 25, 2017 · 6 comments

Comments

@peteryuanpan
Copy link

peteryuanpan commented Sep 25, 2017

I am trying to update ClientSemanticLayerDataSource by following ways:

OperationResult xmlResult = client
.authenticate(Constant.ServerInfo.userName, Constant.ServerInfo.password)
.resourcesService()
.resource(domain.getSchema().getUri())
.downloadBinary();
InputStream inputStreamSchema = xmlResult.getEntity();

ClientFile clientFileSchema = client.authenticate(Constant.ServerInfo.userName,Constant.ServerInfo.password)
.resourcesService()
.resource(domain.getSchema().getUri())
.get(ClientFile.class)
.getEntity();

client.authenticate(Constant.ServerInfo.userName, Constant.ServerInfo.password)
.resourcesService()
.resource(domain)
.withSchema(inputStreamSchema, clientFileSchema)
.createInFolder("/CHRLBI/Domain");

However, eclipse shows me the following errors:
Exception in thread "JavaFX Application Thread" com.jaspersoft.jasperserver.jaxrs.client.core.exceptions.IllegalParameterValueException: パラメータ「schema」の値「/CHRLBI/新規ドメイン_test1_files/schema.xml」が無効です。

What is the wrong with my function ? I can not get the problem.
Is there any effective way to update ClientSemanticLayerDataSource data from computer to server ? Or other way ? using ClientMondrianConnection connection ... ?

I need help. Please help me.
Thank you very very much.

@yaroslav-kovalchyk
Copy link
Contributor

Could you please run your code under EN locale? Unfortunately can't understand what does exception message says...

@peteryuanpan
Copy link
Author

In English, that is means: the value of path [schema] [filepath/schema.xml] is invalid

@yaroslav-kovalchyk
Copy link
Contributor

Thanks for clarification. After deeper investigation we realized, that current REST client API doesn't allow update of ClientSemanticLayerDataSource with sub resources (i.e. with schema, bundles etc.). And you are trying to create semanticLayerDataSource (you are using createInFolder method). This method fails by another issue. So, we will work on this bug, but I can't promise, that fix will be provided soon. I can provide a sample how to create and update semanticLayerDataSources using pure JerseyClient if you wish.

@peteryuanpan
Copy link
Author

Thanks for your reply.
Maybe I did not express it clearly, but I've solved my problem with help of my colleague.

@yaroslav-kovalchyk
Copy link
Contributor

Great! I'll keep this issue open to implement proper create/update API for sermanticLayerDataSource.
Thank you!

@Ffrenchy
Copy link

Ffrenchy commented Oct 2, 2019

@yaroslav-kovalchyk @peteryuanpan Can you please share the details on how you resolved the issue with creating semanticLayerDataSource?

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

3 participants