You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2004/10/06 06:04:25 UTC

[OT] Display Tag Library problems with Weblogic 6.1

I'm trying for the first time to deploy the "displaytag" library to a 
Weblogic 6 server, and I'm getting an annoying error which I was not 
getting while developing locally under Tomcat 4.  Since I know a lot 
of Struts users use displaytag, and since I'm not subscribed to that 
list, I thought I'd see if anyone had any ideas.

When using the "displaytag-1.0-rc1.jar" retrieved from the iBiblio 
Maven repository, I get this error:

/Results.jsp(3): Error in using tag library 
uri='http://displaytag.sf.net/' prefix='display': For tag 'table', 
cannot load extra info class 'org.displaytag.tags.TableTagExtraInfo'
  probably occurred due to an error in /Results.jsp line 3:
<%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>

Changing the JSP so that it attempts to simply access the static 
'class' member of the TableTagExtraInfo class gets me an error "class 
file has wrong version 48.0, should be 47.0".  So... I decided to 
just try rebuilding the JAR from SourceForge CVS.  When I put that 
version of the JAR in place, the above error disappears, but now I 
get:

weblogic.servlet.jsp.JspException: (line 43): for tag 'table', 
property 'name' of tag handler class 'org.displaytag.tags.TableTag', 
the value must be a runtime expression "<%=...%>", since we cannot do 
an automatic conversion from "sessionScope.REGISTRATIONS" to type 
'java.lang.Object' and there is no custom property editor for that 
type

Now, this just seems ridiculous, as what conversion would need to be 
made to "java.lang.Object"?  Also, I thought that runtime expressions 
could only be Strings.

Well, believe it or not, using a Scriptlet to create a String whose 
value is "sessionScope.REGISTRATIONS" and then inlining that using an 
RT-expression, the thing just worked!

<% String freakishWeblogic61Hack = "sessionScope.REGISTRATIONS"; %>
<display:table name="<%= freakishWeblogic61Hack %>" export="true" 
id="row" requestURI="" cellpadding="5" cellspacing="0">

At this point, I'm sending this out in part just to get a solution 
into the google-net in case anyone else comes across the same 
problem.  But also, it just seems like a fragile little hack, and I'm 
wondering if anyone knows anything more about it.

Is anyone using displaytag with Weblogic 6.1? Thanks for any 
experiences, or even just ideas about how to debug it further.

Thanks,
   Joe

--
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
    - Carlos Santana

RE: [OT] Display Tag Library problems with Weblogic 6.1

Posted by Joe Germuska <Jo...@Germuska.com>.
At 1:31 AM -0400 10/6/04, David G. Friedman wrote:
>Joe,
>
>Dumb question for you: Is the taglib line in your displaytag using jsp
>really
><%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>

The uri is arbitrary, and just needs to match up with one 
<taglib-uri> element value in the web.xml file.  I chose to use the 
uris that will work with TLD auto-discovery for the eventuality that 
this app is used on a newer servlet container.  I knew the TLD was 
being read, because the errors were based on stuff that could only 
happen once it was processed -- "can't open X class" where "X class" 
is defined in the TLD, etc.

Thinking about this part this morning:

>weblogic.servlet.jsp.JspException: (line 43): for tag 'table',
>property 'name' of tag handler class 'org.displaytag.tags.TableTag',
>the value must be a runtime expression "<%=...%>", since we cannot do
>an automatic conversion from "sessionScope.REGISTRATIONS" to type
>'java.lang.Object' and there is no custom property editor for that
>type
>
>Now, this just seems ridiculous, as what conversion would need to be
>made to "java.lang.Object"?  Also, I thought that runtime expressions
>could only be Strings.

I realized that most older tags probably use Strings, primitives, or 
primitive wrapper classes as their property types, while displaytag 
uses "Object" for its "list" property because it can take advantage 
of JSTL-EL so that one can directly assign the object intended for 
display.  It's still weird, because the result of a runtime 
expression is always a String, so the net difference is zero.


>Well, believe it or not, using a Scriptlet to create a String whose
>value is "sessionScope.REGISTRATIONS" and then inlining that using an
>RT-expression, the thing just worked!
>
><% String freakishWeblogic61Hack = "sessionScope.REGISTRATIONS"; %>
><display:table name="<%= freakishWeblogic61Hack %>" export="true"
>id="row" requestURI="" cellpadding="5" cellspacing="0">


At 8:23 AM +0200 10/6/04, hermod.opstvedt@dnbnor.no wrote:
>Hei
>
>When you get a class version error, it often means that you are running
>under a version og Java that is lower than the one used to compile the
>class.

Yes, I partially understand this.  Weblogic 6.1 is designed to run 
with JDK 1.3, and we've never tried to make it run under JDK 1.4, 
since we're moving new projects to JBoss anyway.  That's why I 
rebuilt the JAR from the displaytag CVS repository.  However, I don't 
completely understand this, because I didn't change the JAVA_HOME 
that maven used to build the jar, which means that the one I built 
(which works) was also built with Java 1.4.  Do I have some 
compatibility setting enabled about which I was unaware?

Thanks for the responses, folks.  And, as noted, ultimately, it is 
working, and if we need to use displaytag for any of our other legacy 
weblogic apps, it seems as though this solution will work...

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn 
back; I'll know I'm in the wrong place."
    - Carlos Santana

RE: [OT] Display Tag Library problems with Weblogic 6.1

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Joe,

Dumb question for you: Is the taglib line in your displaytag using jsp
really
<%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>

Shouldn't it be something with a tld on it or be a local reference to a TLD
defined in your webapp's web.xml file?

For an old site using 1.0-rc1, I have a web.xml taglib entry:

<taglib-uri>/tags/display</taglib-uri>
	<taglib-location>/WEB-INF/displaytag.tld</taglib-location>
</taglib>

And JSP usage:

<%@ taglib uri="/tags/display" prefix="display" %>

Regards,
David

-----Original Message-----
From: Joe Germuska [mailto:Joe@Germuska.com]
Sent: Wednesday, October 06, 2004 12:04 AM
To: Struts Users Mailing List
Subject: [OT] Display Tag Library problems with Weblogic 6.1


I'm trying for the first time to deploy the "displaytag" library to a
Weblogic 6 server, and I'm getting an annoying error which I was not
getting while developing locally under Tomcat 4.  Since I know a lot
of Struts users use displaytag, and since I'm not subscribed to that
list, I thought I'd see if anyone had any ideas.

When using the "displaytag-1.0-rc1.jar" retrieved from the iBiblio
Maven repository, I get this error:

/Results.jsp(3): Error in using tag library
uri='http://displaytag.sf.net/' prefix='display': For tag 'table',
cannot load extra info class 'org.displaytag.tags.TableTagExtraInfo'
  probably occurred due to an error in /Results.jsp line 3:
<%@ taglib uri="http://displaytag.sf.net/" prefix="display" %>

Changing the JSP so that it attempts to simply access the static
'class' member of the TableTagExtraInfo class gets me an error "class
file has wrong version 48.0, should be 47.0".  So... I decided to
just try rebuilding the JAR from SourceForge CVS.  When I put that
version of the JAR in place, the above error disappears, but now I
get:

weblogic.servlet.jsp.JspException: (line 43): for tag 'table',
property 'name' of tag handler class 'org.displaytag.tags.TableTag',
the value must be a runtime expression "<%=...%>", since we cannot do
an automatic conversion from "sessionScope.REGISTRATIONS" to type
'java.lang.Object' and there is no custom property editor for that
type

Now, this just seems ridiculous, as what conversion would need to be
made to "java.lang.Object"?  Also, I thought that runtime expressions
could only be Strings.

Well, believe it or not, using a Scriptlet to create a String whose
value is "sessionScope.REGISTRATIONS" and then inlining that using an
RT-expression, the thing just worked!

<% String freakishWeblogic61Hack = "sessionScope.REGISTRATIONS"; %>
<display:table name="<%= freakishWeblogic61Hack %>" export="true"
id="row" requestURI="" cellpadding="5" cellspacing="0">

At this point, I'm sending this out in part just to get a solution
into the google-net in case anyone else comes across the same
problem.  But also, it just seems like a fragile little hack, and I'm
wondering if anyone knows anything more about it.

Is anyone using displaytag with Weblogic 6.1? Thanks for any
experiences, or even just ideas about how to debug it further.

Thanks,
   Joe

--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
    - Carlos Santana


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org