Skip to main content
1-Visitor
May 23, 2018
Solved

Not able to run Anomaly Detection

  • May 23, 2018
  • 2 replies
  • 2964 views

Hello everyone,

 

so I am following this guide to deploy the Anomaly Detection Service. I downloaded the AnomalyMicroservices-Windows and extracted it in the path 

C:\Users\...\ThingWorxProjekt\Analytics\AnomalyMicroservices-Windows

 

So I ran the following command after I navigated to the extracted files directory:

java -Dproperties.file=C:\Users\...\ThingWorxProjekt\Analytics\AnomalyMicroservices-Windows\microservices.properties -jar result-standalone-2.0.2-bin.jar server results-h2-
file.yml

 

But I get the error "Main Class .file=C:\User\...\ThingWorxProjekt...\microservices.properties could not be found or loaded"

 

I also tried to not write the whole path but only \microservices.properties since I am already in this directory.

 

Any Ideas how I should do it properly?

 

Best Regards,

Dominik

Best answer by cmorfin

Hi Dominik

 

First I apologize, for some reason I called you David in my last post.

 

I am happy that this worked for you in a command prompt.

Note that it can also work in a Powershell but some extra double quote need to be added, see https://www.ptc.com/en/support/article?n=CS286046 for more details.

 

Thanks

Christophe

2 replies

5-Regular Member
May 23, 2018

The path you specified:

`C:\Users\...\ThingWorxProjekt\Analytics\AnomalyMicroservices-Windows`

is not being recognized. You need to provide the full path, replacing \...\ with the fully specified directory

drieder1-VisitorAuthor
1-Visitor
May 23, 2018

Thanks for your answer, but I wrote the whole Path in the Command line, I just didn't want to post the whole path here. Thats why I replaced the long part with ...

 

I assume it has to do something with java not being able to find the "file" class.

19-Tanzanite
May 23, 2018

Hi

 

The error report it cannot load a class, while we are specifying this as an argument to load a file, so it does not seem that the java command "understand" the argument and takes it as being the path to a class.

This can happen when  a copy paste is done and some corrupted character are pasted.

Could you try retyping the java -Dproperties.file= part instead of pasting it from somewhere ?

I am guessing the - character is not what it looks like and is not interpreted correctly by the java command.

 

Hope this helps

Christophe

 

drieder1-VisitorAuthor
1-Visitor
May 23, 2018

Hi Christope,

 

thank you for your reply, but typing everything by hand didn't resolve the issue.

Screenshot (31).png

 

This is how it looks in powershell, the .file after -Dproperties is highlighted so I guess it recognizes it as a command parameter

19-Tanzanite
May 23, 2018

Hi David

 

Could you execute the same command in a command prompt instead of a power shell.

I do get this error when I run in power shell, but it works for me in a command prompt.

 

Thanks

Christophe