[jboss-user] [JBoss Seam] - Re: How do I test simple SLSBs?

chuckadams do-not-reply at jboss.com
Fri Sep 1 13:38:01 EDT 2006


My informed hunch about Eclipse was right.  Once I fixed the test's classpath and removed the extra cruft, the container started up fine.  Deployment's not as fast with this thing as I would have hoped, but I can live with it.

I'm still having jndi problems now.

  | org.jboss.seam.InstantiationException: Could not instantiate Seam component: greeter
  | 	at org.jboss.seam.Component.newInstance(Component.java:1440)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1350)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1324)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1318)
  | 	at bizint.fiat.test.GreeterTest$1.invokeApplication(GreeterTest.java:25)
  | 	at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:242)
  | 	at bizint.fiat.test.GreeterTest.testGreeterHello(GreeterTest.java:29)
  | Caused by: javax.naming.NameNotFoundException: "Fiat not bound
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
  | 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
  | 	at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
  | 	at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
  | 	at org.jboss.seam.Component.instantiate(Component.java:809)
  | 	at org.jboss.seam.Component.newInstance(Component.java:1436)
  | 	... 23 more
  | 

  Is there something special I need to do with jndi.properties, seam.properties, components.properties, etc? 

Here is my seam.properties.  The docs say it can be empty, but if I leave it empty, seam screams at me to set it or use @JndiName, and won't proceed.


  | org.jboss.seam.core.init.jndiPattern = "Fiat/#{ejbName}/local"
  | 

Here is my components.properties.  I've always marvelled at the inconsistency between these two instances of the same property, jndiPattern, but I've never even made a hello world app work without this inconsistency.


  | myFacesLifecycleBug : false
  | embeddedEjb : true
  | jndiPattern : #{ejbName}/local
  | 

And here is my components.xml


  | <components>
  | 
  |     <component name="org.jboss.seam.core.init">
  |     	<property name="debug">true</property>
  |         <property name="myFacesLifecycleBug">@myFacesLifecycleBug@</property>
  |         <property name="jndiPattern">@jndiPattern@</property>
  |     </component>
  |     
  |     <!-- 120 second conversation timeout -->
  |     <component name="org.jboss.seam.core.manager">
  |         <property name="conversationTimeout">120000</property>
  |     </component>
  |     
  |     <component class="org.jboss.seam.core.Ejb" installed="@embeddedEjb@"/>
  | </components>
  | 

These are all in a folder called test-inf, which is first in my test's classpath.  I don't believe they're even really being looked at however, since I put syntax errors in components.xml and there wasn't even a peep of warning or error.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968971#3968971

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968971



More information about the jboss-user mailing list