[JNDI/Naming/Network] - JNDI Entries Disappear Randomly in 4.2.3/4.3 (Bug?)
by jthinaka
Problem Statement
After a server is running for a while, JNDI entries will randomly disappear. This doesn't allow other JBoss servers to look up queues and topics.
Problem Symptoms
1. Clients will get random "ConnectionFactory" not bound errors (when they've already gotten that look up before.
2. They will get a reference to ConnectionFactory, but will get Queue not bound errors. Again this is after it's already been working for a while.
3. Any shutdown using shutdown.sh will result in RMIAdapter not bound errors forcing to do a kill -9 on the server process.
Problem Resolution
Restart server until the problem happens again.
Where Help is Needed
This is clearly a major issue. Our application is massively distributed with batch and online aspects. At any given time we have about twenty + clients (stand alone Java clients as well as Jboss servers) connecting to one batch-processor. They all queue batch requests to this server and things start failing smack dab in the middle of production (and the day). This problem has appeared in 4.3, 4.2.2 and 4.2.3 (we actually rolled back to 4.2.3 but for different reasons we can go into later). As I mentioned, restart of the batch processor fixes the problem.
What makes this problem very hard to debug is that it happens after things have been running good for a while. Suddenly we'll get those errors, and from the client perspective it makes sense, because those JNDI entries are missing from the JNDIView JMX Bean.
Can any body shed some light on this?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232603#4232603
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232603
16 years, 11 months
[EJB 3.0] - @Resource(name =
by cpslo1999
I've been searching the 'net trying to find out how to use in JBoss 5.0.1.GA.
@Resource(name = "some/name")
However, all of the examples show the annotation used this way:
@Resource(mappedName = "some/jndi/name")
Also, the specification says that mappedName is a provider specific attribute, app servers aren't required to even implement it, and that it is absolutely not portable. All sound like good reasons to avoid using mappedName.
Since I can't seem to find any instructions (and guessing hasn't given me any results either), I'll ask. Is there a way to use the name form of the @Resource annotation in JBoss? If so, where can I discover (or configure) the name of the JMS topic I'm trying to inject?
Thanks,
Josh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232598#4232598
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232598
16 years, 11 months
[JBossWS] - JBossWS client not sending Basic Authentication
by leobaz2
Hi, I have a web service client that is trying to call a webservice secured with basic authentication. I had this working with JAVA 6 but not with JAVA 5.
I am setting the username and password correctly as seen below but I am still getting a 401 error code back. When I used tcpmon to inspect the request\response, I can see that the username and password is not being passed to the client.
| Map requestContext = ((BindingProvider) manager).getRequestContext();
| requestContext.put(BindingProvider.USERNAME_PROPERTY, username);
| requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
|
When I debug, I can see that the web service proxy has the username and password in its Map. So why are they not being sent along with the webservice call? Does it have something to do with the versions of the Jars I am using? I am using JBoss 4.2.3 and the jars are.
| jboss\client\xmlsec.jar
| jboss\client\jboss-jaxws.jar
| jboss\client\jbossws-client.jar
| jboss\client\jboss-common-client.jar
| jboss\lib\endorsed\serializer.jar
| jboss\lib\endorsed\xalan.jar
| jboss\lib\endorsed\xercesImpl.jar
| commons-validator
| commons-logging-api
| <my client stubs jar> created using jwsc ant task
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232592#4232592
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232592
16 years, 11 months
[JBoss Messaging] - ClassCastException looking up ConnectionFactory
by markstrecker
Hello,
I'm trying to get the P2P example working so that my webapp(running in JBoss 4.2.3) can write and consume messages. I used the example from the JBoss docs (http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Se...) and when I start the webapp and execute my JNDI lookup, I get this error :
java.lang.ClassCastException: org.jboss.mq.SpyConnectionFactory cannot be cast to javax.jms.QueueConnectionFactory
So, I change it to a SpyConnectionFactory and get a similar error about SpyQueue. I change that and then get this :
| java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebAppClassLoader) previously initiated loading for a different type with name "javax/jms/QueueConnection"
| java.lang.ClassLoader.defineClass1(Native Method)
| java.lang.ClassLoader.defineClass(Unknown Source)
| java.security.SecureClassLoader.defineClass(Unknown Source)
| org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1814)
| org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
| org.jboss.web.tomcat.service.WebAppClassLoader.findClass(WebAppClassLoader.java:75)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
| org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
| java.lang.ClassLoader.loadClassInternal(Unknown Source)
|
Here's the original version of my code.
| package test.jms;
|
| import javax.jms.JMSException;
| import javax.jms.Queue;
| import javax.jms.QueueConnection;
| import javax.jms.QueueConnectionFactory;
| import javax.jms.QueueReceiver;
| import javax.jms.QueueSender;
| import javax.jms.QueueSession;
| import javax.jms.TextMessage;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
|
| public class QueueSetup
| {
| public void sendRecvAsync(String text) throws JMSException, NamingException
| {
| InitialContext iniCtx = new InitialContext();
| Object tmp = iniCtx.lookup("ConnectionFactory");
| QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
| QueueConnection conn = qcf.createQueueConnection();
| Queue que = (Queue) iniCtx.lookup("queue/A");
| QueueSession session = conn.createQueueSession(false,
| QueueSession.AUTO_ACKNOWLEDGE);
| conn.start();
|
| // Set the async listener
| QueueReceiver recv = session.createReceiver(que);
| recv.setMessageListener(new MyMessageListener());
|
| // Send a text msg
| QueueSender send = session.createSender(que);
| TextMessage tm = session.createTextMessage("This is a test");
| send.send(tm);
| send.close();
| }
| }
|
Any ideas about what's wrong?(I did try java:JmsXA with similar results) Is there some setup that I missed?
TIA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232574#4232574
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232574
16 years, 11 months