Wstrzyknięcie zależności dla silnika Activiti

0

Mam projekt oparty na Spring 2.5.6 i próbuję wkomponować w niego silnik activiti. Natknąłem jednak na problem z wstrzyknięciem ustawień do bazy danych itd. Dokładnie dostaję taki wyjątek:

Exception while initializing process engine: Error creating bean with name 'processEngineConfiguration' defined in resource loaded through InputStream: 
Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'jdbcUrl' of bean class [org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration]: 
Bean property 'jdbcUrl' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

A to bean:

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

	<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
  
		<property name="jdbcUrl" value="jdbc:postgresql://localhost:5432/activiti" />
		<property name="jdbcDriver" value="org.postgresql.Driver" />
		<property name="jdbcUsername" value="[ciach]" />
		<property name="jdbcPassword" value="[ciach]" />
		
		<property name="databaseSchemaUpdate" value="false" />
		
		<property name="jobExecutorActivate" value="true" />
		
		<property name="mailServerHost" value="[ciach]" /> 
		<property name="mailServerPort" value="25" />    
		<property name="mailServerUsername" value="username" />  
		<property name="mailServerPassword" value="password" />  
		<property name="mailServerUseTLS" value="false" />  
	
	</bean>

</beans>
0

A jesteś pewny że to pójdzie na tak niskiej wersji Springa? Zauważ że późniejsze wersje (od 3 w zwyż?) korzystają z cgliba i nie potrzebują setterów/getterów do wstrzykiwania zalezności. Ale wersje wczesniejsze tego nie potrafiły. Zgaduje że ten StandaloneProcessEngineConfiguration po prostu nie ma setterów/getterów dla tych property i tyle.

0

Przeciez napisał co go boli

Bean property 'jdbcUrl' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

0

Czyli moje przypuszczenia się sprawdziły... nie odpalę tego na wcześniejszej wersji Springa niż 3.0 . Miałem nadzieję że uda mi się to w jakiś sposób zrobić ... Upgrade Springa z 2.0 do 2.5 poszedł bezproblemowo. Potem zaczynają się już schodki ... Dzięki

0

Może nie potrzebujesz całego activity. U nas się okazało że w tydzień napisaliśmy sami to co chcieliśmy

0

Można też użyć JBPM. Ono jest dużo starsze więc pewnie póździe na dowolnym springu ;]

0

Udało mi się podnieść wersje Dpringa do 3 i wszystko działa. Dzięki za pomoc :)

1 użytkowników online, w tym zalogowanych: 0, gości: 1