[JBoss Seam] - Accessing entity beans from separate EAR file
by hubaer
Hi all,
I have a problem deploying my seam application.
In my application structure I have 2 EARs. One with the services and one with the web-frontend (with seam). In the service-ear I have entity beans which have Seam annotations. Now when I deploy both ears Seam only install the component from web-frontend and skip the entity beans from the service-ear. I found following lines in the log-file, so Seam seems to find the entity but doesn't want to deploy it:
| 2008-02-12 16:30:14,593 DEBUG [org.jboss.seam.deployment.URLScanner] scanning: C:/Programme/jboss/jboss-4.2.2.GA/server/default/tmp/deploy/tmp37003webFrontend.ear-contents/jboss-seam-2.0.1.GA.jar
| 2008-02-12 16:30:14,593 DEBUG [org.jboss.seam.deployment.URLScanner] archive: C:\Programme\jboss\jboss-4.2.2.GA\server\default\tmp\deploy\tmp37003webFrontend.ear-contents\jboss-seam-2.0.1.GA.jar
| 2008-02-12 16:30:14,828 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@125ee71, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@7588c{ url=null ,addedOrder=0}
| 2008-02-12 16:30:16,187 DEBUG [org.jboss.seam.deployment.URLScanner] scanning: /C:/Programme/jboss/jboss-4.2.2.GA/server/default/tmp/deploy/tmp37003webFrontend.ear-contents/webFrontend-war-exp.war/WEB-INF/lib/jboss-seam-debug-2.0.1.GA.jar
| 2008-02-12 16:30:16,187 DEBUG [org.jboss.seam.deployment.URLScanner] archive: C:\Programme\jboss\jboss-4.2.2.GA\server\default\tmp\deploy\tmp37003webFrontend.ear-contents\webFrontend-war-exp.war\WEB-INF\lib\jboss-seam-debug-2.0.1.GA.jar
| 2008-02-12 16:30:16,203 DEBUG [org.jboss.seam.deployment.URLScanner] scanning: /C:/Programme/jboss/jboss-4.2.2.GA/server/default/tmp/deploy/tmp37002service.ear-contents/entity-jar-1.0-SNAPSHOT.jar
| 2008-02-12 16:30:16,203 DEBUG [org.jboss.seam.deployment.URLScanner] archive: C:\Programme\jboss\jboss-4.2.2.GA\server\default\tmp\deploy\tmp37002service.ear-contents\entity-jar-1.0-SNAPSHOT.jar
| 2008-02-12 16:30:16,421 DEBUG [org.jboss.seam.deployment.URLScanner] scanning: /C:/Programme/jboss/jboss-4.2.2.GA/server/default/tmp/deploy/tmp37003webFrontend.ear-contents/webFrontend-war-exp.war/WEB-INF/lib/jboss-seam-ui-2.0.1.GA.jar
| 2008-02-12 16:30:16,421 DEBUG [org.jboss.seam.deployment.URLScanner] archive: C:\Programme\jboss\jboss-4.2.2.GA\server\default\tmp\deploy\tmp37003webFrontend.ear-contents\webFrontend-war-exp.war\WEB-INF\lib\jboss-seam-ui-2.0.1.GA.jar
|
Have someone else try to deploy entity beans outside a Seam application and got Seam to use them? What is the best practice for such kind of scenario?
The environement is Seam 2.0.1.GA on JBoss 4.2.2
Thank in advance
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128821#4128821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128821
18 years, 2 months
[JBoss jBPM] - Problem adding variables to context instance
by twiceknightly
I have put together a simple junit test. Part of this test defines an action that performs the following:
ContextInstance instance = executionContext.getContextInstance() ;
instance.setVariable("id","1") ;
When I'm running it I'm getting
| Exception in thread "Main Thread" java.lang.Error: Unresolved compilation problems:
| The import javax.jcr cannot be resolved
| Node cannot be resolved to a type
|
| at org.jbpm.context.exe.matcher.JcrNodeMatcher.<init>(JcrNodeMatcher.java:24)
| at java.lang.Class.newInstance(I)Ljava.lang.Object;(Unknown Source)
| at org.jbpm.configuration.BeanInfo.createObject(BeanInfo.java:86)
| at org.jbpm.configuration.ObjectFactoryImpl.getObject(ObjectFactoryImpl.java:154)
| at org.jbpm.configuration.ObjectFactoryImpl.createObject(ObjectFactoryImpl.java:103)
| at org.jbpm.configuration.JbpmTypeObjectInfo.createObject(JbpmTypeObjectInfo.java:100)
| at org.jbpm.configuration.ObjectFactoryImpl.getObject(ObjectFactoryImpl.java:154)
| at org.jbpm.configuration.ListInfo.createObject(ListInfo.java:51)
| at org.jbpm.configuration.ObjectFactoryImpl.getObject(ObjectFactoryImpl.java:146)
| at org.jbpm.configuration.ObjectFactoryImpl.createObject(ObjectFactoryImpl.java:103)
| at org.jbpm.configuration.ObjectFactoryImpl.createObject(ObjectFactoryImpl.java:78)
| at org.jbpm.context.exe.JbpmType.getDefaultJbpmTypes(JbpmType.java:88)
| at org.jbpm.context.exe.JbpmType.getJbpmTypes(JbpmType.java:76)
| at org.jbpm.context.exe.VariableInstance.createVariableInstance(VariableInstance.java:81)
| at org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:65)
| at org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:173)
| at org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:45)
| at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:212)
| at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:202)
|
Does anyone know the jar I am missing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128818#4128818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128818
18 years, 2 months
[JBoss Seam] - well-formed character problem
by pete007
Hi, I am getting the following message in different use-cases:
Error Parsing /router.xhtml: Error Traced[line: 22] The content of elements must consist of well-formed character data or markup.
First one is, when I use german Umlaute like ä.
How do I write this Characters correctly into the xhtml-document?
the other one is maybe a thinking error by myself. I am trying to iterate over a String-Array and to print all elements to screen, in this case in a html-drop-down-select-box.
At first, I had this code, which worked, but it was very slow, because it called router.getEndNodes() for every element.
| <select name="end" rendered="#{router.endNodes!=null}">
| <c:forEach var="w" items="${router.endNodes}">
| <option value="${w}">${w}</option>
| </c:forEach>
| </select>
I changed the getEndNodes-Method to cache the Strings and not load them from the database at every method call.
@Transient public String[] getEndpointNames()
| { if(namearray==null) { namearray = loadEndNodes(); } return namearray; }
| @Transient public String[] loadEndpointNames()
| { ArrayList<String> nl = (ArrayList<String>) entityManager.createQuery("select name from Endpoint order by name").getResultList();
| String[] na = new String[nl.size()]; int counter = 0;
| for(String name: nl) { na[counter++] = name; }
| return na; }
But this is still very slow (about 5 seconds for 200 short string elements).
So I thought about caching the String[] in the html/jsp/xml-page itself by assigning it to a temporary variable:
<% String[] endNodes = ${router.endNodes}; %>
| <select name="end" rendered="#{endNodes!=null}">
| <c:forEach var="w" items="${endNodes}">
| <option value="${w}">${w}</option>
| </c:forEach>
| </select>
And then I get again the above error message from the parser.
Do I have to wrap the statement, some characters, did I type it wrong or is it not possible to do such an assignment at all?
By the way, Is there no predefined tag for select-boxes?
If someone has a better solution for the drop-down-box, please post it. I'm not bound to any datatypes, it's only strings defined in a database.
Thanks in advance, Peter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128816#4128816
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128816
18 years, 2 months