You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kaspar Fischer <fi...@inf.ethz.ch> on 2009/02/19 19:06:20 UTC

[wicket-rad] Problem creating form

I hope this is the right list for wicket-rad questions? (The one on  
SourceForge is empty.)

I am trying to create a form using Wicket-RAD 0.6 and get

   Caused by: java.lang.NoSuchMethodError:  
org.wicketrad.jpa.propertyeditor.CreateBeanForm.add(Lorg/apache/wicket/ 
Component;)Lorg/apache/wicket/MarkupContainer;
	at  
org 
.wicketrad 
.jpa.propertyeditor.CreateBeanForm.<init>(CreateBeanForm.java:27)
	at  
org 
.wicketrad 
.jpa 
.propertyeditor 
.DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:47)
	at  
org 
.wicketrad 
.jpa 
.propertyeditor 
.DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:35)
	at org.icarbasel.aris.ui.web.pages.ProfilesPage 
$1.<init>(ProfilesPage.java:11)
	at  
org.icarbasel.aris.ui.web.pages.ProfilesPage.<init>(ProfilesPage.java: 
11)
	... 31 more

Does anybody know where the problem could lie?

Kaspar

--
My page has markup <div wicket:id="form"></div> and constructor

   public ProfilesPage()
   {
     BeanForm<?> form = new DefaultCreateBeanForm("form", new Profile())
     {
       @Override
       protected void afterSubmit()
       {
         System.err.println("Done...");
       }

     };
     add(form);
   }

The Profile class looks like this:

@Table
public class Profile implements Identifiable<Long>
{
   @Column
   @Id
   @GeneratedValue
   private Long id;

   @Column(unique = true)
   private String name;

   public Long getId()
   {
     return id;
   }

   public void setId(Long id)
   {
     this.id = id;
   }

   @FieldOrder(1)
   @TextField
   @Length(min = 5, max = 255)
   @LabelProperty
   public String getName()
   {
     return name;
   }

   public void setName(String name)
   {
     this.name = name;
   }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
On 19.02.2009, at 19:06, Kaspar Fischer wrote:

> I am trying to create a form using Wicket-RAD 0.6 and get
>
>  Caused by: java.lang.NoSuchMethodError:  
> org.wicketrad.jpa.propertyeditor.CreateBeanForm.add(Lorg/apache/ 
> wicket/Component;)Lorg/apache/wicket/MarkupContainer;
> 	at  
> org 
> .wicketrad 
> .jpa.propertyeditor.CreateBeanForm.<init>(CreateBeanForm.java:27)
> 	at  
> org 
> .wicketrad 
> .jpa 
> .propertyeditor 
> .DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:47)
> 	at  
> org 
> .wicketrad 
> .jpa 
> .propertyeditor 
> .DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:35)
> 	at org.icarbasel.aris.ui.web.pages.ProfilesPage 
> $1.<init>(ProfilesPage.java:11)
> 	at  
> org 
> .icarbasel.aris.ui.web.pages.ProfilesPage.<init>(ProfilesPage.java:11)
> 	... 31 more
>
> Does anybody know where the problem could lie?

For the sake of completeness, this solved it: http://www.nabble.com/Re%3A-Wicket-RAD-0.6-with-Wicket-1.4-SNAPSHOT-p22260835.html

Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by wfaler <wi...@gmail.com>.
Hi,
I tried your code out, and it works fine (I added a new package in the
wicket-rad-samples on my own workspace with the code).

One thing that comes to mind if you are using the Wicket RAD JPA packages
is, does your WebApplication class extend "DataWebApplication"? For the
persistence bits to work, it needs to setup the RequestCycle correctly.

Regards
Wille



hbf wrote:
> 
> On 19.02.2009, at 19:42, Kaspar Fischer wrote:
> 
>> On 19.02.2009, at 19:34, wfaler wrote:
>>
>>> Hi,
>>> Wicket RAD is actually not officially part of Wicket, so the right  
>>> forum is
>>> here: http://www.nabble.com/Wicket-RAD-f35257.html
>>
>> Sorry! I will post a next topic to that forum.
>>
>>> However, looking at your code, what version of Wicket are you  
>>> using, and is
>>> it really on the classpath?
>>
>> Wicket (1.4-SNAPSHOT) is running fine and I am using Panel.add() at  
>> several other places. Only when I navigate to a page containing a  
>> Wicket-RAD form, this message appears.
>>
>>> the add call on the line referred to in the stacktrace is actually  
>>> the add()
>>> method on Component, which should be there.
>>
>> Yes, I looked this up in your code, but here I got stuck.
> 
> I have checked out Wicket-RAD trunk from SVN and installed it using  
> 'mvn clean install'. (Looking at the file modification dates in my  
> ~/.m2/repository/org/wicketrad/, the old jars do get overwritten.) But  
> still the same problem.
> 
> When I look at the pom.xml in a project created with the archetype
> http://code.google.com/p/wicketrad-archetype/ 
> , I see that there is only a dependency on wicket-rad (and none on  
> wicket itself). Could it be that wicket-rad depends on a fixed version  
> of Wicket? Does it work with Wicket 1.4-SNAPSHOT?
> 
> Many thanks for any pointers,
> Kaspar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-wicket-rad--Problem-creating-form-tp22106358p22112213.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by wfaler <wi...@gmail.com>.
Hi,
At the moment Wicket RAD depends on Wicket 1.3.x, the latest version has a
dependency on 1.3.5 defined.

I know of users who have gotten it to work with 1.4 with some minor tweaks,
but it is not yet supported outright.
The focus for 0.7 is to upgrade to 1.4, which I think won't be too hard.


hbf wrote:
> 
> On 19.02.2009, at 19:42, Kaspar Fischer wrote:
> 
>> On 19.02.2009, at 19:34, wfaler wrote:
>>
>>> Hi,
>>> Wicket RAD is actually not officially part of Wicket, so the right  
>>> forum is
>>> here: http://www.nabble.com/Wicket-RAD-f35257.html
>>
>> Sorry! I will post a next topic to that forum.
>>
>>> However, looking at your code, what version of Wicket are you  
>>> using, and is
>>> it really on the classpath?
>>
>> Wicket (1.4-SNAPSHOT) is running fine and I am using Panel.add() at  
>> several other places. Only when I navigate to a page containing a  
>> Wicket-RAD form, this message appears.
>>
>>> the add call on the line referred to in the stacktrace is actually  
>>> the add()
>>> method on Component, which should be there.
>>
>> Yes, I looked this up in your code, but here I got stuck.
> 
> I have checked out Wicket-RAD trunk from SVN and installed it using  
> 'mvn clean install'. (Looking at the file modification dates in my  
> ~/.m2/repository/org/wicketrad/, the old jars do get overwritten.) But  
> still the same problem.
> 
> When I look at the pom.xml in a project created with the archetype
> http://code.google.com/p/wicketrad-archetype/ 
> , I see that there is only a dependency on wicket-rad (and none on  
> wicket itself). Could it be that wicket-rad depends on a fixed version  
> of Wicket? Does it work with Wicket 1.4-SNAPSHOT?
> 
> Many thanks for any pointers,
> Kaspar
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-wicket-rad--Problem-creating-form-tp22106358p22112117.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
On 19.02.2009, at 19:42, Kaspar Fischer wrote:

> On 19.02.2009, at 19:34, wfaler wrote:
>
>> Hi,
>> Wicket RAD is actually not officially part of Wicket, so the right  
>> forum is
>> here: http://www.nabble.com/Wicket-RAD-f35257.html
>
> Sorry! I will post a next topic to that forum.
>
>> However, looking at your code, what version of Wicket are you  
>> using, and is
>> it really on the classpath?
>
> Wicket (1.4-SNAPSHOT) is running fine and I am using Panel.add() at  
> several other places. Only when I navigate to a page containing a  
> Wicket-RAD form, this message appears.
>
>> the add call on the line referred to in the stacktrace is actually  
>> the add()
>> method on Component, which should be there.
>
> Yes, I looked this up in your code, but here I got stuck.

I have checked out Wicket-RAD trunk from SVN and installed it using  
'mvn clean install'. (Looking at the file modification dates in my  
~/.m2/repository/org/wicketrad/, the old jars do get overwritten.) But  
still the same problem.

When I look at the pom.xml in a project created with the archetype http://code.google.com/p/wicketrad-archetype/ 
, I see that there is only a dependency on wicket-rad (and none on  
wicket itself). Could it be that wicket-rad depends on a fixed version  
of Wicket? Does it work with Wicket 1.4-SNAPSHOT?

Many thanks for any pointers,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by Kaspar Fischer <fi...@inf.ethz.ch>.
On 19.02.2009, at 19:34, wfaler wrote:

> Hi,
> Wicket RAD is actually not officially part of Wicket, so the right  
> forum is
> here: http://www.nabble.com/Wicket-RAD-f35257.html

Sorry! I will post a next topic to that forum.

> However, looking at your code, what version of Wicket are you using,  
> and is
> it really on the classpath?

Wicket (1.4-SNAPSHOT) is running fine and I am using Panel.add() at  
several other places. Only when I navigate to a page containing a  
Wicket-RAD form, this message appears.

> the add call on the line referred to in the stacktrace is actually  
> the add()
> method on Component, which should be there.

Yes, I looked this up in your code, but here I got stuck.

I attach my pom.xml; maybe it helps?

Thanks, Kaspar

--

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd 
">

	<modelVersion>4.0.0</modelVersion>
	<groupId>org.myorg.myproject.ui.web</groupId>
	<artifactId>myproject-web</artifactId>
	<packaging>war</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>myproject</name>
	<description></description>
	<repositories>
		<repository>
			<id>wicketrad</id>
			<url>http://wicket-rad.sourceforge.net/repo</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<organization>
		<name>...</name>
		<url>...
		</url>
	</organization>

	<dependencies>

		<!--  WICKET DEPENDENCIES -->
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket</artifactId>
			<version>${wicket.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-extensions</artifactId>
			<version>${wicket.version}</version>
			<!-- <scope>compile</scope> -->
		</dependency>
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-datetime</artifactId>
			<version>${wicket.version}</version>
			<!-- <scope>compile</scope> -->
		</dependency>
		<dependency>
			<groupId>org.wicketstuff</groupId>
			<artifactId>wicket-contrib-tinymce</artifactId>
			<version>1.3-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.wicketstuff</groupId>
			<artifactId>wicketstuff-scriptaculous
			</artifactId>
			<version>${wicket.version}</version>
		</dependency>
		<dependency>
			<groupId>org.wicketstuff</groupId>
			<artifactId>wicketstuff-prototype</artifactId>
			<version>${wicket.version}</version>
		</dependency>
		<dependency>
			<groupId>org.wicketstuff.jquery</groupId>
			<artifactId>wicketstuff-jquery</artifactId>
			<version>1.3-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.wicketstuff</groupId>
			<artifactId>wicketstuff-rome</artifactId>
			<version>1.3-SNAPSHOT</version>
		</dependency>
		<!--
			OPTIONAL <dependency> <groupId>org.apache.wicket</groupId>
			<artifactId>wicket-extensions</artifactId>
			<version>${wicket.version}</version> </dependency>
		-->

		<!-- LOGGING DEPENDENCIES - LOG4J -->

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.4.2</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.14</version>
		</dependency>

		<!--  JUNIT DEPENDENCY FOR TESTING -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.2</version>
			<scope>test</scope>
		</dependency>

		<!-- Persistence -->
		<dependency>
			<groupId>org.wicketrad.jpa</groupId>
			<artifactId>wicket-rad-jpa</artifactId>
			<version>0.6</version>
		</dependency>
		<dependency>
			<groupId>org.wicketrad</groupId>
			<artifactId>wicket-rad-core</artifactId>
			<version>0.6</version>
		</dependency>
		<dependency>
			<groupId>hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<scope>runtime</scope>
			<version>1.8.0.7</version>
		</dependency>

		<!--  JETTY DEPENDENCIES FOR TESTING  -->

		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-util</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty-management</artifactId>
			<version>${jetty.version}</version>
			<scope>provided</scope>
		</dependency>

		<!--
			Spring dependencies, see http://cwiki.apache.org/WICKET/spring.html
		-->
		<dependency>
			<groupId>org.apache.wicket</groupId>
			<artifactId>wicket-spring</artifactId>
			<version>1.4-SNAPSHOT</version>
		</dependency>

		<!-- Dependencies for KIM -->
		<dependency>
			<groupId>org.openrdf</groupId>
			<artifactId>openrdf-model</artifactId>
			<version>1.2.7</version>
		</dependency>

		<dependency>
			<groupId>org.openrdf</groupId>
			<artifactId>openrdf-util</artifactId>
			<version>1.2.7</version>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
			<version>20080701</version>
		</dependency>
		<dependency>
			<groupId>xalan</groupId>
			<artifactId>xalan</artifactId>
			<version>2.7.1</version>
		</dependency>
		<dependency>
			<groupId>xerces</groupId>
			<artifactId>xercesImpl</artifactId>
			<version>2.8.1</version>
		</dependency>
		<dependency>
			<groupId>org.w3c.css</groupId>
			<artifactId>sac</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>net.sourceforge.nekohtml</groupId>
			<artifactId>nekohtml</artifactId>
			<version>1.9.11</version>
		</dependency>

	</dependencies>

	<build>
		<resources>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<filtering>false</filtering>
				<directory>src/main/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<filtering>false</filtering>
				<directory>src/test/java</directory>
				<includes>
					<include>**</include>
				</includes>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<configuration>
					<scanIntervalSeconds>5</scanIntervalSeconds>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<!-- best lock down version of the plugin too -->
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<properties>
		<wicket.version>1.4-SNAPSHOT</wicket.version>
		<jetty.version>6.1.4</jetty.version>
	</properties>

</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [wicket-rad] Problem creating form

Posted by wfaler <wi...@gmail.com>.
Hi,
Wicket RAD is actually not officially part of Wicket, so the right forum is
here: http://www.nabble.com/Wicket-RAD-f35257.html

However, looking at your code, what version of Wicket are you using, and is
it really on the classpath?
the add call on the line referred to in the stacktrace is actually the add()
method on Component, which should be there. 


hbf wrote:
> 
> I hope this is the right list for wicket-rad questions? (The one on  
> SourceForge is empty.)
> 
> I am trying to create a form using Wicket-RAD 0.6 and get
> 
>    Caused by: java.lang.NoSuchMethodError:  
> org.wicketrad.jpa.propertyeditor.CreateBeanForm.add(Lorg/apache/wicket/ 
> Component;)Lorg/apache/wicket/MarkupContainer;
> 	at  
> org 
> .wicketrad 
> .jpa.propertyeditor.CreateBeanForm.<init>(CreateBeanForm.java:27)
> 	at  
> org 
> .wicketrad 
> .jpa 
> .propertyeditor 
> .DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:47)
> 	at  
> org 
> .wicketrad 
> .jpa 
> .propertyeditor 
> .DefaultCreateBeanForm.<init>(DefaultCreateBeanForm.java:35)
> 	at org.icarbasel.aris.ui.web.pages.ProfilesPage 
> $1.<init>(ProfilesPage.java:11)
> 	at  
> org.icarbasel.aris.ui.web.pages.ProfilesPage.<init>(ProfilesPage.java: 
> 11)
> 	... 31 more
> 
> Does anybody know where the problem could lie?
> 
> Kaspar
> 
> --
> My page has markup <div wicket:id="form"></div> and constructor
> 
>    public ProfilesPage()
>    {
>      BeanForm<?> form = new DefaultCreateBeanForm("form", new Profile())
>      {
>        @Override
>        protected void afterSubmit()
>        {
>          System.err.println("Done...");
>        }
> 
>      };
>      add(form);
>    }
> 
> The Profile class looks like this:
> 
> @Table
> public class Profile implements Identifiable<Long>
> {
>    @Column
>    @Id
>    @GeneratedValue
>    private Long id;
> 
>    @Column(unique = true)
>    private String name;
> 
>    public Long getId()
>    {
>      return id;
>    }
> 
>    public void setId(Long id)
>    {
>      this.id = id;
>    }
> 
>    @FieldOrder(1)
>    @TextField
>    @Length(min = 5, max = 255)
>    @LabelProperty
>    public String getName()
>    {
>      return name;
>    }
> 
>    public void setName(String name)
>    {
>      this.name = name;
>    }
> 
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-wicket-rad--Problem-creating-form-tp22106358p22106869.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org