You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Frank G (JIRA)" <ji...@apache.org> on 2007/04/02 07:37:32 UTC

[jira] Updated: (GERONIMO-3051) DB Viewer portlet error

     [ https://issues.apache.org/jira/browse/GERONIMO-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank G updated GERONIMO-3051:
------------------------------

    Attachment: GERONIMO-3051.patch

This is a general problem for any web application which uses standard tag in the jsp file like this:
    <sql:setDataSource
      var="ds"
      driver="org.apache.derby.jdbc.EmbeddedDriver"
      url="jdbc:derby:${db};create=true"
      user=""
      password=""
    />

The classloader hierarchy of any web application is something like bellow:
classloader(configuration org.apache.geronimo.configs/jee-specs/2.0/car)
       ^
      /|\
       |
classloader(configuration org.apache.geronimo.configs/rmi-naming/2.0/car)
       ^
      /|\
       |
     .....  
       ^
      /|\
       |
classloader(configuration org.apache.geronimo.application/any-web-application/1.0/car)

jstl-1.2.jar is included in classloader of configuration org.apache.geronimo.configs/jee-specs/2.0/car and the JDBC driver jar files are included in classloader of configuration org.apache.geronimo.application/any-web-application/1.0/car. So the classloader of configuration org.apache.geronimo.configs/jee-specs/2.0/car can not find the JDBC driver class defined in tag setDataSource.

Because the problem affects not only our web admin console, but also any web application which will use the above tag, my patch moved down jstl-1.2.jar from classloader of configuration org.apache.geronimo.configs/jee-specs/2.0/car to classloader of configuration org.apache.geronimo.application/any-web-application/1.0/car. One site effect of this solution is jstl-1.2.jar will be loaded many times in different web applications which use the standard tag lib, so I don't know if this is the best solution for this problem. What's your thought?

The patch was tested on Tomcat and Jetty.

> DB Viewer portlet error
> -----------------------
>
>                 Key: GERONIMO-3051
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3051
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: console, databases
>    Affects Versions: 2.0-M4
>         Environment: embedded Derby databases
>            Reporter: Hernan Cunico
>         Attachments: GERONIMO-3051.patch
>
>
> There is a problem when trying to view an embedded Derby database.
> I am able to successfully create a new DB with the DB manager and a new entry appears in the DB Viewer but when I try to view that DB from the DB Viewer I get a portlet error.
> When I check the logs I get this:
> 09:57:02,421 ERROR [listTables_jsp]] Servlet.service() for servlet jsp.WEB_002dINF.view.internaldb.listTables_jsp threw exception
> javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Error getting connection: "java.sql.SQLException: No suitable driver"
> ...
> 09:57:02,421 ERROR [[DBViewer]] Servlet.service() for servlet DBViewer threw exception
> javax.servlet.ServletException
> ...
> 09:57:02,453 ERROR [PortletInvokerImpl] PortletInvokerImpl.render() - Error while dispatching portlet.
> javax.portlet.PortletException
> ...
> With the exception of the "SystemDatabase" all the other databases created on the embedded Derby are also unaccessible from other applications.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.