java code:
public class App {
public static void main(String[] args) throws Exception {
Act.start("Hello World Demo");
}
}
error message:
pid: 1
profile: dev
mode: DEV
zen: Namespaces are one honking great idea -- let's do more of those!
四月 14, 2017 11:27:11 上午 act.Act start
信息: loading application(s) ...
四月 14, 2017 11:27:11 上午 act.app.AppScanner scan
警告: . is not a valid app base
四月 14, 2017 11:27:11 上午 org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.6.Final
四月 14, 2017 11:27:11 上午 org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.6.Final
Exception in thread "main" org.osgl.exception.UnexpectedException: App not found. Please make sure your app start directory is correct
at act.Act.start(Act.java:328)
at act.Act.startApp(Act.java:290)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at act.boot.app.RunApp.start(RunApp.java:84)
at act.Act.start(Act.java:631)
at search.doc.App.main(App.java:13)
==================================================
Compilation completed successfully, but run App error.
From: http://actframework.org/doc/faq
You need to update the Run configuration and make sure working directory is set correctly:
I have trouble sending NGSI/XML formatted events to my Proton-CEP GE. The use case is that I will need Orion to send events to CEP.
Orion is configured to send events to Proton, which are correctly received. However, Proton reports NullPointerException when it receives them.
The output from catalina.out is:
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFO: started event message body reader
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFO: Event: DeviceContextUpdate
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
SEVERE: Could not parse XML NGSI event java.lang.NullPointerException, reason: null
last attribute name: null last value: null
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFO: finished event message body reader
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
INFO: starting submitNewEvent
Nov 12, 2015 7:30:27 PM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
SEVERE: Could not send event, reason: java.lang.NullPointerException, message: null
Sending the following JSON event directly to CEP works:
{"Name": "Device", "datacount5": "10", "lastupdate": "12/11/2015-17:09:08"}
INFO: starting submitNewEvent
Nov 12, 2015 7:31:39 PM com.ibm.hrl.proton.router.EventRouter routeTimedObject
INFO: routeTimedObject: forwarding event Device; EventId=32314f63-75d3-489f-9d8d-dbd0ba4a42b8; Chronon=null; DetectionTime=1447353099831; Name=Device; Certainty=0.0; Cost=0.0; lastupdate=1447344548000; EventSource=; OccurrenceTime=null; datacount5=10; Annotation=; Duration=0.0; ExpirationTime=null; to consumer...
Nov 12, 2015 7:31:39 PM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
INFO: events sent to proton runtime...
However, sending it in NGSI/XML produced a NullPointer Exception as above. The sent message is:
<notifyContextRequest>
<subscriptionId>51a60c7a286043f73ce9606c</subscriptionId>
<originator>localhost</originator>
<contextResponseList>
<contextElementResponse>
<contextElement>
<entityId type="Device" isPattern="false">
<id>Device.imei2</id>
</entityId>
<contextAttributeList>
<contextAttribute>
<name>datacount5</name>
<contextValue>5</contextValue>
</contextAttribute>
</contextAttributeList>
</contextElement>
<statusCode>
<code>200</code>
<reasonPhrase>OK</reasonPhrase>
</statusCode>
</contextElementResponse>
</contextResponseList>
</notifyContextRequest>
Note: I have also tried sending the message found in the documentation and I get the same NullPointerException, so I know it is not a XML formatting issue.
What is the reason phqp the JSON objects are accepted, but the NGSI/XML fail?
When NGSI/xml messages are parsed by the CEP, there is a translation process between the NGSI message and the CEP input event.
The matching input event defined in the CEP must have the name <entity type>ContextUpdate which is DeviceContextUpdate in your case
This input event must have the following attributes:
entityId – of type String. This attribute holds the entityId value provided in the message
entityType – of type String. This attributes holds the entity type provided in the message
Details and example can be found in the CEP user guide appendix
It turns out that the Event name is different when sending an Event using the JSON REST than the XML/NGSI format.
When using JSON, the event name is exactly as described in the JSON object
{"Name": "Device", "datacount5": "10"}
so, Device.
In the case of XML/NGSI, even if the entity type is also set to Device like this:
<entityId type="Device" isPattern="false">
<id>Device.imei2</id>
</entityId>
The Event name is converted to DeviceContextUpdate.
This information is provided (hidden?) in the Appendix A of the user documentation.
This question is connected with IBM BPM Advanced 8.0
I created Toolkit ODM Binbank Toolkit. This toolkit contain Advanced Integration Services. Name of the AIS is IServiceBR001ACT.
Then I attach this toolkit to Application "Collection" with short name ACOA and created process TestRule where I just call AIS IServiceBR001ACT.
Then I got exception.
---Error mssage:
javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
---Error details:
Process ID: Ref[65a79c75-9416-4204-aba4-299fb2366892/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444]
Process GUID: guid:e51c9c5cfb9fe587:-3ed7be13:14f73fee28e:-3528
Error timestamp: Sep 4, 2015 1:00:00 AM
Instance ID: BPDInstance.14274
Task ID: Task.41016
Root snapshot ID: null
Snapshot ID: Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18
Branch ID: null
---Error stack trace:
TestRule(Rule)#Snapshot.3d4f3c6e-c02b-4cae-be92-851d62ffdc18(tip)/BPD.bea9811b-01ac-49eb-af6d-b9732624f9bb
IServiceBR001ACT#Snapshot.0011b736-a14b-4bec-8db6-9f0ced5e3208/TWProcess.1d714b6a-6dd4-4fba-bab2-98f04dc01444
---Java stack trace:
com.lombardisoftware.component.common.workflow.WorkflowProcessItemException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:421)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.doResumeWorkflowEngine(EJBWorkflowManagerBean.java:1236)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:347)
at com.lombardisoftware.server.ejb.workflow.EJBWorkflowManagerBean.resumeTask(EJBWorkflowManagerBean.java:311)
at com.lombardisoftware.server.ejb.workflow.EJSRemoteStatefulEJBWorkflowManager_82478d70.resumeTask(Unknown Source)
at com.lombardisoftware.server.ejb.workflow._EJBWorkflowManagerInterface_Stub.resumeTask(_EJBWorkflowManagerInterface_Stub.java:287)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateDefault.resumeTask(EJBWorkflowManagerDelegateDefault.java:94)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere$4.run(EJBWorkflowManagerDelegateWebSphere.java:68)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:197)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:181)
at com.lombardisoftware.component.common.workflow.EJBWorkflowManagerDelegateWebSphere.resumeTask(EJBWorkflowManagerDelegateWebSphere.java:66)
at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask$1.run(ExecuteSystemLaneActivityTask.java:70)
at java.security.AccessController.doPrivileged(AccessController.java:362)
at javax.security.auth.Subject.doAs(Subject.java:573)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$5.run(WebsphereDelegateHelper.java:139)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:134)
at com.lombardisoftware.bpd.runtime.engine.quartz.ExecuteSystemLaneActivityTask.execute(ExecuteSystemLaneActivityTask.java:89)
at com.lombardisoftware.server.scheduler.Engine.execute(Engine.java:796)
at com.lombardisoftware.server.scheduler.Engine.access$300(Engine.java:78)
at com.lombardisoftware.server.scheduler.Engine$1.run(Engine.java:503)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$3$1.run(WebsphereDelegateHelper.java:100)
at java.security.AccessController.doPrivileged(AccessController.java:362)
at javax.security.auth.Subject.doAs(Subject.java:573)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:195)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:152)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAs(WebsphereDelegateHelper.java:172)
at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper$3.run(WebsphereDelegateHelper.java:96)
at com.lombardisoftware.server.scheduler.Utils$EJBThreadRootRunnable.executeRunnable(Utils.java:113)
at com.lombardisoftware.server.scheduler.ThreadPool$Worker.run(ThreadPool.java:194)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.RuntimeException: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:253)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:228)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport$1.doInTransaction(ProgrammaticTransactionSupport.java:409)
at org.springframework.transaction.jta.WebSphereUowTransactionManager$UOWActionAdapter.run(WebSphereUowTransactionManager.java:306)
at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderNewUOW(EmbeddableUOWManagerImpl.java:787)
at com.ibm.ws.uow.EmbeddableUOWManagerImpl.runUnderUOW(EmbeddableUOWManagerImpl.java:366)
at org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:252)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.executeInNewTransaction(ProgrammaticTransactionSupport.java:404)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:267)
at com.lombardisoftware.utility.spring.ProgrammaticTransactionSupport.execute(ProgrammaticTransactionSupport.java:198)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJobProcessRequest(SCAConnectorWorker.java:228)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker.doJob(SCAConnectorWorker.java:104)
at com.lombardisoftware.component.common.workflow.ExecutionJob.doJob(ExecutionJob.java:409)
... 34 more
Caused by: javax.naming.ServiceUnavailableException: No synchronous endpoints are available for targeted SCA export/service: BIN_Collection_Toolkit_Implementation/IServiceBR001ACT [Root exception is javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:250)
... 46 more
Caused by: javax.naming.NameNotFoundException: Context: sme-devNode04Cell/nodes/sme-devNode04/servers/server1, name: sca/ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT: First component in name ACOA-Tip-BIN_Collection_Toolkit_Implementation/export/IServiceBR001ACT not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4564)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1822)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.doInvoke(SCAReferenceBindingInvoker.java:108)
at com.ibm.ws.soa.sca.oasis.binding.sca.SCAReferenceBindingInvoker.invoke(SCAReferenceBindingInvoker.java:85)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:58)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:125)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:108)
at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:91)
at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.invoke(RuntimeEndpointReferenceImpl.java:238)
at com.ibm.bpm.sca.core.ReferenceInvoker.invokeCompleteMessage(ReferenceInvoker.java:87)
at com.lombardisoftware.component.scaconnector.worker.SCAConnectorWorker$1.call(SCAConnectorWorker.java:234)
... 46 more
Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.handleNameNotFound(WsnOptimizedNamingImpl.java:2483)
at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.getNextWsnOptimizedNamingContext(WsnOptimizedNamingImpl.java:1254)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4623)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$3.run(WsnOptimizedNamingImplBase.java:4618)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.getTargetContext(WsnOptimizedNamingImplBase.java:4617)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase$LeafOperationData.<init>(WsnOptimizedNamingImplBase.java:5229)
at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2160)
at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2958)
at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2954)
at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2952)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1818)
... 64 more
I checked websphere and found that here is not created sca component with proper naming.
How to solve this issue?
Should I do something with toolkit or should I point to toolkit properly inside of application?
This is just bug in IBM BPM.
I just removed and connect back toolkit.
And all is working properly.
Also possible another reason of that bug.
When we have project ExampleProject depend on toolkits A and B
and Both of toolkits A and B depend on another toolkit C, but they depend on different snapshot version.
In that situation websphere try to deploy snapshot but can't to do that with error code.
Caused by: com.ibm.bpm.fds.common.FDSException: Failed to process contribution dependency, ctrbDependencyId(false) = ContributionDependency.c63331fb-84a3-4207-9765-264e4ff4891b, libraryName(false) = CONSOLE_Business_Object_Toolkit_Library, contributionId(false) = Contribution.c1abb10c-334e-4e24-b581-680481515246, contributionRef(false) = null, deployWith(false) = true, guid(false) = guid:146778b866395858:-7560582:141a6a84e9b:-4ff5, versionId(false) = 6b739dd4-a735-4b8d-8647-c4118c3fe8d3, lastModified(false) = 2013-10-18 12:50:26.0, lastModifiedByUserId(false) = User.9, state = RECORD_STATE_UP_TO_DATE, saveSyncId = null
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:527)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:515)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContribution(JavaAdapter.java:341)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.buildDependencyTree(JavaAdapter.java:226)
… 16 more
Caused by: com.lombardisoftware.core.TeamWorksException: There are 3 contributions called CONSOLE_Business_Object_Toolkit_Library. Please fix the dependency tree from Console so that there is only 1.
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:188)
at com.lombardisoftware.client.persistence.ContributionFactory.getContributionByName(ContributionFactory.java:166)
at com.ibm.bpm.fds.repo.adapter.JavaAdapter.processContributionDependencies(JavaAdapter.java:495)
… 20 more
mode detailed this described here
https://bpmtricks.wordpress.com/2013/11/04/toolkit-version-problem/
I have a Grizzly http server to implement a jersey-REST API server. I am attempting to make a rest API to #GET
#Produces(MediaType.APPLICATION_JSON)
I am running into exceptions like
A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
The same code was working when I was returning a string as JSON. Now it doesnt work when I attempt to return a java object as JSON. There were many questions in SO, but all of them were almost older than an year; I tried to implement them - but issue was not fixed. I am suspecting this might have been due to newer versions of grizzly... Can any one help ?
Link to github project: https://github.com/seshumadhav/java-projects/tree/master/grizzlySpringJersey
Imp versions info copied from my pom:
<!-- Jersey: javax.ws -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2</artifactId>
<version>1.17.1</version>
</dependency>
<!-- >>> For message body exception error. JSONConfiguration.FEATURE_POJO_MAPPING; This did not work -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId>
<version>1.17.1</version>
</dependency>
<!-- Grizzly2 -->
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet</artifactId>
<version>2.2.16</version>
</dependency>
Detailed exception trace below
Dec 27, 2013 6:25:35 PM org.glassfish.grizzly.servlet.WebappContext deploy
INFO: Starting application [DEMO REST Server WebappContext] ...
Dec 27, 2013 6:25:35 PM org.glassfish.grizzly.servlet.WebappContext log
INFO: [DEMO REST Server WebappContext] Initializing Spring root WebApplicationContext
Dec 27, 2013 6:25:35 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Dec 27, 2013 6:25:35 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Fri Dec 27 18:25:35 IST 2013]; root of context hierarchy
Dec 27, 2013 6:25:36 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
Dec 27, 2013 6:25:36 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#c893391: defining beans [resourceFoo,springRunner,myBean,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Dec 27, 2013 6:25:36 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 421 ms
Dec 27, 2013 6:25:36 PM com.sun.jersey.spi.spring.container.servlet.SpringServlet getContext
INFO: Using default applicationContext
Dec 27, 2013 6:25:36 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registerSpringBeans
INFO: Registering Spring bean, resourceFoo, of type com.demo.web.ResourceFoo as a root resource class
Dec 27, 2013 6:25:36 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'
Dec 27, 2013 6:25:36 PM org.glassfish.grizzly.servlet.WebappContext initServlets
INFO: [DEMO REST Server WebappContext] Servlet [com.sun.jersey.spi.spring.container.servlet.SpringServlet] registered for url pattern(s) [[/*]].
Dec 27, 2013 6:25:36 PM org.glassfish.grizzly.servlet.WebappContext deploy
INFO: Application [DEMO REST Server WebappContext] is ready to service requests. Root: [/].
Dec 27, 2013 6:25:37 PM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [localhost:3388]
Dec 27, 2013 6:25:37 PM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
In order to test the server please try the following urls:
http://localhost:3388/smc/time to see time for smc
http://localhost:3388/bsv/time to see time for bsv
Press enter to stop the server...
Dec 27, 2013 6:25:44 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
Dec 27, 2013 6:25:44 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are:
application/json ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
com.sun.jersey.core.impl.provider.entity.FormProvider
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
com.sun.jersey.core.impl.provider.entity.StringProvider
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.ReaderProvider
com.sun.jersey.core.impl.provider.entity.DocumentProvider
com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider
com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
Dec 27, 2013 6:25:44 PM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:147)
at org.glassfish.grizzly.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:106)
at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:252)
at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpHandlerChain.service(HttpHandlerChain.java:196)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
... 30 more
Dec 27, 2013 6:25:48 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
Dec 27, 2013 6:25:48 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are:
application/json ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
com.sun.jersey.core.impl.provider.entity.FormProvider
com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
com.sun.jersey.core.impl.provider.entity.StringProvider
com.sun.jersey.core.impl.provider.entity.ByteArrayProvider
com.sun.jersey.core.impl.provider.entity.FileProvider
com.sun.jersey.core.impl.provider.entity.InputStreamProvider
com.sun.jersey.core.impl.provider.entity.DataSourceProvider
com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.ReaderProvider
com.sun.jersey.core.impl.provider.entity.DocumentProvider
com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider
com.sun.jersey.core.impl.provider.entity.SourceProvider$SourceWriter
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General
com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
Dec 27, 2013 6:25:48 PM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.glassfish.grizzly.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:147)
at org.glassfish.grizzly.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:106)
at org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:252)
at org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpHandlerChain.service(HttpHandlerChain.java:196)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:815)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:567)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:547)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class com.demo.beans.MyBlob, and Java type class com.demo.beans.MyBlob, and MIME media type application/json was not found
... 30 more
I'd suggest adding a JSON provider to your pom:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey.version}</version>
</dependency>
You may need to enable the com.sun.jersey.api.json.POJOMappingFeature. This can be done programmatically:
ResourceConfig rc = // choose your method of setting up your ResourceConfig
rc.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, true);
or via a web.xml file:
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
Check out the Jersey 1.17 documentation for further detail.
Also, I'd like to suggest using Jersey 2 if at all possible. Note, however, if you decide to go this route the above suggestions will not map directly to Jersey 2.
I'm at a loss for a solution. I've been playing with Spring MVC and Hibernate, and I had established a connection with my database, pulling data, no problem.
I added an #Entity, and maybe done some other changes, and now Hibernate won't do anything. By anything, I mean there is no SQL executed (as shown in the tomcat logs, using the show-sql option of hibernate). There is also no exceptions thrown at all, and Hibernate even tells me it has updated the DB schema (which it has not, since no tables have been created.).
I have checked that the getAllArticles() method gets called during runtime using a debugger.
I really don't know what to check now, if someone has any idea I'll be grateful forever.
My servlet config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<mvc:resources location="/resources/" mapping="/resources/**" />
<mvc:annotation-driven />
<context:component-scan base-package="com.last" />
<tx:annotation-driven transaction-manager="transactionManager" />
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://10.0.0.2/lastDB" />
<property name="username" value="dbuser" />
<property name="password" value="dbpass" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="com.test" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
The entity:
package com.last.entities;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
#Entity
#Table(name = "ARTICLE")
public class Article {
private int id;
private String content;
private User author;
#Id
#GeneratedValue
#Column(name = "ARTICLE_ID")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
#Column(name = "CONTENT", length=10000)
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
#ManyToOne
#Column(name="AUTHOR")
#JoinColumn(name = "USER_USER_ID")
public User getAuthor() {
return author;
}
public void setAuthor(User user) {
this.author = user;
}
}
The DAO:
package com.last.dao;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import com.last.entities.Article;
import com.last.entities.User;
import com.last.exceptions.DAOException;
#SuppressWarnings("unchecked")
#Component
#Transactional(readOnly = true)
public class DAOImpl implements DAO {
#Autowired
SessionFactory sessionFactory;
private Session currentSession() {
return sessionFactory.getCurrentSession();
}
#Override
public List<User> getUserList() {
return currentSession().createCriteria(User.class).list();
}
#Override
public User getUserByID(int id) {
User result = (User) currentSession().createCriteria(User.class)
.add(Restrictions.eq("id", id)).uniqueResult();
if (result == null) {
throw new DAOException(DAOException.NO_RESULT);
} else {
return result;
}
}
#Override
public List<Article> getAllArticles() {
return currentSession().createCriteria(Article.class).list();
}
}
Tomcat's Log:
avr. 22, 2013 4:39:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_15\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Programmes\LaTeX\MikTeX\miktex\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Haskell\bin;D:\Programming Stuff\Haskell\2010.2.0.0\lib\extralibs\bin;D:\Programming Stuff\Haskell\2010.2.0.0\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;D:\Programmes\PostgreSQL\bin;C:\Program Files\Calibre2\;F:\RailsInstaller\Git\cmd;F:\RailsInstaller\Ruby1.9.2\bin;D:\Programming Stuff\RailsInstaller\Git\cmd;D:\Programming Stuff\RailsInstaller\Ruby1.9.2\bin;F:\Web Server\wamp\ruby\bin;C:\Program Files\Java\jdk1.7.0_02\bin;D:\Programmes\NetBeans\ant\apache-ant-1.8.4\bin;C:\Program Files (x86)\OpenVPN\bin;.
avr. 22, 2013 4:39:11 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
avr. 22, 2013 4:39:11 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
avr. 22, 2013 4:39:11 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1055 ms
avr. 22, 2013 4:39:11 PM org.apache.catalina.core.StandardService startInternal
INFO: Démarrage du service Catalina
avr. 22, 2013 4:39:11 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.37
avr. 22, 2013 4:39:12 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [128] milliseconds.
avr. 22, 2013 4:39:12 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration D:\Programming Stuff\Projects\FinalTest\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\Last.xml
avr. 22, 2013 4:39:12 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Last' did not find a matching property.
avr. 22, 2013 4:39:15 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
avr. 22, 2013 4:39:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
avr. 22, 2013 4:39:15 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
avr. 22, 2013 4:39:15 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Apr 22 16:39:15 CEST 2013]; root of context hierarchy
avr. 22, 2013 4:39:15 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/last-servlet.xml]
avr. 22, 2013 4:39:16 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization
INFO: Bean 'dataSource' of type [class org.apache.commons.dbcp.BasicDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
avr. 22, 2013 4:39:16 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
avr. 22, 2013 4:39:16 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.0.Final}
avr. 22, 2013 4:39:16 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
avr. 22, 2013 4:39:16 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
avr. 22, 2013 4:39:17 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
avr. 22, 2013 4:39:17 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
avr. 22, 2013 4:39:17 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
avr. 22, 2013 4:39:17 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
avr. 22, 2013 4:39:17 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
avr. 22, 2013 4:39:17 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
avr. 22, 2013 4:39:17 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization
INFO: Bean 'sessionFactory' of type [class org.springframework.orm.hibernate4.LocalSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
avr. 22, 2013 4:39:17 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#1312f348: defining beans [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,mainController,DAOImpl,serviceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,dataSource,sessionFactory,transactionManager,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
avr. 22, 2013 4:39:17 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
avr. 22, 2013 4:39:17 PM org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod
INFO: Mapped "{[/],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.last.controllers.MainController.showHomePage(java.util.Map<java.lang.String, java.lang.Object>)
avr. 22, 2013 4:39:18 PM org.springframework.orm.hibernate4.HibernateTransactionManager afterPropertiesSet
INFO: Using DataSource [org.apache.commons.dbcp.BasicDataSource#6192fb7a] of Hibernate SessionFactory for HibernateTransactionManager
avr. 22, 2013 4:39:18 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 3389 ms
avr. 22, 2013 4:39:18 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'last'
avr. 22, 2013 4:39:18 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'last': initialization started
avr. 22, 2013 4:39:18 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'last-servlet': startup date [Mon Apr 22 16:39:18 CEST 2013]; parent: Root WebApplicationContext
avr. 22, 2013 4:39:18 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/last-servlet.xml]
avr. 22, 2013 4:39:18 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization
INFO: Bean 'dataSource' of type [class org.apache.commons.dbcp.BasicDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
avr. 22, 2013 4:39:18 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
avr. 22, 2013 4:39:18 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
avr. 22, 2013 4:39:18 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
avr. 22, 2013 4:39:18 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
avr. 22, 2013 4:39:18 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000227: Running hbm2ddl schema export
avr. 22, 2013 4:39:18 PM org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: HHH000230: Schema export complete
avr. 22, 2013 4:39:18 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization
INFO: Bean 'sessionFactory' of type [class org.springframework.orm.hibernate4.LocalSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
avr. 22, 2013 4:39:18 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#1b2cc445: defining beans [org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,mainController,DAOImpl,serviceImpl,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,dataSource,sessionFactory,transactionManager,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory#1312f348
avr. 22, 2013 4:39:18 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
avr. 22, 2013 4:39:18 PM org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod
INFO: Mapped "{[/],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.last.controllers.MainController.showHomePage(java.util.Map<java.lang.String, java.lang.Object>)
avr. 22, 2013 4:39:18 PM org.springframework.orm.hibernate4.HibernateTransactionManager afterPropertiesSet
INFO: Using DataSource [org.apache.commons.dbcp.BasicDataSource#1583f012] of Hibernate SessionFactory for HibernateTransactionManager
avr. 22, 2013 4:39:19 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'last': initialization completed in 503 ms
avr. 22, 2013 4:39:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
avr. 22, 2013 4:39:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
avr. 22, 2013 4:39:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7587 ms
Thank you !
Could be copy-paste, but your hibernate session factory bean is scanning com.test for hibernate entities instead of com.last.