Vibhas Kumar

Greenhorn
+ Follow
since Oct 13, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

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



PLEASE HELP.
12 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

httpServletResponse.setStatus(HttpServletResponse.SC_OK);

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


13 years ago
JSF
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.Assert.fail(Assert.java:47)
at junit.framework.TestCase.runTest(TestCase.java:147)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)

Below is my code:

13 years ago
JSF
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 GrantAccessBackingBean.java can dereference a null pointer on
line 2357 because it does not check the return value of resolveVariable(), which might
return null.
Sink: GrantAccessBackingBean.java:2353 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
13 years ago
JSF
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
14 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(Class.java:169)
at com.example.model.Driver.main(Driver.java:13)
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 {

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

Statement stmt = conn.createStatement();
ResultSet rset = stmt
.executeQuery("select * from customer");
while (rset.next())
System.out.println(rset.getString(1));
rset.close();
stmt.close();
conn.close();


}
}


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(SQLStateMapping.java:70)<br/>oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)<br/>oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)<br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)<br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:406)<br/>oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)<br/>oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:794)<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:391)<br/>oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)<br/>oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)<br/>oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)<br/>oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)<br/>com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:505)<br/>com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:369)<br/>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br/>java.lang.reflect.Method.invoke(Method.java:597)<br/>org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)<br/>org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)<br/>...

thanks in advance
14 years ago
Thanks Sunil will try and let you know.Also if not resolved i will post the prinst screen as well.
14 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.
14 years ago
Yes i am able to login into pl/sql developer (Oracle) using the same user id "SYS" and password.
14 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)
weblogic.jdbc.oracle.OracleImplConnection.connectAndAuthenticate(Unknown Source)
weblogic.jdbc.oracle.OracleImplConnection.open(Unknown Source)
weblogic.jdbc.base.BaseConnection.connect(Unknown Source)
weblogic.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)
weblogic.jdbc.base.BaseConnection.open(Unknown Source)
weblogic.jdbcx.base.BaseXADataSource.getBaseConnectionPreparedForXA(Unknown Source)
weblogic.jdbcx.base.BaseXADataSource.getXAConnection(Unknown Source)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:550)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:369)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
...

These are the details:

Driver Class Name:weblogic.jdbcx.oracle.OracleDataSource

URL:jdbc:bea:oracle://127.0.0

Database User Name:SYS Password:SYS

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

Test Table Name: select * from customer
14 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
14 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