[JBoss AS 7 Development] - quartz-service.xml Jboss7.1
by rathm1
rathm1 [https://community.jboss.org/people/rathm1] created the discussion
"quartz-service.xml Jboss7.1"
To view the discussion, visit: https://community.jboss.org/message/721223#721223
--------------------------------------------------------------
Hi there,
I am trying to deploy my quartz-service.xml in Jboss7.1, previously we had it working in Jboss4.2.3 and Jboss6.1.0.
I have the quartz-1.8.5.jar and the quartz-jboss-1.8.5.jar in the lib directory of my ear.
When I try placing the quartz-service.xml in my standalone/deployments folder I get the error:
[org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."quartz-service.xml".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."quartz-service.xml".INSTALL: Failed to process phase INSTALL of deployment "quartz-service.xml"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: java.lang.IllegalArgumentException: JBAS017220: Class not found
at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:115)
at org.jboss.as.service.ReflectionUtils.getClassHierarchy(ReflectionUtils.java:122)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:108)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:99)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.quartz.ee.jmx.jboss.QuartzService from [Module "deployment.quartz-service.xml:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_26]
at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_26]
at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:113)
... 9 more
My quartz-service.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.quartz.ee.jmx.jboss.QuartzService"
name="user:service=QuartzService,name=QuartzService">
<depends>jboss.jca:service=DataSourceBinding,name=MyDS</depends>
<attribute name="Properties">
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.xaTransacted = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = QUARTZ
org.quartz.jobStore.nonManagedTXDataSource = QUARTZ_NO_TX
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.dataSource.QUARTZ.jndiURL = java:jboss/datasources/MyDS
org.quartz.dataSource.QUARTZ_NO_TX.jndiURL = java:jboss/datasources/MyNoTxDS
</attribute>
</mbean>
</server>
Does anyone have any suggestions as to how this should be configured in jboss 7.1?
Thanks a lot.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/721223#721223]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[JBoss AS 7 Development] - Migrating from AS4 to AS7 - Problem loading view templates
by Neil Doshi
Neil Doshi [https://community.jboss.org/people/ndoshi] created the discussion
"Migrating from AS4 to AS7 - Problem loading view templates"
To view the discussion, visit: https://community.jboss.org/message/744935#744935
--------------------------------------------------------------
I am migrating my spring mvc web app from AS4 to AS7.
The application is having a hard time finding my view templates (we are using velocity templates for our view).
This currently works fine in AS4 as is.
The project structure is as follows:
/
/src
/com
(etc...)
/WebContent
/WEB-INF
/velocity
/login
/login.vm
Here is an excerpt from my spring config file:
Stack Trace:
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/WEB-INF/velocity/login/login.vm'
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483)
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354)
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400)
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:401)
org.springframework.web.servlet.view.velocity.VelocityView.getTemplate(VelocityView.java:535)
org.springframework.web.servlet.view.velocity.VelocityView.getTemplate(VelocityView.java:520)
org.springframework.web.servlet.view.velocity.VelocityView.checkTemplate(VelocityView.java:293)
org.springframework.web.servlet.view.velocity.VelocityLayoutView.checkTemplate(VelocityLayoutView.java:122)
org.springframework.web.servlet.view.velocity.VelocityView.initApplicationContext(VelocityView.java:258)
org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:69)
org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:70)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:341)
org.springframework.web.servlet.view.UrlBasedViewResolver.loadView(UrlBasedViewResolver.java:413)
org.springframework.web.servlet.view.AbstractCachingViewResolver.createView(AbstractCachingViewResolver.java:159)
org.springframework.web.servlet.view.UrlBasedViewResolver.createView(UrlBasedViewResolver.java:378)
org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:78)
org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1215)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1164)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
I tried a few different options for the "prefix" property
* /WEB-INF/velocity/
* WEB-INF/velocity/
* customerportal.war/WEB-INF/velocity/
* com.odc.customerportal/WEB-INF/velocity/
I am able to reorganize the location of the files in the built war file if necessary.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744935#744935]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[JBoss AS 7 Development] - JBoss AS 7.1.1.Final custom login module for remoting and custom principal
by Sebastian Raue
Sebastian Raue [https://community.jboss.org/people/sraue] created the discussion
"JBoss AS 7.1.1.Final custom login module for remoting and custom principal"
To view the discussion, visit: https://community.jboss.org/message/726343#726343
--------------------------------------------------------------
For remoting we have made a custom login module which extends org.jboss.security.auth.spi.AbstractServerLoginModule.
The overwritten method getIdenttity() returns a custom principal - ApplicationPrincipal.
We can access the principal inside our ejbs via
@Resource
public SessionContext sessionContext;
....
Principal principal = sessionContext.getCallerPrincipal();
....
but we get a ClassCastException when we try to cast the returned Principal into ApplicationPrincipal.
On the other hand principal.getClass().getName() returns the expected class name.
The problem is that our login module is deployed as a jboss module (<jboss-home>/modules) - inside a jar which also
contains ApplicationPrincipal. The ear containing our ejb.jar which contains our ejbs also contains a copy of ApplicationPrincipal.
The problem is that our custom login module and the ApplicationPrincipal are loaded by one class loader and our
ejbs and the ApplicationPrincipal copy are loaded by another class loader. The ApplicationPrincipal from the login module which we get
by calling sessionContext.getCallerPrincipal() in the ejb is no ApplicationPrincipal known by the ejbs.
What can we do to solve this problem?
I have tried to put the custom login module code into our ear and adjusted the "module" attribute value of <login-module>
in our standalone.xml to deployment.<app-name>.ear.<ejb-jar-name>.jar but it did not work. Exception on the remote client was:
javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
As a separate module and the respective <login-module> configuration in standalone.xml the authentication works fine with our login module
- we only have the described ClassCastException problem.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/726343#726343]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months