Topic
  • 10 replies
  • Latest Post - ‏2014-05-16T22:15:39Z by JesseJamesRiosFranco
SystemAdmin
SystemAdmin
37422 Posts

Pinned topic Websphere JNDI datasource configuration with Spring 3

‏2011-09-08T20:37:21Z |
Hi all!

I am having issues when setting up a Spring 3 datasource which comes from the Websphere JNDI configuration. In my solution, I am using WAS8 to host some JAX-WS web serivces which calls down to Spring 3 JDBC stored procedures, and uses Oracle11g jdbc drivers.

Here are the scenario details:
  • My solution works if I have the datasource set inside Spring applicationContext.xml as follows:
CODE
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@xxx.xxx.xxx.xxx:xxxx:dbname"/>
<property name="username" value="user"/>
<property name="password" value="pswd"/>
</bean>
[/CODE]

  • So far I got the datasource to be injected from JNDI when I setup applicationContext.xml as follows:
CODE
<jee:jndi-lookup
id="dataSource"
jndi-name="jdbc/myDs"
cache="true"
resource-ref="true"
lookup-on-startup="true"
/>
[/CODE]

But the Store Procedures fails to execute, and I am lost.

Thanks for any advice.

This is part of the error log:
9/8/11 15:38:19:779 CDT 00000023 FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/blds, throwing ResourceAllocationException. Original exception: <=================================>Exception Message -> null
java.lang.NullPointerException
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:94)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:70)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:1223)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:1260)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:2003)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getConnection(WSManagedConnectionFactoryImpl.java:1746)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1498)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:2047)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1724)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3101)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2473)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1340)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:961)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:669)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:636)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:940)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1003)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:144)
at com.autologic.bl.ontario.sp.spring.jdbc.GetTestUnitInfoJdbcImpl.execute(GetTestUnitInfoJdbcImpl.java:53)
at com.autologic.bl.ontario.ws.soap.SystemService.getTestUnitInfo(SystemService.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:83)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:98)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:111)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:161)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:197)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.doPost(WASAxis2Servlet.java:1465)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3604)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:950)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1625)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:197)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:445)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:504)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:301)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:275)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1620)
<=================================>
9/8/11 15:38:19:715 CDT 00000023 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\dev\app\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_3e17dfd_11.09.08_15.38.19.6342776987887153413143.txt com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper 545
Updated on 2011-09-12T16:34:59Z at 2011-09-12T16:34:59Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2011-09-09T15:37:24Z  
    I suggest you do the following:-

    1. Create the JDBC Resource in WAS. Test whether it is successful.
    2. In your application.xml configure the JNDI rather than hard coding the database details.
    3. Lookup the Datasource from your Spring Bean.

    Sample Code for Step 2
    <bean id="testDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/myDs"/>
    <property name="lookupOnStartup" value="false"/>
    <property name="cache" value="true" />
    <property name="proxyInterface" value="javax.sql.DataSource"/>
    </bean>
    Sample Code for Step 3
    DataSource ds = (DataSource)context.getBean("testDataSource");

    This way it should work.
  • infyniti
    infyniti
    215 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2011-09-09T18:56:55Z  
    I suggest you do the following:-

    1. Create the JDBC Resource in WAS. Test whether it is successful.
    2. In your application.xml configure the JNDI rather than hard coding the database details.
    3. Lookup the Datasource from your Spring Bean.

    Sample Code for Step 2
    <bean id="testDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/myDs"/>
    <property name="lookupOnStartup" value="false"/>
    <property name="cache" value="true" />
    <property name="proxyInterface" value="javax.sql.DataSource"/>
    </bean>
    Sample Code for Step 3
    DataSource ds = (DataSource)context.getBean("testDataSource");

    This way it should work.
    Nice developer works article on using spring and hibernate with WAS.

    http://www.ibm.com/developerworks/websphere/techjournal/0609_alcott/0609_alcott.html

    Thanks
  • SystemAdmin
    SystemAdmin
    37422 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2011-09-12T16:34:59Z  
    [b]infyity:[/b] Thanks for the link. That's the one I was using and is definitively the best one out there.

    [b]SANDIP:[/b] You hit it. I had to create the JDBC connection in WAS dev server AND REMOVE the deployment descriptor information generated by RAD. I don't get why some stuff in the Deployment descriptor gets propagated down to the server (i.e. shared libraries) but others like the JDBC configuration doesn't. Maybe this is a bug, because why do the get written into the Deployment config?

    Anyways now I am up and running just to hit a different problem. To be continue.. I need to research some about WSWrappedConnection vs OraJDBCConnection. :)

    Thanks for you help
  • JesseJamesRiosFranco
    5 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T17:19:01Z  
    [b]infyity:[/b] Thanks for the link. That's the one I was using and is definitively the best one out there.

    [b]SANDIP:[/b] You hit it. I had to create the JDBC connection in WAS dev server AND REMOVE the deployment descriptor information generated by RAD. I don't get why some stuff in the Deployment descriptor gets propagated down to the server (i.e. shared libraries) but others like the JDBC configuration doesn't. Maybe this is a bug, because why do the get written into the Deployment config?

    Anyways now I am up and running just to hit a different problem. To be continue.. I need to research some about WSWrappedConnection vs OraJDBCConnection. :)

    Thanks for you help

    Hi, I am integrating a project with Spring and Hibernate frameworks, this project I'm deploying in WAS, the datasource using the project already configured in the WAS, Connect also tested in the same WAS. 

    In the deployment project in the WAS trace shows the error, but this error does not prevent the project is deployed successfully: 

    5/16/14 10:43:55:675 PET] 0000003b CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun.
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0200I: Starting application: PA_KM_Comun
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0204I: Application: PA_KM_Comun  Application build level: Unknown
    [5/16/14 10:43:56:561 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: KM Comun.
    [5/16/14 10:43:56:565 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.inject.Inject annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/javax.inject-1.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceUnit annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceContext annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:578 PET] 0000003b InjectionProc E   CWNEN0044E: A resource reference binding could not be found for the jdbc/dbKMSYS resource reference, defined for the KM Comun component.
    [5/16/14 10:43:56:580 PET] 0000003b AbstractInjec E   CWNEN0011E:  The injection engine failed to process bindings for the metadata.
    [5/16/14 10:43:56:580 PET] 0000003b webapp        E com.ibm.ws.webcontainer.webapp.WebAppImpl populateJavaNameSpace SRVE8084E: An unexpected internal server error occurred while populating the namespace.
                                     com.ibm.wsspi.injectionengine.InjectionException: Unable to perform reference processing for component KM_Comun.war in module KM_Comun.war in application PA_KM_Comun.
        at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:1039)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.populateJavaNameSpace(WebAppImpl.java:1108)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:324)
             at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
             at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1162)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369)
             at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:768)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1356)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2152)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
             at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5459)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5585)
             at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1248)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:248)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:120)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:108)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1709)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcessSynchronousExt(AppBinaryProcessor.java:749)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.postProcess(BLABinaryProcessor.java:590)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.onChangeCompletion(BLABinaryProcessor.java:467)
             at com.ibm.ws.management.bla.sync.BinaryProcessorWrapper.onChangeCompletion(BinaryProcessorWrapper.java:109)
             at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1905)
             at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1414)
             at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:665)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1998)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1946)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:549)
             at com.ibm.ws.management.configservice.ConfigServiceImpl.save(ConfigServiceImpl.java:719)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
             at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:478)
             at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:312)
             at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
             at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
             at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
             at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1691)
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: Failed to process bindings for metadata
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:852)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:483)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:379)
             at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:965)
             ... 92 more
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/dbKMSYS], defined for the KM Comun component.
             at com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:1395)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:839)
             ... 95 more

    [5/16/14 10:43:56:591 PET] 0000003b WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/wps/PA_KM_Comun
    [5/16/14 10:43:56:602 PET] 0000003b I18nJndiSuppo W   I18N9015E: The Internationalization context API cannot be bound into the namespace on WebSphere_Portal.
    Application components will be unavailable on WebSphere_Portal.
    Application components will be unable to access Internationalization context API references.
    [5/16/14 10:43:56:605 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in Portlet mbean is excluded from access check.
    [5/16/14 10:43:56:615 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in PortletApplication mbean is excluded from access check.
    [5/16/14 10:44:03:444 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.No Spring WebApplicationInitializer types detected on classpath
    [5/16/14 10:44:03:456 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:458 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:506 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring root WebApplicationContext
    [5/16/14 10:44:03:507 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization started
    [5/16/14 10:44:03:608 PET] 0000003b XmlWebApplica I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing Root WebApplicationContext: startup date [Fri May 16 10:44:03 PET 2014]; root of context hierarchy
    [5/16/14 10:44:03:652 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-web.xml]
    [5/16/14 10:44:03:693 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-hb.xml]
    [5/16/14 10:44:03:805 PET] 0000003b DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441: 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,dataSource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager]; root of factory hierarchy
    [5/16/14 10:44:03:899 PET] 0000003b SimpleUrlHand I org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
    [5/16/14 10:44:04:595 PET] 0000003b AnnotationSes I org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory Building new Hibernate SessionFactory
    [5/16/14 10:44:04:978 PET] 0000003b HibernateTran I org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet Using DataSource [com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@8b719406] of Hibernate SessionFactory for HibernateTransactionManager
    [5/16/14 10:44:04:983 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization completed in 1475 ms
    [5/16/14 10:44:04:990 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:04:992 PET] 0000003b servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [view-servlet]: Initialization successful.
    [5/16/14 10:44:04:992 PET] 0000003b webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module KM Comun has been bound to default_host[*:9081,*:80,*:9444,*:5063,*:5062,*:443,*:10046,*:10049,*:10027,*:10025,*:10028,*:10039,*:10029,*:10032].
    [5/16/14 10:44:05:046 PET] 0000003b ApplicationMg A   WSVR0221I: Application started: PA_KM_Comun
    [5/16/14 10:44:05:046 PET] 0000003b CompositionUn A   WSVR0191I: Composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun started.
    [5/16/14 10:44:05:047 PET] 0000003b AppBinaryProc I   ADMA7021I: Distribution of application PA_KM_Comun completed successfully.
    [5/16/14 10:44:05:065 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255031463.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255021351.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/application.xml.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/PA_KM_Comun.ear.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.policy.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/deployment.xml.
    [5/16/14 10:44:05:068 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/ibm-application-runtime.props.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/nodes/wp8Node/serverindex.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-web-bnd.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/portlet.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web_merged.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.webmodule.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.module.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-metadata.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253829964.
    [5/16/14 10:44:05:073 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253819535.
    [5/16/14 10:45:16:364 PET] 00000038 annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:45:16:369 PET] 00000038 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [KM_Debate]: Initialization successful.
    [5/16/14 10:45:16:379 PET] 00000038 DispatcherPor I org.springframework.web.portlet.GenericPortletBean init Initializing portlet 'KM_Debate'
    [5/16/14 10:45:16:400 PET] 00000038 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring FrameworkPortlet 'KM_Debate'
    [5/16/14 10:45:16:401 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization started
    [5/16/14 10:45:16:407 PET] 00000038 XmlPortletApp I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing PortletApplicationContext for namespace 'KM_Debate-portlet': startup date [Fri May 16 10:45:16 PET 2014]; parent: Root WebApplicationContext
    [5/16/14 10:45:16:412 PET] 00000038 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from PortletContext resource [/WEB-INF/portlet/debate-portlet.xml]
    [5/16/14 10:45:16:440 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:443 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:469 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:470 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:477 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:478 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:552 PET] 00000038 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    [5/16/14 10:45:16:573 PET] 00000038 DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@69149cf6: defining beans [usuarioDAOHibernate,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,debateServiceImpl,CDebateController,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#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,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,messageSource,portletViewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441
    [5/16/14 10:45:16:677 PET] 00000038 RequestMappin I org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod Mapped "{[/VIEW],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(org.springframework.ui.ModelMap)
    [5/16/14 10:45:17:155 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization completed in 754 ms

    When trying to run a Hibernate Criteria statement inside my project displays the following error:

    Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
        at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
             at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.getSession(UsuarioDAOHibernate.java:29)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.obtenerUsuarioPorId(UsuarioDAOHibernate.java:24)
             at pe.gob.onp.reapro.km.comun.debate.service.impl.DebateServiceImpl.obtenerUsuarioPorId(DebateServiceImpl.java:51)
             at pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(CDebateController.java:44)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:362)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:349)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:291)
             at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:734)
             at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:522)
             ... 230 more

     

  • bpaskin
    bpaskin
    4282 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T19:21:02Z  

    Hi, I am integrating a project with Spring and Hibernate frameworks, this project I'm deploying in WAS, the datasource using the project already configured in the WAS, Connect also tested in the same WAS. 

    In the deployment project in the WAS trace shows the error, but this error does not prevent the project is deployed successfully: 

    5/16/14 10:43:55:675 PET] 0000003b CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun.
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0200I: Starting application: PA_KM_Comun
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0204I: Application: PA_KM_Comun  Application build level: Unknown
    [5/16/14 10:43:56:561 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: KM Comun.
    [5/16/14 10:43:56:565 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.inject.Inject annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/javax.inject-1.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceUnit annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceContext annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:578 PET] 0000003b InjectionProc E   CWNEN0044E: A resource reference binding could not be found for the jdbc/dbKMSYS resource reference, defined for the KM Comun component.
    [5/16/14 10:43:56:580 PET] 0000003b AbstractInjec E   CWNEN0011E:  The injection engine failed to process bindings for the metadata.
    [5/16/14 10:43:56:580 PET] 0000003b webapp        E com.ibm.ws.webcontainer.webapp.WebAppImpl populateJavaNameSpace SRVE8084E: An unexpected internal server error occurred while populating the namespace.
                                     com.ibm.wsspi.injectionengine.InjectionException: Unable to perform reference processing for component KM_Comun.war in module KM_Comun.war in application PA_KM_Comun.
        at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:1039)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.populateJavaNameSpace(WebAppImpl.java:1108)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:324)
             at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
             at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1162)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369)
             at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:768)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1356)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2152)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
             at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5459)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5585)
             at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1248)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:248)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:120)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:108)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1709)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcessSynchronousExt(AppBinaryProcessor.java:749)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.postProcess(BLABinaryProcessor.java:590)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.onChangeCompletion(BLABinaryProcessor.java:467)
             at com.ibm.ws.management.bla.sync.BinaryProcessorWrapper.onChangeCompletion(BinaryProcessorWrapper.java:109)
             at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1905)
             at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1414)
             at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:665)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1998)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1946)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:549)
             at com.ibm.ws.management.configservice.ConfigServiceImpl.save(ConfigServiceImpl.java:719)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
             at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:478)
             at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:312)
             at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
             at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
             at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
             at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1691)
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: Failed to process bindings for metadata
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:852)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:483)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:379)
             at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:965)
             ... 92 more
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/dbKMSYS], defined for the KM Comun component.
             at com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:1395)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:839)
             ... 95 more

    [5/16/14 10:43:56:591 PET] 0000003b WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/wps/PA_KM_Comun
    [5/16/14 10:43:56:602 PET] 0000003b I18nJndiSuppo W   I18N9015E: The Internationalization context API cannot be bound into the namespace on WebSphere_Portal.
    Application components will be unavailable on WebSphere_Portal.
    Application components will be unable to access Internationalization context API references.
    [5/16/14 10:43:56:605 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in Portlet mbean is excluded from access check.
    [5/16/14 10:43:56:615 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in PortletApplication mbean is excluded from access check.
    [5/16/14 10:44:03:444 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.No Spring WebApplicationInitializer types detected on classpath
    [5/16/14 10:44:03:456 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:458 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:506 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring root WebApplicationContext
    [5/16/14 10:44:03:507 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization started
    [5/16/14 10:44:03:608 PET] 0000003b XmlWebApplica I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing Root WebApplicationContext: startup date [Fri May 16 10:44:03 PET 2014]; root of context hierarchy
    [5/16/14 10:44:03:652 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-web.xml]
    [5/16/14 10:44:03:693 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-hb.xml]
    [5/16/14 10:44:03:805 PET] 0000003b DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441: 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,dataSource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager]; root of factory hierarchy
    [5/16/14 10:44:03:899 PET] 0000003b SimpleUrlHand I org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
    [5/16/14 10:44:04:595 PET] 0000003b AnnotationSes I org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory Building new Hibernate SessionFactory
    [5/16/14 10:44:04:978 PET] 0000003b HibernateTran I org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet Using DataSource [com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@8b719406] of Hibernate SessionFactory for HibernateTransactionManager
    [5/16/14 10:44:04:983 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization completed in 1475 ms
    [5/16/14 10:44:04:990 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:04:992 PET] 0000003b servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [view-servlet]: Initialization successful.
    [5/16/14 10:44:04:992 PET] 0000003b webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module KM Comun has been bound to default_host[*:9081,*:80,*:9444,*:5063,*:5062,*:443,*:10046,*:10049,*:10027,*:10025,*:10028,*:10039,*:10029,*:10032].
    [5/16/14 10:44:05:046 PET] 0000003b ApplicationMg A   WSVR0221I: Application started: PA_KM_Comun
    [5/16/14 10:44:05:046 PET] 0000003b CompositionUn A   WSVR0191I: Composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun started.
    [5/16/14 10:44:05:047 PET] 0000003b AppBinaryProc I   ADMA7021I: Distribution of application PA_KM_Comun completed successfully.
    [5/16/14 10:44:05:065 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255031463.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255021351.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/application.xml.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/PA_KM_Comun.ear.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.policy.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/deployment.xml.
    [5/16/14 10:44:05:068 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/ibm-application-runtime.props.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/nodes/wp8Node/serverindex.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-web-bnd.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/portlet.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web_merged.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.webmodule.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.module.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-metadata.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253829964.
    [5/16/14 10:44:05:073 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253819535.
    [5/16/14 10:45:16:364 PET] 00000038 annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:45:16:369 PET] 00000038 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [KM_Debate]: Initialization successful.
    [5/16/14 10:45:16:379 PET] 00000038 DispatcherPor I org.springframework.web.portlet.GenericPortletBean init Initializing portlet 'KM_Debate'
    [5/16/14 10:45:16:400 PET] 00000038 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring FrameworkPortlet 'KM_Debate'
    [5/16/14 10:45:16:401 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization started
    [5/16/14 10:45:16:407 PET] 00000038 XmlPortletApp I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing PortletApplicationContext for namespace 'KM_Debate-portlet': startup date [Fri May 16 10:45:16 PET 2014]; parent: Root WebApplicationContext
    [5/16/14 10:45:16:412 PET] 00000038 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from PortletContext resource [/WEB-INF/portlet/debate-portlet.xml]
    [5/16/14 10:45:16:440 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:443 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:469 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:470 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:477 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:478 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:552 PET] 00000038 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    [5/16/14 10:45:16:573 PET] 00000038 DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@69149cf6: defining beans [usuarioDAOHibernate,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,debateServiceImpl,CDebateController,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#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,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,messageSource,portletViewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441
    [5/16/14 10:45:16:677 PET] 00000038 RequestMappin I org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod Mapped "{[/VIEW],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(org.springframework.ui.ModelMap)
    [5/16/14 10:45:17:155 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization completed in 754 ms

    When trying to run a Hibernate Criteria statement inside my project displays the following error:

    Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
        at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
             at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.getSession(UsuarioDAOHibernate.java:29)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.obtenerUsuarioPorId(UsuarioDAOHibernate.java:24)
             at pe.gob.onp.reapro.km.comun.debate.service.impl.DebateServiceImpl.obtenerUsuarioPorId(DebateServiceImpl.java:51)
             at pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(CDebateController.java:44)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:362)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:349)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:291)
             at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:734)
             at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:522)
             ... 230 more

     

    Hi,

    In the future, start a new thread.  You replied to a thread that is three years old.

    You are trying to override the WAS Full Profile with classes you provided.  Remove the offending classes (javax.inject-1.jar, hibernate-jpa-2.0-api-1.0.1.Final.jar)

    [5/16/14 10:43:56:565 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.inject.Inject annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/javax.inject-1.jar location rather than from a product class loader.

    Brian

  • gas
    gas
    893 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T20:49:00Z  

    Hi, I am integrating a project with Spring and Hibernate frameworks, this project I'm deploying in WAS, the datasource using the project already configured in the WAS, Connect also tested in the same WAS. 

    In the deployment project in the WAS trace shows the error, but this error does not prevent the project is deployed successfully: 

    5/16/14 10:43:55:675 PET] 0000003b CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun.
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0200I: Starting application: PA_KM_Comun
    [5/16/14 10:43:55:702 PET] 0000003b ApplicationMg A   WSVR0204I: Application: PA_KM_Comun  Application build level: Unknown
    [5/16/14 10:43:56:561 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: Loading Web Module: KM Comun.
    [5/16/14 10:43:56:565 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.inject.Inject annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/javax.inject-1.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceUnit annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:567 PET] 0000003b AbstractInjec W   CWNEN0070W: The javax.persistence.PersistenceContext annotation class will not be recognized because it was loaded from the file:/opt/IBM/WebSphere/wp_profile/installedApps/wp8Cell/PA_KM_Comun.ear/KM_Comun.war/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar location rather than from a product class loader.
    [5/16/14 10:43:56:578 PET] 0000003b InjectionProc E   CWNEN0044E: A resource reference binding could not be found for the jdbc/dbKMSYS resource reference, defined for the KM Comun component.
    [5/16/14 10:43:56:580 PET] 0000003b AbstractInjec E   CWNEN0011E:  The injection engine failed to process bindings for the metadata.
    [5/16/14 10:43:56:580 PET] 0000003b webapp        E com.ibm.ws.webcontainer.webapp.WebAppImpl populateJavaNameSpace SRVE8084E: An unexpected internal server error occurred while populating the namespace.
                                     com.ibm.wsspi.injectionengine.InjectionException: Unable to perform reference processing for component KM_Comun.war in module KM_Comun.war in application PA_KM_Comun.
        at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:1039)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.populateJavaNameSpace(WebAppImpl.java:1108)
             at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:324)
             at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
             at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
             at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
             at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1162)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369)
             at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
             at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:768)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1356)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2152)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
             at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5459)
             at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5585)
             at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
             at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
             at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1248)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.startDeployment(StartDeploymentTask.java:248)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.fullAppUpdate(StartDeploymentTask.java:120)
             at com.ibm.ws.management.application.sync.StartDeploymentTask.performTask(StartDeploymentTask.java:108)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor$ExpandApp.expand(AppBinaryProcessor.java:1709)
             at com.ibm.ws.management.application.sync.AppBinaryProcessor.postProcessSynchronousExt(AppBinaryProcessor.java:749)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.postProcess(BLABinaryProcessor.java:590)
             at com.ibm.ws.management.bla.sync.BLABinaryProcessor.onChangeCompletion(BLABinaryProcessor.java:467)
             at com.ibm.ws.management.bla.sync.BinaryProcessorWrapper.onChangeCompletion(BinaryProcessorWrapper.java:109)
             at com.ibm.ws.management.repository.FileRepository.postNotify(FileRepository.java:1905)
             at com.ibm.ws.management.repository.FileRepository.update(FileRepository.java:1414)
             at com.ibm.ws.management.repository.client.LocalConfigRepositoryClient.update(LocalConfigRepositoryClient.java:189)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceMasterRepositoryAdapter.update(WorkSpaceMasterRepositoryAdapter.java:665)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.update(RepositoryContextImpl.java:1998)
             at com.ibm.ws.sm.workspace.impl.RepositoryContextImpl.synch(RepositoryContextImpl.java:1946)
             at com.ibm.ws.sm.workspace.impl.WorkSpaceImpl.synch(WorkSpaceImpl.java:549)
             at com.ibm.ws.management.configservice.ConfigServiceImpl.save(ConfigServiceImpl.java:719)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
             at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
             at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1148)
             at java.security.AccessController.doPrivileged(AccessController.java:252)
             at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
             at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
             at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1142)
             at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:995)
             at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
             at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:774)
             at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
             at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
             at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
             at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
             at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:478)
             at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:312)
             at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
             at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
             at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
             at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1691)
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: Failed to process bindings for metadata
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:852)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:483)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:379)
             at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:965)
             ... 92 more
    Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/dbKMSYS], defined for the KM Comun component.
             at com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:1395)
             at com.ibm.ws.injectionengine.AbstractInjectionEngine.processBindings(AbstractInjectionEngine.java:839)
             ... 95 more

    [5/16/14 10:43:56:591 PET] 0000003b WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/wps/PA_KM_Comun
    [5/16/14 10:43:56:602 PET] 0000003b I18nJndiSuppo W   I18N9015E: The Internationalization context API cannot be bound into the namespace on WebSphere_Portal.
    Application components will be unavailable on WebSphere_Portal.
    Application components will be unable to access Internationalization context API references.
    [5/16/14 10:43:56:605 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in Portlet mbean is excluded from access check.
    [5/16/14 10:43:56:615 PET] 0000003b MBeanDescript I   ADMN1216I: One or more methods in PortletApplication mbean is excluded from access check.
    [5/16/14 10:44:03:444 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.No Spring WebApplicationInitializer types detected on classpath
    [5/16/14 10:44:03:456 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:458 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:03:506 PET] 0000003b webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring root WebApplicationContext
    [5/16/14 10:44:03:507 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization started
    [5/16/14 10:44:03:608 PET] 0000003b XmlWebApplica I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing Root WebApplicationContext: startup date [Fri May 16 10:44:03 PET 2014]; root of context hierarchy
    [5/16/14 10:44:03:652 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-web.xml]
    [5/16/14 10:44:03:693 PET] 0000003b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from class path resource [META-INF/spring/applicationContext-hb.xml]
    [5/16/14 10:44:03:805 PET] 0000003b DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441: 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,dataSource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager]; root of factory hierarchy
    [5/16/14 10:44:03:899 PET] 0000003b SimpleUrlHand I org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
    [5/16/14 10:44:04:595 PET] 0000003b AnnotationSes I org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory Building new Hibernate SessionFactory
    [5/16/14 10:44:04:978 PET] 0000003b HibernateTran I org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet Using DataSource [com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource@8b719406] of Hibernate SessionFactory for HibernateTransactionManager
    [5/16/14 10:44:04:983 PET] 0000003b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization completed in 1475 ms
    [5/16/14 10:44:04:990 PET] 0000003b annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:44:04:992 PET] 0000003b servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [view-servlet]: Initialization successful.
    [5/16/14 10:44:04:992 PET] 0000003b webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module KM Comun has been bound to default_host[*:9081,*:80,*:9444,*:5063,*:5062,*:443,*:10046,*:10049,*:10027,*:10025,*:10028,*:10039,*:10029,*:10032].
    [5/16/14 10:44:05:046 PET] 0000003b ApplicationMg A   WSVR0221I: Application started: PA_KM_Comun
    [5/16/14 10:44:05:046 PET] 0000003b CompositionUn A   WSVR0191I: Composition unit WebSphere:cuname=PA_KM_Comun in BLA WebSphere:blaname=PA_KM_Comun started.
    [5/16/14 10:44:05:047 PET] 0000003b AppBinaryProc I   ADMA7021I: Distribution of application PA_KM_Comun completed successfully.
    [5/16/14 10:44:05:065 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255031463.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0015I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal created document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400255021351.
    [5/16/14 10:44:05:066 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/application.xml.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/PA_KM_Comun.ear.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.policy.
    [5/16/14 10:44:05:067 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/deployment.xml.
    [5/16/14 10:44:05:068 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/ibm-application-runtime.props.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/nodes/wp8Node/serverindex.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-web-bnd.xml.
    [5/16/14 10:44:05:069 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/portlet.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web_merged.xml.
    [5/16/14 10:44:05:070 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/META-INF/MANIFEST.MF.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.webmodule.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/META-INF/was.module.
    [5/16/14 10:44:05:071 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/web.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0016I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal modified document cells/wp8Cell/applications/PA_KM_Comun.ear/deployments/PA_KM_Comun/KM_Comun.war/WEB-INF/ibm-metadata.xml.
    [5/16/14 10:44:05:072 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253829964.
    [5/16/14 10:44:05:073 PET] 0000003b FileRepositor A   ADMR0017I: User defaultWIMFileBasedRealm/server:wp8Cell_wp8Node_WebSphere_Portal deleted document cells/wp8Cell/applications/PA_KM_Comun.ear/deltas/PA_KM_Comun/delta-1400253819535.
    [5/16/14 10:45:16:364 PET] 00000038 annotation    W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper inject SRVE8042E: An internal error caused the reference context that enables injection to not be initialized properly.
    [5/16/14 10:45:16:369 PET] 00000038 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [PA_KM_Comun] [/wps/PA_KM_Comun] [KM_Debate]: Initialization successful.
    [5/16/14 10:45:16:379 PET] 00000038 DispatcherPor I org.springframework.web.portlet.GenericPortletBean init Initializing portlet 'KM_Debate'
    [5/16/14 10:45:16:400 PET] 00000038 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet Message - [PA_KM_Comun#KM_Comun.war]:.Initializing Spring FrameworkPortlet 'KM_Debate'
    [5/16/14 10:45:16:401 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization started
    [5/16/14 10:45:16:407 PET] 00000038 XmlPortletApp I org.springframework.context.support.AbstractApplicationContext prepareRefresh Refreshing PortletApplicationContext for namespace 'KM_Debate-portlet': startup date [Fri May 16 10:45:16 PET 2014]; parent: Root WebApplicationContext
    [5/16/14 10:45:16:412 PET] 00000038 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from PortletContext resource [/WEB-INF/portlet/debate-portlet.xml]
    [5/16/14 10:45:16:440 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:443 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:469 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:470 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:477 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    [5/16/14 10:45:16:478 PET] 00000038 ClassPathBean I org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    [5/16/14 10:45:16:552 PET] 00000038 AutowiredAnno I org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor <init> JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    [5/16/14 10:45:16:573 PET] 00000038 DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@69149cf6: defining beans [usuarioDAOHibernate,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,debateServiceImpl,CDebateController,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#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,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,messageSource,portletViewResolver,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@ed07d441
    [5/16/14 10:45:16:677 PET] 00000038 RequestMappin I org.springframework.web.servlet.handler.AbstractHandlerMethodMapping registerHandlerMethod Mapped "{[/VIEW],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(org.springframework.ui.ModelMap)
    [5/16/14 10:45:17:155 PET] 00000038 DispatcherPor I org.springframework.web.portlet.FrameworkPortlet initPortletBean FrameworkPortlet 'KM_Debate': initialization completed in 754 ms

    When trying to run a Hibernate Criteria statement inside my project displays the following error:

    Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
        at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
             at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.getSession(UsuarioDAOHibernate.java:29)
             at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.obtenerUsuarioPorId(UsuarioDAOHibernate.java:24)
             at pe.gob.onp.reapro.km.comun.debate.service.impl.DebateServiceImpl.obtenerUsuarioPorId(DebateServiceImpl.java:51)
             at pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(CDebateController.java:44)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
             at java.lang.reflect.Method.invoke(Method.java:611)
             at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:362)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:349)
             at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:291)
             at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:734)
             at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:522)
             ... 230 more

     

    Hi,

    Looks like you are also missing reference binding:

    Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/dbKMSYS], defined for the KM Comun component.

    Check if you have ibm-web-bnd.xml file with binding defined.

    Gas

  • JesseJamesRiosFranco
    5 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T21:08:47Z  
    • gas
    • ‏2014-05-16T20:49:00Z

    Hi,

    Looks like you are also missing reference binding:

    Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/dbKMSYS], defined for the KM Comun component.

    Check if you have ibm-web-bnd.xml file with binding defined.

    Gas

    Your same answer told me a professor of IBM, I know that WAS route is the "ibm-web-bnd.xm" file, also do not know how to link to that file, please if pudideran teach me the path and as link please.

  • gas
    gas
    893 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T21:26:02Z  

    Your same answer told me a professor of IBM, I know that WAS route is the "ibm-web-bnd.xm" file, also do not know how to link to that file, please if pudideran teach me the path and as link please.

    In general you have to bind resource reference (in your case reference to the datasource) to the object defined on the application server.

    For resources defined in web modules bindings are in ibm-web-bnd.xml file (WEB-INF folder), for resources defined in ejb components - in the ibm-ejb-jar-bnd.xml (META-INF folder).

    If you would use RAD or Eclipse with WebSphere Developer Tools, there are wizard to create such files. If you dont have such tool you can use this as an example:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-bnd 
        xmlns="http://websphere.ibm.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_2.xsd"
            version="1.2">
            <resource-ref name="jdbc/myRef" binding-name="jdbc/NameOnServer" />
    </web-bnd>
    

    Here is link to infocenter page:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.base.iseries.doc/info/iseries/ae/cejb_ref.html

    I'm not a professor, but I hope its clear now ;-)

    Gas

  • gas
    gas
    893 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T21:28:53Z  
    • gas
    • ‏2014-05-16T21:26:02Z

    In general you have to bind resource reference (in your case reference to the datasource) to the object defined on the application server.

    For resources defined in web modules bindings are in ibm-web-bnd.xml file (WEB-INF folder), for resources defined in ejb components - in the ibm-ejb-jar-bnd.xml (META-INF folder).

    If you would use RAD or Eclipse with WebSphere Developer Tools, there are wizard to create such files. If you dont have such tool you can use this as an example:

    <pre class="html dw" data-editor-lang="js" data-pbcklang="html" dir="ltr"><?xml version="1.0" encoding="UTF-8"?> <web-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_2.xsd" version="1.2"> <resource-ref name="jdbc/myRef" binding-name="jdbc/NameOnServer" /> </web-bnd> </pre>

    Here is link to infocenter page:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.base.iseries.doc/info/iseries/ae/cejb_ref.html

    I'm not a professor, but I hope its clear now ;-)

    Gas

    Oh, by the way.. You can also bind resource references during the installation or after installation via web admin console or scripting, if you dont have binding file in your application.

    Gas

  • JesseJamesRiosFranco
    5 Posts

    Re: Websphere JNDI datasource configuration with Spring 3

    ‏2014-05-16T22:15:39Z  
    • gas
    • ‏2014-05-16T21:26:02Z

    In general you have to bind resource reference (in your case reference to the datasource) to the object defined on the application server.

    For resources defined in web modules bindings are in ibm-web-bnd.xml file (WEB-INF folder), for resources defined in ejb components - in the ibm-ejb-jar-bnd.xml (META-INF folder).

    If you would use RAD or Eclipse with WebSphere Developer Tools, there are wizard to create such files. If you dont have such tool you can use this as an example:

    <pre class="html dw" data-editor-lang="js" data-pbcklang="html" dir="ltr"><?xml version="1.0" encoding="UTF-8"?> <web-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_2.xsd" version="1.2"> <resource-ref name="jdbc/myRef" binding-name="jdbc/NameOnServer" /> </web-bnd> </pre>

    Here is link to infocenter page:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/topic/com.ibm.websphere.base.iseries.doc/info/iseries/ae/cejb_ref.html

    I'm not a professor, but I hope its clear now ;-)

    Gas

    I created the "ibm-web-bnd.xml" file as you indicated me, and I put in the WEB-INF folder of my application. 

    <?xml version="1.0" encoding="UTF-8"?>
    <web-bnd 
        xmlns="http://websphere.ibm.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_2.xsd"
            version="1.2">
            <resource-ref name="jdbc/dbKMSYS" binding-name="jdbc/dbKMSYS" />
    </web-bnd>
    
    

    With that now no longer shows me the error of the reference, but when I execute a statement with a criteria object shows me the following error:

    Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
        at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
            at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
            at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.getSession(UsuarioDAOHibernate.java:29)
            at pe.gob.onp.reapro.km.dao.usuario.impl.UsuarioDAOHibernate.obtenerUsuarioPorId(UsuarioDAOHibernate.java:24)
            at pe.gob.onp.reapro.km.comun.debate.service.impl.DebateServiceImpl.obtenerUsuarioPorId(DebateServiceImpl.java:47)
            at pe.gob.onp.reapro.km.comun.debate.controller.CDebateController.iniciar(CDebateController.java:44)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
            at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:362)
            at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.doHandle(AnnotationMethodHandlerAdapter.java:349)
            at org.springframework.web.portlet.mvc.annotation.AnnotationMethodHandlerAdapter.handleRender(AnnotationMethodHandlerAdapter.java:291)
            at org.springframework.web.portlet.DispatcherPortlet.doRenderService(DispatcherPortlet.java:734)
            at org.springframework.web.portlet.FrameworkPortlet.processRequest(FrameworkPortlet.java:522)
            ... 229 more
    
    

    Mi web.xml

    <resource-ref>
            <res-ref-name>jdbc/dbKMSYS</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
            <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    
    

    My configuration file is Spring with Hibernate:

    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/dbKMSYS" cache="true" resource-ref="true" lookup-on-startup="false" proxy-interface="javax.sql.DataSource"/>
        
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
            <property name="dataSource">
                    <ref bean="dataSource"/>
            </property>
            
            <property name="hibernateProperties">
                    <props>
                            <prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
                            <prop key="hibernate.show_sql">true</prop>
                    </props>
            </property>
            
            <property name="packagesToScan" value="pe.gob.onp.reapro.km.dominio.entidad"/>
    </bean>   
    
    <tx:annotation-driven transaction-manager="transactionManager"/>
    
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory">
            <ref bean="sessionFactory"/>
        </property>
    </bean>
    
    

     

    Updated on 2014-05-16T22:16:26Z at 2014-05-16T22:16:26Z by JesseJamesRiosFranco