Meter-hub Example error

6 views
Skip to first unread message

jokoul webster

unread,
Dec 8, 2009, 5:17:02 AM12/8/09
to jEmbedded Discussion Group
Hi Adolfo:
Now I can run invoicing-server successfully,and I can generate
invoicings in generated-invoices\files directory by
http://localhost:9090/controller.inv?id=6&kwh=88, but when I run meter-
hub,I got the following error,would you pls tell me the cause:
//////////////////////////////////
BEGIN//////////////////////////////////////////////

2009-12-08 18:05:55,406 ERROR
[org.mule.service.DefaultServiceExceptionStrategy] -
********************************************************************************
Message : Component that caused exception is:
hubMuleService. Message payload is of type: MeterReading
Type : org.mule.api.service.ServiceException
Code : MULE_ERROR--2
JavaDoc :
http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html
Payload :
org.jsemantic.services.examples.energy.invoice.model.MeterReading@1bb9696
********************************************************************************
Exception stack is:
1. null (java.lang.NullPointerException)
org.springframework.jdbc.core.JdbcTemplate
$SimplePreparedStatementCreator:1313 (http://java.sun.com/j2se/1.5.0/
docs/api/java/lang/NullPointerException.html)
2. null
(org.jsemantic.jiservice.core.service.exception.ServiceException)
org.jsemantic.jembedded.examples.invoicing.hub.HubService:63 (null)
3. Component that caused exception is: hubMuleService. Message payload
is of type: MeterReading (org.mule.api.service.ServiceException)
org.mule.component.DefaultLifecycleAdapter:216 (http://
www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/ServiceException.html)
********************************************************************************
Root Exception stack trace:
java.lang.NullPointerException
at org.springframework.jdbc.core.JdbcTemplate
$SimplePreparedStatementCreator.createPreparedStatement
(JdbcTemplate.java:1313)
at org.springframework.jdbc.core.JdbcTemplate.execute
(JdbcTemplate.java:585)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:
641)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:
670)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:
678)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject
(JdbcTemplate.java:721)
at org.springframework.jdbc.core.JdbcTemplate.queryForMap
(JdbcTemplate.java:740)
at
org.jsemantic.jembedded.examples.invoicing.hub.dao.AnnotatedDao.executeQuery
(AnnotatedDao.java:46)
at
org.jsemantic.jembedded.examples.invoicing.hub.dao.HubDAO.getMeterReading
(HubDAO.java:43)
at
org.jsemantic.jembedded.examples.invoicing.hub.HubService.receiveReading
(HubService.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mule.model.resolvers.AbstractEntryPointResolver.invokeMethod
(AbstractEntryPointResolver.java:154)
at org.mule.model.resolvers.ReflectionEntryPointResolver.invoke
(ReflectionEntryPointResolver.java:178)
at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke
(DefaultEntryPointResolverSet.java:50)
at org.mule.component.DefaultLifecycleAdapter.invoke
(DefaultLifecycleAdapter.java:205)
at org.mule.component.AbstractJavaComponent.invokeComponentInstance
(AbstractJavaComponent.java:83)
at org.mule.component.AbstractJavaComponent.doInvoke
(AbstractJavaComponent.java:74)
at org.mule.component.AbstractComponent.invokeInternal
(AbstractComponent.java:133)
at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:
161)
at org.mule.service.AbstractService.invokeComponent
(AbstractService.java:932)
at org.mule.model.seda.SedaService.doSend(SedaService.java:251)
at org.mule.service.AbstractService.sendEvent(AbstractService.java:
505)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354)
at org.mule.routing.inbound.DefaultInboundRouterCollection.send
(DefaultInboundRouterCollection.java:220)
at org.mule.routing.inbound.DefaultInboundRouterCollection.route
(DefaultInboundRouterCollection.java:180)
at org.mule.transport.AbstractMessageReceiver
$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:
364)
at org.mule.transport.AbstractMessageReceiver.routeMessage
(AbstractMessageReceiver.java:252)
at org.mule.transport.AbstractMessageReceiver.routeMessage
(AbstractMessageReceiver.java:175)
at org.mule.transport.vm.VMMessageReceiver.onCall
(VMMessageReceiver.java:107)
at org.mule.transport.vm.VMMessageDispatcher$2.doInTransaction
(VMMessageDispatcher.java:125)
at org.mule.transaction.TransactionTemplate.execute
(TransactionTemplate.java:99)
at org.mule.transport.vm.VMMessageDispatcher.doSend
(VMMessageDispatcher.java:128)
at org.mule.transport.AbstractMessageDispatcher.send
(AbstractMessageDispatcher.java:163)
at org.mule.transport.AbstractConnector.send(AbstractConnector.java:
2017)
at org.mule.endpoint.DefaultOutboundEndpoint.send
(DefaultOutboundEndpoint.java:76)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
at org.mule.module.client.MuleClient.send(MuleClient.java:650)
at org.mule.module.client.MuleClient.send(MuleClient.java:596)
at
org.jsemantic.services.mule.client.impl.MuleClientWrapperImpl.sendObjectMessage
(MuleClientWrapperImpl.java:105)
at org.jsemantic.jembedded.examples.invoicing.agent.MeterAgent.process
(MeterAgent.java:63)
at org.jsemantic.services.agent.skeletal.AbstractAgentService.run
(AbstractAgentService.java:63)
at java.lang.Thread.run(Thread.java:595)

********************************************************************************

/////////////////////////////////////
END///////////////////////////////////////////
from above error information,it told me that no dataSource would be
injected and then there was no jdbcTemplate instance existed in
AnnotatedDao.java.

Adolfo Estevez

unread,
Dec 9, 2009, 3:34:28 PM12/9/09
to jEmbedded Discussion Group
Hi,

It's strange, I've tried it using eclipse and it works fine. How are
you generating the eclipse project? With maven eclipse:eclipse?

Adolfo

On 8 dic, 11:17, jokoul webster <jokoulwebs...@gmail.com> wrote:
> Hi Adolfo:
>     Now I can run invoicing-server successfully,and I can generate
> invoicings in generated-invoices\files directory byhttp://localhost:9090/controller.inv?id=6&kwh=88, but when I run meter-
> hub,I got the following error,would you pls tell me the cause:
> //////////////////////////////////
> BEGIN//////////////////////////////////////////////
>
> 2009-12-08 18:05:55,406 ERROR
> [org.mule.service.DefaultServiceExceptionStrategy] -
> *************************************************************************** *****
> Message               : Component that caused exception is:
> hubMuleService. Message payload is of type: MeterReading
> Type                  : org.mule.api.service.ServiceException
> Code                  : MULE_ERROR--2
> JavaDoc               :http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/ser...
> Payload               :
> org.jsemantic.services.examples.energy.invoice.model.MeterReading@1bb9696
> *************************************************************************** *****
> Exception stack is:
> 1. null (java.lang.NullPointerException)
>   org.springframework.jdbc.core.JdbcTemplate
> $SimplePreparedStatementCreator:1313 (http://java.sun.com/j2se/1.5.0/
> docs/api/java/lang/NullPointerException.html)
> 2. null
> (org.jsemantic.jiservice.core.service.exception.ServiceException)
>   org.jsemantic.jembedded.examples.invoicing.hub.HubService:63 (null)
> 3. Component that caused exception is: hubMuleService. Message payload
> is of type: MeterReading (org.mule.api.service.ServiceException)
>   org.mule.component.DefaultLifecycleAdapter:216 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/service/Se...)
> *************************************************************************** *****

jokoul webster

unread,
Dec 11, 2009, 3:40:56 AM12/11/09
to jEmbedded Discussion Group
Hi,sorry,I have resolved that problem,becasue I once used the older
version embedded-database(0.13RC1) ,now I have updated it to
0.13RC2,it is ok,thanks.

JK.Webster

Adolfo Estevez

unread,
Dec 11, 2009, 4:10:59 AM12/11/09
to jEmbedded Discussion Group
It's fine.

I will release next week the 0.1.3 - release version that contains an
updated&refactored version of the case study (and all the examples).
Now I think it's easier to understand. Also I will update the whole
documentation.


Take care

Adolfo

mens jamie

unread,
Dec 12, 2009, 10:41:50 AM12/12/09
to jEmbedded Discussion Group
Good,Adolfo,I am pleased to hear that you will release the
0.13,congratuation.
PS,if you can,I hope you can give us a architecture graph about
jEmbedded container,and a description grapht about the case study.

Thanks.

Adolfo Estevez

unread,
Dec 12, 2009, 2:20:06 PM12/12/09
to jembedded-dis...@googlegroups.com
Hi,
 
Don´t worry as I´m gonna write a document about the case study. As I have integrated the jIntegrationTest within the framework I have reworked all the examples too, so I will rehash the docs examples.

 
I have added a new annotation @Composition (similar to @Inject, but the lifecycle of the injected service will be handled by the owner service) and a few more things.
 
Thanks
 
Adolfo
--
Adolfo Estevez Jimenez

Blog: http://semanticj2ee.blogspot.com

Open source projects:

http://code.google.com/p/jembedded

http://code.google.com/p/jservicerules 
Reply all
Reply to author
Forward
0 new messages