Vibhas Kumar

+ Follow
since Oct 13, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vibhas Kumar

0 down vote favorite
share [fb] share [tw]

I have a problem with japanese text. My code sends the japanese text in an email basically. The problem is when I am using the encoding type as EUC-JP I am getting the proper text in email but in microsoft-outlook only whereas in gmail and yahoo the same japanese text apperas as junk.

Now if i change the encoding as JIS then yahoo and gmail is showing proper japanese text but in outlook it is coming as junk.

I have tried Shift-JIS also but it is also apperaing junk in outlook.

Any suggestion how to resolve.

Here is the code:

// Code for sending mail

6 years ago
Hi All,

I need one help in my current development one of the requirement says:

The server will return 200-OK as a response(httpresponse).

If the panelist is verified then as a result,
the server must also return the panelist id of this panelist.

The server will place the panelist id inside the body of the 200-OK response in the following way:

Now what I can able to do is I can put the httpresponse as


And I can put String responseToClient= "<tdcp><cmd><ack cmd=”Init”><panelistid>3849303</panelistid></ack></cmd></tdcp>";

Now what does putting the above xml inside the body of 200-OK response mean??
and how it can be achieved.

Please help me thanks in advance

6 years ago
Hi I am facing the following problem while running it using junit: All the methods are working fine except testValidatePanelistIDHwid. This is the new method that i have added in this class all other methods are working fine. Please advice.

junit.framework.AssertionFailedError: Method "testValidatePanelistIDHwid" not found
at junit.framework.TestCase.runTest(
at junit.framework.TestCase.runBare(
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(
at org.apache.cactus.server.ServletTestRedirector.doPost(
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(
at org.apache.cactus.server.ServletTestRedirector.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.ajp.AjpProcessor.process(
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(

Below is my code:

6 years ago
Hi Freinds!! I am facing the following security warning for the code mentioned below:

The warning that I am getting in fortify Report is :

Abstract: The method getList() in can dereference a null pointer on
line 2357 because it does not check the return value of resolveVariable(), which might
return null.
Sink: requestObject = resolveVariable(...) :
VariableResolver.resolveVariable may return NULL()
2351 .resolveVariable(context, "userBean")) {
2352 Object requestObject = context.getApplication()
2353 .getVariableResolver().resolveVariable(context,
2354 "userBean");

Though I am checking the all null reference condition still it is giving me. Any suggestion ? Thanks in advance
7 years ago
Hi friends i am facing one issue while writing the content in an excel sheet incrementally.When i try to add the next content in an existing excel sheet. I loose the previous one.Can any one help me to resolve this.Here is the code for this. I have created two java classes 1.ReadXLSheet -->to read the file 2.Create--> to write the content incrementally.

Kindly look into it and resolve this issue.


Thanks in advance
7 years ago
Hi friends still i am unable to resolve this issue. I set my class path to C:\bea\user_project\workspace\wlserver_10.3\server\ext\jdbc\oracle\11g\ojdbc5.jar;

i am using weblogic 10.3 workspace and weblogic 10.3 server.

what mistake i could possibly would have made kindly suggest.I am also attaching my data source of web-logic admin console .
Hi Jan i downloaded a classes12.jar file and put it into C:\bea\user_project\workspace\jdk160_05\jre\lib\ext folder and set the class path as well but still i am getting the same error.

Kindly suggest.
Hi friends i am facing the following error while trying to connect to a database through java code:
Exception in thread "Main Thread" java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.example.model.Driver.main(
My java code is:
package com.example.model;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Driver {
public static void main(String args[]) throws ClassNotFoundException,
SQLException {

// or you can use:
// DriverManager.registerDriver(
// new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(
"jdbcracle:thin:@", "scott", "tiger");

Statement stmt = conn.createStatement();
ResultSet rset = stmt
.executeQuery("select * from customer");
while (


As per i came to know it could be due to class path issue but don't know how to resolve

my class path is showing following thing
Variable value: oracle.jdbc.OracleDriver

and path is showing :
C:\app\admin\product\11.2.0\dbhome_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\

Can anyone suggest me what to do.

Hi Sunil I tried with scott/tiger as username and password and able to login into the pl/sql developer. Also i tried to use the same credentials in weblogic admin console and got this error now. Kindly suggest what is this issue.

ORA-28000: the account is locked <br/>oracle.jdbc.driver.SQLStateMapping.newSQLException(<br/>oracle.jdbc.driver.DatabaseError.newSQLException(<br/>oracle.jdbc.driver.DatabaseError.throwSqlException(<br/>oracle.jdbc.driver.T4CTTIoer.processError(<br/>oracle.jdbc.driver.T4CTTIoer.processError(<br/>oracle.jdbc.driver.T4CTTIoer.processError(<br/>oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(<br/>oracle.jdbc.driver.T4CConnection.logon(<br/>oracle.jdbc.driver.PhysicalConnection.<init>(<br/>oracle.jdbc.driver.T4CConnection.<init>(<br/>oracle.jdbc.driver.T4CDriverExtension.getConnection(<br/>oracle.jdbc.driver.OracleDriver.connect(<br/>com.bea.console.utils.jdbc.JDBCUtils.testConnection(<br/>com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(<br/>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>sun.reflect.NativeMethodAccessorImpl.invoke(<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(<br/>java.lang.reflect.Method.invoke(<br/>org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(<br/>org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(<br/>...

thanks in advance
7 years ago
Thanks Sunil will try and let you know.Also if not resolved i will post the prinst screen as well.
7 years ago
Also when i run the query to get the username and password i get the username as "SYS" only. I am able to login into oracle using the same username and password.
7 years ago
Yes i am able to login into pl/sql developer (Oracle) using the same user id "SYS" and password.
7 years ago
Hi Friends while configuring the weblogic admin console i am getting this problem i dont know why but my user name and password for Oracle 11g server is "SYS" only. Here is the error which i am getting now:

Message icon - Error Connection test failed. Message icon - Error [BEA][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
weblogic.jdbc.base.BaseExceptions.getException(Unknown Source) Source) Source)
weblogic.jdbc.base.BaseConnection.connect(Unknown Source)
weblogic.jdbc.base.BaseConnection.setupImplConnection(Unknown Source) Source)
weblogic.jdbcx.base.BaseXADataSource.getBaseConnectionPreparedForXA(Unknown Source)
weblogic.jdbcx.base.BaseXADataSource.getXAConnection(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

These are the details:

Driver Class


Database User Name:SYS Password:SYS

Properties: user=SYS portNumber=1521 SID=ORCL serverName=

Test Table Name: select * from customer
7 years ago
Dear All,

I am stuck at some point where in I need to get database changes in a java code.
Request is to get any record updated, added, deleted in any table of db; should be recongnised by java program.
How could it be implemented JMS ? or a java thread ?

Please help me getting some way over this...

Thanks in advance
8 years ago
Dear All,

I am stuck at some point where in I need to get database changes in a java code.
Req is to get any record updated, added, deleted in any table of db; should be recongnised by java program.
How could it be implemented JMS ? or a java thread ?

Pl help me getting some way over this...

Thankx in advance