[JBoss Seam] - how to trace failed entityManager injection?
by gsegura
I'm using seam 1.1.5GA, and create a project with seam-gen. The authenticator component is generated automatically.
just filled the sql script (-dev.sql) to populate the database and when trying to test the login page this exception is thrown:
org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager
The relevant part of Authenticator.java is:
@In EntityManager entityManager ;
I have the same name in components.xml (all generated by seam-gen):
<core:managed-persistence-context name="entityManager" persistence-unit-jndi-name="java:/hermes2EntityManagerFactory"/>
Also I checked with jndi viewer and the datasource and entityManagerFactory were published successfuly:
Java: Namespace
| +- hermes2EntityManagerFactory (class: org.jboss.ejb3.entity.InjectedEntityManagerFactory)
| +- hermes2Datasource (class: javax.sql.DataSource)
No other exception before that one. Just little before, the console showed some unrelated (I think) errors , all identical to this one:
00:05:25,656 ERROR [STDERR] 8/02/2007 12:05:25 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
Finally, I include some lines from server.log which made me think everything was ok (except the last one :P ):
| 2007-02-07 23:59:26,859 DEBUG [org.jboss.seam.deployment.Scanner] found: org/jboss/seam/core/EntityManagerFactory.class
| ...
| 2007-02-07 23:59:28,593 INFO [org.jboss.seam.Component] Component: entityManager, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.ManagedPersistenceContext
| ...
| 2007-02-07 23:59:28,609 DEBUG [org.jboss.seam.Component] entityManager.persistenceUnitJndiName=java:/hermes2EntityManagerFactory
| ...
| 2007-02-08 00:05:43,968 DEBUG [org.jboss.seam.Component] trying to inject with hierarchical context search: entityManager
| ...
| 2007-02-08 00:05:43,984 ERROR [org.jboss.seam.core.Exceptions] redirecting to debug page
| org.jboss.seam.RequiredException: In attribute requires value for component: authenticator.entityManager
|
Excuse such a verbose post but I just don't have any clue.
how could I check why is failing the entityManager injection??
help please.
please!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012858#4012858
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012858
19Â years, 2Â months
[JBoss Seam] - Converter exception when using a factory?
by dandiodati
We have this object that exists in the servlet session that I want to make available to inject into other Seam components. So I tried to create a factory pattern object:
public class SessionObjFactory {
|
| public ParamBean getParamBean()
| {
| return (ParamBean)Contexts.getSessionContext().get(SessionConstants.PARAMS);
| }
|
| public void setParamBean(ParamBean params)
| {
| Contexts.getSessionContext().set(SessionConstants.PARAMS, params);
| }
|
| }
and specified a SessionObjFactory.component.xml (wanted to use the auto-create option which does not seem to be available in the Factory annotation).
<component>
<factory name="paramBean" value="#{sessionScope.paramBean}" scope="session"/>
</component>
on startup I see the following exception:
17:11:05,069 ERROR [[/]] Exception sending context initialized event to listener
instance of class org.jboss.seam.servlet.SeamListener
java.lang.IllegalArgumentException: No converter for type: com.sf.bean.ParamBean
at org.jboss.seam.util.Conversions.getConverter(Conversions.java:54)
at org.jboss.seam.Component$ConstantInitialValue.(Component.java:1
971)
at org.jboss.seam.Component.getInitialValue(Component.java:400)
at org.jboss.seam.Component.initInitializers(Component.java:378)
at org.jboss.seam.Component.(Component.java:263)
at org.jboss.seam.Component.(Component.java:204)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:7
42)
at org.jboss.seam.init.Initialization.addComponents(Initialization.java:
674)
at org.jboss.seam.init.Initialization.init(Initialization.java:429)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.j
ava:33)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
...
What is going on I thought the factory pattern can be used to create any Pojo object? I can't find any documentation for having to create some Converter object for factories?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012851#4012851
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012851
19Â years, 2Â months
[Advanced Documentation] - Jboss.xml (deployment descriptor)
by ashishpatwari
I want to make new deployment descriptor for JBoss app server as I am migrating my application from websphere to JBoss
IN websphere we have ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi
code for both of them are
ibm-ejb-jar-bnd.xmi
<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmi:id="EJBJarBinding_1101636685106">
<ejbBindings xmi:id="EnterpriseBeanBinding_1101636685106" jndiName="com.sa.Account">
<enterpriseBean xmi:type="ejb:Entity" href="META-INF/ejb-jar.xml#Account"/>
</ejbbnd:EJBJarBinding>
ibm-ejb-jar-ext.xmi
<?xml version="1.0" encoding="UTF-8"?>
<ejbext:EJBJarExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbext="ejbext.xmi" xmlns:ejb="ejb.xmi" xmi:id="EJBJarExtension_1108911522650">
<ejbExtensions xmi:type="ejbext:EntityExtension" xmi:id="EntityExtension_1108911522650">
<enterpriseBean xmi:type="ejb:Entity" href="META-INF/ejb-jar.xml#Account"/>
<localTransaction xmi:id="LocalTransaction_1108911522650" unresolvedAction="Commit"/>
</ejbext:EJBJarExtension>
Now in JBoss.xml I wrote:
<?xml version="1.0" encoding="UTF-8"?>
<enterprise-beans>
<ejb-name>amdocs.AccountHome</ejb-name>
<jndi-name>com.amdocs.ecare.sa.Account</jndi-name>
</enterprise-beans>
How can I specify ejb Bindings and rest of the things like <localTransaction xmi:id="LocalTransaction_1108911522650" unresolvedAction="Commit"/> from ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi in JBoss.xml
Please help if anyone knows..
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012837#4012837
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012837
19Â years, 2Â months
[JBoss jBPM] - Unable to get the Hello World Example Running
by gv_Ramkumar
Hi All,
I downloaded jboss-4.0.4.GA, jbpm-bpel-1.1.Beta3 and jwsdp-2.0 and installed and configured as mentioned in the documentation. I was successfully able to also deploy the application.
But when i am trying to test the Hello World Example as a servlet , i wasn't able to do the same.
According to the configurations (web.xml) generated
<!-- Greeter Service Endpoint -->
<servlet-name>greeterServlet</servlet-name>
<servlet-class>
org.jboss.test.ws.samples.wsbpel.hello.Greeter_Impl
</servlet-class>
<servlet-mapping>
<servlet-name>greeterServlet</servlet-name>
<url-pattern>/greeter</url-pattern>
</servlet-mapping>
Greeter_Impl should be a servlet , but unfortunately this class implements Greeter interface which inturn extends javax.rmi.Remote class.
I am not sure how this can be.
Is there any other way that i can test the Hello World Example as a webservice?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012827#4012827
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012827
19Â years, 2Â months