Skip to main content
May 23, 2018 12:24 PM UTC
Solved

Not able to run Anomaly Detection

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

cmorfinAnswer
May 24, 2018 8:20 AM UTC

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

7 replies

May 23, 2018 1:27 PM UTC

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

driederAuthor
May 23, 2018 1:34 PM UTC

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.

May 23, 2018 1:41 PM UTC

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

 

driederAuthor
May 23, 2018 2:38 PM UTC

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

May 23, 2018 4:03 PM UTC

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