Hi, I have excatly the same problem, and can't seem to fix it...
Anyone have a suggestion ?
:-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941709#3941709
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941709
---
Hi,
I was having just the same problem and (took at least few hours searching on google and interpreting user posts) looks like a classloader issue. The following discussions throw a light on it.
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=59192&postdays=0&postorder=asc&start=0
ht
Hi, thanks for replying.
JBoss versions I've tested with:
4.0.1sp1
4.0.3sp1
About the client: one is a Servlet, the other one a MDB.
The MDB is the main client, the servlet I've just create to continue testing at
home, where I can't make use of the MDB, as I can't send a message to it (it's
n
Two pieces of information missing, JBoss version and what is the client
performing the lookup.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3910271#3910271
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3910271
-
This looks familiar, I think I ran into it at some point, but don't recall
exactly what was wrong.
Make sure your client is doing a JNDI lookup on the remote interface class
name, not the local interface or the bean itself. Also, make sure you are
casting the result of the JNDI lookup to the r
Thankyou svetzal, setting UseJBossWebLoader to true (in 4.0.2), solved the
problem.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885186#3885186
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885186
Yes, everything was in an ear. I did as you suggested and it works fine.
Thanks.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885023#3885023
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885023
--
Sorry, forgot to mention the contents of application.xml in the previous post:
Make an entry as follows:
| MyBeans_ejb.jar
|
|
And create a jar file MyBeans.jar containing the interfaces and beans
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewto
Have you packaged the jar and war together in an ear?
Just don't add the interfaces jar to the web application. If the beans are
deployed within the ear of the war the interfaces will be available at runtime
anyway. The section in the tutorial that shows how to do this probably needs
to be re
Place the beans in a jar file, say MyBeans_ejb.jar, and mention this in the
application.xml file as follows:
MyBeans_ejb.jar
I think this should work
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885007#3885007
Reply to the post :
http://ww
Thanks for responding. I'm using JBoss 4.0.2.
Yes, the interfaces are in the war file, in a jar under WEB-INF/lib. This was
the suggested way to do it in the JBossIDE tutorial. How would you suggest I
package them?
View the original post :
http://www.jboss.org/index.html?module=bb&op
Which version of JBoss are you using?
How is your application actually packaged?
If you have packaged the interfaces in the war file you need to remove them as
that is probably the cause of the conflict.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884941#
"darranl" wrote : Have any of you read the links posted by Scott earlier in
this thread?
I realize everybody's busy and all, but perhaps a short summary of the problem
(a sentence or two) before referring the world to 25 pages of detailed
technical description containing _far_ more than we real
So, I've been patiently working through this and am getting closer to solving
the class loading issues, but, still have a few quirks to work out.
I have read the JBossClassLoadingUseCases and found
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration to be very
useful.
Based on t
Lots of suggestion but i didnt find any thing helpfull , simple i got a .war
folder which is suppoesed to access a bean deployed separately within jar file
i tried by giving ejb-local-ref tag in deployment descriptor of ejb module but
nothing changed, i tried by adding ejb-localref adding jboss-
Thanks Scott.
I just wanted to rephrase what you said to clarify. It is imperative that you
do not include classes in both a war and jar in the same ear as they will be
loaded by two different class loaders, thus causing the ClassCastException. If
they are present only once in the ear, they w
Have any of you read the links posted by Scott earlier in this thread?
They may help you understand the problem without needing to roll back to
earlier releases.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881074#3881074
Reply to the post :
http://www.
I experienced the same problem on 4.0.2. I rolled back to 4.0.1 (SP1) and it
worked.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881067#3881067
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881067
--
Hi all,
I have the same problem. It's works with JBoss 3.2.7, but fails when I deploy
in JBoss 4.0.2.
What is the problem? I'm new in this environment.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881050#3881050
Reply to the post :
http://www.jboss.org/
There can only be a single class loader for types used in call be reference
scenarios. Wars are always at bottom of the class loader chain, so this means
that they should never contain duplicate classes that are involved in call by
reference scenarios.
View the original post :
http://www.jboss
"[EMAIL PROTECTED]" wrote : And everyone asking this question has read:
| http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
|
Scott,
I read the article, and it was very helpful. However, it doesn't yet cover
UCL3 and EARs with embedded JARs and WARs (the second TO-DO),
And everyone asking this question has read:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880265#3880265
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p
And you have read the following?
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880258#3880258
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880258
true
true
Yes! This's been workin fine for classcastexception
problem in JBoss 4.X and +,
thanx a lot!
sudhakar kanakaraj
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880247#3880247
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting
I Meant for movzx reply on
I've solve this problem by changing options of jboss-service.xml in
deploy/jbossweb-tomcat55.sar:
sudhakar kanakaraj
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880248#3880248
Reply to the post :
http://www.jboss.org/index.ht
I hope this doesn't come back to haunt me later, but, this article explains how
to get the classloading back to what it was doing in 4.0.1sp1:
http://jira.jboss.com/jira/browse/JBAS-1691
Could someone help me understand the difference between the two classloaders?
Why would one be favored over
There's additional information in the server log after startup about MBeans
being the root cause:
=ERROR [main] (org.jboss.deployment.scanner.URLDeploymentScanner:527) -
Incomplete Deployment listing:
|
| --- Incompletely deployed packages ---
| [EMAIL PROTECTED] {
url=file:/C:/jboss-4.0
on which version of jboss, it worked?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3880187#3880187
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3880187
---
This S
A stateless session bean can be called from a web module. I had in fact done
this with Sun prior to trying JBoss. Also, my jar and war were even in the
same ear.
The issue is just that JBoss changed the default behavior of their web
container to follow the servlet spec by default, which is
erinol0,so you mean that you will call a SLSB from the web module? If so,that
will be the same problem as I've mentioned before. I believe you will get a
ClassCastException if your web module and the EJB module don't belong to the
same EAR while trying to pass instances by reference,for the Java
"movzx" wrote :
| This is a class loader issue of Java2.
Not really, this is an artifact of the Servlet 2.3 spec, which calls for a web
container first class loading.
I haven't tried it yet, but upon rereading the JIRA issue discussion I
mentioned earlier, I believe that the more appropria
I've solve this problem by changing options of jboss-service.xml in
deploy/jbossweb-tomcat55.sar:
| true
| true
|
This is a class loader issue of Java2.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879712#3879712
Reply to the post :
http://ww
There is no need to narrow on a LocalHome, only with a RemoteHome. The problem
is probably that JBoss, as of 4.0.2, uses the Tomcat class loader for anything
hosted by Tomcat, including web services and JSPs. Prior to this, they used
the JBoss Class Loader by default. You have a few different
i'm not sure if i'm understanding your problem fully (i'm just a beginner) but
i think i've read somewhere, that for some reason you have to cast a a class
here in that way:
home 2 = (CommandLocalHome)
PortableRemoteObject.narrow(home1,CommandLocalHome.class);
hope this helps (at least to find
It was just a problem of JBoss version!! Now it runs!!!
Bye bye! ;)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878575#3878575
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878575
So what i have to do?
I understood that probably it is a problem of version, now i'm trying to test
it on an older version of JBoss. But if that test would fail what i could do?
Thx a lot ;)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878569#3878569
Repl
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878554#3878554
Reply to the post :
http://www.jboss.org/index.html?module=bb&
Hi, again.
The interfaces are remote (I don't run the junit client inside JBoss,but in a
different virtual machine).
But, don't worry. It works fine now!!!
The error was mine.
The issue was that the Remote Interface name (HelloWorld) and the bean class
had the same name, and when the Eclipse sh
There should not be a need to cast the object returned from the create method.
The create method of the home interface should have a return type of the remote
interface already. If the home interface is a local home the return type
should be the local interface.
What does your home interface l
Hi all,
Since NOBODY reply my question, I'll answer it myself... the problem was
caused by wrong use of (Home/Remote) interface pairs.
If you're using LocalHome you MUST use the EJB's Local interface!
I hope this could help somebody...
View the original post :
http://www.jboss.org/index
What is the full exception produced by a e.printStackTrace() ?
Are you sure that your client has the same version of the interface as the
server?
Are you sure that your bean is configured to use the correct home interface?
View the original post :
http://www.jboss.org/index.html?module=bb&op=v
I included the jar file which contains the session bean in question in the WEB-INF/lib
directory, but I am still encountering this problem. I'm not sure exactly why this
ClassCastException is happening, but I found a post where the exact same problem was
encountered with Inprise app server and
OK, here is a summary of how I resolved this issue:
jbossweb-tomcat50.sar\META-INF\jboss-service.xml:
1. set attribute Java2ClassLoadingCompliance to false
2. set attribute UseJBossWebLoader to false
in building my war (which is included in the ear), I make sure that all required
library jar fil
I figured out how to do it.. For posterity I'll post it here...
| cst = connection.prepareCall("{call request_list.get_default_request_list
(?,?,?)}");
| cst.setInt(1, 1);
| cst.setInt(2, 1);
| cst.registerOutParameter(3, OracleTypes.CURSOR);
| cst.execut
After much experimentation, I have found that if I move the code that calls and loads
the TeacherApplicationBD class directly into a jsp, it works there. For some reason
when the TeacherApplicationBD class is loaded from an Action Class it causes the
ClassCastException inside the TeacherApplica
Yes it is as well.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838864#3838864
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838864
---
This SF.Net email is spons
is the web app packaged inside the ear?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838838#3838838
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838838
---
This
Yep, I had already read that page and decided it did not apply in this situation. Let
me explain my understanding of the problem.
The class that the code snippet is copied from is called TeacherApplicationBD
(business deligate) and it is packaged in the exact same jar that the ejb is packaged
http://www.jboss.org/wiki/Wiki.jsp?page=HotDeployClassCastExceptions
(this would (should) have come up in a search of the forums).
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838784#3838784
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=
BTW, this is with JBoss 3.2.4.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838723#3838723
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838723
---
This SF.Net em
now availabe through the wiki.
http://jboss.org/wiki/Wiki.jsp?page=HotDeployClassCastExceptions
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834661#3834661
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834661
---
Ok, thank you for your help.
Yes, it might be a good idea to post your explanation on the wiki.
Fred.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834648#3834648
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834
i posted this message back when the mailing lists were being used directly (as opposed
to now where we primarily use the forums and just see the messages via the list).
maybe i should turn this into the base for a wiki faq page since this topic seems to
be coming up a lot as of late.
-
The purpose of the PortableRemoteObject.narrow method is to handle the casting when
the object uses IIOP as the transport mechanism (corba or RMI/IIOP) and has nothing to
do with your problem. You should use this whenever downcast an object that may be
using IIOP, the lookup of a home interface
My experience so far is, that also for remote interfaces and calls, the simple cast is
enough in JBoss.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3822646#3822646
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=382264
"meerkat512" wrote :
| Using PortableRemoteObject.narrow() also results in a ClassCastException.
|
| Does this definitely work for you in the situation where you have an entity EJB
and the client is running in a different JVM than the server?
|
| When you write that I should not cast
Hi,
Using PortableRemoteObject.narrow() also results in a ClassCastException.
Does this definitely work for you in the situation where you have an entity EJB and
the client is running in a different JVM than the server?
When you write that I should not cast remote objects, is that a general J2
cc:
[EMAIL PROTECTED]Subject: [JBoss-user] [EJB/JBoss] -
Re: ClassCastException
cefor
"meerkat512" wrote :
|
| | Object o = context.lookup("FooHome");
| | FooHome home = (FooHome)o;
| |
|
You should not just cast remote objects, that does not work. Use something like this:
| object o=context.lookup(jndiName);
| FooHome home=javax.rmi.PortableRemoteObject.n
OK,
I have found a workaround from this post:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=9102&watch=topic&start=0
When I added the line
| Thread.currentThread().setContextClassLoader(FooHome.class.getClassLoader());
|
before my lookup, the code started working.
Is this a
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3821897#3821897
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3821897
Both the client and server are using sdk1.4.2. What are the "client jars" you're
reffering to? I tho
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3821668#3821668
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3821668
Have you updated the client to use the client jars from the new version of JBoss
instead of the old on
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3820809#3820809
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3820809
Ok,
that is interesting and we should document the errors better. The goal here is
CLEARLY to hav
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3820801#3820801
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3820801
Ok, so here is what I finally discovered as the root of my ClassCastException
problems. We have had mu
64 matches
Mail list logo