Swaroop Reddy

Ranch Hand
+ Follow
since Feb 25, 2009
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 Swaroop Reddy

Hi All,
I am new to DB2.I am trying to connect to DB2 through my servlet but its giving an exception

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver



Though I have added db2jcc.jar

and my code goes like this




but when I ripped the Jar db2jcc.jar I found only com.ibm.db2.jdbc.app but not found DB2Driver in that jar.
suggest me if need to use any further drivers.
I came to know that adding db2java.jar resolves this problem is it true?
but I have only db2java.zip,should i jar it and use or can i get jar directly from some where else

Thanks in advance
11 years ago
Hi All,
I am working on Spring with JDBC Templates,I need to delete a record from almost all 25 tables hence I thought of going for Batch updates,all 25 queries need caseNo as a parameter ,hence my problem is how to use batch update for deleting a record in these 25 tables by sending caseNo as inparameter

example of my query
1.Delete* from emp where id = ?
2.Delete * from organization where id = ?
and so on till 25 th query

Please provide me with example

Jyothsna Panchagnula wrote:Hello Swaroop,

When I searched in google I got the following urls giving some info on developing applications using spring and hibernate.

url


url2

url3

url4

Hope this helps out!!!

thanks,
Jyothsna



Thankyou Jyothsna for your help,

I had tried one example I sorted out somany problems faced by log4j and so on .. finally the server started deploying the application,but I encountered with an error


SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moController' defined in ServletContext resource [/WEB-INF/action-servlet.xml]: Can't resolve reference to bean 'myObjectService' while setting property 'myObjectService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'myObjectService' is defined: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [viewResolver,moController,moFormController,urlMapping]; root of BeanFactory hierarchy
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'myObjectService' is defined: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [viewResolver,moController,moFormController,urlMapping]; root of BeanFactory hierarchy
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:349)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:671)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1012)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:305)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:250)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:219)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jul 15, 2009 11:52:33 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /Spring threw load() exception




I am posting here my action-servlet.xml along with MyObjectSevice.java file


MyObjectService.java


applicationContext-service.xml


MyObjectController.java


I am not getting whats the problem is,please let me know what's the problem.
So much frustated please give me the solution

Thankyou
Hi All,
I have created an Spring with hibernate application all the things are looking fine but when i start server its causing

log4j:WARN No appenders could be found for logger (org.springframework.web.conte
xt.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
Jul 14, 2009 8:07:26 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 14, 2009 8:07:26 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Spring] startup failed due to previous errors



I till now never used log4j ,whats the problem actually causing to my application

Some information I got from forums are

provide log4j.properties or log4j.xml on the classpath


where do i need to set it and how do i need to set it,i dont know any thing about it please help me
13 years ago
Hi all,
I am doing a POC on Spring with hibernate,I am new bee to it can any one help me in developing one small web application using spring with hibernate on myeclipse IDE 6. I saw most of the tutorials but I am not able to cope up with them,I dont know about configurations much.I need your help in completeing the POC.
Any body can help me
Hello All,
I am working on Sring with Hibernate application,but I want to work on access database ,Hence I woukld like to know whether Hibernate supports Msaccess or not,if so do i need any jars for it.
what about Msaccess.jar can i find it any where
Hello ,
I am new to Spring with Hibernate web application.I just want a small example to create one webapplication using spring with hibernate
Thank you
Hi All,
I have a servlet which gets a list of records and are stored in vector and then the response is redirected to Jsp page,now i need to iterate the vector to get the records .here i want only limited records(ex:5 records)to be displayed and i want a link Next where when I click the link the next 5 records should appear in my same jsp .in same manner link for previous also .
Any one can help me in solving this problem.
Thanks in prior,can give me links if any
13 years ago
JSP

Deepak Bala wrote:The DLL is not getting loaded. The system property to refer is java.library.path. That usually solves the problem.
Debug just before you load the library and use the Display view in eclipse to obtain the java.library.path value. Check if this contains the directory where your DLL resides. Try a System.loadLibrary() in the Display view after this is done.





Hi,I checked the same as you specified still it is giving same error.I got the library path and added my dll to that path ,but still its giving same error

java.lang.UnsatisfiedLinkError: (method name)



Please any one can solve my problem
13 years ago
Hi All,
I am doing POC on JNI calling Native methods from servlet.The code I am posting here had worked fine for stand alone application,but when i work it out in servlet its giving an

java.lang.UnsatisfiedLinkError:



Please find my code below
1.
I am making this as a jar file to call it from servlet for ease use

2.

and finally in my servlet class I am calling the jar file created above at using prog1.java
3.my servlet file(giving only the method used in servlet)


but after running the servlet I am getting an error

java.lang.UnsatisfiedLinkError: sum
at prog.prog1.sum(Native Method)
at prog.prog1.Sum(prog1.java:25)
at prog1.main(prog1.java:27)



I refered the forums they are saying like put the dll in java.library path
my library path is

C:\j2sdk1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Oracle\product\10.1.0\
Client_2\bin;D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\client;D:\Oracle\
product\10.1.0\Client_2\jre\1.4.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\
System32\Wbem;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\
Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;
C:\j2sdk1.4.2_04\bin;C:\j2sdk1.4.2_04\bin\include;C:\j2sdk1.4.2_04\bin\include\win32;
C:\J2SDK1.4.2_04\BIN



where should i include my prog1.dll file

Please help me to resolve the problem ,no specific data though googled,
thank you in prior
13 years ago
Hello All,
I had implemented JNI with normal java program that runs through command prompt.Now I have an requirement to Implement JNI with servlets,the data should come from Jsp page and the data should be passed from servlet to VC++ methods and execute and return the result.But now the problem is how to implement this using servlets.what configurations do i need to do,where i need to place the dll file in order to make the servlet access the dll.Please provide me the required information,
If Any examples or links exist please give me the link


Thanking you

13 years ago

Swaroop Reddy wrote:Hello All,
I am using myeclipse5.5 ,I wanted to run a program in hibernate.I searched in google and found an basic example from
webpage
I had configured all the things like oracle database and so on,even i am able to check the table using hql editor after creating a project in myeclipse.but my problem is after configuring all the things when i am about to add code for operations on database I am not able to code it properly.please see the attachments i had a snap shot of the project structure where problem is highlighted with red color




Thanks for your suggestion,anyway i got the problem solved.
Hello ,
I have an executable file written using Vc++ ,i want to call it in my java program in such a way it should get executed and should start working
Is it possible if so please suggest me relative links and process how to do
13 years ago
Hello All,
I am using myeclipse5.5 ,I wanted to run a program in hibernate.I searched in google and found an basic example from
webpage
I had configured all the things like oracle database and so on,even i am able to check the table using hql editor after creating a project in myeclipse.but my problem is after configuring all the things when i am about to add code for operations on database I am not able to code it properly.please see the attachments i had a snap shot of the project structure where problem is highlighted with red color
Hello All,
I want to start a project in Spring,till now i was using tomcat 5.0 and jdk1.4 with myeclipse5.5 and was developing projects in Servlets and Jsp.now in-order to develop a project in Spring what configurations i need to do to the existing jdk or else do i need to upgrade to jdk 5.Is tomcat5.0 enough or need to upgrade to higher versions please let me know as soon as possible

Thanks