[appfuse-user] Need Help for Web services using struts framework

2007-02-14 Thread Sarav
I want to resue my business logic from struts action class file to create a web services without changing any code. I put my logic in service.impl classes file and invoke the method from action file. I can't access the dao.getObject(class,id). Whether we need to create a se

[appfuse-user] txProxyTemplate bean not found

2007-02-14 Thread 23455432
I am going through the tutorial to get a dwr page working and when I deploy I have the following error: ERROR [main] [/shotoncall].listenerStart(3767) | Exception sending context initialized event to listener instance of class org.appfuse.webapp.listener.StartupListener org.springframework.beans

Re: [appfuse-user] apfuse2+hibernate - GenericDaoHibernate getAll returns duplicate entities (users)

2007-02-14 Thread Bryan Noll
OK... so I accidentally stopped short of actually addressing your issue. So, I added another test as follows: public void testGetAllUsers() throws Exception { System.out.println("# testGetAllUsers #"); super.assertEquals(2, dao.getAll().size()); } ...and I'm having the same

Re: [appfuse-user] apfuse2+hibernate - GenericDaoHibernate getAll returns duplicate entities (users)

2007-02-14 Thread Bryan Noll
OK... so it might help to see the code from your GenericSearchDaoHibernate class, but I it works just fine for me with the following: Assuming you checked out from the following (which by the way, the suggested way for using appfuse 2 is not to use the code directly as you did with appfuse 1,

[appfuse-user] Maven 2.0.5 Released

2007-02-14 Thread Matt Raible
FYI... Maven 2.0.5 has been released: http://blogs.maven.org/jvanzyl/2007/02/14/117149034.html I've been using this release for about a week and it seems to work fine with AppFuse 2.0 and JDK 5. A few minutes ago I tried it with AppFuse and JDK 6. While it gets a lot farther than before, i

Re: [appfuse-user] canoo test fails

2007-02-14 Thread Matt Raible
If you look in build/test/web-tests (or something like that), you should be able to sort the HTML files by created date. Open the most recent one and you should see the last page rendered by WebTest. Matt On 2/14/07, hquinn <[EMAIL PROTECTED]> wrote: Greetings everyone, I have an error when I

[appfuse-user] canoo test fails

2007-02-14 Thread hquinn
Greetings everyone, I have an error when I run the canoo test and I dunno why.. can someone help me? BUILD FAILED /home/hazelq/workspace/dif/build.xml:634: The following error occurred while executing this line: /home/hazelq/workspace/dif/build.xml:599: The following error occurred while executing

Re: [appfuse-user] apfuse2+hibernate - GenericDaoHibernate getAll returns duplicate entities (users)

2007-02-14 Thread Bryan Noll
Also, is the relationship truly unidirectional as you've specified, or is there a corresponding @ManyToOne annotation on the Test object? Bryan Noll wrote: How many Test objects are there in the database? 5 I'm guessing... ros wrote: (Appguse2 Hibernate) I've added OneToMany relation with Fe

Re: [appfuse-user] apfuse2+hibernate - GenericDaoHibernate getAll returns duplicate entities (users)

2007-02-14 Thread Bryan Noll
How many Test objects are there in the database? 5 I'm guessing... ros wrote: (Appguse2 Hibernate) I've added OneToMany relation with FetchType.EAGER from User pojo to Test pojo. Now GenericDaoHibernate getAll returns 5 users, but in database there are 2 users - one amin user and one tomcat use

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread 23455432
Once again, the solution worked. Thanks a bunch. I am learning, the good way. :) ~rk Matt Raible-3 wrote: > > If you have Controller, you're not using Struts - you're using Spring MVC. > ;-) > > If you look at the latest code for UserFormController.java in > Subversion, we've changed the for

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread Matt Raible
If you have Controller, you're not using Struts - you're using Spring MVC. ;-) If you look at the latest code for UserFormController.java in Subversion, we've changed the formBackingObject method so it re-fetches the user from the database before populating it with request parameters. If you chan

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread 23455432
I think I must be missing something. I only have xdoclet tags in my User.java and Person.java My UserController and UserFormController don't have any tags - are those the files you were referrign to? They do use the request to get information. Should I change that to session? Matt Raible-3 wro

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread Matt Raible
You could do this for your person list, but it'd be a pain because you'd have to use the tag and write out all your properties properly. The easier thing to do is look in your XDoclet tags at the top of your UserAction.java and change request to session. Matt On 2/14/07, 23455432 <[EMAIL PROTE

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread 23455432
I am using STruts. In which case, I should put the form in session. What does that mean? I noticed that in the form there are some hidden inputs like Should I do the same for my personList? thanks. Matt Raible-3 wrote: > > On 2/14/07, 23455432 <[EMAIL PROTECTED]> wrote: >> >> I have a us

Re: [appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread Matt Raible
On 2/14/07, 23455432 <[EMAIL PROTECTED]> wrote: I have a user object that contains many persons in a one-to-many bag relationship. The relationship is set up as follows: // USER class /** * @hibernate.bag name="persons" lazy="false" cascade="save-update" * @hibernate.collection-key

[appfuse-user] Parent object updates child object in one-to-many

2007-02-14 Thread 23455432
I have a user object that contains many persons in a one-to-many bag relationship. The relationship is set up as follows: // USER class /** * @hibernate.bag name="persons" lazy="false" cascade="save-update" * @hibernate.collection-key column="user_id" * @hibernate.collection-one

Re: [appfuse-user] Netbeans 5.5 with warpath

2007-02-14 Thread johne
This Ant to Maven2 thing has been driving me a bit nuts, but changed requirements has forced us to go this way pretty much. We now have to have the same code base produce multiple web sites now. Here is the new Jira issue: http://issues.appfuse.org/browse/APF-645 Any help would sure save me a

Re: [appfuse-user] DWR with DisplayTag

2007-02-14 Thread Matt Raible
I've used AjaxAnywhere with DisplayTag, but never DWR. http://raibledesigns.com/rd/entry/the_future_of_the_displaytag Matt On 2/14/07, misun chung <[EMAIL PROTECTED]> wrote: Hi all, I implemented DWR function to display a table. But is there a way to use DisplayTag with DWR? I just want to h

Re: [appfuse-user] Type safety and generics in Service

2007-02-14 Thread Matt Raible
If you can change your code to use Generics and everything works - we'd be happy to change the tutorial. Matt On 2/14/07, PeteTh <[EMAIL PROTECTED]> wrote: The examples in Tutorial show public class PersonManagerImpl implements PersonManager { private PersonDao dao; declaring the dao li

Re: [appfuse-user] ajax4jsf depencies (equinox/appfuse)

2007-02-14 Thread Matt Raible
I've tested this release with Equinox and AppFuse 2.0 and everything seems to work fine. Matt On 2/14/07, jclagache <[EMAIL PROTECTED]> wrote: It seems to fix the problem, but i prefer to test it better to be sure ... JCL Matt Raible-3 wrote: > > It looks like this may be fixed in the 1.0.6

[appfuse-user] DWR with DisplayTag

2007-02-14 Thread misun chung
Hi all, I implemented DWR function to display a table. But is there a way to use DisplayTag with DWR? I just want to have paging table instead of a long list. Thanks!

[appfuse-user] Type safety and generics in Service

2007-02-14 Thread PeteTh
The examples in Tutorial show public class PersonManagerImpl implements PersonManager { private PersonDao dao; declaring the dao like this means the methods have to do a cast :- public Person getPerson(final Long id) { return (Person) dao.get(id); } I though

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-14 Thread Matt Raible
You haven't answered my first question: ;-) If you enter a date through your database console and then view the record in your browser - what date format does it use? If you don't modify the date, does it allow you to save it? Matt On 2/14/07, Fan <[EMAIL PROTECTED]> wrote: This is the Person

Re: [appfuse-user] why illegal access to lazy collection with collection in commonclipse methods

2007-02-14 Thread Jason Brice
IMO you definitely want to avoid any lazily-loaded property as part of equals/hashcode. There was an interesting thread on the Hibernate forums on the topic of equals / hashCode: http://forum.hibernate.org/viewtopic.php?t=928172 The larger point is how do you define object identity. The Hibernat

Re: [appfuse-user] Fix lazy-loading errors in StrutsTestCase

2007-02-14 Thread Matt Raible
In 2.0, this is done for everything but JSF. In 1.9.x, I was never able to get this to work properly with StrutsTestCase. You could probably use the trick where you keep the Hibernate Session open in a ThreadLocal. http://issues.appfuse.org/browse/APF-171 Matt On 2/14/07, Sanders, Corey <[EMA

Re: [appfuse-user] mvn jetty:run-war

2007-02-14 Thread Matt Raible
Do you already have something running on port 8080? You could try changing the default Jetty port to something else: http://andyhot.di.uoa.gr/blojsom/blog/default/java/2007/01/12/Controlling-Jetty-port-in-Maven-2.html You could also try running "mvn cargo:start -Dcargo.wait=true". Matt On 2/1

[appfuse-user] Fix lazy-loading errors in StrutsTestCase

2007-02-14 Thread Sanders, Corey
I am running APPFUSE 1.94 w/ Struts and Hibernate. When I run test-web for testcases that use objects that have lazy-loaded relationships, I am getting lazy-loading exceptions. I believe this is a known issue. I found the JIRA once before, but can't seem to located it now. Anyway, if I recall corre

Re: [appfuse-user] Refresh page with table displaytag consumes too much memory

2007-02-14 Thread Matt Raible
Which web framework and version of AppFuse are you using? You might try using a profiler like JProfiler to see where your hotspots are. Matt On 2/14/07, misun chung <[EMAIL PROTECTED]> wrote: Fan, I just checked the memory usages manually. Whenever I click something in appfuse, it increases 1

Re: [appfuse-user] Capturing and displaying picture as part of registration process

2007-02-14 Thread Richard Nduka
Thanks a mill Mike. It worked. On 2/14/07, Michael Horwitz <[EMAIL PROTECTED]> wrote: Richard, I think the key to your problem lies right at the bottom of the stack trace: Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use

Re: [appfuse-user] Refresh page with table displaytag consumes too much memory

2007-02-14 Thread misun chung
Fan, I just checked the memory usages manually. Whenever I click something in appfuse, it increases 1MB of memory. And it never release the memory. On 2/14/07, Fan <[EMAIL PROTECTED]> wrote: Sorry I dont have solution here, but would you like to share how do you monitor the usage of memory ?

Re: [appfuse-user] Refresh page with table displaytag consumes too much memory

2007-02-14 Thread Fan
Sorry I dont have solution here, but would you like to share how do you monitor the usage of memory ? nadragon wrote: > > Hi all, > > I added auto refresh into a listPage, which uses a display tag to display > a > table. > > > //refresh this page every 15 > seconds. > > > > But then I f

[appfuse-user] Refresh page with table displaytag consumes too much memory

2007-02-14 Thread misun chung
Hi all, I added auto refresh into a listPage, which uses a display tag to display a table. //refresh this page every 15 seconds. But then I found that the browser keeps the data and increases memory usages every time it refreshes. So I added the following scripts, not to store any data in

Re: [appfuse-user] mvn jetty:run-war

2007-02-14 Thread jamdiazdiaz
Hello friends. I have the same problem, this is my log: [INFO] Starting jetty null ... 2007-02-14 10:31:59.781::INFO: jetty-6.0.x 2007-02-14 10:32:11.515::INFO: Extract jar:file:/C:/appfuse/elias/target/elias- 1.0-SNAPSHOT.war!/ to C:\appfuse\elias\target\work\webapp 2007-02-14 10:32:52.859::W

Re: [appfuse-user] ajax4jsf depencies (equinox/appfuse)

2007-02-14 Thread jclagache
It seems to fix the problem, but i prefer to test it better to be sure ... JCL Matt Raible-3 wrote: > > It looks like this may be fixed in the 1.0.6 release. Maybe we should > just upgrade to that release? > > http://mvnrepository.com/artifact/net.java.dev.ajax4jsf/ajax4jsf/1.0.6 > > Matt >

[appfuse-user] apfuse2+hibernate - GenericDaoHibernate getAll returns duplicate entities (users)

2007-02-14 Thread ros
(Appguse2 Hibernate) I've added OneToMany relation with FetchType.EAGER from User pojo to Test pojo. Now GenericDaoHibernate getAll returns 5 users, but in database there are 2 users - one amin user and one tomcat user, tomcat user has relation to 4 Test pojos. Can getAll return distinct selecti

Re: [appfuse-user] Calendar component and Date field for Appfuse 2.0

2007-02-14 Thread Fan
This is the Person.java I have: package org.appfuse.model; import org.appfuse.model.BaseObject; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.bui

Re: [appfuse-user] Error for Appfuse AOP

2007-02-14 Thread Thomas Ramapuram
I have not added any actions or jsp pages. I have just added the class given earlier along with the application context given earlier. I placed it in a package called my.company.services (it would have been better in my.company.aop). Other than this I have not extended appfuse in any way.

Re: [appfuse-user] why illegal access to lazy collection with collection in commonclipse methods

2007-02-14 Thread Michael Horwitz
Hi Ron, From my experience with Hibernate I would be extremely cautious of using too many fields in the equals/hashcode of persisted entities (particularly the latter). One specific problem I came accross was that when building a collection of persisted entities, Hibernate adds empty elements t

RE: [appfuse-user] acegi - disable authentication for particular jsp pages (using spring MVC)

2007-02-14 Thread Jon Loken
Thanks all for your help, The second suggestion worked fine, namely to place /yourjsppattern.jsp*=ROLE_ANONYMOUS AT THE TOP of the value list. Before this line was at the bottom of the list, hence the problem. Much appreciated, Jon -Original Message- From: Matt R