This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Saumitra Tiwari

Ranch Hand
+ Follow
since Apr 09, 2014
Saumitra likes ...
PHP Tomcat Server Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Saumitra Tiwari

Hello guys,
I am getting this error while Spring MVC and Hibernate integration

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:658)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:624)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:672)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:543)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:484)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4914)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
at org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:54)
at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:46)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:275)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:188)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:327)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:359)
at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:438)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1458)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
... 27 more

This is my spring-servlet.xml



All this error is because of this class "org/hibernate/cache/spi/RegionFactory" but it is present in library.
Spring version: 4.0.4 and Hibernate version 4.3.7
I don't know what I am doin wrong.
Please guys help me !!
Thanks.
4 years ago
Hello guys,this question was asked in my last interview


I want to know why it is calling int not short?
Thanks.


5 years ago
Hello guys, I am having 1.5 years of exp in java (struts2) including other web technologies(php,javascript,jquery,css and html). Some people said struts2 (or even spring) are old technologies so shift to some CRM(salesforce) or go to android dev, while some other say stick with. So now I am deciding to go with android (because it also uses java and I am learn it fast).
As my exp is very less, can you guys help me out with this situation. Mainly I am asking "will shifting to android be benefecial now".
Thanks.
5 years ago
Hello guys, does any know about oracle forms and reports.
Thanks.

5 years ago
finally my issue is resolved, increased java pool size, I don't know what it was earlier but currently I have set it to 64mb and my application is running for more than 10 days without any glitches. But I wanted to know is it an alternate solution or it is the only solution. Is increasing java pool size at database end , part of increasing application performance or not(meaning is it recommended.)

Java Pool Size resource
http://docs.oracle.com/cd/B28359_01/java.111/b31225/chnine.htm#BABCDEAH
5 years ago
Hey guys i have successfully configured hibernate, i have inserted and retrieved data using hibernate successfully but when I am trying to configure eclipse with hibernate tools (provided by jboss) then I only get one error "Problem while reading database schema"
Unable to find it on google..
please help guys..
I don't know about Hibernate market demand, but I am sure it is in demand. Reading books could be time taking process, I would suggest Java Brains on youtube. You could learn hibernate basics in a day and this is coming from less than a year experience guy.
5 years ago
Hello guys, as you all guys suggested here is small piece of thread dump...

"http-bio-8085-exec-343" daemon prio=10 tid=0x00002aab7449e400 nid=0x3824 waiting for monitor entry [0x00000000470fa000..0x00000000470fbc10]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.dataaccess.ConnectionTable.addConnection(ConnectionTable.java:64)
- waiting to lock <0x00002aaab4ff1728> (a java.util.Hashtable)
at com.dataaccess.GenericCRUD.<init>(GenericCRUD.java:107)
at com.nic.struts.upjn.rm.dataaccess.LoginDAO.<init>(LoginDAO.java:25)
at com.nic.struts.upjn.rm.businesscomponent.LoginManager.<init>(LoginManager.java:27)
at com.nic.struts.upjn.rm.action.LoginAction.execute(LoginAction.java:30)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.dataaccess.CustomActionServlet.process(CustomActionServlet.java:19)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
- locked <0x00002aab3767c250> (a org.apache.tomcat.util.net.SocketWrapper)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:636)

I have googled it out and I think the problem is with my java code connecting to database. But for more understanding could you guys please give it look and suggest some facts that I am missing(google could not answers every thing). Any suggestion would be highly appreciated.
Thanks. and sorry for being so frustrating.
5 years ago
Hello Guys, earlier I was using glassfish as my application server (which provides a decent admin console for testing web service) for development and testing web services (SOAP). Now I am asked to do it in jboss. I have worked with Jboss only for web application not for web service. glassfish gives tool for testing web service but Jboss does not.
So how can I test web service(apart for creating a client and then testing it) in Jboss using tester.
Thanks.

"How to test webservice in Jboss"
5 years ago
Hello guys, I have a web application in struts1 . My application is working fine.
But am facing some problems while running application. Suppose at a time there are two users logged in A and B. They login fine, with no errors. When they request something form database, then A is viewing B's content and B is viewing A's content.But this not happens always, it only occurs sometimes. Other than that nothing unexpected is not happening.
I dont't know the cause of this and even what this problem is called.
Please guys provide something atleast the name of this problem so that I can searh in on google. really getting very frustrated.
Thanks.
5 years ago
Hello guys, I am new to web-services.Is there any way to validate input in web services. I came across validation schema.
But is there any other way..
Thanks.
5 years ago
Does this something had to do with internet speed? or server processing power ?? or my web application ??. Can you provide some useful links about how to diagnose this problem.
Thanks.
6 years ago
Hello,( meanwhile I am analyzing thread dump )I want to know, is my internet speed also a problem. Currently we are having 2 mpbs broadband speed and approx 50 users access application, resulting data download 10 mb (approx.).
Thanks.
6 years ago
Can you tell what is "request count" referring too??
6 years ago
I am new to application monitoring, so could just provide some useful links about taking and analyzing thread dumps.
Thanks.
6 years ago