Hi All

I'm using JBoss 3.0.4 running on Windows 2000 and I'm trying to use
hibernatedoclet to generate my jboss-service.xml file.

All goes well, except that when the MapResources are inserted into the file,
the package path names are separated by a backslash (\) instead of a
forward-slash (/). When this happens, the HibernateServiceMBean can't find
the hbm.xml file. When I manually edit the generated jboss-service.xml file
to change the backslashes to forward slashes and redeploy the file, all is
well. Here's an example of the output from jboss:

With backslashes:


16:09:10,633 INFO  [MainDeployer] Starting deployment of package:
file:/C:/Java/jboss-3.0.4/server/default/deploy/jboss-service.xml
16:09:10,683 INFO  [HibernateServiceMBean] starting service at JNDI name:
java:/HibernateFactory
16:09:10,683 INFO  [HibernateServiceMBean] properties:
{hibernate.connection.username=sa,
hibernate.session_factory_name=java:/HibernateFactory,
hibernate.connection.password=sa,
hibernate.dialect=cirrus.hibernate.sql.SybaseDialect,
hibernate.show_sql=true, hibernate.use_outer_join=true,
hibernate.connection.datasource=java:/MSSQLDS}
16:09:10,723 INFO  [HibernateServiceMBean] compiling mapping:
com\gfg\persistent\Account.hbm.xml
16:09:10,733 INFO  [DatastoreImpl] Mapping resource:
com\gfg\persistent\Account.hbm.xml
16:09:10,783 INFO  [HibernateServiceMBean] Could not build SessionFactory
using the MBean classpath - will try again using client classpath
16:09:10,783 INFO  [SessionFactoryObjectFactory] Factory name:
java:/HibernateFactory
16:09:10,793 INFO  [NamingHelper] JNDI InitialContext properties:{}
16:09:10,793 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name:
java:/HibernateFactory
16:09:10,803 WARN  [SessionFactoryObjectFactory] InitialContext did not
implement EventContext
16:09:10,803 INFO  [MainDeployer] Deployed package:
file:/C:/Java/jboss-3.0.4/server/default/deploy/jboss-service.xml


With forward-slashes:


16:09:40,887 INFO  [MainDeployer] Starting deployment of package:
file:/C:/Java/jboss-3.0.4/server/default/deploy/jboss-service.xml
16:09:40,927 INFO  [HibernateServiceMBean] starting service at JNDI name:
java:/HibernateFactory
16:09:40,957 INFO  [HibernateServiceMBean] properties:
{hibernate.connection.username=sa,
hibernate.session_factory_name=java:/HibernateFactory,
hibernate.connection.password=sa,
hibernate.dialect=cirrus.hibernate.sql.SybaseDialect,
hibernate.show_sql=true, hibernate.use_outer_join=true,
hibernate.connection.datasource=java:/MSSQLDS}
16:09:40,957 INFO  [HibernateServiceMBean] compiling mapping:
com/gfg/persistent/Account.hbm.xml
16:09:40,957 INFO  [DatastoreImpl] Mapping resource:
com/gfg/persistent/Account.hbm.xml
16:09:40,967 INFO  [XMLHelper] Parsing XML: unknown system id
16:09:41,107 INFO  [Dialect] Using dialect:
cirrus.hibernate.sql.SybaseDialect
16:09:41,107 INFO  [NamingHelper] JNDI InitialContext properties:{}
16:09:41,117 INFO  [DatasourceConnectionProvider] Using datasource:
java:/MSSQLDS
16:09:41,117 INFO  [SessionFactoryImpl] Use outer join fetching: true
16:09:41,167 INFO  [SessionFactoryImpl] Use scrollable result sets: true
16:09:41,167 INFO  [SessionFactoryImpl] echoing all SQL to stdout
16:09:41,277 INFO  [SessionFactoryObjectFactory] Factory name:
java:/HibernateFactory
16:09:41,277 INFO  [NamingHelper] JNDI InitialContext properties:{}
16:09:41,287 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name:
java:/HibernateFactory
16:09:41,357 WARN  [SessionFactoryObjectFactory] InitialContext did not
implement EventContext
16:09:41,357 INFO  [SessionFactoryImpl] Query language substitutions: {}
16:09:41,357 INFO  [MainDeployer] Deployed package:
file:/C:/Java/jboss-3.0.4/server/default/deploy/jboss-service.xml




Here's my ant task definition:


    <target name="xdoclet.hibernate.mapping">
        <mkdir dir="${build.classes.dir}" />
        <delete>
            <fileset dir="${build.classes.dir}" includes="**/*.hbm.xml"/>
            <fileset dir="${build.hibernate}" includes="jboss-service.xml"/>
        </delete>

        <taskdef
            name="hibernatedoclet"
            classname="xdoclet.modules.hibernate.HibernateDocletTask"
            classpathref="xdoclet.path"
        />

        <hibernatedoclet
            destdir="${build.classes.dir}"
            verbose="true"
        >
            <fileset dir="${src.ejb.dir}">
                <include name="**/*.java" />
            </fileset>

            <hibernate/>
            <jbossservice
                destdir="${build.hibernate}"
                dataSource="java:/MSSQLDS"
                dialect="cirrus.hibernate.sql.SybaseDialect"
                jndiName="java:/HibernateFactory"
                serviceName="Hibernate"
                showSql="true"
                userName="sa"
                password="sa"
                useOuterJoin="true"/>
        </hibernatedoclet>
    </target>





So, clearly there is a problem with this. Is there a workaround, or what? Is
this a problem with xdoclet's hibernatedoclet, or is it a problem with
HibernateServiceMBean?

Thanks in advance...

Craig Shearer

Chief Architect
Dyosoft Systems Limited




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to