[Installation, Configuration & DEPLOYMENT] - Error when narrowing a session bean (remote interface) deplo
by sunnyDev
Hello forum,
I deployed a web application into JBoss 4.2.2 GA, and in this web application, a managed bean will have access to a EJB session bean (remote interface) deployed in the same JBoss server, but I got this error:
ERROR [STDERR] java.lang.ClassCastException
20:01:44,775 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
20:01:44,775 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
20:01:44,775
.........
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
20:01:44,802 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
20:01:44,802 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
20:01:44,803 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
20:01:44,803 ERROR [STDERR] Caused by: java.lang.ClassCastException: $Proxy85 cannot be cast to org.omg.CORBA.Object
20:01:44,804 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:212)
The code to get the session bean handler:
Properties env = new Properties( );
env.put(Context.SECURITY_PRINCIPAL, "guest");
env.put(Context.SECURITY_CREDENTIALS, "guest");
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.security.jndi.JndiLoginInitialContextFactory");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
Context jndi = new InitialContext(env);
Object ref = jndi.lookup("MyBean/remote");
instance = (MyBeanRemote) PortableRemoteObject.narrow(ref, MyBeanRemote.class);
I can get "ref" from Context, just get error when narrow it. And with the same code deployed to tomcat, it works fine.
I wonder whether anyone has met with this problem or can see some error in my code.
Thanks a lot in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161183#4161183
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161183
17 years, 9 months
[EJB 3.0] - EJB 3.0 MDB Jboss 4.0.5 ejb-jar.xml jboss.xml
by globetrottersam
I have created a MDB
package com.messaging;
@MessageDriven(activationConfig =
{
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="queue/stream.EMailMessenger")
}
)
public class EMailMessenger implements MessageListener {
..............................
}
my ejb-jar.xml looks like
<?xml version='1.0' encoding='UTF-8' ?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
<message-driven>
<ejb-name>EMailMessenger</ejb-name>
<ejb-class>com.messaging.EMailMessenger</ejb-class>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
</message-driven>
</enterprise-beans>
</ejb-jar>
my jboss.xml looks like
<?xml version='1.0' encoding='UTF-8' ?>
<enterprise-beans>
<message-driven>
<ejb-name>EMailMessenger</ejb-name>
<destination-jndi-name>queue/stream.EMailMessenger</destination-jndi-name>
</message-driven>
</enterprise-beans>
I get the following warning on deployment
14:52:06,093 INFO [EJBContainer] STARTED EJB: com.messaging.EMailMessenger ejbName: EMailMessenger
14:52:06,093 WARN [MessagingContainer] Could not find the queue destination-jndi-name=queue/stream.EMailMessenger
14:52:06,093 WARN [MessagingContainer] destination not found: queue/stream.EMailMessenger reason: javax.naming.NameNotFoundException: stream.EMailMessenger not bound
14:52:06,093 WARN [MessagingContainer] creating a new temporary destination: queue/stream.EMailMessenger
14:52:06,093 INFO [EMailMessenger] Bound to JNDI name: queue/stream.EMailMessenger
Please suggest how can I remove this warning on deployment.
Thanks and regards,
Sam.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161181#4161181
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161181
17 years, 9 months
[JBoss Portal] - Re: WSRP: images, css, and javascript from ICEfaces not comi
by Lightguard
Ah okay. Yeah I noticed that it was truncated after I posted. I have an ICEfaces + Seam portlet that I'm remoting. There are style sheets and javascript files that ICEfaces is putting into the resultant HTML so that it can do all the AJAX stuff (and make it look pretty). There are also some images in the application that we have used.
On the consumer end none of the images, css, or javascript are coming across. When I look at the HTML that is rendered all of those are relative paths back to the context of the war that was deployed in JBoss portal (JBoss is the Producer). The images we could probably make absolute in the source ourselves, but the main things are the javascript and css from ICEfaces.
I imagine these should be urlType=resource in WSRP terms, but I'm not sure if that's the case (the spec really doesn't make that clear in my mind). I'm wondering if this is a bug in JBoss Portal or if ICEfaces should be using absolute paths. Thanks for the help, hope that made more sense.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4161176#4161176
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4161176
17 years, 9 months