Vinu krish

Greenhorn
+ Follow
since Nov 20, 2003
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 Vinu krish

Hi,
There is a stored procedure in DB2 which expects Date as its input parameter. The code is deployed in weblogic 8.0 and the driver used is COM.ibm.db2.jdbc.app.DB2Driver (Type 2 ) . Code snippet is as follows

CallableStatement CS = conn.prepareCall(SQL(?));
String strdate = "2005-01-01";
CS.setString(1, strdate)
CS.execute();

When i run the same piece of code in my local IDE (WSAD) , i get the following error
DB2 SQL error: SQLCODE: -301, SQLSTATE: 42895, SQLERRMC: 005;

SQLState 42895 is due to "For static SQL, an input host variable cannot be used, because its data type is not compatible with"

Hence I changed the statement from CS.setString(1, strdate) to
CS.setDate(1, java.sql.Date()) and it worked fine. The only difference I could see is that my IDE uses com.ibm.db2.jcc.DB2Driver (Type 4) to connect to the database.
Can someone tell me if the problem is due to driver?

Thanks,
Vinu
Hi,
We have an application that is deployed in weblogic 8.1. Initally it was in weblogic 7.0 . After upgradation I am facing this 512 Internal Error. have access to the GUI console of weblogic. When I managed to check the console I just got the following error "512 Internal Error fileNameXXX" and fileNameXXX is the path and name of the file that is supposed to be displayed like say, "512 Internal Error /production/html/index.html" .I have a problem only with this file. The browser is also showing "512 Internal Error fileNameXXX" .The remaining part of the application is working fine. Can anyone tell me what this means? I have checked with same application deployed in weblogic 7.0 and it works fine.

Can you also tell him how to check the weblogic console logs from weblogic GUI console.
Thanks,
Vinu
19 years ago
Hi Kapil, Thanks a lot!! But I have been postponing this because my memory is weak and I cant get to remember syntax and stuff like that. IDEs have made me a little lazy !! I think I will try Tiger SCJP bcos I have close to 4 yrs of java experience and Tiger SCJP would be easier for me. Again I have to postpone SCJP!! I guess am not lucky with SCJP exams!!
Hi,
Today I made up my mind to write SCJP1.4 after lots and lots of thinking for the past one year !! .. Whenever I think about the exam I get loads of work in office. Now I have a confusion. I happened to read one of the posts regarding Tiger SCJP. Now should I start preparing for 1.4 or wait some more days. Anyways I have to start preparing right from getting books
Pls advise me. But now I have made up my mind and nothing can stop me!! I hope one month of preparation will be sufficient and I am planning to write in Jan 2005.
Hi,
I have installed VAJ 4. I have selected all required features and some of the optional features( EJB, Transaction Access Builder). I am not able to find com.ibm.connector classes. WHere can I find those? WHt feature shld I add in my workspace to get the same? Or shld I install some other feature from CD. I have installed from licensed CD.
Thanks,
Vinu
Thanks David. I felt that some resources must be consumed and that is why I posted tht question.
Hello all,
Can someone tell me the disadvantages of using connection pool? For each connection in the connection pool are some server resources consumed? If so what are the resources.
Thanks in advance,
Vinu
Hello..
I was doing a code review and found out that they have typecasted a null object. I was under the impression that it will throw a null pointer exception.But it didnt. Wht is the use of doing this?
This is the code
public void methodName(UserDefinedObject obj)
{
.......
}
They have used the following code to invoke methodName
methodName((UserDefinedObject) null);
A null can be passed directly instead of type casting. Does this have any performance issues?
I also saw another style of coding. I normally use the following
if(abc!=null). But I came across the following style if(null!=abc). Again any specific reason for doing this this or is it only a coding style?
19 years ago
Hi all,
I was asked this question in an interview. Can someone tell me the real time example of using 'Never' transactional attribute. We can use it when we are dealing with a non transactional system. But can someone be more specific and give a real time application?
Thanks in advance,
Vinu
Hi,
I have a EJB file and I have a WAR file. I have deployed them as seperate applications. WHen both are in a EAR file it works fine. But if I deploy them separately then the WAR file does not recognize the EJB home and remote interface. I have specified <ejb-reference-description> in weblogic.xml and also <ejb-ref> in web.xml as suggested by docs. Here are the pieces of code
weblogic.xml
<weblogic-web-app>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>MyFirstStatelessBean</ejb-ref-name>
<jndi-name>ejb/MyFirstStatelessBeanHome</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>
and web.xml
<ejb-ref>
<ejb-ref-name>MyFirstStatelessBean</ejb-ref-name>
<ejb-ref-type>javax.ejb.SessionBean</ejb-ref-type>
<home>myejbs.ejbs.MyFirstStatelessBeanHome</home>
<remote>myejbs.ejbs.MyFirstStatelessBeanRemote</remote>
</ejb-ref>
weblogic-ejb-jar.xml
<weblogic-enterprise-bean>
<ejb-name>MyFirstStatelessBean</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>ejb/MyFirstStatelessBeanHome</jndi-name>
</weblogic-enterprise-bean>
Can anyone tell me where I am going wrong. What else should I add in my WAR file to access the EJB files. I am gettin the following exception
<Error> <HTTP> <101017> <[ServletContext(id=6100815,name=FreshEARWeb,context-path=/FreshEARWeb)] Root cause of ServletException
java.lang.NoClassDefFoundError: myejbs.ejbs.MyFirstStatelessBeanHome
Thanks in advance,
Vinu
20 years ago
Thanks Jonathan. I wanted to try with an object only. Since I have never used synchronization i didnt know abt tht!! But if a thread is in a synchronized block, say as per ur eg, synchronized (this) of method2(), then can another thread access other non-synchronized methods of Foo class? Pls tell me if what i say is correct. Can ANother instance of Foo access all the methods?
What is the significane of synchronizing on Object lock? I can create an instance of Foo(say abc) and then can I do this? synchronized(abc) . Does this mean that, thread of abc cannot access the other synchronized methods of Foo? Sorry if I am sounding too silly!! I have not worked.. Can u suggest some nice document which can be of some help to me
Thanks again
Vinu
Hi ,
Can someone explain the significance of the following piece of code.
String a = new String();
synchronized(a)
{
some code
}
Wht exactly happens? I have heard of synchronizing a block of code and methods. But here I am passing a string object ( or rather it could be an object of a class also). Pls help as I am preparing for an interview
Thanks,
Vinu
Hi,
I have one basic question. Through console I have created Conenction Factory,JMS Server,Queue etc. Can someone tell me if the queue that I have created Thru the admin console, be stored somewhere in the file sys? If not, where can i access it?
Thanks,
Vinu
20 years ago
Hi,
I have a propery file kept in a location in my m/c. I have one utility jar which has a class that refers to the property file. When i use this property file to read a value in a WAR file, it works fine. But I am not able to access this in EJB module. The code is written in a static block and so while deployment starts it tries to read the property file and it is not able to find. It throws the following exception
Exception:weblogic.management.ApplicationException: activate failed for / Module: / Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: ResourceReference "(TrialProps.properties)" has no reference set] weblogic.deployment.EnvironmentException: ResourceReference "(TrialProps.properties)" has no reference set at weblogic.deployment.EnvironmentBuilder.addConnectorRef(EnvironmentBuilder.java:253) at weblogic.deployment.EnvironmentBuilder.addResourceReferences
I have put the utlity class and the propery file in the classpath.On top of it I have also put that in the ejb file. Can somebody help me out.
Thanks in advance
Vinu
20 years ago
Hi,
I'm new to JMS and I am working on WSAD(Websphere Application Developer) 5.0. I have installed IBM Embedded MQ and am trying to run a simple point to point application which I downloaded from a site. I have set the class path properly. Now when I am starting the server I am gettin the following problem
[12/9/03 17:46:04:513 IST] 2654c63b JMSEmbeddedPr A MSGS0050I: Starting the Queue Manager
[12/9/03 17:46:05:114 IST] 2654c63b QueueManagerM E MSGS0101E: Start Queue Manager command failed with exit code: 16
[12/9/03 17:46:05:134 IST] 2654c63b JMSService E MSGS0001E: Starting the JMS Server failed with exception: java.lang.Exception: MSGS0101E: Start Queue Manager command failed with exit code: 16
I'm working on Windows NT. But it works fine in Windows 2000. Can somebody tell me what can be the problem
Thanks in advance
Vinu
20 years ago