[Installation, Configuration & DEPLOYMENT] - JBoss 5.0.0Beta2 and Struts2 deployment problem
by mjremijan
Has anyone successfully deployed a Struts2 application onto JBoss 5.0.0Beta2? I get the following stack trace when I try to deploy a webapp which uses Struts2 technology:
| Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/jboss/j
| boss-5.0.0.Beta2/server/default/tmp/deploy/moss-homepage51895-exp.war/WEB-INF/lib/struts2-core-2.0.6
| .jar!/struts-default.xml:8:69
| at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvi
| der.java:209)
| at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider
| .java:101)
| at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
| at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:5
| 2)
| at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:398)
| at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:455)
| at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
| at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
| at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
| at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
| at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3720)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4367)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.j
| ava:300)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:138)
|
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:367)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:104)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:80)
| 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:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| 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:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.
| java:42)
| at org.jboss.system.microcontainer.ServiceControllerContextAction.install(ServiceControllerContextA
| ction.java:46)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextA
| ctions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:23
| 3)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:2
| 38)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:724)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:445)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:555)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:489)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:335)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:205)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:656)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:142)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:103)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.plugins.deployers.helpers.AbstractSimpleRealDeployer.deploy(AbstractSimpleRe
| alDeployer.java:56)
| at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.
| java:52)
| at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:170)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:592)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:603)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:476)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:406)
| 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:597)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
| at org.jboss.profileservice.aop.MainDeployerAspect.process(MainDeployerAspect.java:53)
| at org.jboss.aop.advice.org.jboss.profileservice.aop.MainDeployerAspect_z_process_10776760.invoke(M
| ainDeployerAspect_z_process_10776760.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at AOPContainerProxy$0.process(AOPContainerProxy$0.java)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:302)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:234)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadP
| oolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThread
| PoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExec
| utor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already bee
| n loaded by bean - jar:vfsfile:/C:/jboss/jboss-5.0.0.Beta2/server/default/deploy/moss-homepage.war/W
| EB-INF/lib/struts2-core-2.0.6.jar!/struts-default.xml:8:69 - bean - jar:file:/C:/jboss/jboss-5.0.0.B
| eta2/server/default/tmp/deploy/moss-homepage51895-exp.war/WEB-INF/lib/struts2-core-2.0.6.jar!/struts
| -default.xml:8:69
| at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvi
| der.java:194)
| ... 71 more
| 2007-08-31 07:39:02,631 ERROR [org.apache.catalina.core.StandardContext] Error filterStart
| 2007-08-31 07:39:02,631 ERROR [org.apache.catalina.core.StandardContext] Context [/moss-homepage] st
| artup failed due to previous errors
| 2007-08-31 07:39:02,646 DEBUG [org.jboss.web.tomcat.service.deployers.TomcatDeployment] Initialized:
| {WebApplication: /C:/jboss/jboss-5.0.0.Beta2/server/default/tmp/deploy/moss-homepage51895-exp.war/,
| URL: file:/C:/jboss/jboss-5.0.0.Beta2/server/default/tmp/deploy/moss-homepage51895-exp.war/, classL
| oader: java.net.FactoryURLClassLoader@1c9b4e7:29996263} jboss.web:j2eeType=WebModule,name=//localhos
| t/moss-homepage,J2EEApplication=none,J2EEServer=none
| 2007-08-31 07:39:02,646 DEBUG [org.jboss.deployers.plugins.deployment.MainDeployerImpl] Deployed: vf
| sfile:/C:/jboss/jboss-5.0.0.Beta2/server/default/deploy/moss-homepage.war
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082170#4082170
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082170
18 years, 7 months
[JBoss jBPM] - Re: Combo Box in Form
by karstendausb
Hi Ronald,
I just found some time to try it out.
"kukeltje" wrote :
| I'm curious though what would happen if you changed
|
| System.out.println("first.node-enter: directly after setting variable: instanceof selectitem:"+(test.get(0) instanceof javax.faces.model.SelectItem));
|
| to
|
| System.out.println("first.node-enter: directly after setting variable: instanceof selectitem:"+(executionContext.getContextInstance().getVariable("selectitems").get(0) instanceof javax.faces.model.SelectItem));
|
|
It returns true. Just adding them doesn't persist them, so this has to work.
anonymous wrote : I also wonder is something like this would work or if it would throw a classcastexception...
|
| | public List getItems() {
| | List elements = executionContext.getContextInstance().getVariable("selectitems");
| | Iterator i = elements.iterator();
| | List retVal = new LinkedList();
| |
| | while(i.hasNext()) {
| | javax.faces.model.SelectItem element = (javax.faces.model.SelectItem) i.next();
| | javax.faces.model.SelectItem item = new javax.faces.model.SelectItem(element.getId(),element.getValue());
| | retVal.add(item);
| | }
| | return retVal;
|
| I'll keep thinking/searching/...
That causes a ClassCastExcpetion:
| 15:24:08,213 WARN [Script] exception during evaluation of script expression
| Sourced file: inline evaluation of: ``List elements = executionContext.getContextInstance().getVariable("selectitems") . . . '' : Typed variable declaration : null : at Line: 1 : in file: inline evaluation of: ``List elements = executionContext.getContextInstance().getVariable("selectitems") . . . '' : ( javax .faces .model .SelectItem ) i .next ( )
|
| Target exception: java.lang.ClassCastException: Illegal cast. Cannot cast javax.faces.model.SelectItem to javax.faces.model.SelectItem
|
| at bsh.UtilTargetError.toEvalError(Unknown Source)
| at bsh.UtilEvalError.toEvalError(Unknown Source)
| at bsh.BSHCastExpression.eval(Unknown Source)
| at bsh.BSHVariableDeclarator.eval(Unknown Source)
| at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
| at bsh.BSHBlock.evalBlock(Unknown Source)
| at bsh.BSHBlock.eval(Unknown Source)
| at bsh.BSHBlock.eval(Unknown Source)
| at bsh.BSHWhileStatement.eval(Unknown Source)
| at bsh.Interpreter.eval(Unknown Source)
| at bsh.Interpreter.eval(Unknown Source)
| at bsh.Interpreter.eval(Unknown Source)
| at org.jbpm.graph.action.Script.eval(Script.java:129)
| at org.jbpm.graph.action.Script.eval(Script.java:72)
|
Very strange. What is happening here? I have a workaround (maps) for my proto and am thinking about Seam and other solutions, so this is not to urgent for me.
But persistence layer being broken will probably cause bad problems along the way?
Karsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082163#4082163
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082163
18 years, 7 months
[JBoss Messaging] - Exception: could not create native thread
by mwelss
After several days (7-11) we get the following exception.
At the time of the exception there about 1000 threads, but
exactly this jboss had more threads earlier in its lifetime.
The server is running Linux, jdk 1.6.0_02, jboss 4.2.1 and jboss-messaging 1.4.2.CR1.
Best regards,
Martin
anonymous wrote :
|
| 2007-09-07 11:02:53,912 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] Unable to schedule work
| javax.resource.spi.work.WorkRejectedException: org.jboss.util.threadpool.ThreadPoolFullException: java.lang.OutOfMemoryError: unable to create
| new native thread
| at org.jboss.resource.work.WorkWrapper.rejected(WorkWrapper.java:250)
| at org.jboss.util.threadpool.BasicTaskWrapper.taskRejected(BasicTaskWrapper.java:345)
| at org.jboss.util.threadpool.BasicTaskWrapper.rejectTask(BasicTaskWrapper.java:164)
| at org.jboss.util.threadpool.BasicThreadPool.execute(BasicThreadPool.java:417)
| at org.jboss.util.threadpool.BasicThreadPool.runTaskWrapper(BasicThreadPool.java:192)
| at org.jboss.resource.work.JBossWorkManager.executeWork(JBossWorkManager.java:205)
| at org.jboss.resource.work.JBossWorkManager.scheduleWork(JBossWorkManager.java:144)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.start(JmsServerSession.java:212)
| at org.jboss.jms.client.JBossConnectionConsumer.run(JBossConnectionConsumer.java:296)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.util.threadpool.ThreadPoolFullException: java.lang.OutOfMemoryError: unable to create new native thread
| ... 7 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082161#4082161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082161
18 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - Using Hibernate's ScanForMappingsEnabled
by homerlex
I have an EAR that contains a WAR and HAR. The HAR only contains the hibernate-service.xml which looks like this:
| <server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate"
| name="test.messaging:name=MessagingSessionFactory">
| <attribute name="DatasourceName">java:/MySqlDS</attribute>
| <attribute name="Dialect">
| org.hibernate.dialect.MySQLDialect
| </attribute>
| <attribute name="SessionFactoryName">
| java:/hibernate/MessagingSessionFactory
| </attribute>
| <attribute name="CacheProviderClass">
| org.hibernate.cache.HashtableCacheProvider
| </attribute>
| <attribute name="ShowSqlEnabled">true</attribute>
| <attribute name="ScanForMappingsEnabled">true</attribute>
| </mbean>
| </server>
|
The WAR has some servlets and also has a jar (in WEB-INF) that contains the hibernate mapping and class files.
When the servlet tries to do a save with one of these hibernate objects I get an exception: org.hibernate.MappingException: Unknown entity
I looked at the Jboss logs when the EAR deploys and it appears that the ONLY place being searched for the hibernate mappings is in the HAR file:
| 2007-09-07 09:11:30,627 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: tmp3596messagebrokerpersistence.har
|
It is my understanding that with ScanForMappingsEnabled set to true its supposed to scan the entire EAR for the mapping files. Am I missing something or doing something wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082156#4082156
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082156
18 years, 7 months