• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Annoying error_java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory.createNewArra

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

After undergoing through many hardships and removing many compiling, spec violation and datasource configuration errors , finally I was glad that I'm going to run my first CMP beans in JBoss container. But my happiness did not last long as I started facing a very annoying and weird error message during ear deployment which I could not get rid off. I'm seeing the following error in server.log



and some where before this, I have the below error stack


Are there any library version conflicts here ?

I'm using JBoss 4.0.4 as AS, jdk1.4.2 and EJB 2.1.

In case you suspect errors in code, I would be glad to copy them here, but I just do not want to throw all the stuff on to this thread if not needed.

Any help is highly appreciated.
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could some one look into this and advice? If this is not the right group, please advice, if this post can be moved to some other group.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like a jar (version) conflict. Are you packaging any jars containing org.apache.bcel.* in your application?

By the way, any specific reason for using such a old version of JBoss AS?
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Jai. I'm deploying
the following jars along with my ear.

jboss-j2ee.jar
log4j.jar
xerces.jar
xml.jar

There is no specific reason for using 4.0.4 version. Since I'm just learning, I did not bother to have the latest version of AS. Do you suspect anything caused by older version.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jboss-j2ee.jar
log4j.jar
xerces.jar
xml.jar



Don't package jboss-j2ee.jar in your application. You *may* package the other 3 jars in your app, but that will require some additional classloading configurations for things to work properly. Since you are just getting started, I would recommend you remove those 3 jars too from the application packaging. JBoss already ships those.

There is no specific reason for using 4.0.4 version. Since I'm just learning, I did not bother to have the latest version of AS. Do you suspect anything caused by older version.



Can't say for sure whether this is because of the older version. But it's always better to start off with the latest stable versions because they will have any bug fixes that might be related to your issue. I would recommend that you use JBoss AS 5.1.0 (that's currently the latest stable version).

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, EJB2.x is old too. You might want to start working with EJB3, but I'll leave that to you to decide depending on your technical requirements.
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm,

Instead of deploying in JBoss 4.0.4, I compiled my files with jdk1.6 and deployed in JBoss 4.2.3 version and was able to get around the issue. But now it seems some thing else is breaking and now this seems to be more from my components. My design is as follows,

I'm using a standalone client (no specific reason to use standalone. I'm just concentrating on EJBs not web currently). This standalone obtains a reference of a stateless session bean through JNDI (remote reference) and and calls a business method to insert a Employee object. Session Facade, in turn obtains a local home interface of entity beans through JNDI and then calls create method on this. This is the objective in short.

I checked the deployment status of my beans and I see my datasource, session facade is bound to JNDI. However I do not see JNDI bound for Employee as expected.

For my SessionFacade - MyEJB/Facade is correct JNDI name given in Jboss.xml and MyEJB/Employee for my entity bean. But from below JMX, I see local/Employee. I do not know why.


jndiName=MyEJB/Facade,plugin=pool,service=EJB
jndiName=MyEJB/Facade,service=EJB
jndiName=local/Employee@17326134,plugin=cache,service=EJB
jndiName=local/Employee@17326134,plugin=pool,service=EJB
jndiName=local/Employee@17326134,service=EJB
module=MyEJB.jar,service=EjbModule
service=ClientDeployer
service=EARDeployer
service=EARDeployment,url='MyEJB.ear'



Now coming to my problem. I was able to obtain the home reference of Session bean, but when I invoke create method on home interface, boom.... I'm getting an exception, which I never recollect of seeing before.



I know, this information is not really sufficient to pinpoint but I'm just curious if the issue can be found with this information. If needed, I'm glad to put all the files here.
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

By the way, EJB2.x is old too. You might want to start working with EJB3, but I'll leave that to you to decide depending on your technical requirements.



I'm just curious to know, how far EJBs have travelled leaving 2.x behind (I mean literally in the practical world). To be honest with you, in our projects we are using ejbs 1.1 (I swear) and I assume this might be the case with many legacy projects. Do you suggest it is not worthy, spending time in learning 2.x version, when 3.x is sweeping. I thought, it is only the way ejbs are coded, is different in 3.x from its earlier versions but soul remained the same.
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help on this.

If this question needs to be moved to a different group, please advice how to do that.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Raja wrote:Any help on this.

If this question needs to be moved to a different group, please advice how to do that.



A bit of patience is all that's required
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Raja wrote:
I'm just curious to know, how far EJBs have travelled leaving 2.x behind (I mean literally in the practical world). To be honest with you, in our projects we are using ejbs 1.1 (I swear) and I assume this might be the case with many legacy projects.



Yes, that's correct. There are a lot of applications out there which still use EJB2.x. But I haven't heard of many EJB1.x apps.

EJB3 is backward compatible. What this means is, you can use EJB2.x semantics within a EJB3 app.

Kumar Raja wrote:
Do you suggest it is not worthy, spending time in learning 2.x version, when 3.x is sweeping. I thought, it is only the way ejbs are coded, is different in 3.x from its earlier versions but soul remained the same.



EJB3 (and EJB3.1) development is way easier compared to EJB2.x. If you are going to start a new application, then there is no point in using EJB2.x. But however, if there are existing apps which you are working on, which use earlier versions, then you don't have a choice - you'll have to learn the previous versions.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kumar Raja wrote:
Now coming to my problem. I was able to obtain the home reference of Session bean, but when I invoke create method on home interface, boom.... I'm getting an exception, which I never recollect of seeing before.





Looks like the objects being passed around are not serializable? But that's just a guess, since I don't know about the example you are trying.

By the way, If you are interested in EJB3 tutorials, you can find them here
 
Kumar Raja
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



JaiKiran

A bit of patience is all that's required




I agree .

I will cross check my code again and see If I could figure out anything.

By the way thanks for the link to ejb3.
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic