The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
J2SE 1.4.2 + WLS 7.0 + weblogic.ejbc = Problem

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Joey Gibson

Posts: 71
Nickname: joeygibson
Registered: Jun, 2003

Joey Gibson is an opinionated software architect who blogs about technology, politics, music, etc.
J2SE 1.4.2 + WLS 7.0 + weblogic.ejbc = Problem Posted: Aug 24, 2003 3:17 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Joey Gibson.
Original Post: J2SE 1.4.2 + WLS 7.0 + weblogic.ejbc = Problem
Feed Title: Joey Gibson's Blog
Feed URL: http://www.jobkabob.com/index.html
Feed Description: Thoughts, musings, ramblings and rants on Java, Ruby, Python, obscure languages, politics and other exciting topics.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Joey Gibson
Latest Posts From Joey Gibson's Blog

Advertisement
I discovered something interesting the other day at the office. We have a guy who has been unable to build a certain entire jar of entity beans ever since he started working there and I had only given it scant thought as to why. I knew that I had had no problems... So he came by my office on Wednesday and I said "OK. Let's figure this out." I ran our Ant build file that is specifically used for building this particular jar full of entity beans and got the same errors he was reporting. Odd, thought I. The errors being reported by ejbc were that the compiler couldn't resolve symbols with names like Foo$ValueObject. That was odd since that looked like the inner classes defined in each of the entity beans were not there. But looking at the classes directory, those classes were definitely there. What was really odd was that simply dropping back to J2SE 1.3.1, or even 1.4.1 worked.

For reference, we have a group of entity beans that each have a nested class called ValueObject. (I don't particularly like that, but they're there nonetheless.) Essentially we have 80 entity interfaces that follow this basic pattern:
public interface Foo extends EJBLocalObject
{
   ...

   public ValueObject getValueObject()
   
   public static class ValueObject
   {
       ...
   }
}
and then 80 entity bean classes that actually implement the getValueObject method.

It was at this point that I started looking at that "$" in the class name. It then hit me that the code should be using a "." between the outer and inner class names, not a "$". But the code where the error was occurring was generated by ejbc. I've tried this now with WLS 7.0 sp2 and sp3 and the results are identical.

Even though I've not been able to find this documented in the release notes of J2SE, it would appear that versions prior to 1.4.2 allowed code to specify an inner class using a dollar sign, even though it was not technically correct, and that 1.4.2 has stopped being lenient in this regard. Yes, I know that WLS 7 is not officially supported with 1.4.2... I haven't tried with WLS 8 yet; I would assume that since it is supported with 1.4.2 they've changed the code generation routines inside ejbc.

So the moral of the story is that if you find yourself needing to run WLS 7 with J2SE 1.4.2, and you happen to have entity beans that you need to run through ejbc, first run your build file for those entities using J2SE <= 1.4.1, and run everything else under 1.4.2.

Read: J2SE 1.4.2 + WLS 7.0 + weblogic.ejbc = Problem

Topic: Einfuhrung in Ruby: Chapter 4 Previous Topic   Next Topic Topic: Kata Two Worked (continued) -- Eliminating Tail Recursion

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use