ramjcp kris

Greenhorn
+ Follow
since Sep 05, 2005
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 ramjcp kris

In a Webform i have a text box control which represents customer Names,on entering the value some thing like 'P' in the textbox i have to display all customer names starting with 'P' from database using AJAX and from which i can select.
it should more over look like Google search box
I am new to Java ,
Please let me know what is the importance of container in a webserver.
what are the other features that are handled by webserver other than maintaining container.
13 years ago
Hi ,
can any one tell me what are the protocols that are supported by webserver and Appserver.
13 years ago
Hi

can any one let me know is there any way to deploy application ear into websphere without using Admin console.
if so pls provide me the way or links where i can get useful information fot this
14 years ago
Hi All

I am new to this MQ Series. i have a requirement in which we are using IBM MQ classes
following is the code used for reading message from queue


reading from queue using following code


now msgInstring contains whole message.

now this string consists of japanese characters.
my requirement is i need to divide this string ( entire message) into multiple records say each of 180 bytes
and write these records into text file.

can any one suggest me , how can i split the entire message which is of string format
into multiple of 180 bytes (each record) and writing these records into text file.
more over this received message consits of japanese characters.
without loosing this encoding i need to achieve.
14 years ago
Hi ALL

my problem is in reading Message from MQSeries which consists of japanese charaters.All these japanese charaters are getting converted into Some special characters after reading from MQQueue. I Have tried using UTF-8.

can any one help me how to acheive this. i am posting my code here.


now i am constructing string with this msgBytes

it does not work so i tried in this way




waiting for your reply with anticipation
14 years ago
Hi All

my Requirement is I need to return a value from java program to a shell script.my main class is being called from this shell script;

following is my test.sh


And my Hello class code is below


can any one tell me how to print the value returned from my java program to shell script
waiting for reply with anticipation
14 years ago
Hi All,

my code is


I have added all those necessary jar files to classpath like - wssec.jar, naming.jar, namingclient.jar, lmproxy.jar,sas.jar and ecutils.jar still facing same problem

I am getting the following Exception when executing the code (Object obj = ctx.lookup("/Hello") in SUN JRE

Exception is

javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:318)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:392)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at TestHello.main(TestHello.java:26)
Caused by: java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:86)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)
... 6 more

but when try to execute the same code at line (Object obj = ctx.lookup("/Hello") in IBM jre I am facing following Exception

Exception is

Exception in thread "P=169394 =0:CT" java.lang.NoClassDefFoundError: org.jboss.mx.util.Serialization
at javax.management.ObjectName.<clinit>(ObjectName.java:86)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.class$(RMIConnectionImpl_Stub.java:6)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.<clinit>(RMIConnectionImpl_Stub.java:41)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:131)
at javax.management.remote.rmi.RMIConnector.<clinit>(RMIConnector.java:2006)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:150)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:945)
at java.lang.reflect.Field.getFieldAccessor(Field.java:926)
at java.lang.reflect.Field.get(Field.java:385)
at com.ibm.CORBA.iiop.UtilDelegateImpl$2.run(UtilDelegateImpl.java:178)
at java.security.AccessController.doPrivileged(AccessController.java:192)
at com.ibm.CORBA.iiop.UtilDelegateImpl.<clinit>(UtilDelegateImpl.java:170)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:144)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1263)
at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:359)
at javax.rmi.CORBA.Util.<clinit>(Util.java:70)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ibm.rmi.corba.PluginRegistry.instantiatePlugins(PluginRegistry.java:116)
at com.ibm.rmi.corba.ORB.instantiatePlugins(ORB.java:1386)
at com.ibm.rmi.corba.ORB.orbParameters(ORB.java:1298)
at com.ibm.rmi.corba.ORB.set_parameters(ORB.java:1206)
at com.ibm.CORBA.iiop.ORB.set_parameters(ORB.java:1662)
at org.omg.CORBA.ORB.init(ORB.java:364)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:86)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:309)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:392)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at TestHello.main(TestHello.java:26)


can any one tell me or give me a source for standalone java client which is working.
15 years ago
i need to split file because , iwant to send these files over queue.
but my queue limit is 4MB, so i cant send file of size more than 4mb to a queue. if my file size is more than 4mb , i need to split it and send over queue
15 years ago
HI All

i have a text file which is of size 6 mb,which i need to send across net.
so i want to split this file in 2 files, which is of 3mb each.

can any one suggest me How can i split a file in java when its size is more than say 6mb.
15 years ago
Hi All

If a Queue contains 10 msgs, when i say getmessage I am getting first message,suppose i want to read all messages from queue,
I mean reading them in loop until no more message is left

can any one suggest me how to do it.
15 years ago
hi Cameron

thanks for your reply.

i need it to be done through stand alone client.
i mean its pure java class which contains main method from there i want to post message to queue running in MQServer.

how to create a connection factory from context just like the way you have given reply
15 years ago
HI

i have created QueueManager say QM and queues say Q1 in MQServer.

Now i want to publish a mesage into the queue Q1 created earlier Through stand alone java client.

can any one tell me how to acheive this.
i am giving here the code i have written .



can any one tell me how do i need to give the properties at time of context cretion for lookup.

i was new to JMS and IBM MQ server ,if my apporach is wrong , pls suggest me.

hope i would get some answer
15 years ago
HI All
can any one help me how to read first x lines say(5)
from a file ,and when i say getNextLines it should return me the lines from x+1 to some increment no of lines in the same file.

i have tried it using BufferedReader and implemented using mark , but just helpless...

pls provide me some sample code....
15 years ago
HI ALL

I am using Session Facade design pattern.I need to throw user defined exception from entity beans store method .Can we throw userdefined exceptions from entity bean? if so what will be the type of exception thrown to webtier.when i tried to throw exception from entity beans callby method i,e ejbstore the exception is getting propagated to webtier,but not to session bean.
can any one suggest me how to handle the userdefined exception ,if it is possible to throw from entity bean