Opened 16 years ago

Closed 11 years ago

Last modified 11 years ago

#1059 closed defect (worksforme)

JasperException: Unable to find setter method for attribute: direction when running IBM's java

Reported by: base Owned by: everyone
Priority: trivial Milestone:
Component: web Version: trunk
Keywords: Cc:

Description

I'm attempting to use BASE 2.6.3. I only have Tomcat5 available, and so I cannot use BASE 2.7. I can log in to the BASE interface just fine and everything looks normal, but when I try to access many (but not all) of the menu items, I get the error below. Any idea how to fix the problem?

org.apache.jasper.JasperException: /admin/users/list_users.jsp(214,2) Unable to find setter method for attribute: direction

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148) org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2722) org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2876) org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2188) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1686) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1706) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1706) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2214) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2220) org.apache.jasper.compiler.Node$Root.accept(Node.java:457) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2164) org.apache.jasper.compiler.Generator.generate(Generator.java:3322) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199) org.apache.jasper.compiler.Compiler.compile(Compiler.java:296) org.apache.jasper.compiler.Compiler.compile(Compiler.java:277) org.apache.jasper.compiler.Compiler.compile(Compiler.java:265) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:72)

Change History (9)

comment:1 by Nicklas Nordborg, 16 years ago

I think this is a Tomcat-related problem. Which Tomcat5 version are you using? You need at least Tomcat 5.5.16. If you already have this Tomcat version, please give more information about the rest of your system, such as which Java version you are using, operating system etc. Eg. the information in the Help -> About -> Configuration dialog.

in reply to:  1 comment:2 by base, 16 years ago

Replying to nicklas:

I think this is a Tomcat-related problem. Which Tomcat5 version are you using? You need at least Tomcat 5.5.16. If you already have this Tomcat version, please give more information about the rest of your system, such as which Java version you are using, operating system etc. Eg. the information in the Help -> About -> Configuration dialog.

Hi there,

Thanks. Here is the information:

Version BASE 2.6.3 (build #4283; schema #52) Web server Apache Tomcat/5.5.23 Database Server MySQL 5.0.45 Database Dialect org.hibernate.dialect.MySQLInnoDBDialect JDBC Driver com.mysql.jdbc.Driver (version 5.0) Java runtime Java(TM) SE Runtime Environment (2.4), IBM Corporation Operating system Linux amd64 2.6.18-53.1.14.el5 Memory Total: 85.7 MB Free: 35.5 MB Max: 512.0 MB

comment:3 by Nicklas Nordborg, 16 years ago

Have you tried using Sun's Java runtime?

in reply to:  3 comment:4 by base, 16 years ago

Yes, that fixed the problem! Thanks a lot.

comment:5 by Nicklas Nordborg, 16 years ago

Priority: majortrivial
Summary: BASE 2.6.3 errorJasperException: Unable to find setter method for attribute: direction when running IBM's java
Version: trunk

I have checked with IBM's java runtime (version 6) and I get the same error with BASE 2.8. I guess this means that there is a difference in their implementation of the reflection API (assuming that this is what Tomcat uses to find the setDirection() method).

The problem may be related to that there are actually two setDirection() methods in the Table taglib (http://base.thep.lu.se/browser/trunk/src/clients/web/net/sf/basedb/clients/web/taglib/table/Table.java#L372). If i remove the one with a String parameter the error goes away. I am not completely sure that the other method isn't used somewhere else so this is not a solution. There may also be other taglibs that uses a similar setup.

I'll leave this ticket open if someone wants to have a go at fixing it.

comment:6 by Nicklas Nordborg, 16 years ago

Milestone: BASE 2.8.1

comment:7 by Jari Häkkinen, 16 years ago

Milestone: BASE 2.8.3BASE 2.x+

comment:8 by Jari Häkkinen, 11 years ago

Resolution: worksforme
Status: newclosed

If this is an issue try another java RTE (tomcat with Oracle java RTE).

comment:9 by Nicklas Nordborg, 11 years ago

Milestone: BASE Future Release
Note: See TracTickets for help on using tickets.