cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Not able to run Anomaly Detection

drieder
15-Moonstone

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

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:drieder)

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

View solution in original post

7 REPLIES 7

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

drieder
15-Moonstone
(To:Rick-Stanley)

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.

cmorfin
19-Tanzanite
(To:drieder)

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

 

drieder
15-Moonstone
(To:cmorfin)

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

cmorfin
19-Tanzanite
(To:drieder)

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

drieder
15-Moonstone
(To:cmorfin)

Hello Christophe,

 

thank you very much, running this in command prompt worked for me. I will keep in mind to always try both before asking questions.

 

Best Regards,

Dominik

cmorfin
19-Tanzanite
(To:drieder)

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

Top Tags