Vikas Kumar Sahu

Ranch Hand
+ Follow
since Dec 02, 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 Vikas Kumar Sahu

Hi Java Gurus,

I have one query.
I have one j2ee server runing in solaris environment.
I have one one library (jr file) that I have to update in the server.
Without retsarting the server, Is it possible to update this jar file and the runing server will use this updated jar ?
So far as I know that JVM can not take this updted jar until we restart it. The classloader can load this jar once we restart the server.
But probably there must be a solution that I dont know and you know.

Thanks In Advance...
Hi,
I want row selection when user right click on the table.
Right now when user right click on table a pop up menu comes but no row selected at this time.
Can any body tell how select the row when right click over the table.
18 years ago
Hi All,

Hi I have one table DataSheet in oracle 9i with two column
NETOBJECTID and EVENT_DATE_TIME.

What a strange problem is coming,

ResultSet rs = statement.executeQuery("SELECT NETOBJECTID FROM DataSheet");

query is working fine through JDBC api, and


ResultSet rs = statement.executeQuery("SELECT NETOBJECTID,EVENT_DATE_TIME FROM DataSheet");

query is not working throught JDBC api, while this is working fine directly in oracle sql client .

Is EVENT_DATE_TIME i any keyword in java

When we include it into query this gives the following exception

java.sql.SQLException: ORA-03115: unsupported network datatype or representation
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.v8Odscrarr.receive(v8Odscrarr.java:191)
at oracle.jdbc.ttc7.TTC7Protocol.describe(TTC7Protocol.java:586)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:647)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)*********QUERY=SELECT EVENT_DATE_TIME,NETOBJECTID,ALARM_ID,SEVERITY,CATEGORY,SOURCE,GROUP_NAME,ADDITIONAL_INFO,BACKEUPOBJECT,BACKEDUPSTATUS,CAUSE,
REPAIRACTION_PROPOSED,SPECIFIC_PROBLEMS,ALARM_STATE,ASSIGNEDTO,
OPERATOR_NAME,THRESHOLD_INFO,TREND_INDICATION,ESCALATED_FROM,ESCALATED_TO,STATECHANGEDEF FROM Alarm_Table WHERE Threshold_Info is not null
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:538)
at com.sisl.snms.server.util.db.DBUtil.getData(DBUtil.java:485)
at com.sisl.snms.server.util.db.DBUtil.getColumnData(DBUtil.java:824)
at com.sisl.snms.server.util.db.DBManager.getTcas(DBManager.java:1986)
at com.sisl.db.Demo.main(Demo.java:146)


Regards -

Vikas Kumar Sahu


[ August 29, 2005: Message edited by: Bear Bibeault ]

[edited to add line break]
[ August 29, 2005: Message edited by: Jeanne Boyarsky ]
Hi,
I am unalble to deploy one cmp bean in the weblogic server 7.0.0,
The following exception is coming -

Unable to deploy EJB: EccATM.jar from EccATM.jar:


Could not locate bean with ejb-name 'EccATM' in weblogic-ejb-jar.xml

at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:155)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:332)
at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:489)
at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:819)
at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1268)
at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:235)
at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:1579)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:741)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1098)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:766)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)



}
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:748)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:555)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1098)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:766)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
>

Thanx -
Vikas Sahu
Hi,

I creaed one user defined exception and using this exception
in the session bean when I am trying use this bean at the client
side and cathing this exception it is not catching it properly
while server side it is throwing this exception.

I can elaborate it through client code -

try {
isModified = sessionBean1.modifyNe(Object product);
}
catch (ValidationException nve) {
throw nve;
}
catch (RemoteException remoteException) {
remoteException.printStackTrace();
}


server is throwing ValidationException but it is cathing in
the RemoteException.


stack trace is given below

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: com.ss.sms.common.exception.ValidationException: name should be unique
at com.sisl.snms.server.esc.common.SmsEscBean.checkDuplicateNeName(SnmsEscBean.java:56)
at com.sisl.snms.server.esc.escatm.SessionBean1.modifyNe(EscAtmBean.java:219)
at com.pramati.ejb.runtime.EscAtmBean_LocalObject_Impl_785398532._pramati_impl_modifyNe(EscAtmBean_LocalObject_Impl_785398532.java:285)
at com.pramati.ejb.runtime.EscAtmBean_LocalObject_Impl_785398532$3.run(EscAtmBean_LocalObject_Impl_785398532.java:238)
at com.pramati.security.util.JAASSecurityHelper.doAs(JAASSecurityHelper.java:158)
at com.pramati.security.util.JAASSecurityHelper.doAs(JAASSecurityHelper.java:266)
at sun.reflect.GeneratedMethodAccessor85.invoke(Unknown Source)
\



You should read JAXB concept, there are many open source like castor.org
by which you can read/write xml data.
There are two ways -
1. You can create dom object at the server side and send this object to the client.

2. Or create dom object and send xml stream to the client.
But I have taken remote interface of this SB once,
and I think at this point of time the bean instance has created once.
Then I am caling these two method (with the help of this interface).
Hi,

I am facing one strange problem.

I am calling two functions of same session bean one by one from the client.
In one function I am doing some processing and populating one hashtable,
this hashtable is the data memeber of the class.
But when I am getting this hashtable refrence from the other method the populated
data is not comming. Its size is zero.

Can anybody have the solution ?

My client calling following method first -

readConfiguredWorkFlows(int userId)

//this method populating hashtable.

then taking refrence of the hashtable from the other method

getAllEccsCommandsHashtable()

but hashtable size is zero though its size is >0.

You can see the code below -


Code is like this -

public class WorkflowXmlManipulatorBean
implements SessionBean {
SessionContext sessionContext;
ArrayList workflowsJaxbArrayList = null;
Hashtable eccCommandsHashTable = new Hashtable();
Hashtable workflowPathHashTable = new Hashtable();

final String TOPDIRPATH = "config" + File.separator + "cm" + File.separator +
"ecc";
final String COMMANDDIRNAME = "commandxml";
final String WORKFLOWXMLDIRNAME = "workflowxml";

public void ejbCreate() throws CreateException {
}

public void ejbRemove() {
}

public void ejbActivate() {
}

public void ejbPassivate() {
}

/**
*
* @param sessionContext SessionContext
*/
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
}

/**
* This function will read all xml file and put dom into arraylist
* @param userId int
* @return ArrayList
*/
public ArrayList readConfiguredWorkFlows(int userId) {
this.workflowsJaxbArrayList = new ArrayList();
visitAllDirsAndXMLFiles(new File(this.TOPDIRPATH));
return this.workflowsJaxbArrayList;
}


/**
* This function will visit all folders and subfolders and read workflows
* and make dom bjects and store it into the xml.
* @param dir File
*/

public void visitAllDirsAndXMLFiles(File dir) {
String dirName = dir.getName();

if (dir.isDirectory()) {
print("dir name =", dirName, '#');
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
visitAllDirsAndXMLFiles(new File(dir, children[i]));
}
}
else {
if (dirName.endsWith(".xml")) {
print("xml file name =", dirName, '&');
print("xml file path name =", dir.getPath(), '%');
print("Parent name", dir.getParentFile().getName(), '^');
if (dir.getParentFile().getName().equals(this.WORKFLOWXMLDIRNAME)) {
Unmarshaller ui = new Unmarshaller(Workflow.class);
ui.setValidation(false);
try {
Workflow workflow = (Workflow) ui.unmarshal(Workflow.class,
new FileReader(dir));
this.workflowsJaxbArrayList.add(workflow);
}
catch (FileNotFoundException ex) {
ex.printStackTrace();
}
catch (ValidationException ex) {
ex.printStackTrace();
}
catch (MarshalException ex) {
ex.printStackTrace();
}
catch (Exception ex) {
ex.printStackTrace();
}


}
else if (dir.getParentFile().getName().equals(this.COMMANDDIRNAME)) {
Unmarshaller ui = new Unmarshaller(Ne_root.class);
ui.setValidation(false);
try {
Ne_root ne_root = (Ne_root) ui.unmarshal(Ne_root.class,
new FileReader(dir));
ArrayList commandAl = new ArrayList();
for (int i = 0; i < ne_root.getOperationCount(); i++) {
Operation op = ne_root.getOperation(i);
System.out.println("op.getOperation_output()=" + op.getOperation_output());
commandAl.add(op.getOperation_output());
}
String eccname = dir.getParentFile().getParentFile().getName();
print("Eccname = ", eccname, '@');
this.eccCommandsHashTable.put(eccname, commandAl);
System.out.println("###::: hastable size =" + eccCommandsHashTable.size());

}
catch (FileNotFoundException ex) {
ex.printStackTrace();
}
catch (ValidationException ex) {
ex.printStackTrace();
}
catch (MarshalException ex) {
ex.printStackTrace();
}
catch (Exception ex) {
ex.printStackTrace();
}


}
}
}

}


public Hashtable getAllEccsCommandsHashtable() {
return this.eccCommandsHashTable;
}

}


Thanx in advance-

Vikas Kumar Sahu
Hi All,

Can we execute sql script ("name.sql") through java programe.
I am not talking about reading sql script one by one and excute.
I just want to send this sql script to oracle console.

Or any body can give other alternative I have to lot of db operation in less time.

- Vikas Kumar Sahu
Hi All,
I am trying to access local interface of my ejb at the weblogic server.
I am accesing this ejb from the MDB.
The following exception is comming :

javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/taskmgmt.jar#TaskManagement/local-home]; Link Remaining Name: 'java:app/ejb/taskmgmt.jar#TaskManagement/local-home'
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:9 8)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292 )
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:771)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sisl.snms.server.common.LocalEJBGetter.getLocalHome(LocalEJBGetter.java:49)
at com.sisl.snms.server.common.LocalEJBGetter.getRemoteInterface(LocalEJBGetter.ja va:29)
at com.sisl.snms.server.cm.CMLocalInterfaceGetter.getLocalTaskManagementRemoteInte rface(CMLocalInterfaceGetter.java:34)
*******obj[0]=Tue May 24 14:07:50 IST 2005 at com.sisl.snms.client.cm.taskmanagement.gui.PrivateTaskManager.deleteUserAndItsA ssociatedOp(PrivateTaskManager.java:333)


BR -
Vikas Kumar Sahu
Hi All,
How can I subscribe JMS at the server side rather than slient side ?
Coz I want to do some processing at the server side when JMS shall come.

How can we compare two objects ?
Is it ok
if(obj1 == obj2)




18 years ago
now one strange thing my saving functionality is working at client end means saving of xml at client is working. Now I am reading it and then saving this dom object at server is working fine.
The diff is only earlier i was saving xml directly at server that is not working but when i am saving it client then reading dom and saving dom internally at server is working fine.

I am not able to understand this strange problem.
but it is sun's java file

com.sun.java.swing.plaf.windows.XPStyle
I already Implented Serializable interface