Surya Lanka

Greenhorn
+ Follow
since Dec 14, 2006
Merit badge: grant badges
For More
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 Surya Lanka

The above solution seems to be working...Thanks...
14 years ago
Hi all,
I have stuck with this problem.Please help me.

I have a table goals_01 in which ID and GOALCODE form a composite key in ORACLE DB.
I am using MyEclipse. I have selected increment as id generator while reverse engging from tables.
I thought id will be increment automatically but it gave me an error that you have assign id a value manually.
Since i dont have the max value in the begining i tried to get the max value of id by using HQL.below is the query.
{
Query query = hsession.createQuery("select max(Goals01.id) from Goals01 ");
List lis = query.list();
maxID = ((Integer)lis.get(0)).intValue();
}

here Goals01 is the pojo class.but i am getting a nullpointer exception at the 1st line.i thought since no value existed it is throwing an exception.
I inserted one row manually and tried again.but got the same .
Please help me to resolve this or any other way i can handle incrementing or assigning composite ids in hibernate.Example will be very helpful
Thanks in adavance
Hi all,
Can anybody just a good book on learning javascript and ajax.
Although i have knowledge on both ,it is very rusty.so I want to buy some standard books which will help in learning the language and mastering it.
Some books which i am thinking abt are
1)Javascript-the Definitive Guide
2)Head rush Ajax.

I have decided that i will go with HR-Ajax but couldnt decide on JavaScript book.I am looking forward to you guys to suggest me.
Prepared Statement will be much helpful if you have to use multiple sql statements of similar type.For example if you have to do multiple insertions of type INSERT into table_name values("a","b"...); for n number of times with a change in the values of a and b then we can use prepared statement in the below way:-

PreparedStatement pstmt = con.prepareStatement("INSERT into table_name values(?,?...);
pstmt.setDataType(1,value);
pstmt.setDataType(2,value);
...
Where DataType can be String,Int and so on as per datatype.
I moved to a new company where i have to work on sqlj.I know oracle,sql but this is the first time i am working on sqlj.Can anybody suggest a good book or any other means to learn it quickly.
Hai,
I am using tomcat for learning servlets and jsp.I am using tomcat 5.0.25.
I was developing a small webapplication.
I have put in a file called form.html under ~/tomcat5.0/webpps/Beer-v1(root directory of my application)/ and other classes and web.xml in respective directories (ie servlet and model classes in webapps/Beer-v1/WEB-INF/classes and web.xml in WEB-INF) and
when i am using the below url
http://localhost:8000/Beer-v1/form.html
in the browser
(at the time of installation i have changed the port to 8000 instead of 8080,thats y i used the port 8000) i am getting the following error in the browser:-
HTTP Status 404 - /Beer-v1/form.html
type Status report
message /Beer-v1/form.html
description The requested resource (/Beer-v1/form.html) is not available.
and i have found the following error in logfile:-
2006-12-18 16:11:07 StandardContext[/Beer-v1]Error configuring application listener of class listeners.SessionListener
java.lang.ClassNotFoundException: listeners.SessionListener
And the most confusing thing is when i am using war file and Tomcat Manager for deploying ,its working fine,even when i copied my entire directory structure except the
Beer-v1 directory(root directory of myapplication) to ~/ webapps/Root/ the form is getting displayed in the browser,but when i am trying to put the same directory structure separately in ~tomcat5.0/webapps/ its not working.

please help me solving this error bcoz i am stuck here and not able to run any application on Tomcat5.0. using the above method

logfile:-
2006-12-18 16:40:18 StandardContext[/Beer-v1]Error configuring application listener of class listeners.ContextListener
java.lang.ClassNotFoundException: listeners.ContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3753)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4321)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:683)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:476)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)

Please somebody help,Thanks in advance.
17 years ago