[EJB 3.0] - NetBeans 5.5 + EJB3 + JBoss 4.2 == ejbLink: not used by any
by LeandroSeverino
Well,
I'm sorry by my terrible english, because I'm writing from Brazil.
I'll try explain my problem.
My Environment:
-> NetBeans 5.5.1
-> JBoss 4.2.1 GA
-> EJB 3 / JPA.
I have a Enterprise Application (EAR) with 2 EJB modules + WAR module.
The projects:
1) Report.ear (NetBeans EnterpriseApplication project.)
1.1) Report-Business-ejb (NetBeans EJB Module project.)
1.1.1) ElementoGerenciadoFacade (@Stateless, SessionBean EJB class.)
note : in this class I have a @EJB private DAOFactory daoFactory;
1.1.2) ElementoGerenciadoFacadeLocal (@Local )
1.2) Report-DAO-ejb (Netbeans EJB Module project)
1.2.1) persistence.xml
1.2.2) iDAO
1.2.3) IElementoGerenciadoDAO
1.2.4) ElementoGerenciadoDAOImpl
1.2.5) DAOFactory ( como EJB @Stateless )
1.3) Report-war.war
1.3.1) ListElementsServlet.
The DAOFactory code
| @Stateless
| public class DAOFactory implements DAOFactoryLocal{
|
| /** Creates a new instance of DAOFactory */
| public DAOFactory() {
| }
|
| @PersistenceContext(unitName = "PU")
| private EntityManager entityManager;
|
| public ElementoGerenciadoDAOImpl getElementoGerenciadoDAO(){
| IDAO dao = new ElementoGerenciadoDAOImpl();
| dao.setEntityManager(entityManager);
| return (ElementoGerenciadoDAOImpl) dao;
| }
|
| }
|
The ElementoGerenciadoFacade code
| @Stateless
| public class ElementoGerenciadoFacade implements ElementoGerenciadoFacadeLocal {
| @EJB
| private DAOFactory daoFactory;
|
| public ElementoGerenciadoFacade() {
| }
| public List findAll() {
| ElementoGerenciadoDAOImpl dao = daoFactory.getElementoGerenciadoDAO();
| return dao.findAll();
| //em.createQuery("select object(o) from ElementoGerenciado as o").getResultList();
| }
|
| }
|
When I run, I receive this error message:
anonymous wrote :
| Reason: java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container ElementoGerenciadoFacade: reference class: com.digitel.ejb.DAOFactory ejbLink: not used by any EJBs
|
Well,
I have a question:
- I need configure some XML file / descriptor file ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101740#4101740
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101740
18 years, 5 months
[JBoss Seam] - Re: Feature request regarding nested conversations
by wschwendt
Hi Pete, thanks for your post and please excuse my late response, too. I hardly followed this forum in October and therefore didn't notice earlier that you posted a response in this thread.
"pete.muir(a)jboss.org" wrote :
| "Wolfgang Schwendt" wrote : And the following approach is not viable either: We cannot simply access a component from the parent conversation and call a property Setter of this component with the ending result of the nested conversation supplied as argument for this Setter.
|
| This is what you are supposed to be able to do.
|
|
| "Wolfgang Schwendt" wrote : The reason is that when a component from the parent conversation is called while the nested conversation is still in progress, the ManagedEntityIdentityInterceptor saves wrappers for the called component in the scope of the nested conversation (!) and not the scope of the parent conversation.
|
| I'm 90% sure this is a bug. Do you have a JIRA issue open for it? Can you point me at it if you do? I need to review it carefully with Norman.
|
ok, if one is really supposed to call a component of the parent conversation in order to transfer the result of the nested conversation, the behavior looks indeed like a bug. By the way, in the meantime another thread regarding the problem was opened by Denis Karpov in late October:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121852
Therefore, as requested and in face of the second thread, I opened a JIRA issue at the weekend (you probably have noticed it already). http://jira.jboss.com/jira/browse/JBSEAM-2209
"pete.muir(a)jboss.org" wrote :
| anonymous wrote : I'm puzzled by the fact that Seam offers nothing yet in this regard. A feature like that would be highly useful when modeling complex flows and composing them of one or more subflows. I hope that an output-mapper gets added to Seam, in order to avoid having to resort to ugly hacks such as writing from the nested conversation to the parent conversation scope.
| |
|
| Even if you were able to write attributes back to the parent conversation do you still think this would be useful?
from a technical point of view, it would not be necessary. It would already be a big improvement if it was possible to transfer state to the parent conversation by way of an explicit method call (invocation of a component of the parent conversation).
Nevetheless, from a software engineering perspective, an output mapper feature could still be very useful. But I'd need to write a more detailed explanation about that, with this post I just want to mention the JIRA case. And such an output mapper feature would have to be carefully designed.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101731#4101731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101731
18 years, 5 months
[Beginners Corner] - Jboss 5 Beta 2 won't even run with Java 5?
by l33t_Phr3Ak
Hey ho,
i hope somebody can help me out here:
The symptoms:
-> Jboss 5 Beta 1 runs with both Java 5 and Java 6.
-> Jboss 5 Beta 2 doesn't run with both Java 5 and Java 6?
Now i know that the Beta does NOT run with Java 6, but everything i read said it should run with Java 5?
According to this Jboss-Bug entry:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassNotFoundJava.lang.StringInJDK6
anonymous wrote :
| Problem:
|
| You get the below exception when running JBoss with JDK 6:
|
| java.lang.IllegalStateException: Class not found: [Ljava.lang.String;
|
|
|
| Cause:
|
| This exception is caused because of the improper use of classloaders in JBoss code. Look at this forum thread for more details.
|
| Solution:
|
| Use JDK5
|
|
Yeah exactly, use Java 5
But regardless of the java version i use (meaning 5 or 6), i always get the exact same error message:
| 07:56:33,596 INFO [ProfileImpl] Using profile root:/opt/jboss-5.0.0.Beta2/server/default
| 07:56:34,763 ERROR [AbstractKernelController] Error installing to Instantiated: name=DeploymentFilter state=Described
| java.lang.IllegalStateException: Class not found: [Ljava.lang.String;
| at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:174)
| at org.jboss.metadata.spi.signature.Signature.stringsToClasses(Signature.java:125)
| at org.jboss.metadata.spi.signature.Signature.getParametersTypes(Signature.java:292)
| at org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:138)
| at org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:280)
| at org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:159)
| at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.methodHasAnnotations(AOPConstructorJoinpoint.java:202)
| at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasMethodMetaData(AOPConstructorJoinpoint.java:172)
| at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.hasInstanceOrJoinpointMetaData(AOPConstructorJoinpoint.java:152)
|
This is exactly the error message which is described in the bug report.
So in a nutshell:
Why won't Jboss 5 Beta 2 run with Java 5 although this is the "official" bug solution?
Can somebody confirm that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4101729#4101729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4101729
18 years, 5 months