[JBoss Eclipse IDE (users)] - How contribute to Freemarker plugin and add my Plugin eclips
by azerr
Hi,
I'm new JBOSS IDE user. I discover Freemarker plugin, and I updated it to manage :
-> XML context
-> add Preview Tab
-> add customizable template features with completion (ex : you type list, and after it generate <#list .....></#list>
My first question, is how can I contribute to the Freemarker Plugin? I wrote to Joe Hudson, but I have none answer?
I'm developping Eclipse generator called Akrogen, that you can find at http://akrogen.sourceforge.net/.
This plugin looks like EclipseWork, but it is able to generate any components (use XML Mapping Hibernate to generate DAO, Service,...)
by describing into XML component your WizardPage. You can too describe XML Wizard to use several XML component. Today Akrogen support XSL end Freemarker template engine.
Are you interest by this plugin (to add JBOSS Eclipse IDE)? If so, are you agree to help me?
Thank you for your answer.
Regards Angelo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994806#3994806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994806
19 years, 7 months
[JBoss Seam] - Re: Component bindings in Conversation scope
by quilleashm
Thanks for the replies guys.
Pete, I'll look into doing my logic inside a tag handler, I hadn't thought of doing it that way. I have a template with a grid panel and a ui:define inside. The define will insert things like input fields and combos. I then use some convention rules based of the name of the bean property each control value is bound to, to auto-populate these fields from database tables. To be fair I have to use a custom invoke handler in the template already to do this logic as it has to be done after the panel piece of the view is fully constructed but before encodeAll() is called.
Gavin, I looked at the code and for the Sun RI at least it is possible to restore the conversation before the bindings are updated on the controls. By putting the conversation restore code in either the SeamStateManager.restoreView() or SeamViewHandler.restoreView(), the ViewRoot is available and built. I have no idea if you can guarantee this will work on all implementations, I'll have to check the spec and see.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994805#3994805
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994805
19 years, 7 months
[JBoss Seam] - Re: Can I mix Session, Entity and regular Java Beans in Seam
by PatrickMadden
Thank you very much - indeed that fixed my POJO problem. Now, I'm down to one last hurdle. Hopefully after this I'll be off and running. I did buy the Rough Cuts book by the way but I haven't seen this in there yet.
Question is - What is the proper way to inject the GreeterBean into my Stateless LoginAction class. I'll list the code here:
| package com.clooster.web.ejb.session;
|
| import java.util.List;
|
| import javax.ejb.Stateless;
| import javax.faces.application.FacesMessage;
| import javax.faces.context.FacesContext;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.contexts.Context;
| import org.jboss.seam.core.FacesMessages;
| import org.jboss.seam.log.Log;
|
| import com.clooster.web.ejb.entity.ClUsers;
|
| @Stateless
| @Name("login")
| public class LoginAction implements Login
| {
|
| @Logger
| private Log log;
|
| @In
| FacesMessages facesMessages;
|
| @In
| GreeterBean greeter;
|
| @PersistenceContext
| private EntityManager em;
|
| @In
| private transient Context sessionContext;
|
| @In
| private transient FacesContext facesContext;
|
| // seam-gen method
| public String login()
| {
| log.info("Entered LoginAction login");
| log.info("Greeter is " + greeter);
|
| List<ClUsers> results = em.createQuery(
| "from ClUsers where cloosterid=:cloosterid and password=:password")
| .setParameter("cloosterid", greeter.getName())
| .setParameter("password",
| greeter.getPassword().getBytes())
| .getResultList();
|
| if (results.size() == 0)
| {
| facesContext.addMessage(null, new FacesMessage(
| "Invalid login"));
|
| return "login";
| }
| else
| {
| ClUsers user = results.get(0);
| sessionContext.set("loggedIn", true);
| sessionContext.set("User", user);
|
| log.info("Logged In");
| return "main";
| }
| }
| }
|
When I remove the @In annotation on the GreeterBean, it is null after submitting the form. When I include the @In annotation I get the following error.
anonymous wrote : Exception during INVOKE_APPLICATION(5): org.jboss.seam.RequiredException: In attribute requires value for component: login.greeter with the stack trace as follows:
| org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
| org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
| org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| $Proxy313.login(Unknown Source)
| com.clooster.web.ejb.session.Login$$FastClassByCGLIB$$7b8ae7bc.invoke(<generated>)
| net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
| org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
| com.clooster.web.ejb.session.Login$$EnhancerByCGLIB$$ad46ced0.login(<generated>)
| sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| javax.faces.component.UICommand.broadcast(UICommand.java:106)
| javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| java.lang.Thread.run(Thread.java:595)
|
Once again, the form snippet is as follows:
Thank you in advance!!! Greatly appreciated.
<fieldset>
| <div>
| <h:outputLabel for="name">Login Name</h:outputLabel>
| <h:inputText id="name" value="#{Greeter.name}" style="width: 175px;" />
| </div>
| <div>
| <h:outputLabel for="password">Password</h:outputLabel>
| <h:inputSecret id="password" value="#{Greeter.password}" style="width: 175px;" />
| </div>
| <div class="errors"><h:messages globalOnly="true"/></div>
| <div class="buttonBox"><h:commandButton action="#{login.login}" value="Account Login" class="button" /></div>
| <div class="notes"><h:commandLink action="register">Register New User</h:commandLink></div>
| </fieldset>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994800#3994800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994800
19 years, 7 months
[JBossCache] - Re: Using Jboss Cache IDE on EJB3 4.0.5.GA server
by gurkanerdogdu
Hi;
First of all, last cache ide built in JBoss IDE 2.0.0Beta2 is compatible wih JBoss Cache 1.4.0 version.
Be able to view cache content in the server via eclipse, you have to put jndi of TreeCache service via mbean definition in the cache-service.xml file like
<mbean code ="org.jboss.invocation.jrmp.server.JRMPProxyFactory",....>
<....
MyCache
.....other properties
..../>
In the server configuration,
*serverUrl (localhost by default)
*Jndi Port (1099 by default, may be 1100)
*Cache Jndi Name (jndi_name of the running cache instance in the server defined above mbean ex: MyCache)
*Cache Service Name(changed to jboss.cache:service=EJB3EntityTreeCache, running cache service name, and must be configured also in the above mbean and also is used to get statatistics mbeans if view statistics enable)
*Added jars (Object classes, that are contained in the cache, must be added as jar to view their content in the eclipse view),
Gurkan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994799#3994799
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994799
19 years, 7 months
[JBoss jBPM] - Re: Fork + Join
by nlmarco
Hello Tom,
thanks a lot for your quick reply! I built a test case and hope you can either tell me what I'm doing wrong or fix the bug in jBPM ;-)
This is my test process definition: http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/processimage.jpg
Here is a little test application (incl. the process definition): http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/jbpmfork.tar.gz
And here are screen shots (of the above test application) showing two wrong/strange behaviours:
http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/forktest-a.html
As you see in A3, I was able to move the root token from the Fork node "fork1" to the State "state_left_1", even though the child tokens didn't reach the Join node yet. This is not a serious problem, though, because I could find out that the root token has active child tokens and prevent the user from doing the transition "to_state_left_1". However, is this behaviour really intended? Shouldn't jBPM prevent signalling the root token while there are active children?
http://www.nightlabs.de/~marco/jbpm/2006-12-18.00/forktest-b.html
This is what I've described in my previous posting. As you see in B3 and B4, I move the two child tokens to the Join node "join1". Correctly, the root token jumps from "fork1" to "state_after_join" as soon as the second child token reached "join1". B5 demonstrates, however, that I can continue moving the second child token after it has reached "join1" - it does not end in this Join node.
Btw, I'm using jBPM version 3.1.2 with MySQL 5.0.18.
Best regards, Marco :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994796#3994796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994796
19 years, 7 months
[JBoss Seam] - Component bindings in Conversation scope
by quilleashm
I think I'm correct in saying that currently you cannot have a conversation scoped component that has UIComponent bindings.
e.g. of a minimal example
Facelet view
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:ui="http://java.sun.com/jsf/facelets">
| <head>
| <title></title>
| </head>
| <body>
| <h:form>
| <h:outputText value="Text" binding="#{testBean.outputText}"/>
|
| <h:commandButton value="Submit"/>
| </h:form>
| </body>
| </html>
|
And the bean
| @Name( "testBean" )
| @Scope( ScopeType.CONVERSATION )
| public class TestBean
| {
| private HtmlOutputText outputText;
|
| public HtmlOutputText getOutputText()
| {
| return outputText;
| }
|
| public void setOutputText( HtmlOutputText outputText )
| {
| this.outputText = outputText;
| }
| }
|
It is fine during the initial rendering of the page but if you click the button to do a postback the setOutputText() is called during the restore view phase which is before the conversation context is created by Seam (done in the afterPhase() of the restore view), so the component is unavailable.
For completeness here's the exception.
| javax.el.PropertyNotFoundException: /index.xhtml @11,68 binding="#{testBean.outputText}": Target Unreachable, identifier 'testBean' resolved to null
| at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:95)
| at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:228)
| at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:233)
| at com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:233)
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:186)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
| at java.lang.Thread.run(Thread.java:595)
|
The short term workaround would be to put component bindings in an event scoped component and inject it into the conversation component but I'd prefer not to do this.
Is it possible via some configuration/option to allow this particular combination? I looked at the SeamPhaseListener and it would be trivial to move the conversation setup code into the beforePhase() of restore view but I have no idea what side-effects this will have and if it will work.
Is the conversation setup done after restore view for a particular reason? Would be very useful to me personally as I think I will frequently need to bind UI components to do certain types of dynamic page creation in the code. I'm willing to spend some time looking at/trying this if it's worth investigating a change.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994781#3994781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994781
19 years, 7 months
[EJB 3.0] - @manytoone left join problem
by enesterov
Hi everyone,
I have many-to-one unidirectional relationship between two objects as follows:
| @Entity
| @Table(name = "A")
| public class A implements Serializable {
|
| private Long id;
|
| private B bObject;
|
| @Id
| public Long getId() {
| return id;
| }
|
| public void setId(Long _id) {
| id = _id;
| }
|
| @ManyToOne
| @JoinColumn(name = "a_id", insertable = false, updatable = false, nullable = true)
| public B getBObject() {
| return bObject;
| }
|
| public void setBObject(B _bObject) {
| bObject = _bObject;
| }
| }
|
| @Entity
| @Table(name = "B")
| public class B implements Serializable {
|
| private Long id;
|
| private Long aId;
|
| @Id
| public Long getId() {
| return id;
| }
|
| public void setId(Long _id) {
| id = _id;
| }
|
| @Column(name="a_id")
| public Long getAId() {
| return id;
| }
|
| public void setAId(Long _aId) {
| aId = _aId;
| }
| }
|
in the session bean I am getting List as follows:
| ...
| Query query = em.createQuery("select a from A a left outer join a.bObject as b ");
| query.setFirstResult(start);
| query.setMaxResults(MSG_PER_PAGE);
| List<A> result =query.getResultList();
| ...
|
The problem is that every time there is no record in table B that corresponds to record in table A I am getting the javax.persistence.EntityNotFoundException: Unable to find B with id 123
I am running Jboss 4.0.4.
Any help is appreciated.
Ed
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994778#3994778
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994778
19 years, 7 months
[JBoss Seam] - Can I mix Session, Entity and regular Java Beans in Seam app
by PatrickMadden
Hello,
I'm very new to Seam. I Have successfully created sites using JSP and Tomcat however.
I have seam CR2 deployed with 4.0.5GA using eclipse. I would like to be able to have a standard java beans created that is used as temporary object in my application to initialize some entity beans and then commit to the database. Take for example a very simple UserName and Password combination. My database password takes a byte[] for the password (sqlserver 2000). I can't change that. When I generate my entities the User Entity bean has a public void setPassword(byte[] password) method. Therefore I want a very simple POJO similar to the Greeter example that is not backed by the DB. I want to create this object as follows:
package com.foo.web.bean;
|
| import java.io.Serializable;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Out;
|
| @Name("Greeter")
| public class GreeterBean implements Serializable
| {
| /**
| *
| */
| private static final long serialVersionUID = 1L;
| private String name = "";
| private String password = "";
|
| @Out
| public String getName()
| {
| return name;
| }
|
| @Out
| public String getPassword()
| {
| return this.password;
| }
|
| @In
| public void setName(String name)
| {
| this.name = name;
| }
|
| @In
| public void setPassword(String password)
| {
| this.password = password;
| }
| }
|
And then use it in a form as follows:
<div id="sidebar">
| <fieldset>
| <div>
| <h:outputLabel for="name">Login Name</h:outputLabel>
| <h:inputText id="name" value="#{Greeter.name}" style="width: 175px;" />
| </div>
| <div>
| <h:outputLabel for="password">Password</h:outputLabel>
| <h:inputSecret id="password" value="#{Greeter.password}" style="width: 175px;" />
| </div>
| <div class="errors"><h:messages globalOnly="true"/></div>
| <div class="buttonBox"><h:commandButton action="#{Login.login}" value="Account Login" class="button" /></div>
| <div class="notes"><h:commandLink action="register">Register New User</h:commandLink></div>
| </fieldset>
| </div>
Inside my stateless LoginAction class, I have an @In Greeter variable and I will use it to extract the bytes from the password to login my user. However, when I do this I get the following error:
javax.faces.el.EvaluationException: /home.xhtml @25,77 value="#{Greeter.name}": Exception getting value of property name of base of type : com.clooster.web.ejb.session.GreeterBean$$EnhancerByCGLIB$$8988b3bf
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.faces.el.EvaluationException: Bean: com.clooster.web.ejb.session.GreeterBean$$EnhancerByCGLIB$$8988b3bf, property: name
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| ... 36 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
| ... 42 more
| Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: Greeter.password
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1878)
| at org.jboss.seam.Component.injectMethods(Component.java:1322)
| at org.jboss.seam.Component.inject(Component.java:1113)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:140)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:75)
| at com.clooster.web.ejb.session.GreeterBean$$EnhancerByCGLIB$$8988b3bf.getName(<generated>)
| ... 47 more
So my question is is this possible - am I doing something wrong? Any help is greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994772#3994772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994772
19 years, 7 months
[EJB 3.0] - Re: The EJB3 embeddable release contains errors
by klejs
Some updates:
I created a new jar file from the old one but added the NoResultException. In this way I got rid of the ClassNotFoundExceptions but I'm getting some other strange errors now. This is the coding I'm using to start the embedded server:
EJB3StandaloneBootstrap.boot(null);
| EJB3StandaloneDeployer deployer = new EJB3StandaloneDeployer(); deployer.getArchivesByResource().add("META-INF/persistence.xml");
| // need to set the InitialContext properties that deployer will use
| // to initial EJB containers
| deployer.setJndiProperties(getInitialContextProperties());
|
| deployer.create();
| deployer.start();
An error then occurs at deployer.create(). The warnings and exceptions looks like this:
[testng] WARN 18-12 19:55:31,321 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=file:/C:/dev/project/ejb/embedded_jboss_alpha/conf/bean-deployer_1_0.xsd
| [testng] WARN 18-12 19:55:31,337 (SaxJBossXBParser.java:warning:226) -schema_reference.4: Failed to read schema document 'bean-deployer_1_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ file:/C:/dev/project/ejb/embedded_jboss_alpha/conf/embedded-jboss-beans.xml[5,45]
| [testng] WARN 18-12 19:55:32,399 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
| [testng] WARN 18-12 19:55:33,978 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/javaee_5.xsd
| [testng] WARN 18-12 19:55:34,446 (JBossEntityResolver.java:getLocalEntityName:201) -Entity is not registered, publicId=null systemId=http://java.sun.com/xml/ns/javaee/javaee_web_services_client_1_2...
| [testng] FAILED: startEjbServer
| [testng] java.lang.NullPointerException
| [testng] at org.jboss.ejb3.Ejb3DescriptorHandler.isEjb(Ejb3DescriptorHandler.java:129)
| [testng] at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:310)
| [testng] at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:300)
| [testng] at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:282)
| [testng] at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:253)
| [testng] at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:240)
| [testng] at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.create(EJB3StandaloneDeployer.java:390)
| [testng] at test.EJBLifeCycle.startEjbServer(Unknown Source)
I used the jboss embeddable alpha_5 before and there everything worked perfect and I had no problems like this. The problem with alpha_5 was that the @EntityResult annotation wasn't updated to the spec. Does anyone have an idea about what could be wrong? The application is, by the way, working when I deploy it in JBoss AS.
Thanks in advance
/klejs
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994771#3994771
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994771
19 years, 7 months
[JBossCache] - Re: Buddy Replication and data consistency
by bstansberry@jboss.com
If you do a put with a local option, it won't replicate to anyone, so the node that did the replication will be out of sync with the buddies.
As to multiple nodes simultaneously doing a put on the same node, here's what happens. I'm assuming the node already exists.
Assume no tx running. The data in question is stored on server0 and it's buddy group.
1) You do a put() on server 1. Simultaneously a put() on server0.
2) DataGravitatorInterceptor.1 and DataGravitatorInterceptor.2 both see the node doesn't exist; fetches the node's data from across the cluster.
3) DataGravitatorInterceptor.1 and .2 take the data and do a put (not local). This replicates the data to its buddies. No tx, so no lock is held on the node. At this point there are three copies of the data -- the server0 group's, the server1 group's and the server2 group's.
4) DataGravitatorInterceptor.1 and .2 send a cleanup call to the cluster. Any copy of the data not associated with the sending server's buddy group is removed.
5) The original puts go through.
The end result here will very much depend on how things get interleaved. With REPL_SYNC you could end up with a TimeoutException in Step 4 as server1 and server2 tell each other to remove the data and deadlock. Or server1 completes steps 3-5 and then server 2 executes steps 3-5, in which case server 2's change wins. Or both complete step 3, then server 1 completes step 4 (so the server 0 and server 2 copies are gone), then server 2 completes step 4 (so the server 1 copy is gone). Then the both complete step 5, resulting in 2 sets of data, each of which only has the key/value pair included in the put.
Now, if there is a tx in place:
The put() in step 3 is done in a tx, so a write lock will be held on the node on each server until the tx commits. The put will not replicate until the tx commits.
The removes in step 4 will also not be broadcast until the tx commits.
The put in step 5 will not be replicated until the tx commits.
The fact that the WL from step 3 is held should make steps 3-5 atomic. If it's REPL_SYNC, you have two servers trying to write to the same node, so it's possible when the tx tries to commit you'll get a TimeoutExceptio due to a lock conflict. With REPL_ASYNC, the later tx will win; the step 5 put from the earlier tx will be lost.
But.. while writing this I'm pretty sure I've spotted a bug in the tx case. The step 4 cleanup call gets bundled together with the other tx changes and therefore only gets replicated to the server's buddy's, not to the whole cluster.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994763#3994763
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994763
19 years, 7 months
[JBoss Seam] - Seam 1.1.0.GA with IceFaces 1.5.1 - updating existing entity
by scotttam
Seam 1.1.0.GA
Icefaces 1.5.1
JBoss-AS 4.0.5.GA
MySQL 5.0.27
I created a basic Seam application following the instructions in the Seam documentation. I have 2 simple tables in a MySQL database for testing. I ran the following commands to create the basic application:
seam setup
seam new-project
seam generate-entities
After importing into Eclipse, deploying and starting the AS, the generated application works as expected. I can see the list of existing entities, create new ones and edit existing ones.
Now, I want to integrate with Icefaces. So, I followed the documentation from the Icefaces site:
http://support.icesoft.com/jive/servlet/KbServlet/download/623-102-847/Se...
When I redeploy, the list and creating a new entity works but selecting an existing item for update is not working. When I choose the Select link, it brings me to a page where all the fields are either 0 or empty, acting as if the id for the entity object does not exist.
Here's my web.xml:
| <?xml version="1.0" ?>
|
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
| <context-param>
| <param-name>javax.faces.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/navigation.xml</param-value>
| </context-param>
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
|
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>client</param-value>
| </context-param>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.actionURLSuffix</param-name>
| <param-value>.seam</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.synchronousUpdate</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>com.icesoft.faces.doJSFStateManagement</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <filter>
| <filter-name>Seam Exception Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Exception Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <!-- ICEFACES -->
| <servlet>
| <servlet-name>Blocking Servlet</servlet-name>
| <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
| <load-on-startup> 1 </load-on-startup>
| </servlet>
|
| <servlet>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>/xmlhttp/*</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>/xmlhttp/*</url-pattern>
| </servlet-mapping>
|
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>*.iface</url-pattern>
| </servlet-mapping>
|
| <!-- Blocking Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Blocking Servlet</servlet-name>
| <url-pattern>/block/*</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>Persistent Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
| </web-app>
|
faces-config.xml
| <?xml version='1.0' encoding='UTF-8'?>
| <!DOCTYPE faces-config PUBLIC
| "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
| <faces-config>
| <application>
| <message-bundle>messages</message-bundle>
| <view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
| </application>
|
| <managed-bean>
| <managed-bean-name>highlight</managed-bean-name>
| <managed-bean-class>com.icesoft.faces.context.effects.Highlight</managed-bean-class>
| <managed-bean-scope>application</managed-bean-scope>
| </managed-bean>
|
| <managed-bean>
| <managed-bean-name>timeZoneBean</managed-bean-name>
| <managed-bean-class>com.test.par.TimeZoneBean</managed-bean-class>
| <managed-bean-scope>session</managed-bean-scope>
| </managed-bean>
|
| <!-- Seam transaction management -->
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
| </lifecycle>
|
| <!-- No Seam transaction management -->
| <!--
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
| </lifecycle>
| -->
| </faces-config>
|
I also updated the build.xml to include the icefaces jars and replacing the facelets jar with the icefaces one:
| <?xml version="1.0"?>
|
| <project name="myproject" default="deploy" basedir=".">
|
| <!-- Give user a chance to override without editing this file or typing -D -->
| <property file="${basedir}/build.properties" />
|
| <!-- set global properties for this build -->
| <property name="project.name" value="myproject"/>
| <property name="dist.dir" value="dist" />
| <property name="src.java.dir" value="src" />
| <property name="lib.dir" value="lib" />
| <property name="ear.dir" value="exploded-archives/${project.name}.ear" />
| <property name="jar.dir" value="exploded-archives/${project.name}.jar" />
| <property name="war.dir" value="exploded-archives/${project.name}.war" />
| <property name="test.dir" value="build/test" />
| <property name="embedded-ejb3.dir" value="${basedir}/embedded-ejb/conf" />
| <property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
| <property name="ear.deploy.dir" value="${deploy.dir}/${project.name}.ear" />
| <property name="jar.deploy.dir" value="${ear.deploy.dir}/${project.name}.jar" />
| <property name="war.deploy.dir" value="${ear.deploy.dir}/${project.name}.war" />
| <property name="testng.jar" value="${basedir}/lib/testng-4.5.1-jdk15.jar" />
| <property name="javac.debug" value="true" />
| <property name="javac.deprecation" value="false" />
|
| <fileset id="lib" dir="${lib.dir}">
| <include name="*.jar" />
| </fileset>
|
| <path id="build.classpath">
| <fileset refid="lib" />
| </path>
|
| <target name="init" description="Initialize the build">
| <mkdir dir="${jar.dir}" />
| <mkdir dir="${ear.dir}" />
| <mkdir dir="${war.dir}" />
| <mkdir dir="${dist.dir}" />
| </target>
|
| <target name="compile" depends="init"
| description="Compile the Java source code"
| unless="eclipse.running">
| <javac classpathref="build.classpath"
| destdir="${jar.dir}"
| debug="${javac.debug}"
| deprecation="${javac.deprecation}"
| nowarn="on">
| <src path="${src.java.dir}" />
| </javac>
| </target>
|
| <target name="jar" depends="compile"
| description="Build the distribution .jar file">
| <copy todir="${jar.dir}">
| <fileset dir="${basedir}/resources">
| <include name="seam.properties" />
| <include name="import.sql" />
| </fileset>
| </copy>
| <copy todir="${jar.dir}/META-INF">
| <fileset dir="${basedir}/resources/META-INF">
| <include name="ejb-jar.xml" />
| <include name="persistence.xml" />
| </fileset>
| </copy>
| </target>
|
| <target name="war" depends="compile"
| description="Build the distribution .war file">
| <copy todir="${war.dir}">
| <fileset dir="${basedir}/view" />
| </copy>
| <copy todir="${war.dir}/WEB-INF">
| <fileset dir="${basedir}/resources/WEB-INF">
| <include name="*.*"/>
| <include name="classes/**/*.*"/>
| <exclude name="classes/**/*.class"/>
| </fileset>
| <filterset>
| <filter token="jndiPattern" value="${project.name}/#{ejbName}/local" />
| <filter token="embeddedEjb" value="false" />
| </filterset>
| </copy>
| <copy todir="${war.dir}/WEB-INF">
| <fileset dir="${basedir}/resources/WEB-INF">
| <include name="lib/*.*"/>
| <include name="classes/**/*.class"/>
| </fileset>
| </copy>
| <copy todir="${war.dir}/WEB-INF/lib">
| <fileset dir="${lib.dir}">
| <include name="icefaces.jar" />
| <include name="icefaces-comps.jar" />
| <include name="icefaces-facelets.jar" />
| <include name="el-api.jar" />
| <include name="el-ri.jar" />
| <include name="jboss-seam-debug.jar" />
| <include name="jboss-seam-ui.jar" />
| </fileset>
| </copy>
| <copy todir="${war.dir}/WEB-INF/classes">
| <fileset dir="${basedir}/resources">
| <include name="messages*.properties"/>
| </fileset>
| </copy>
| </target>
|
| <target name="ear" description="Build the EAR">
| <copy todir="${ear.dir}">
| <fileset dir="${basedir}/resources">
| <include name="*jpdl.xml" />
| <include name="hibernate.cfg.xml" />
| <include name="jbpm.cfg.xml" />
| </fileset>
| <fileset dir="${lib.dir}">
| <include name="jboss-seam.jar" />
| <include name="jbpm*.jar" />
| <include name="el-*.jar" />
| </fileset>
| </copy>
| <copy todir="${ear.dir}/META-INF">
| <fileset dir="${basedir}/resources/META-INF">
| <include name="application.xml" />
| <include name="jboss-app.xml" />
| </fileset>
| </copy>
| </target>
|
| <target name="archive" depends="jar,war,ear"
| description="Package the archives">
| <jar jarfile="${dist.dir}/${project.name}.jar" basedir="${jar.dir}"/>
| <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/>
| <jar jarfile="${dist.dir}/${project.name}.ear">
| <fileset dir="${ear.dir}"/>
| <fileset dir="${dist.dir}">
| <include name="${project.name}.jar"/>
| <include name="${project.name}.war"/>
| </fileset>
| </jar>
| </target>
|
| <target name="datasource">
| <fail unless="jboss.home">jboss.home not set</fail>
| <copy todir="${deploy.dir}">
| <fileset dir="${basedir}/resources">
| <include name="${project.name}-ds.xml" />
| </fileset>
| </copy>
| </target>
|
| <target name="explode" depends="jar,war,ear,datasource"
| description="Deploy the exploded archive">
| <fail unless="jboss.home">jboss.home not set</fail>
|
| <mkdir dir="${jar.deploy.dir}"/>
| <mkdir dir="${war.deploy.dir}"/>
|
| <copy todir="${jar.deploy.dir}">
| <fileset dir="${jar.dir}"/>
| </copy>
| <copy todir="${war.deploy.dir}">
| <fileset dir="${war.dir}"/>
| </copy>
| <copy todir="${ear.deploy.dir}">
| <fileset dir="${ear.dir}"/>
| </copy>
| </target>
|
| <target name="unexplode" description="Undeploy the exploded archive">
| <delete failonerror="no">
| <fileset dir="${ear.deploy.dir}">
| <exclude name="**/*.jar"/>
| </fileset>
| </delete>
| <delete file="${deploy.dir}/${project.name}-ds.xml" failonerror="no"/>
| <delete dir="${ear.deploy.dir}" failonerror="no"/>
| </target>
|
| <target name="restart" depends="explode" description="Restart the exploded archive">
| <touch file="${ear.deploy.dir}/META-INF/application.xml"/>
| </target>
|
| <target name="deploy" depends="archive,datasource" description="Deploy to JBoss AS">
| <fail unless="jboss.home">jboss.home not set</fail>
| <copy todir="${deploy.dir}" file="${dist.dir}/${project.name}.ear" />
| </target>
|
| <target name="undeploy" description="Undeploy the example from JBoss">
| <delete file="${deploy.dir}/${project.name}.ear" />
| <delete file="${deploy.dir}/${project.name}-ds.xml" />
| </target>
|
| <target name="clean" description="Cleans up the build directory">
| <delete dir="${dist.dir}" />
| <delete dir="${test.dir}" />
| <delete dir="${ear.dir}" />
| <delete dir="${war.dir}" />
| <delete>
| <fileset dir="${jar.dir}">
| <exclude name="**/*.class" if="eclipse.running"/>
| </fileset>
| </delete>
| </target>
|
| <target name="test" depends="jar,war,ear" description="Run the tests">
|
| <taskdef resource="testngtasks" classpath="${testng.jar}" />
| <copy todir="${test.dir}">
| <fileset dir="${basedir}/resources" />
| <fileset dir="${jar.dir}" />
| </copy>
|
| <copy todir="${test.dir}/WEB-INF">
| <fileset dir="${war.dir}/WEB-INF">
| <exclude name="**/*.jar" />
| </fileset>
| </copy>
|
| <copy todir="${test.dir}" flatten="true">
| <fileset dir="${src.java.dir}">
| <include name="**/*Test.xml" />
| </fileset>
| </copy>
|
| <testng outputdir="${basedir}/testng-report">
| <classpath path="${test.dir}" />
| <classpath path="${embedded-ejb3.dir}" />
| <classpath refid="build.classpath" />
| <xmlfileset dir="${test.dir}" includes="*Test.xml" />
| </testng>
|
| </target>
|
| </project>
|
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994761#3994761
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994761
19 years, 7 months