John McDonald

Ranch Hand
+ Follow
since Jul 01, 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 John McDonald

Hello Gurus:
I have a project that needs to use JMS in Spring with TIBCO is my JMS server. My question is when JMS is used in Spring framework, if a connection fails, does it Spring framework reconnect the connection automatically? Thanks much.

John
Hi,
A few years ago I used axis. I used netbean and tried to learn the new web services. Where should I start? I few overwhelmed with JAX-WS, axis 2, REST, web services with annotation, etc? Can some guru tell me which one the newest and easier to have a grip? I feel I need to start over. Thank you very much.

John

15 years ago
Dear Gurus,
I am new to WAS. In fact I use Websphere Integration Developer 6. I created EJBProject and stateless HelloEJB

I also created an Enterprise Application and Application Project which have references to EJB Project

I deployed ejb by adding Enterprise Applcation to the server. I saw ejb.ar and its jndi in admin console but I don't see any of those on ibm universal test.

Here is my code:

final String JNDI = "ejb/ejbs/HelloEJBHome";
Properties properties = new java.util.Properties();

properties.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
properties.put(javax.naming.Context.PROVIDER_URL, "iiop://localhost:2810/");
HelloEJBHome home = (HelloEJBHome)context.lookup(JNDI);

HelloEJB hello= home.create();
System.out.println(hello.greet("Blessing"));

I don't know whether I don't have the context properties right or I dont' have the jndi right. The jndi JNDI = "ejb/ejbs/HelloEJBHome" is exactly what is shown in the ibm-ebj-jar-bnd.xmi and in the admin console. Thank you very much.

John




Error is follow:
Aug 13, 2008 2:08:48 PM com.ibm.ws.naming.util.WsnInitCtxFactory
WARNING: jndiUnavailCommErr
javax.naming.ServiceUnavailableException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "iiop://localhost:2810/". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible:
Forwarded IOR failed with: java.net.UnknownHostException: EIS745XP.customs.treas.gov:host=EIS745XP.customs.treas.gov,port=9101
Initial IOR failed with: java.net.UnknownHostException: EIS745XP.customs.treas.gov:host=EIS745XP.customs.treas.gov,port=9101 vmcid: IBM minor code: E07 completed: No]








WARNING: jndiUnavailCommErr
javax.naming.ServiceUnavailableException:
15 years ago
My question was if I have a value of 192, how do I change this value of special A character. So the answer is

int value = 192;
String specialCharacter = "" + (char)value;
System.out.println("special A[" + specialCharacter.charAt(0) + "]");
15 years ago
Thanks to Paul and Pat for your kindness. It helps me a lot specially dealing with the hex.

If If have a numerical value of an int 192, its hex value is c0. How do I convert this numerical value into a special character?

For value of 256 or higher, when I cast that number to char, I just see [?]. I wonder that I have to set some sort of UTF8 but don't know how. Could you show me how to set the output stream? Thank you very much. You all have given a big help.
15 years ago
Hllo There,
I have to a need to convert a special character to a unicode but don't know how.

I see a unicode to a character but not the other way around. For example:

String original = new String("A" + "\u00ea" + "\u00f1"
+ "\u00fc" + "C");

becomes: A���C

but when I don't know how to convert � this to "\u00ea". Can someone show me please? Thanks.

John
15 years ago
I keep getting this error message. Please help


AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - Could not find class for the service named: wsdl2java.AlphaNumSOAPBindingSkeleton
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: wsdl2java.AlphaNumSOAPBindingSkeleton

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Could not find class for the service named: wsdl2java.AlphaNumSOAPBindingSkeleton
Hint: you may need to copy your class files/tree into the right location (which depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: wsdl2java.AlphaNumSOAPBindingSkeleton
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:jadmin-
15 years ago
Hi,
I am using a vista OS. I cannot clean up the mess in axis folder. For some strange reson, I cannot delete the folder underneath. Let me rerun and post the message again.

BTW, my name is John McDonald, I also sent message to my friend, John Giang when tried to do two things at once.

John
15 years ago
Hi Gurus,
I compiled the java classes and copy them to tomcat\webapps\axis\WEB-IMF\classes. I deployed it with a wsdl file. But When I go to http://locahlhost/axis. I got the error message that I need to copy the class files. I examined carefully, the server side service, binding, and other classes if they are in axis web directory. They are. But why do I keep getting this type of error.

I can't undeploy them either nor can I force to remove the classes. Every time, it happy I have to copy the whole axis directory over. Please help and show the proper step. Thank you very much.

John Giang
15 years ago
Could someone explain how to I use Configurable with the helloWorld class? How does that relate to <aop:spring-configured/>? Can someone just give me a real simple sample? Thank you very much.

John
Thanks and apologize for being a wrong forum. So I still puzzle of ThreadLocal. I googled a lot but don't find a good sample and well explanation. I have a java concurrency in practice but I don't see it much. Do you have any good source? And also does ThreadLocal have another alternative? Thanks again.

John
Thank you very much for a quick reply. Can you point out the different outcome when I just changed the way I input initial value to Client object? Thanks much.

John
Hi Gurus,
I start learning ThreadLocal. I have basic knowledge that is a separate thread to hold a separate value but I don't know if there its practical usage. Could you explain it? Is ThreadLocal useful?

I have the following code

The output is:
New local thread + Thread-0
New local thread + Thread-1
Thread Thread-1 has client Client[2]
Thread Thread-0 has client Client[1]


But if I change the initialValue method to be:

Then output is:
New local thread + Thread-0
New local thread + Thread-1
Thread Thread-1 has client Client[1]
Thread Thread-0 has client Client[1]


Could someone show me why? Much appreciated.

[ Edited to use code tags - Paul Sturrock ]
[ April 14, 2008: Message edited by: Paul Sturrock ]
I used the 1.6.3 sdk. I don't remember somehow I got away with it. And now it come back. Thanks.

John
I was working on my project and it was fine until I did refresh loading into eclipse. Does any one has any clue? Thanks.

John

*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at ../../../src/share/instrument/JPLISAgent.c line: 806