Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuse
AppFuse_it
AppFuse_jp
AppFuse_zh
Downloads
LeftMenu
Main
StrutsResumeSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseSupport


This is version 76. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


This is a list of questions that relate to AppFuse. You might also checkout the AppFuse Tutorials and StrutsResume Support pages. The Mailing List Archives or the AppFuse IRC channel might also be helpful.

Table of Contents

  • [1] Common Questions
  • [2] Development with AppFuse
  • [3] Security Questions
  • [4] Struts Specific HowTos
  • [5] Database Questions and HowTos
  • [6] Application Server Questions and HowTos
  • [7] Using Anthill and CruiseControl
  • [8] Hibernate Specific Questions
  • [9] Archived Questions

Common Questions [#1]

  • Where is UserForm.java?
The UserForm.java file is generated by XDoclet using Ant. If you run "ant compile" it gets generated into build/web/gen/org/appfuse/webapp/form.
This article explains it best.
  • Is this the right place to ask AppFuse questions?
Sure, but you'll probably get more visibility and input from the help forum or mailing list. Also, this wiki has recently been locked down b/c of spammers so you'll need to get a username/password from me to post anything. Don't forget that the mailing list archives are a great resources.
  • Why am I getting this error "Cannot create JDBC driver of class ' ' for connect URL 'null'"?
Chances are you forgot to run "ant setup-tomcat" (or "ant setup" if you need to set up the database as well).

Development with AppFuse [#2]

  • HowTo setup your Development Environment. This is what I typically use when building a new machine. It includes environment variables, downloads, where to install applications, etc.
  • What are the major ant tasks? What do they do?
See AppFuseAntTasks.

Security Questions [#3]

  • HowTo use NTLM authentication with appfuse? Using the jCIFS, one can use the jcifs.http.NtlmHttpFilter to use the NTLM authentication in Tomcat. Matt can you give some pointers if this can be integrated with AppFuse?
Here is how I used Andy Armstrong's JAAS Login Modules to get Tomcat to talk to an NT Domain. It's been over a year since I tried it - but it worked quite well at the time. I have no experience with jCIFS - but if you get it working - please let me know. I'd be happy to help you write a howto on this wiki for it. ~ Matt

Struts Specific [#4]

Database Specific [#5]

  • I get an "access denied" error when trying to create the MySQL Database.
The issue is likely because you're on Unix or you've changed the root password. See this page for assistance.
  • I get an "Illegal mix of collations" when I try to run tests against a MySQL database.
MySQL 4.1.7 requires you to add set the default character set to UTF-8 to get unicode support with AppFuse. To do this, add the following to your c:\Windows\my.ini or /etc/my.cnf file:
[mysqld]
default-character-set=utf8
  • I'm have methods that throw exceptions in a Transaction and nothing is being rolled back. What gives?
MySQL's default tables (MyISAM) do not support transactions by default. Add or replace the following line in your c:\Windows\my.ini or /etc/my.cnf file. You could also use PostgreSQL.
[mysqld]
default-storage-engine=innodb
NOTE: You may see default-storage-engine's synonym "default-table-type" in the configuration file. If so, set the value of that parameter to "innodb" instead.
BTW, MySQL Administrator is a nice tool for administering/monitoring MySQL.
  • I'm having trouble with MySQL on Suse 9.2.
Upgrading to the MySQL 3.1.5 JDBC Driver (or above) should fix this.
  • I get an "Could not synchronize database state with session" exception when I try to run test-dao.
If a class with a natural key does not declare a version or timestamp property, it's more dificult to get saveOrUpdate() and cascades to work correctly. You might use a custom Hibernate Interceptor as discussed in this chapter. (On the other hand, if you're happy to use explicit save() and explicit update() instead of saveOrUpdate() and cascades, Hibernate doesn't need to be able to distinguish between transient and detached instances; so you can safely ignore this advice.) Composite natural keys extend the same ideas. {Hibernate in Action: pag.:333}

Application Server Specific [#6]

See AppFuseOnOrion - Orion is the embedded server in Oracle AS.

Continuous Integration [#7]

Hibernate Specific Questions [#8]

The DAO layer has the Hibernate sessionFactory injected (made available) to it through Spring and this entry in applicationContext-hibernate.xml:
<property name="sessionFactory"><ref local="sessionFactory"/></property> 

So to access the Hibernate session from within your DAO, place a method like this in your DAO:


    	Session session = SessionFactoryUtils.getSession(getSessionFactory(), false);

  • How do I get hold of the Hibernate session in my View code?
To get hold of the Session in the view code, you need to lookup the SessionFactory defined in the applicationContext-hibernate.xml:
    private void createApplicationContext() {
        if (ctx == null) {
            ctx =    
          WebApplicationContextUtils.getRequiredWebApplicationContext(servlet.getServletContext());
        }
    }

    public net.sf.hibernate.Session getCurrentHibernateSession() {
    	createApplicationContext();
    	
        SessionFactory sessionFactory = (SessionFactory)ctx.getBean("sessionFactory");
        SessionHolder sessionHolder = (SessionHolder)TransactionSynchronizationManager.getResource(sessionFactory);
        net.sf.hibernate.Session currentSession = null;
        Transaction currentTransaction = null;
        
        if (sessionHolder!=null) {
           currentSession = sessionHolder.getSession();
           currentTransaction = sessionHolder.getTransaction();
        }         
        return currentSession;
    }

Archived Questions (no longer relevant) [#9]



Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:27 MST by BenGill.