jaspal singh

Ranch Hand
+ Follow
since Sep 15, 2005
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 jaspal singh

Hi,

I am using WAS 6 with db2.

I've used currentSchema i.e deafault schema property in Datasource for JDBC connectiion pooling.

However this doesent work while accessing any procedure.

I've to explicity provide e.g. call Schema.xyzProce

Any suggestions as why this is happening.

Thanks,
Jass
Hi,

I am using WAS 6 with db2.

I've used currentSchema i.e deafault schema property in Datasource for JDBC connectiion pooling.

However this doesent work while accessing any procedure.

I've to explicity provide e.g. call Schema.xyzProce

Any suggestions as why is it like this?

THanks
Jazz
15 years ago
hello guys

how can I clear the contents of the screen when my java app fill the screen.
17 years ago
u can hav a Static variblle declared in the class.

class Abc
{
Static instanceCount=0;

//then in constructor u can increment the counter

Abc()
{

instanceCount++;
}

}
18 years ago
but the Class ResultObject is serializable.suddenly this problem has crapped.

can u tell me how to solve this problem.
hi guys!

im using jboss server.im getting following exception while making call to session bean from my java client application:

the problem is generated only on my machine other guys dont get such problem.
also the transaction works fine the data is properly manupilated in database.but at the end this exception is thrown

in the folloiwing trace.ResulObject seems to be the root cause.this
class is used by bean developers to set the transaction success/failure details.

pls reply






ShrtCdMgmtDAO.insertRec] : Record could not be created for some reasons
[ShrtCdMgmtDAO.insertRec] : Exception generated e-->java.lang.reflect.UndeclaredThrowableException<--
java.lang.reflect.UndeclaredThrowableException
at $Proxy1.addShortCodeData(Unknown Source)
at ShrtCdMgmtDAO.insertRec(ShrtCdMgmtDAO.java:69)
at com.gomobile.cmdadminui.GMAdminUIShrtCdMst.readCommands(GMAdminUIShrtCdMst.java:154)
at GMAdminUIShrtCdMst.main(GMAdminUIShrtCdMst.java:379)
Caused by: java.io.InvalidClassException: ResultObject; class invalid for deserialization
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
... 4 more

[ March 26, 2006: Message edited by: jaspal singh ]
Hi guys,
before i question anything, I would like to thank all u guys on this ranch arean,A BIG THanx, as u hav always rescued when i see myself under the water.

problem:
1.wat i want to know is that how exactly servlets are managed by container.wats the role of web-server in servlet handling.

2.how many instance are created for a single servlet, for all requests.

3.how classloader is used by server for dynamically loading the changed servlet instance.

thanxz in advance.
18 years ago
Hi.
im new to ejb and dont know abt it.

can u suggest best book/links to start off.

im having jboss to work with.


thanx fot ur response in advance
how can i call ejb objects in my program written in j2se 1.5.

thanx in advance.
18 years ago
hi guys,

i would really appreciate, if u can help me know how to configure multiple virtual hosts in tomcat 5.5.7.all these hosts would point to single app.
e.g d:\myapp.


i dont know where to start.its absolutely new thing for me.

would be fine if u give me steps to do that.
[ January 19, 2006: Message edited by: jaspal singh ]
18 years ago
hi guys,

i dont know anythin abt xml.and im supposed to make a class which
reads a hashmap and converts it to xml using sax.

so can anybody give the code which can help me to make that class,since i dont have enough time to learn xml for atleast now.


thanxz in advance.

Please read the following page to find out why putting "urgent" in your subject heading will actually slow down responses to your question:



oh! big sorry for that.

thanx for getting me aware of the fact.
18 years ago
there is one servlet runnin in the application which gets some data and
send to another servlet to process it and return that data back.

so how do i do this...


thanxz in advance





[BS: removed "urgent" from the subject]
[ January 17, 2006: Message edited by: Ben Souther ]
18 years ago
actully both are required.

u get context insatance and then u lookup for the component.

and wats more.this code runs on most of the machines.only 2-3 hav problem.


hop u got that
ya...client calls for service from tomcat, its a jsp page.

the request is served by the cmp runnin on jboss.

using windows nt professional.

actually context is found.

"System.out.println("Inside Server"+serverName);
Context ctx = getInitialContext();
System.out.println("Context Found");//this is printed
Object obj = ctx.lookup(serverName);"//so here is problm.
System.out.println("Lookup Completed");//this does not print

[ January 11, 2006: Message edited by: jaspal singh ]


///whole class is below:
package com.n4n.hello;

import java.util.*;
import java.rmi.*;
import java.rmi.registry.*;
import javax.naming.*;
import javax.rmi.*;
import javax.ejb.*;

public class ServerLookup
{
private static Context CONTEXT = null;

private static Hashtable SERVERS = new Hashtable();


private static Hashtable CLASS_MAPPINGS = new Hashtable();

public static final String HelloServerRemoteName = "HelloServer";

public static Object getServer(String serverName) throws RemoteException
{
Object server = null;
try{
System.out.println("Inside Server"+serverName);
Context ctx = getInitialContext();
System.out.println("Context Found");
Object obj = ctx.lookup(serverName);
System.out.println("Lookup Completed");
Class homeClass = getHomeClass(serverName);
System.out.println("Home Found");
EJBHome home = (EJBHome)PortableRemoteObject.narrow(obj, homeClass);
System.out.println("Narrow Completed");
server = homeClass.getDeclaredMethod("create", null).invoke(home, null);
System.out.println("Instance Created");

}
catch(Exception e)
{
e.printStackTrace();
}
return server;
}
private static Class getHomeClass(String remoteName) throws ClassNotFoundException
{
Class cls = (Class)CLASS_MAPPINGS.get(remoteName);
if(cls == null)
{
if(remoteName.equalsIgnoreCase(HelloServerRemoteName))
cls = Class.forName("com.n4n.hello.IHelloHome");
}
return cls;
}
public static InitialContext getInitialContext() throws javax.naming.NamingException
{
java.util.Hashtable JNDIParm = new java.util.Hashtable();
JNDIParm.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
JNDIParm.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
JNDIParm.put(Context.PROVIDER_URL, "192.168.111.79:2016");
return new InitialContext(JNDIParm);
}
}
[ January 11, 2006: Message edited by: jaspal singh ]