[JBoss Seam] - Re: a problem with jBpm in Seam
by mnrz
Hi again
As I had doubt on not loading Jbpm xml file, I decided to put my pageflow.jbpm.xml in the "deploy" directory and remove it from ear file. now it seems the Jboss try to deploy it but deployment fails and there is no noticeable exception message.
the name of pageflow file is myproject.jpdl.xml
| 2006-11-07 10:09:26,187 INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/H:/jboss-4.0.4.GA/server/default/deploy/registration.ear
| 2006-11-07 10:09:26,187 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: registration.ear
| 2006-11-07 10:09:26,187 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/H:/jboss-4.0.4.GA/server/default/deploy/registration.ear
| 2006-11-07 10:09:26,187 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/H:/jboss-4.0.4.GA/server/default/deploy/registration.ear -> file:/H:/jboss-4.0.4.GA/server/default/deploy/registration.ear
| 2006-11-07 10:09:26,187 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,187 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,203 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml -> H:\jboss-4.0.4.GA\server\default\tmp\deploy\tmp42474myproject.jpdl.xml
| 2006-11-07 10:09:26,203 DEBUG [org.jboss.deployment.MainDeployer] No deployer found for url: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,203 DEBUG [org.jboss.deployment.MainDeployer] deployment waiting for deployer: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,218 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,218 DEBUG [org.jboss.deployment.MainDeployer] Deployment of package: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml is waiting for an appropriate deployer.
| 2006-11-07 10:09:26,218 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml -> file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| 2006-11-07 10:09:26,218 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- Packages waiting for a deployer ---
| org.jboss.deployment.DeploymentInfo@8644f4a0 { url=file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| altDD: null
| lastDeployed: 1162881566218
| lastModified: 1162881566203
| mbeans:
|
| --- Incompletely deployed packages ---
| org.jboss.deployment.DeploymentInfo@8644f4a0 { url=file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/H:/jboss-4.0.4.GA/server/default/deploy/myproject.jpdl.xml
| altDD: null
| lastDeployed: 1162881566218
| lastModified: 1162881566203
| mbeans:
|
|
| 2006-11-07 10:09:26,234 DEBUG [org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread] Notified that enabled: true
| 2006-11-07 10:09:26,234 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
| 2006-11-07 10:09:26,250 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.deployment:type=DeploymentScanner,flavor=URL dependent components: []
| 2006-11-07 10:09:26,343 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: jboss-service.xml
| 2006-11-07 10:09:26,343 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/H:/jboss-4.0.4.GA/server/default/conf/jboss-service.xml
| 2006-11-07 10:09:26,343 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Saw org.jboss.system.server.started notification, starting connectors
| 2006-11-07 10:09:26,421 INFO [org.apache.coyote.http11.Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
| 2006-11-07 10:09:27,078 INFO [org.apache.jk.common.ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
| 2006-11-07 10:09:27,171 INFO [org.apache.jk.server.JkMain] Jk running ID=0 time=0/156 config=null
| 2006-11-07 10:09:27,187 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 55s:250ms
| 2006-11-07 10:16:46,156 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
| 2006-11-07 10:24:16,156 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
| 2006-11-07 10:31:46,156 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983643#3983643
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983643
19Â years, 6Â months
[Javassist user questions] - HotSwapper Exception
by wuyunlong
Code :
| //CtClass target = ...;
| HotSwapper swapper = new HotSwapper(8000);
| swapper.reload(target.getName(), target .toBytecode());
problem:
Listening for transport dt_socket at address: 8000
| Exception in thread "HotSwap" java.lang.UnsupportedOperationException: schema change not implemented
| at com.sun.tools.jdi.VirtualMachineImpl.redefineClasses(VirtualMachineImpl.java:309)
| at javassist.util.HotSwapper.hotswap(HotSwapper.java:249)
| at javassist.util.HotSwapper$1.run(HotSwapper.java:223)
| java.lang.RuntimeException: failed to reload: sun.misc.Launcher$AppClassLoader
| at javassist.util.HotSwapper.reload2(HotSwapper.java:203)
| at javassist.util.HotSwapper.reload(HotSwapper.java:159)
| at com.azk.component.bridge.ParentClassLoadAspect.save(ParentClassLoadAspect.java:125)
| at com.azk.component.bridge.ClassLoaderBridge.connect(ClassLoaderBridge.java:53)
| at com.azk.component.ClassLoaderBridgeTest.main(ClassLoaderBridgeTest.java:17)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983641#3983641
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983641
19Â years, 6Â months
[JBoss Seam] - Re: Sharing an Entity Between JSP's
by johnurban
I should have posted the code:
JSF with the call that needs to get me to the other screen:
| <h:column>
| <f:facet name="header">
| <h:outputText value="Print"/>
| </f:facet>
| <h:commandLink value="print" action="#{personFinder.print}">
| <f:param name="id" value="#{id}"/>
| </h:commandLink>
| </h:column>
|
When I click on Print, I can see that I get the System.out in the server.log file:
anonymous wrote :
| 00:12:42,820 INFO [STDOUT] inside print..:531
|
Here is the code for personFinder.print:
| ...
| @DataModelSelection
| @Out(required=false)
| private Person selectedPerson;
| ...
| @LoggedIn
| public String print() {
| System.out.println("inside print..:"+selectedPerson.getId());
| return "/uPrintLabel.jsp";
| }
|
|
It does indeed get to my uPrintLabel.jsp. But my firstName and lastName don't have anything in them:
| <h:form>
|
| <table>
| <tr>
| <td><h:outputText value="#{selectedPerson.firstName}"/></td>
| </tr>
| <tr>
| <td><h:outputText value="#{selectedPerson.lastName}"/></td>
| </tr>
| </table>
|
| </h:form>
|
|
This page contains nothing, even though selectedPerson has valid data inside of it. I need to display in this screen information about the selectedPerson.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983640#3983640
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983640
19Â years, 6Â months
[EJB 3.0] - @Clustered problem with SFSB and JBossAS 4.0.5.GA
by scotto
I am in the process of upgrading from JBossAS 4.0.4.GA (with EJB3 RC8) to 4.0.5.GA (EJB3 RC9).
The problem is that I now get a deployment exception in all Seam SFSBs that use the @Clustered annotation. These all previously deployed and worked fine fine:
anonymous wrote :
| 2006-11-07 11:17:38,281 153750 INFO [org.jboss.ejb3.EJBContainer] (main:) STARTED EJB: com.vieo.ccs.web.LoginBean ejbName: LoginBean
| 2006-11-07 11:17:38,390 153859 WARN [org.jboss.system.ServiceController] (main:) Problem starting service jboss.j2ee:ear=vieo-ccs.ear,jar=vieo-ccs.jar,name=LoginBean,service=EJB3
| java.lang.RuntimeException: java.lang.NoSuchFieldError: eviction_policy_provider
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:108)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy79.start(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96)
| at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy27.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy28.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NoSuchFieldError: eviction_policy_provider
| at org.jboss.ejb3.cache.tree.PassivationTreeCache.getEvictionPolicy(PassivationTreeCache.java:42)
| at org.jboss.ejb3.cache.tree.StatefulTreeCache.initialize(StatefulTreeCache.java:164)
| at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:94)
| 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.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
| ... 138 more
|
The code is based on the LoginBean in the 'issues' Seam example (examples/issues/src/org/jboss/seam/example/issues/LoginBean.java), the only difference being the extra @Clustered annotation and Serializable implementation:
| package com.vieo.ccs.web;
|
| import java.io.Serializable;
| import java.util.List;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.apache.log4j.Logger;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.Seam;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.contexts.Contexts;
| import org.jboss.seam.core.Conversation;
| import org.jboss.seam.core.FacesMessages;
| import org.jboss.annotation.ejb.Clustered;
|
| import com.vieo.ccs.model.identity.Identity;
|
| @Name("login")
| @Stateful
| @Scope(ScopeType.SESSION)
| @Clustered
| public class LoginBean implements Login, Serializable {
| private static final long serialVersionUID = -5556715111425574332L;
| static final Logger logger = Logger.getLogger(LoginBean.class);
|
| @PersistenceContext(name="vieo-ccs")
| private EntityManager em;
|
| @In(create=true)
| private Conversation conversation;
|
| @In(create=true)
| FacesMessages facesMessages;
|
| private Identity instance = new Identity();
|
| public Identity getInstance() {
| if(logger.isDebugEnabled()) logger.debug("getInstance()");
| return instance;
| }
|
| public String login()
| {
| List results = em.createQuery(
| "SELECT i from Identity i where username=:username and password=:password")
| .setParameter("username", instance.getUsername())
| .setParameter("password", instance.getPassword())
| .getResultList();
| if (results.size() == 0) {
| if(logger.isInfoEnabled()) logger.info("Login failed for user '" + instance.getUsername() + "'");
| facesMessages.addFromResourceBundle("InvalidLogin");
| return null;
| } else {
| if(logger.isInfoEnabled()) logger.info("User '" + instance.getUsername() + "' logged in");
| Contexts.getSessionContext().set("loggedIn", true);
| instance = (Identity) results.get(0);
| String outcome = conversation.redirect();
| return outcome == null ? "home" : outcome;
| }
| }
|
| public String logout()
| {
| if(logger.isInfoEnabled()) logger.info("User '" + instance.getUsername() + "' logged out");
| Contexts.getSessionContext().remove("loggedIn");
| Seam.invalidateSession();
| return "login";
| }
|
| @Remove @Destroy
| public void destroy() {
| if(logger.isDebugEnabled()) logger.debug("destroy()");
| }
| }
|
I have also tried upgrading from Seam 1.0.1.GA to Seam 1.1 Beta 1 and get the same exception on deployment (I think it is a more generic SFSB problem rather than something which is Seam specific).
>From searching the forums for similar exceptions, this looks like it could have be a problem with an old version of jboss-cache. However, I have confirmed that my JBoss is using 1.4.0.SP1 of jboss-cache.jar, and also tried rebuilding Seam 1.1 Beta 1 using the exact same jboss-cache.jar that ships in JBossAS 4.0.5.GA - no difference.
Can anyone give me any clues as to what might be going wrong here?
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983639#3983639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983639
19Â years, 6Â months
[JBoss Seam] - Scanner not picking up the @Name
by samau
Trying to replicate the booking sample in eclipse (Myeclipse with ear,jar,war projects).
Some how the scanner is not loading the component @name up. I keep getting "Component: null" on my user defined components.
I have a blank seam.properties in the component jar.
13:26:40,591 INFO [Scanner] scanning: /D:/Program Files/jboss-4.0.5.GA/server/default/tmp/deploy/tmp61828testbooking.ear-contents/testbookingEJB3.jar
13:26:40,638 INFO [Component] Component: null, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.testbooking.action.LogoutAction, JNDI: testbooking/LogoutAction/local
13:26:40,685 ERROR [[/testbookingWeb]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NullPointerException
at java.lang.String.startsWith(String.java:1252)
at java.lang.String.startsWith(String.java:1281)
at org.jboss.seam.Component.initInitializers(Component.java:325)
at org.jboss.seam.Component.(Component.java:248)
Any pointers to what I may have done wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983632#3983632
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983632
19Â years, 6Â months