[Installation, Configuration & Deployment] - Re: deployment order of modules within an EAR
by Oyabun
Read more about the jboss-service.xml
| C:\jboss-4.0.2\server\default\conf\jboss-service.xml
| ...
| <!-- ==================================================================== -->
| <!-- Deployment Scanning -->
| <!-- ==================================================================== -->
|
| <!-- An mbean for hot deployment/undeployment of archives.
| -->
| <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
| name="jboss.deployment:type=DeploymentScanner,flavor=URL">
|
| <!-- Uncomment (and comment/remove version below) to enable usage of the
| DeploymentCache
| <depends optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
| -->
| <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
|
| <!-- The URLComparator can be used to specify a deployment ordering
| for deployments found in a scanned directory. The class specified
| must be an implementation of java.util.Comparator, it must be able
| to compare two URL objects, and it must have a no-arg constructor.
| Two deployment comparators are shipped with JBoss:
| - org.jboss.deployment.DeploymentSorter
| Sorts by file extension, as follows:
| "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
| "*"
| - org.jboss.deployment.scanner.PrefixDeploymentSorter
| If the name portion of the url begins with 1 or more digits, those
| digits are converted to an int (ignoring leading zeroes), and
| files are deployed in that order. Files that do not start with
| any digits will be deployed first, and they will be sorted by
| extension as above with DeploymentSorter.
| -->
| <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
| <!--
| <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
| -->
|
Regards,
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989622#3989622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989622
19Â years, 5Â months
[JBoss Seam] - Seam throws exception while working with DataModel
by lamerbot
Hello.
I'm new to seam and i want to integrate seam capability with AndroMDA product.
I use AndroMDA for generating EJB3 and DAOs.
I made a simple application that allows users login and see userlist.
There are some strangeness:
After user login he able to see userslist. There are an link to CreateNewUser from that page. When user created it's rediercts toViewAllUsers. All work's fine, but:
When i add capability to delete User (delete button in userlist according to seam examples) i got an error:
| 12:07:22,138 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| javax.faces.FacesException: Error calling action method of component with id _id0:_id2_4:_id13
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:7
| 4)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIData.broadcast(UIData.java:338)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
| ava:252)
| 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.j
| ava: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.ja
| va: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.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(Htt
| p11BaseProtocol.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: Exception while invoking expression #{userService.del
| eteUser}
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:6
| 3)
| ... 25 more
| Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: could not set field value: us
| erService.userDataModel
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor
| .java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.jav
| a:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:1
| 06)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy871.deleteUser(Unknown Source)
| 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.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| ... 26 more
| Caused by: java.lang.IllegalArgumentException: could not set field value: userService.userDataModel
| at org.jboss.seam.Component.setFieldValue(Component.java:1214)
| at org.jboss.seam.Component.injectDataModelSelection(Component.java:909)
| at org.jboss.seam.Component.injectDataModelSelection(Component.java:874)
| at org.jboss.seam.Component.inject(Component.java:796)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionIntercept
| or.java:30)
| at sun.reflect.GeneratedMethodAccessor594.invoke(Unknown Source)
| 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:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(Con
| versationInterceptor.java:82)
| at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source)
| 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:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(Busin
| essProcessInterceptor.java:60)
| at sun.reflect.GeneratedMethodAccessor592.invoke(Unknown Source)
| 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:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39
| )
| at sun.reflect.GeneratedMethodAccessor591.invoke(Unknown Source)
| 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:13)
| at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
| at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
| at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
| at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
| at sun.reflect.GeneratedMethodAccessor656.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor
| .java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedE
| ntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 46 more
| Caused by: java.lang.IllegalArgumentException
| at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
| at java.lang.reflect.Field.set(Field.java:656)
| at org.jboss.seam.Component.setFieldValue(Component.java:1210)
| ... 90 more
|
I try many wariants and now i'm going mad
There are code of my userService class:
| @Name("userService")
| @Stateless
| @Scope(SESSION)
|
| @javax.ejb.Local({com.accarda.manobobs.service.UsersServiceLocal.class})
| @javax.ejb.Remote({com.accarda.manobobs.service.UsersServiceRemote.class})
| @Interceptors(SeamInterceptor.class)
| public class UsersServiceBean extends
| com.accarda.manobobs.service.UsersServiceBase {
|
| //seam injections
| @In(required=false)
| private UserVO2Seam userVO2Seam;
|
| @Logger
| private Log log;
|
| @DataModel
| private List<UserVO2Seam> userDataModel;
| @DataModelSelection
| @In(required=false)
| @Out(required=false)
| private UserVO2Seam selectionUser;
| // --------------- Constructors ---------------
|
| public UsersServiceBean() {
| super();
| }
|
|
| public List<UserVO2Seam> getUserDataModel() {
| return userDataModel;
| }
|
|
| public void setUserDataModel(List<UserVO2Seam> userDataModel) {
| this.userDataModel = userDataModel;
| }
|
|
| // -------- Business Methods Impl --------------
| protected void handleSelect() throws Exception {
| // TODO Auto-generated method stub
| }
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#createUser(com.accarda.manobobs.model.vo.UsersVO[])
| */
| protected String handleCreateUserFromSeam() throws Exception {
| String result = "userlist";
| try{
| updateUser(userVO2Seam);
| userDataModel = new ArrayList(getUsersDao().loadAll(UsersDao.TRANSFORM_USERSVO));
| } catch (Exception e) {
| log.error(e.getMessage());
| result = "creatingerror";
| FacesMessages.instance().add("Nick name must be unique");
| }
|
| return result;
| }
|
|
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#updateUser(UsersVO)
| */
| protected void handleUpdateUser(UsersVO userVO) throws Exception {
| getUsersDao().update(getUsersDao().usersVOToEntity(userVO));
| }
|
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#deleteUser()
| */
| protected void handleDeleteUser() throws Exception {
| if(selectionUser != null){
| getUsersDao().remove(selectionUser.getId());
| userDataModel.remove(selectionUser);
| }
| }
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#createUser(com.accarda.manobobs.model.vo.UsersVO[])
| */
| protected void handleCreateUser(com.accarda.manobobs.model.vo.UsersVO userVO)
| throws java.lang.Exception {
| getUsersDao().create(userVO.getFirstName(), userVO.getLastName(),
| userVO.getPassword(), userVO.getNickname());
| log.info("User Created");
| }
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#populateUsers()
| */
|
| protected void handlePopulateUsers() throws Exception {
|
| }
|
| @Factory("userDataModel")
| public void findUsers() {
| log.info("-------POPULATING-----USERS-------");
| try{
| userDataModel = new ArrayList(getUsersDao().loadAll(UsersDao.TRANSFORM_USERSVO));
| } catch (Throwable th) {
| log.error(th);
| }
|
| }
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#deleteUser(java.lang.Long)
| */
| protected void handleDeleteUser(java.lang.Long id)
| throws java.lang.Exception {
| // TODO: put your implementation here.
| throw new java.lang.UnsupportedOperationException(
| "com.accarda.manobobs.service.UsersServiceBean.handleDeleteUser(java.lang.Long id) Not implemented!");
| }
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#getUser(java.lang.Long)
| */
| protected com.accarda.manobobs.model.vo.UsersVO handleGetUser(
| java.lang.Long id) throws java.lang.Exception {
| // TODO: put your implementation here.
| // Dummy return value, just that the file compiles
| return null;
| }
|
| /**
| * @see com.accarda.manobobs.service.UsersServiceBase#getAllUsers()
| */
| protected com.accarda.manobobs.model.vo.UsersVO[] handleGetAllUsers()
| throws java.lang.Exception {
| // TODO: put your implementation here.
| // Dummy return value, just that the file compiles
| return null;
| }
|
|
| // -------- Lifecycle Callback Impl --------------
|
| }
|
UserServiceBase code:
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| @javax.ejb.Remote({com.accarda.manobobs.service.UsersServiceRemote.class})
| public abstract class UsersServiceBase
| implements com.accarda.manobobs.service.UsersServiceRemote
| {
| // ------ Session Context Injection ------
|
| @javax.annotation.Resource
| protected javax.ejb.SessionContext context;
|
| // ------ Persistence Context Definitions --------
|
| /**
| * Inject persistence context manobonsweb
| */
| @javax.persistence.PersistenceContext(unitName = "manobonsweb")
| protected javax.persistence.EntityManager emanager;
|
| // ------ DAO Injection Definitions --------
|
| /**
| * Inject DAO UsersDao
| */
| @javax.ejb.EJB
| private com.accarda.manobobs.model.domain.UsersDao usersDao;
|
| // --------------- Constructors ---------------
|
| public UsersServiceBase()
| {
| super();
| }
|
| // ------ DAO Getters --------
|
| /**
| * Get the injected DAO UsersDao
| */
| protected com.accarda.manobobs.model.domain.UsersDao getUsersDao()
| {
| return this.usersDao;
| }
|
| // -------- Business Methods --------------
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void createUser(com.accarda.manobobs.model.vo.UsersVO userVO)
| {
| if (userVO == null)
| {
| throw new IllegalArgumentException(
| "com.accarda.manobobs.service.UsersServiceBean.createUser(com.accarda.manobobs.model.vo.UsersVO userVO) - 'userVO' can not be null");
| }
| try
| {
| this.handleCreateUser(userVO);
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.createUser(com.accarda.manobobs.model.vo.UsersVO userVO)' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #createUser(com.accarda.manobobs.model.vo.UsersVO)}
| */
| protected abstract void handleCreateUser(com.accarda.manobobs.model.vo.UsersVO userVO)
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void deleteUser(java.lang.Long id)
| {
| if (id == null)
| {
| throw new IllegalArgumentException(
| "com.accarda.manobobs.service.UsersServiceBean.deleteUser(java.lang.Long id) - 'id' can not be null");
| }
| try
| {
| this.handleDeleteUser(id);
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.deleteUser(java.lang.Long id)' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #deleteUser(java.lang.Long)}
| */
| protected abstract void handleDeleteUser(java.lang.Long id)
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public com.accarda.manobobs.model.vo.UsersVO getUser(java.lang.Long id)
| {
| if (id == null)
| {
| throw new IllegalArgumentException(
| "com.accarda.manobobs.service.UsersServiceBean.getUser(java.lang.Long id) - 'id' can not be null");
| }
| try
| {
| return this.handleGetUser(id);
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.getUser(java.lang.Long id)' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #getUser(java.lang.Long)}
| */
| protected abstract com.accarda.manobobs.model.vo.UsersVO handleGetUser(java.lang.Long id)
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public com.accarda.manobobs.model.vo.UsersVO[] getAllUsers()
| {
| try
| {
| return this.handleGetAllUsers();
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.getAllUsers()' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #getAllUsers()}
| */
| protected abstract com.accarda.manobobs.model.vo.UsersVO[] handleGetAllUsers()
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public java.lang.String createUserFromSeam()
| {
| try
| {
| return this.handleCreateUserFromSeam();
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.createUserFromSeam()' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #createUserFromSeam()}
| */
| protected abstract java.lang.String handleCreateUserFromSeam()
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void populateUsers()
| {
| try
| {
| this.handlePopulateUsers();
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.populateUsers()' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #populateUsers()}
| */
| protected abstract void handlePopulateUsers()
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void updateUser(com.accarda.manobobs.model.vo.UsersVO userVO)
| {
| if (userVO == null)
| {
| throw new IllegalArgumentException(
| "com.accarda.manobobs.service.UsersServiceBean.updateUser(com.accarda.manobobs.model.vo.UsersVO userVO) - 'userVO' can not be null");
| }
| try
| {
| this.handleUpdateUser(userVO);
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.updateUser(com.accarda.manobobs.model.vo.UsersVO userVO)' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #updateUser(com.accarda.manobobs.model.vo.UsersVO)}
| */
| protected abstract void handleUpdateUser(com.accarda.manobobs.model.vo.UsersVO userVO)
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void deleteUser()
| {
| try
| {
| this.handleDeleteUser();
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.deleteUser()' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #deleteUser()}
| */
| protected abstract void handleDeleteUser()
| throws java.lang.Exception;
|
| /**
| *
| */
| @javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRED)
| public void select()
| {
| try
| {
| this.handleSelect();
| }
| catch (Throwable th)
| {
| throw new com.accarda.manobobs.service.UsersServiceException(
| "Error performing 'com.accarda.manobobs.service.UsersService.select()' --> " + th,
| th);
| }
| }
|
| /**
| * Performs the core logic for {@link #select()}
| */
| protected abstract void handleSelect()
| throws java.lang.Exception;
|
|
| // -------- Lifecycle Callbacks --------------
|
| }
|
And finally JSP code:
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
| <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s"%>
| <html>
| <head>
| <title>Users</title>
| </head>
| <body>
| <f:view>
| <h:form>
| <h2>User List</h2>
| <h:outputText value="No users to display"
| rendered="#{userDataModel.rowCount==0}" />
| <h:dataTable var="user" value="#{userDataModel}"
| rendered="#{userDataModel.rowCount>0}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="Nickname" />
| </f:facet>
| <h:commandLink value="#{user.nickname}" action="#{userService.select}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="First Name" />
| </f:facet>
| <h:outputText value="#{user.firstName}" />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Last Name" />
| </f:facet>
| <h:outputText value="#{user.lastName}" />
| </h:column>
| <h:column>
| <h:commandButton value="Delete" action="#{userService.deleteUser}" />
| </h:column>
| </h:dataTable>
|
| <h3><h:outputText value="#{selectionUser.firstName}" /></h3>
| <div><h:outputText value="#{selectionUser.lastName}" /></div>
|
| <s:link view="/user/CreateUser.jsp" value="Create User" />
| </h:form>
| </f:view>
| </body>
| </html>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989621#3989621
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989621
19Â years, 5Â months
[Installation, Configuration & Deployment] - Mbeans Releated Problem..new to jboss.. plz help
by samfromindia
Hi,
I am new to jboss.please help me for the following problem.
In my application i have a .ini file where we have some configuration values which must be set at the time of deployment of the build.
What i am trying to do is creating a MBEAN through which we can change the values through jmx console. and my application will read all the values from this mbean.
i have created one interface and one class which implements the interface.
when i try to compile the build it says build suceesful and i also can see the sar file in the server>default>deploy folder.
but imedidately after i am getting this exception.
13:05:11,758 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-4.0.1/server/default/deploy/blog_example.sar
org.jboss.deployment.DeploymentException: No ClassLoaders found for: blog.example.services.BlogExampleService; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: blog.example.services.BlogExampleService)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
at org.jboss.system.ServiceController.install(ServiceController.java:200)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:208)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: blog.example.services.BlogExampleService
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1183)
at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:269)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:327)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:125)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
... 33 more
plzzzzz help me what to do now.
Thanks in advance!!
sam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989620#3989620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989620
19Â years, 5Â months
[EJB/JBoss] - access denied security policy write
by minixman
All i have a strange problem with my RMI client, i am trying to connect to the jboss which has been started in my VM by eclipse, when i try and access it i get the following error.
java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.poli
cy write)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
I have setup the security manager
System.setProperty("java.security.policy", "client.policy");
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
Properties env = new Properties();
// Definir las propiededes y ubicacion de busqueda de Nombres JNDI.
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
InitialContext ic = new InitialContext(env);
And i have created the client policy file
grant {
permission java.security.AllPermission;
};
And in the eclipse run as option i put in VM args
-Djava.security.manager -Djava.security.policy=client.policy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989614#3989614
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989614
19Â years, 5Â months