Hi,
I use helloworld example in SDK. And i put following code in "public void tagArrived(TagReadEvent tag)" :
LLRPGPIOService a = new LLRPGPIOService();
try {
a.setGPO(tag.getReaderID(), 1);
System.out.println("OK");
} catch (CannotExecuteException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
System.out.println("Fail!!!"+e.getMessage());
}
System.out.println("TAG ARRIVED: " + tag.getTag().getFormattedID());
And it throw error message is "Reader DAO is null"
How can i solve this problem ?
Thx !
spring.xml :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/b ... ns-3.0.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/o ... g-osgi.xsd">
<bean id="HelloWorldApp" class="org.rifidi.app.helloworld.HelloWorldApp">
<constructor-arg index="0" value="HelloWorld" />
<constructor-arg index="1" value="HelloWorldApp" />
<property name="readZoneMonitoringService" ref="readZoneMonitoringService" />
</bean>
<osgi:service ref="HelloWorldApp" interface="org.rifidi.edge.api.RifidiApp" />
<osgi:reference id="readZoneMonitoringService"
interface="org.rifidi.edge.api.service.tagmonitor.ReadZoneMonitoringService" />
</beans>
Use LLRPGPIOService have error log : Reader DAO is null
-
- Posts: 5
- Joined: Tue May 10, 2016 9:30 pm
Re: Use LLRPGPIOService have error log : Reader DAO is null
You can't just instantiate the GPIOService like that, you need to inject it through spring.
Here's a tutorial on how to do that:
http://wiki.rifidi.net/index.php?title=GPIO_Tutorial
Here's a tutorial on how to do that:
http://wiki.rifidi.net/index.php?title=GPIO_Tutorial
Who is online
Users browsing this forum: Avtoservis_pxsl and 7 guests