volks!
I have a problem. I want to read some messages from Weblogic 12c. This code is currently working with another server, which wasn't configured by me. So the problem may be in configuration of server.
The problem is when I use code:
public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
public final static String JMS_FACTORY="QCF";
public final static String QUEUE="dizzyworldQueue";
public final static String USER_NAME="weblogic";
public final static String USER_PASSWORD="Welcome1";
public final static String URL="t3://localhost:8001";
private static InitialContext getInitialContext(String url) throws NamingException
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
env.put(Context.PROVIDER_URL, url);
env.put(Context.SECURITY_PRINCIPAL, USER_NAME);
env.put(Context.SECURITY_CREDENTIALS, USER_PASSWORD);
return new InitialContext(env);
}
qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
qcon = qconFactory.createQueueConnection(); // here it falls
The error is:
Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'QCF'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'QCF'. Resolved '']; remaining name 'QCF'
I have Queue and QueueConnection factory on my server. What can be the rison?