facebook

Tiles Definition Factory

  1. MyEclipse IDE
  2.  > 
  3. Comments
Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #218099 Reply

    Riyad Kalla
    Member

    Your post is much appreciated.

    #220721 Reply

    I had a similar problem, and somehow it seems related to the data-source section of the struts-config file …

    First I had everything working,nice and smooth, then i decided to fool around with datasources, so I added a datasource to the struts config. Now Tiles gave me that error message that it “Can’t get definitions factory from context.” Then when I deleted the datasource, the problem dissappeared …

    Any1 any ideas on this ?

    #220723 Reply

    Well, I checked my tomcat logs, and it seems something went wrong in the init() method of the actionservlet (i must have configured sth wrong), and as a result the plugins don’t get loaded either … so check your tomcat (or whatever jsp/servlet container you’re running) logs, and check what went wrong in the init() method, or wherever else

    #220724 Reply

    Then of course my question becomes: what have i done wrong with my data-sources ?

    <data-sources>
        <data-source key="libDB" type="org.apache.commons.dbcp.BasicDataSource">
        <set-property property="driverClass" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
    <set-property property="url" value="jdbc:microsoft:sqlserver://onuris.groept.be:1437;DatabaseName=ict4g11"/>
    
                <set-property property="user"
    
                              value="xxxxx"/>
    
                <set-property property="password"
    
                              value="xxxxx"/>
    
                <set-property property="description"
    
                              value="MS SQL Server Data Sourced"/>
    
                <set-property property="autoCommit"
    
                              value="true"/>
    
                <set-property property="maxCount"
    
                              value="20"/>
    
                <set-property property="minCount"
    
                              value="2"/>
    
            </data-source>
    
        </data-sources>

    I have the ms*.jar MS JDBC driver jars in the WEB-INF dir, is that sufficient?

    #220725 Reply

    Then of course my question becomes: what have i done wrong with my data-sources ?

    <data-sources>
    <data-source key="libDB" type="org.apache.commons.dbcp.BasicDataSource">
    
        <set-property property="driverClass" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
    
        <set-property property="url" value="jdbc:microsoft:sqlserver://onuris.groept.be:1437;DatabaseName=ict4g11"/>
    
        <set-property property="user"  value="xxxxxx"/>
    
        <set-property property="password" value="xxxxxx"/>
    
        <set-property property="description"  value="MS SQL Server Data Source"/>
    
        <set-property property="autoCommit" value="true"/>
    
        <set-property property="maxCount" value="20"/>
    
        <set-property property="minCount" value="2"/>
    
    </data-source>
    
    </data-sources>
    

    I have the ms*.jar MS JDBC driver jars in the WEB-INF dir, is that sufficient?

    #224920 Reply

    pwhelan
    Member

    @mercnboy3 wrote:

    I hate when I read through a whole thread and the problem was never resolved. So to keep you from scratching your head. If you have a working implementation and cannot get it to work on a new machine do the following:

    Put these in the action-mappings tag in struts-config.xml

    <action path=”/admin/tiles/reload”
    type=”org.apache.struts.tiles.actions.ReloadDefinitionsAction”/>
    <action path=”/admin/tiles/view”
    type=”org.apache.struts.tiles.actions.ViewDefinitionsAction”/>

    and go to url http://host_name/context_path/admin/tiles/reload.do

    apparently it is not read on startup.

    Now, next time you cannot find an answer but find alot of old posts, please pay it forward and post your solution.

    Hello I have the same problem,

    I did what was recommended in the previous link, the tiles/reload.do link printed OK to my browser.
    Then I went back to the url of my webapp and it worked.

    However when I restart my tomcat the problem comes back. I am guessing it is like mercnboy3 said the tiles-def or the tiles plugin is not being read on start up.

    Does anyone know how to get it read on start up without having to go to the link listed above.

    #224995 Reply

    pwhelan
    Member

    I managed to fix the above problem, my issue was an additional plugin being loaded in my struts config was throwing an exception and for some reason this seemed to be throwing my tiles-def.xml out of scope or it was somehow killing my session. I removed that plugin and it seems to have fixed the problem.

    #284305 Reply

    sbb360
    Member

    Hi
    Thanks all for the valuable input. The relode.do really works. But when I restart the server I have the same problem stated below. This is a major problem for me because I am using a shared hosting and they restart the server every time that can cause many problems. I have subscribed for so many portals like even experts exchange but I was unable to get an answer. I need it to find the defs and upload them automatically.

    Thanks in advance.

    javax.servlet.ServletException: Can’t get definitions factory from context.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:117)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    root cause

Viewing 8 posts - 16 through 23 (of 23 total)
Reply To: Tiles Definition Factory

You must be logged in to post in the forum log in