Me too ;-)

Karr, David wrote:

At end.

-----Original Message-----
From: Eddie Bush [mailto:ekbush@;swbell.net]

David M. Karr wrote:

"Eddie" == Eddie Bush <[EMAIL PROTECTED]> writes:

Eddie> Ok - you asked for it. Note that this error
*only* arises if I try to use the

Eddie> html tag (ELHtmlTag class). It occurs during
page compilation -

Eddie> not during execution.

Eddie> index.jsp [-1:-1] java.lang.ExceptionInInitializerError
Eddie> at java.lang.Class.forName0(Native Method)
Eddie> at java.lang.Class.forName(Class.java:130)

Eddie> Caused by: java.lang.NullPointerException
Eddie> at
Eddie>
org.apache.struts.util.MessageResources.getMessageResources(Me
ssageResources.java:577)

Eddie> at
org.apache.struts.taglib.html.HtmlTag.<clinit>(HtmlTag.java:91)

Ok, I've thought about this a bit, but I only have a minute
now.  I have a

couple of wild guesses to make.

Are you using Tomcat, and just using the Manager to "reload"
your application,

after you added the references to "html-el:html"? If so, do
a "remove" on the

application and reinstall it. If that works, I think this might be a
bug/feature in Tomcat, wrt reflection, classloading, and
BeanInfo classes.

Impossible. Recall (did I not mention this? maybe I didn't ...) I build an absolutely new app - very small - which includes that one tag. If I use the struts-html set all is good. If I use struts-html-el it ... pukes :-(

It's not a matter of running. It's *compiling* (hasn't run at this point) when the error occurrs. I do run Tomcat though, but this doesn't happen as part of a reload. This happens in Netbeans. It happens only if I use ELHtmlTag. It happens only during compilation. I'll move the app over to a webapp folder and see if it pukes under TC.

I'm not certain how compiling in Netbeans works.  I just use it as a
debugger and do a remote attach.

I believe your problem may be related to the fact that the BeanInfo class is
only loaded by reflection, and not by a direct reference.

In Netbeans, will it only compile and load the source files you explicitly
add to the project, or will it compile all the source files in a directory?
If it is somehow not compiling and loading the BeanInfo classes, you might
see this problem.

Ok - I build struts/struts-el/<insert any other .java sources here> by using ant directly. The JSP files I let NB handle whenever it things it needs to. That really isn't relevant here though, since I have a compiled binary distribution in a web application. I dump JARs into the app - compiled by ant from the command-line. In other words, if it's in need of compilation, it will get compiled. I love NB for easing certain things, but I *always* compile using ant. So - in essence, I'm working with a "nightly binary distribution". Compilation of the library has been done successfully. It's only when NB goes to compile the JSP page that it pukes.

So far as compilation goes (since you asked), NB will compile anything under a given leg that you tell it to compile. It relies on you "mounting" JARs and filesystems which contain the libraries you will be using (this is how you add things to your classpath). As I said though, this is not an issue.

The odd thing is that the ELHtmlTag class is the only one I've had problems with thus far. The others use bean info classes too, from what I can tell... so I'd think it would be a more widespread problem if it were something of that nature giving fits. I'm just a wee bit stumped.

I haven't had a chance to dump that little test app over to TC yet. I've got other fish that need fried. Once I do that I'll let you know what happens. Is it conceivable this would be a bug in ant? NB uses 1.4.1 (I believe) for things. Maybe I need to go figure out how to make ant 1.5 (my global install) do that too. :-/ IDEs are cool things, but they just don't move as fast as one might like wrt keeping pace on revisions of things.

--
Eddie Bush




--
To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to