hi,
trying to solve, and found it is a config issue. Somehow path(?) is different
under gf, then it was with old orion server. Next one causing the problem:
JDO.loadConfiguration( inputSource, new MappingResolver(), null );
where inputSource is: InputSource inputSource = new InputSource(inputStream);
where inputStream is: InputStream inputStream = getClass().getResourceAsStream(
"/" + Config.getProperty("DB_DESCRIPTOR") );
okay, inputSource and inputStream is read, I was able to echoing content of
DB_DESRIPTOR - database.xml:
<database name="MYDB" engine="oracle">
<jndi name="jdbc/cafe"/> <!-- old-orion-version: <jndi
name="java:comp/env/jdbc/cafe"/> -->
<mapping href="mapping.xml"/>
</database>
next, mapping.xml.
Structure is: WEB-INF/classes containing my com/* branch, and in 'root' level
of WEB-INF having database.xml, mapping.xml, etc. Deployed to GF as a WAR
archive.
Any hints guys?
thx,
Zol
org.exolab.castor.mapping.MappingException: Could not find the class
com.company.dto.CountryDTO
thx,
Zol
2013.01.23. dátummal, 15:11 időpontban Zoltán Levárdy írta:
> hi,
>
> I am trying use old code (castor 0.9.5.3), with spring v3 on a glassfish v3
> server. Is there any hints on this topic? (avoid, or working, … etc.)
>
> Next imports in place now in DAO:
> import org.exolab.castor.jdo.Database;
> import org.exolab.castor.jdo.JDO;
> import org.exolab.castor.jdo.OQLQuery;
> import org.exolab.castor.jdo.PersistenceException;
> import org.exolab.castor.jdo.TransactionNotInProgressException;
> import org.exolab.castor.jdo.QueryResults;
> import org.exolab.castor.mapping.MappingException;
> and in DTO:
> import org.exolab.castor.jdo.TimeStampable;
>
> to use as it was, simply giving error at mapping.xml:
> <mapping>
> <class name="com.company.dto.CountryDTO" …
>
> it gives exception like this, and it is strange, because the
> com.company.dto.CountryDTO is absolutely there:
> [#|2013-01-23T10:46:39.539+0100|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=135;_ThreadName=Thread-75;|[2013-01-23
> 10:46:39.538+0100] [App:ERROR] [Thread-75] BaseDAO():
> org.exolab.castor.mapping.MappingException: Could not find the class
> com.company.dto.CountryDTO
>
> found something here, but not sure is it working with spring v3, and gf v3:
> http://mvnrepository.com/artifact/org.codehaus.castor/spring-orm/1.3
>
> thanks for any hints,
> Zol