Hi,

I'm trying to use the appfuse:gen Maven plugin but when I run it I get a
fatal error (below).

I've created a new Struts2 project using the Struts 2 Basic archetype, and
added a new entity called Person (code below).

The mapping to Person is added to hibernate.cfg.xml successfully but the
appfuse:gen task itself fails thusly:

[INFO] [appfuse:gen]
What is the name of your pojo (i.e. Person)?: Person
log4j:WARN Continuable parsing error 57 and column 64
log4j:WARN Attribute value "com.opensymphony.xwork2.util.OgnlValueStack" of
type ID must be unique within the document.
[INFO] Configuration XML file loaded:
file:/C:/temp/demoappfuse/myproject/src/main/resources/hibernate.cfg.xml
[INFO] Configuration XML file loaded:
file:/C:/temp/demoappfuse/myproject/src/main/resources/hibernate.cfg.xml
[INFO] src/main/resources/database.properties not found within the project.
Trying absolute path.
[INFO] No hibernate properties file loaded.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] URI has an authority component
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.IllegalArgumentException: URI has an authority component
        at java.io.File.(File.java:340)


The code for Person is:

package com.mycompany.app.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;

@Entity
@Table(name = "person")
public class Person {
    private Long id;
    private String username;

    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }

    @Column(name = "username")
    public String getUsername() {
        return username;
    }

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

     public void setUsername(String username) {
        this.username = username;
    }

}

Any help gratefully received.

Thanks,

Phil Wilson
-- 
View this message in context: 
http://www.nabble.com/appfuse%3Agen-fatal-error%3A-URI-has-an-authority-component-tp19666489s2369p19666489.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to