tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Cannot find @Stateless annotation in other module
Date Thu, 06 Mar 2008 09:35:16 GMT

On Mar 5, 2008, at 11:27 AM, <Karsten.Ohme@t-systems.com> <Karsten.Ohme@t-systems.com

 > wrote:

>
> Hello,
>
> Sorry for the delay. Also with 3.0-SNAPSHOT I face with the same  
> problem.
>
> Can it be a problem with asm? I had to manually include it. OpenEJB  
> seems to be depending on it.
>
> 		<dependency>
> 			<groupId>asm</groupId>
> 			<artifactId>asm</artifactId>
> 			<version>2.2.3</version>
> 			<scope>test</scope>
> 		</dependency>

Definitely a strange maven thing.  I noticed it as well.  Hibernate as  
a dependency on asm-attrs version 1.5.3 while OpenEJB has a dependency  
on 2.2.3 and it seems maven just decides that no one gets asm at all.

> The initial context in my app I get with (I tried it without  
> openejb.deployments.classpath.include but it cannot find anything in  
> this case.):
>
>        Properties properties = new Properties();
>        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,  
> "org.apache.openejb.client.LocalInitialContextFactory");
>
>        properties.setProperty("openejb.deployments.classpath.include",
>                ".*(target|mock|target/classes|target/test- 
> classes).*");
>        //  
> properties.setProperty("openejb.deployments.classpath.exclude", "");
>        if (DB_MODE == MYSQL) {
>            properties.setProperty("MySqlDatabase", "new://Resource? 
> type=DataSource");
>            properties.setProperty("MySqlDatabase.JdbcUrl",  
> "jdbc:mysql://localhost:3306/tpg-server");
>            properties.setProperty("MySqlDatabase.JdbcDriver",  
> "com.mysql.jdbc.Driver");
>            properties.setProperty("MySqlDatabase.UserName", "tpg");
>            properties.setProperty("MySqlDatabase.Password", "tpg");
>            properties.setProperty("MySqlDatabase.JtaManaged",  
> "false");
>        } else if (DB_MODE == DERBY) {
>            properties.setProperty("DerbyDatabase", "new://Resource? 
> type=DataSource");
>            properties.setProperty("DerbyDatabase.JdbcUrl",  
> "jdbc:derby:derbyDB;create=true");
>            properties.setProperty("DerbyDatabase.JdbcDriver",  
> "org.apache.derby.jdbc.EmbeddedDriver");
>            properties.setProperty("DerbyDatabase.JtaManaged",  
> "false");
>        }
>
>        InitialContext initialContext = new InitialContext(properties);

Here's what that setting turned up:

INFO - Found EjbModule in classpath: C:\Dokumente%20und%20Einstellungen 
\koh\.m2\repository\tpg\pattern-management\pattern-management-api\0.4- 
SNAPSHOT\pattern-management-api-0.4-SNAPSHOT-mock.jar
INFO - Found EjbModule in classpath: C:\workspace\tpg-server\p3-server 
\p3-core\target\classes
INFO - Found EjbModule in classpath: C:\Dokumente%20und%20Einstellungen 
\koh\.m2\repository\tpg\networkstorage-management\networkstorage- 
management-api\0.2-SNAPSHOT\networkstorage-management-api-0.2-SNAPSHOT- 
mock.jar

Seems there was an issue with paths converted from URLs still  
containing some encoding and therefore not being accurate.  It took  
nearly all day but I think I stomped out all the code that does this  
incorrectly.

I've published new 3.0-SNAPSHOT jars with this issue fixed.  Give your  
build a try again and see if it doesn't work better.  Be warned that  
maven only downloads snapshots once a day by default so you may need  
to force it to grab the new ones.

-David


Mime
View raw message