Webservice logging table missing

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

atnetws
Posts: 15
Joined: Tue Jan 21, 2020 10:27 am

Webservice logging table missing

Post by atnetws »

Hi,

each WS-Api call generates an error message like this:

Code: Select all

2020-01-24 18:54:04,768: WARN  [http-nio-8080-exec-7] com.agnitas.emm.springws.usage.UsageInterceptor - Error logging webservice usage
org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO webservice_usage_log_tbl (timestamp, endpoint, company_id, username) VALUES (?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExcept
ion: Table 'emm.webservice_usage_log_tbl' doesn't exist
The installer did not create the mentioned table and I cannot find it in any of the sql files.
Could you please provide a proper create statement for it?
mdoerschmidt
Posts: 25
Joined: Fri Jan 04, 2013 8:55 am

Re: Webservice logging table missing

Post by mdoerschmidt »

To fix this, remove these lines from spring-ws-common.xml (somewhere near lines 52 to 58):

Code: Select all

    <bean id="usageInterceptor" class="com.agnitas.emm.springws.usage.UsageInterceptor">
    	<property name="usageLogger">
    		<bean class="com.agnitas.emm.springws.usage.DatabaseBasedUsageLogger">
    			<property name="dataSource" ref="dataSource" />
    		</bean>
    	</property>
    </bean>
 
and remove this line from spring-ws-servlet.xml (near line 55):

Code: Select all

				<ref bean="usageInterceptor" />
atnetws
Posts: 15
Joined: Tue Jan 21, 2020 10:27 am

Re: Webservice logging table missing

Post by atnetws »

Hi mdoerschmidt,

do you have a functioning set of these XML files ready?
I assume the installer failed to create all these properly.

Cheers
Marcus
Post Reply