Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
980 views

scancentral: web app on Tomcat doesn't work due to Error creating bean with name 'emailServiceImpl'

Jump to solution

I tried to configure scancentral control web app, but even if the application starts the web page is not visible. I tried browsing the page http://localhost:8080/scancentral-ctrl but the error 404 is displayed.

the error is:

2020-10-14 16:13:36,933 [WARN] org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailServiceImpl' defined in file [/home/ide/FortifyController/tomcat/webapps/scancentral-ctrl/WEB-INF/classes/com/fortify/cloud/ctrl/service/EmailServiceImpl.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;
2020-10-14 16:13:36,953 [ERROR] org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailServiceImpl' defined in file [/home/ide/FortifyController/tomcat/webapps/scancentral-ctrl/WEB-INF/classes/com/fortify/cloud/ctrl/service/EmailServiceImpl.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:550) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) ~[spring-beans-5.0.10.RELEASE.jar:5.0.10.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-5.0.10.RELEASE.jar:5.0.10.RELEASE]
........

0 Likes
1 Solution

Accepted Solutions
Lieutenant Commander Lieutenant Commander
Lieutenant Commander

Hi, 

I had version 8, but it was OpenJDK, and in this was a problem.

Everything worked fine for me when I change java on oracle java (Java SE Development Kit 8u271 - actual at this moment).

Thanks!

 

 

View solution in original post

0 Likes
7 Replies
Micro Focus Expert
Micro Focus Expert

You can overcome this by editing the config.properties on the ScanCentral client and add client_auth_token=<blank> even if the client token functionality is disabled on the controller.

This has been fixed in 20.2, but if you need it a hotfix is available for 20.1. You will need to open a ticket with support and mention dev ticket 350012.

0 Likes

Error persist. This is my configuration:

# db home dir
db_dir=${catalina.base}/cloudCtrlDb

# worker shared secret, either plaintext password or password encoded by pwtool can be used
worker_auth_token=

# client shared secret, either plaintext password or password encoded by pwtool can be used
client_auth_token=
# to support older client that can not set client_auth_token you can allow connections from client without any token set
# connections from clients with configured but incorrect secret key would be rejected
allow_insecure_clients_with_empty_token=true

# job storage dir
job_file_dir=${catalina.base}/jobFiles
# max file size (MB) allowed to be uploaded to the controller from clients or workers (eg. log files/result files/job files)
max_upload_size=4096

# SMTP server host name:
smtp_host=10.24.0.65
# SMTP server port number:
smtp_port=25

# if set to true, use SSL for connections to SMTP server; otherwise SSL is not used (the default)
#smtp_ssl=false
# if set to false, SMTP server certificate is always trusted; otherwise the certificate trust is based on certification path (the default)
#smtp_ssl_check_trust=true
# if set to false, STMP server identity is not checked; otherwise the server identity is checked as specified by RFC 2595 (the default)
#smtp_ssl_check_server_identity=true

# If your SMTP server requires authentication uncomment both smtp_auth_user and smtp_auth_pass properties
# and give them proper values, otherwise leave both properties commented,
# either plaintext password or password encoded by pwtool can be used in smtp_auth_pass
#smtp_auth_user=
#smtp_auth_pass=

# Sender's email address:
from_email=**PERSONAL INFORMATION REMOVED**

# time after finished job expires (hours) and is candidate for cleanup
job_expiry_delay=168

# time after non-communicating worker become stale (seconds);
# should be larger than worker_sleep_interval and worker_jobwatcher_interval
# defined for any worker
worker_stale_delay=60
# time after non-communicating worker become inactive (minutes)
# and all its unfinished jobs are marked as faulted;
# should be much larger than worker_stale_delay (note it uses different time units)
worker_inactive_delay=60
# time after non-communicating worker expires (hours) and is candidate for cleanup
worker_expiry_delay=168

# how often cleanup of expired jobs and workers is run (minutes)
cleanup_period=60

# ssc url
ssc_url=http://192.168.100.117:8080/ssc
# ssc lockdown mode
ssc_lockdown_mode=false
# ssc shared secret, either plaintext password or password encoded by pwtool can be used
ssc_cloudctrl_secret=

# pool mapping mode; value must be DISABLED when used with SSC release older then 16.20;
# available values:
# - DISABLED: client can request any pool, mapping from app. version to pool by SSC is never requested
# - ENABLED: client can request any pool, mapping from app. version to pool by SSC is requested
# - ENFORCED: client cannot request pool, mapping from app. version to pool by SSC is requested
pool_mapping_mode=disabled

# this server url
this_url=http://localhost:8888/scancentral-ctrl

# configure allowed remote IP address for SSC, only requests with matching remote IP address will be allowed
# (default is IP address resoled from ssc_url)
# set this if CS controller accesses SSC via reverse proxy server
# value can be comma separated IP addresses or CIDR network ranges
ssc_remote_ip=

# HTTP header where the SSC remote IP is looked up if ssc_remote_ip_trusted_proxies_range is set
# (default is X-FORWARDED-FOR)
ssc_remote_ip_header=
# configure addresses of trusted proxy servers used to access CS controller
# if the request came from trusted proxy address, SSC remote IP is resolved from HTTP header set by ssc_remote_ip_header
# (default is disabled - meaning ssc_remote_ip_header is never used to retrieve SSC remote IP address)
# set this if SSC is accessing CS controller via (reverse) proxy server
# value can be comma separated IP addresses or CIDR network ranges
ssc_remote_ip_trusted_proxies_range=

# ScanCentral client Zip location. It is downloaded by clients to be updated remotely.
# Property is not expected to be modified.
client_zip_location=${catalina.base}/client/scancentral.zip

# ScanCentral client auto update.
# If enabled ScanCentral clients with version less than controller one will download updates from controller.
# If disabled ScanCentral controller will not send updates to clients.
client_auto_update=false

0 Likes
Micro Focus Expert
Micro Focus Expert

At this point, I would recommend opening a ticket with support for further analysis and to obtain a copy of the patch that addressed this issue.

0 Likes
Lieutenant Commander Lieutenant Commander
Lieutenant Commander

Hi! 

Did you get any response to the ticket? I have the same problem.(

0 Likes

No, nobody answered, but I discovered the solution. Scancentral does not support Java 11. So, you have to start tomcat with java 8 in order to solve the problem.  

0 Likes
Micro Focus Expert
Micro Focus Expert
If you opened a support ticket and no one responded, please provide me with the ticket number and I can follow up.

Also, there are some assumptions taken when posting on the forum... the main one being the system represents being met. If you’ve deviated from what’s documented please advise in the original request for assistance as this is usually important.
0 Likes
Lieutenant Commander Lieutenant Commander
Lieutenant Commander

Hi, 

I had version 8, but it was OpenJDK, and in this was a problem.

Everything worked fine for me when I change java on oracle java (Java SE Development Kit 8u271 - actual at this moment).

Thanks!

 

 

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.