• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Deployment time NameNotFoundException

 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to deploy my EJBs to WebLogic 7.0, using JBuilder 8.0 (Enterprise). For some reason,
I'm getting a NameNotFoundException during deployment. I'd expect to see these at
runtime, but at deployment time, it suggests I have some configuration setting wrong--but I can't
find any. A co-worker has been able to successfuly deploy to and run his EJBs on the server.
Any ideas?

Log file:


Exception:

I do have an EJB named OrderCrosser in trading.jar (along with a few other beans, session, entity, and message-driver), however I never named it, placed it, or otherwise referenced it by app/ejb/trading.jar#OrderCrosser I'm guessing that's something WebLogic did and some setting is misconfigured.
--Mark

(Hmm, looks like the password is included in the error log, I better fix that :-)
[ December 17, 2002: Message edited by: Mark Herschberg ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually my first guess would be JBuilder 8 did something funny with the descriptors. It would be helpful to see the actual ejb-jar.xml and weblogic-ejb-jar.xml that gets generated by JBuilder.
Personally, I don't think you should use JBuilder to deploy your ejbs (and other J2EE components). It makes it very hard to create builds that are exactly reproduceable among all team members. You should look into using ANT to build your components to be deployed. This way all the team members can use the same build process and errors will be easily traceable. You can even use your ANT scripts to kick off Unit Tests. This can also lead itself easily to automation and allow you to take advantage of XP practices such as continous integration. I find continous integration extremely useful at identifying errors early.
As it is, you could merely have a difference in your JBuilder settings compared to your co-worker. This could be what is causing all of your problems.
Your problem could also result from the order of your deployments. Are you deploying separate ejb jars or just a single jar?
Last question, have you tried running ejbc on your jar outside of JBuilder? Does is pass compile correctly?
 
Mark Herschberg
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, thanks for replying, Chris.

Originally posted by Chris Mathews:
Actually my first guess would be JBuilder 8 did something funny with the descriptors. It would be helpful to see the actual ejb-jar.xml and weblogic-ejb-jar.xml that gets generated by JBuilder.


I was debating including them, I'll list them below.

Originally posted by Chris Mathews:
Personally, I don't think you should use JBuilder to deploy your ejbs (and other J2EE components). It makes it very hard to create builds that are exactly reproduceable among all team members. You should look into using ANT to build your components to be deployed. This way all the team members can use the same build process and errors will be easily traceable. You can even use your ANT scripts to kick off Unit Tests. This can also lead itself easily to automation and allow you to take advantage of XP practices such as continous integration. I find continous integration extremely useful at identifying errors early.


I would generally agree with you. However, We have only a 2 person development team, so coordinating settings shouldn't be too difficult. JBuilder has some nice features, like one-click deploy (and one-click unit testing, too), that make it very attractive, especially for small projects. We will probably ultimately switch to Ant at the end of development, so future iterations aren't tied to JBuilder, of course, event hen JBuilder can create the Ant files for us (I'll be sure to check them to make sure they are not JBuilder dependent).

Originally posted by Chris Mathews:
As it is, you could merely have a difference in your JBuilder settings compared to your co-worker. This could be what is causing all of your problems.
Your problem could also result from the order of your deployments. Are you deploying separate ejb jars or just a single jar?
Last question, have you tried running ejbc on your jar outside of JBuilder? Does is pass compile correctly?


Yes, it could be setting--although we haven't found anything yet.
Order of deployments? I'm deploying a single jar. Do you think I should put each bean into its own jar?
No, I haven't tried compiling seperately, but that's a good idea.
What we did find was some JBuilder idosynchrocies. In one case I accidentally had the bean set to "remote interface" as opposed to "local interface." I changed it using the EJB designer, but I didn't seem to update the descriptor files consistently with the other EJBs. We ultimately checked each JNDI name and interface name by hand to make sure we were calling the names to which they were set.

Here are the descriptor files:
ejb-jar.xml:


weblogic-ejb-jar.xml:

--Mark
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Herschberg
I'm deploying a single jar. Do you think I should put each bean into its own jar?


Keep them all in one jar. They will be easier to maintain and an ejb-jar with N ejbs deploys faster than N ejb-jars.

Mark Herschberg
What we did find was some JBuilder idosynchrocies.


This is another reason I prefer using a build tool like Ant.

Mark Herschberg
JBuilder can create the Ant files for us


Are you sure? I know JBuilder supports Ant (only the $3000 version mind you) but I wasn't aware it supported generating Ant scripts for projects.
Onward to your problem...
Your deployment descriptors look fine to me, except that you do not specify the WebLogic JMS Queue for your MDB in your weblogic-ejb-jar.xml.
Looking in Google Groups it appears others have had this same problem, most during runtime though. There is at least one post of someone having this problem during deployment and he was using JBuilder to deploy. JBuilder has had deployment bugs with WebLogic in the past, so that could be an issue.
Have you done a diff between your DDs and your co-workers? If they are the same then the only other thing I can suggest is to delete all of WebLogic's working directories (.wlstaging, .wlnotdelete, etc.) and try to manually deploy the ejb-jar. Drop the jar into your Application directory and deploy thru the Admin console. If that does not work, then try to deploy your co-worker's ejb-jar (which works right?) on your WebLogic Server. At this point you should be able to tell if it is your build or your server that is causing the problems.
 
Mark Herschberg
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, we're still not 100% certain of the cause, but it seems to be fixed. All I did was start over, and recreate the first bean. but the settings are all as before. My best guess is some bits didn't get switched when I switched some settings in the bean designer. Lesson learned: deploy one bean at a time. Thanks for your help, Chris.
--Mark
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Herschberg:
Well, we're still not 100% certain of the cause, but it seems to be fixed. All I did was start over, and recreate the first bean. but the settings are all as before. My best guess is some bits didn't get switched when I switched some settings in the bean designer. Lesson learned: deploy one bean at a time. Thanks for your help, Chris.
--Mark


That is why I dislike using tools like JBuilder that hide settings for the sake of simplicity. Things are great and wonderful... until they break.
 
Chris Mathews
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chris Mathews:

That is why I dislike using tools like JBuilder that hide settings for the sake of simplicity. Things are great and wonderful... until they break.


I just want to qualify my statements. I am referring to JBuilder's wizards, not JBuilder as an editor. I have used JBuilder since version 3.0 and it was my favorite IDE up until the first time I used IntellJ IDEA. IDEA is the best IDE I have ever used, regardless of platform (I have never worked with Smalltalk though).
 
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic