[XDoclet-JIRA] Created: (XDT-1549) Composite ID implemented as internal static class

"Andrey Grebnev (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.xdoclet.devel
Message-ID <[email protected]>
Composite ID implemented as internal static class
-------------------------------------------------

         Key: XDT-1549
         URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1549
     Project: XDoclet
        Type: Bug
  Components: Hibernate Module  
    Versions: 1.3    
 Environment: XDoclet 1.3 dated by 2005-10-06, Hibernate 3.1b3
 Reporter: Andrey Grebnev
 Assigned to: xdoclet-devel (Use for new issues) 


I have the following code:

/**
 * @hibernate.class table="al_core_app_resource" lazy="false"
 */
public class ApplicationResource extends BaseObject {

	/**
	 * Returns ID of this resource
	 *
	 * @return ID of resource
	 * @hibernate.id generator-class="assigned" class="com.blandware.atleap.model.core.ApplicationResource$ApplicationResourceID"
	 */
	public ApplicationResourceID getId() {
		return id;
	}

                     ...

	public static class ApplicationResourceID implements CompositeID, Serializable, Comparable {
                     ...
                     }

}

it generates

        <!-- Use of @hibernate.id for composite IDs is deprecated, use @hibernate.composite-id instead -->
        <composite-id
            name="id"
            class="com.blandware.atleap.model.core.ApplicationResource.ApplicationResourceID"
        >

with dot for internal static class, but it should be 
   com.blandware.atleap.model.core.ApplicationResource$ApplicationResourceID
with $.

As result I have the following error:

     [java] (hbm2ddl.SchemaExport                374 ) Error creating schema
     [java] org.hibernate.MappingException: component class not found: com.blandware.atleap.model.core.Applicatio
nResource.ApplicationResourceID
     [java]     at org.hibernate.mapping.Component.getComponentClass(Component.java:105)
     [java]     at org.hibernate.tuple.PojoComponentTuplizer.buildGetter(PojoComponentTuplizer.java:140)
     [java]     at org.hibernate.tuple.AbstractComponentTuplizer.<init>(AbstractComponentTuplizer.java:40)
     [java]     at org.hibernate.tuple.PojoComponentTuplizer.<init>(PojoComponentTuplizer.java:33)
     [java]     at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:126)
     [java]     at org.hibernate.mapping.Component.getType(Component.java:160)
     [java]     at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
     [java]     at org.hibernate.cfg.Configuration.iterateGenerators(Configuration.java:574)
     [java]     at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:685)
     [java]     at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:94)
     [java]     at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:62)
     [java]     at org.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:364)
     [java] Caused by: java.lang.ClassNotFoundException: com.blandware.atleap.model.core.ApplicationResource.Appl
icationResourceID
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
     [java]     at java.lang.Class.forName0(Native Method)
     [java]     at java.lang.Class.forName(Class.java:141)
     [java]     at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
     [java]     at org.hibernate.mapping.Component.getComponentClass(Component.java:102)
     [java]     ... 11 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.