[Beginner's Corner] New message: "Re: Add JBoss as Eclipse Server"
by Peter Johnson
User development,
A new message was posted in the thread "Add JBoss as Eclipse Server":
http://community.jboss.org/message/529417#529417
Author : Peter Johnson
Profile : http://community.jboss.org/people/peterj
Message:
--------------------------------------------------------------
First, I highly recommend that you install JBoss AS locally and do your development work and testing there and use the remote JBoss AS only for system/qualification testing.
But if you still insist on using only a remote JBoss AS:
* As Wolfgang points out, you will need the JBoss AS libraries locally to get access the the required APIs. You will have to manually add the required libraries into your build path. (Eclipse can provide those libraries automatically only if you have a locally declared Server.)
* You mentioned web services, so you will need to run the web services tools (wsconsume, etc) manually from the command line and incorporate the results in your project.
* Eclipse can compile the project for you, but you will need some mechanism to deploy the result to the remote JBoss AS. Possibilities include: Wolfgang's plugin, scp, ftp, network drive
* You should be able to do remote debugging, I gave you the reference in the help where this is covered. I am uncertain as to how much, if any, of the JBoss AS source you will need to get the remote debugging to work properly.
If all that does not scare you, then I wish you the best of luck.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529417#529417
16 years, 1 month
[EJB 3.0] New message: "EJB3 SLBS access from a quartz job results in ClassNotFoundExceptions, working now about 8 hours on that :-(..."
by Michael Obster
User development,
A new message was posted in the thread "EJB3 SLBS access from a quartz job results in ClassNotFoundExceptions, working now about 8 hours on that :-(...":
http://community.jboss.org/message/529410#529410
Author : Michael Obster
Profile : http://community.jboss.org/people/praenti
Message:
--------------------------------------------------------------
Hi,
have some big problems accessing an EJB3 SLBS from a quartz job on JBoss 5.1.0. I always getting an error like this:
This the error:
17:08:10,041 ERROR [JobRunShell] Job default.job.0.1267546069637 threw an unhandled Exception:
javax.ejb.EJBTransactionRolledbackException: Unable to inject jndi dependency: env/vwg.audi.cancard.business.scheduler.jobs.StateCheckJob/stateFacade into property vwg.audi.cancard.business.scheduler.jobs.StateCheckJob.stateFacade: vwg.audi.cancard.business.facade.StateFacade from BaseClassLoader@517f0c{VFSClassLoaderPolicy@6c11eb{name=vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/ domain=ClassLoaderDomain@63a8af{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1ea5671} roots=[MemoryContextHandler@17599419[path= context=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22 real=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22], DelegatingHandler(a)11118241[path=quartz-ra.rar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar], DelegatingHandler(a)33202086[path=quartz-ra.rar/quartz-ra.jar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/quartz-ra.jar]] delegates=null exported=[org.jboss.resource.adapter.quartz.inflow, META-INF] <IMPORT-ALL>NON_EMPTY}}
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:80)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
at $Proxy347.execute(Unknown Source)
at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: java.lang.RuntimeException: Unable to inject jndi dependency: env/vwg.audi.cancard.business.scheduler.jobs.StateCheckJob/stateFacade into property vwg.audi.cancard.business.scheduler.jobs.StateCheckJob.stateFacade: vwg.audi.cancard.business.facade.StateFacade from BaseClassLoader@517f0c{VFSClassLoaderPolicy@6c11eb{name=vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/ domain=ClassLoaderDomain@63a8af{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1ea5671} roots=[MemoryContextHandler@17599419[path= context=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22 real=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22], DelegatingHandler(a)11118241[path=quartz-ra.rar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar], DelegatingHandler(a)33202086[path=quartz-ra.rar/quartz-ra.jar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/quartz-ra.jar]] delegates=null exported=[org.jboss.resource.adapter.quartz.inflow, META-INF] <IMPORT-ALL>NON_EMPTY}}
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:82)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:61)
at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1086)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
... 17 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + BaseClassLoader@517f0c{vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/}]]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1352)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
... 31 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + BaseClassLoader@517f0c{vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/}]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
... 35 more
Caused by: java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + BaseClassLoader@517f0c{vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/}
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:343)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 39 more
Caused by: java.lang.ClassNotFoundException: vwg.audi.cancard.business.facade.StateFacade from BaseClassLoader@517f0c{VFSClassLoaderPolicy@6c11eb{name=vfszip:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/ domain=ClassLoaderDomain@63a8af{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1ea5671} roots=[MemoryContextHandler@17599419[path= context=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22 real=vfsmemory://a6z3s46-c42kit-g6aw5jhs-1-g6aw5ydo-22], DelegatingHandler(a)11118241[path=quartz-ra.rar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar], DelegatingHandler(a)33202086[path=quartz-ra.rar/quartz-ra.jar context=file:/D:/server/jboss_cancard/server/default/deploy/ real=file:/D:/server/jboss_cancard/server/default/deploy/quartz-ra.rar/quartz-ra.jar]] delegates=null exported=[org.jboss.resource.adapter.quartz.inflow, META-INF] <IMPORT-ALL>NON_EMPTY}}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:339)
... 45 more
This is my job:
package vwg.audi.cancard.business.scheduler.jobs;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.EJB;
import javax.ejb.MessageDriven;
import org.apache.log4j.Logger;
import org.jboss.ejb3.annotation.ResourceAdapter;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import vwg.audi.cancard.business.facade.StateFacade;
/**
* Job: State check of the cards
*
* @author Michael Obster
*
*/
@MessageDriven(activationConfig =
{@ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "*/5 * * * * ?")})
@ResourceAdapter("quartz-ra.rar")
public class StateCheckJob implements Job {
@SuppressWarnings("unused")
private static Logger logger = Logger.getLogger(StateCheckJob.class);
@EJB
private StateFacade stateFacade;
/**
* @see org.quartz.Job#execute(org.quartz.JobExecutionContext)
*
* {@inheritDoc}
*/
public void execute(JobExecutionContext arg0) throws JobExecutionException {
stateFacade.checkCancardFeedback();
stateFacade.checkComputerFeedback();
}
}
And this is my SLBS:
package vwg.audi.cancard.business.facade;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import org.apache.log4j.Logger;
import org.jboss.spring.callback.SpringLifecycleInterceptor;
import vwg.audi.cancard.dao.CancardDao;
import vwg.audi.cancard.dao.ComputerDao;
import vwg.audi.cancard.dao.DAOFactory;
/**
* Implementation of State facade
*
* @author Michael Obster (michael.obster(a)epos-cat.de)
*
*/
@Stateless
@Local({StateFacade.class})
public class StateFacadeBean implements StateFacade {
@SuppressWarnings("unused")
private Logger log = Logger.getLogger(StateFacadeBean.class);
private CancardDao cancardDao;
private ComputerDao computerDao;
@EJB
private DAOFactory daoFactory;
/**
* Inits the daos.
*/
@PostConstruct
public void initDao() {
cancardDao = daoFactory.getCancardDao();
computerDao = daoFactory.getComputerDao();
}
@Override
public void checkCancardFeedback() {
cancardDao.checkState();
}
@Override
public void checkComputerFeedback() {
computerDao.checkState();
}
}
Anyone who can help me and give me a hint, what I'm doing wrong?
Regards,
Michael
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529410#529410
16 years, 1 month
[JBoss Web Services] New message: "Re: Unable to verify SOAP packet encryption"
by Peter Johnson
User development,
A new message was posted in the thread "Unable to verify SOAP packet encryption":
http://community.jboss.org/message/529409#529409
Author : Peter Johnson
Profile : http://community.jboss.org/people/peterj
Message:
--------------------------------------------------------------
OK, I reran the example from the book's source code (project ch09, target 10), and the log file shows the encrypted message. I also compared the book's source for ch09 as updated for AS 5.1.0 with the original source, which was for AS 5.0.0 and the only change was to a setting in the jboss-log4j.xml. So the task now is to figure out how you code and settings differ from that in the book:
a) The book doesn't declare an interface for the EJB, thus all of the annotations are on the implementation EJB. Possible fix: move the annotations to the implementation class.
b) Your client sets configs in the code (we've already gone over this)
That's it from the information you posted. I cannot comment on jboss-wsse-server.xml, jboss-wsse-client.xml or standard-jaxws-client-config.xml since you did not post them.
Have you run target 10 in ch09 and verified that the messages are encrypted? By the way, you will want to pull the sources from trunk in subversion since we do not yet have a downloadable zip file that contains updates for AS 5.1.0.GA (most of the chapters, chapter 9 included, have been updated for 5.1.0.GA in trunk).
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529409#529409
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: JBDEPLOY-243 or change deployment's relative order"
by Ales Justin
User development,
A new message was posted in the thread "JBDEPLOY-243 or change deployment's relative order":
http://community.jboss.org/message/529405#529405
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> > They want a -properties.xml to be deployed as a -service.xml
> > but for the -properties to go first in the REAL stage
> > so it can set the system properties before the mbeans
> > are created.
> Currently we don't order components -- with this new feature we will have to,
> otherwise we cannot order deployments with multiple matchings.
> e.g. both -properties.xml and -service.xml in the same sub-deployment
This is now done.
There is a helper method on AbstractDeployer
/**
* Change relative order on unit.
*
* @param unit the deploymenty unit
* @param relativeOrder the relative order
*/
protected static void changeRelativeOrder(DeploymentUnit unit, int relativeOrder)
{
if (unit instanceof DeploymentUnitExt)
{
DeploymentUnitExt ext = (DeploymentUnitExt) unit;
ext.changeRelativeOrder(relativeOrder);
}
}
which changes the relative order of given DeploymentUnit, while also notifying its parent of the change.
So, the next time you invoke any of the getters on the parent -- getChildren or getComponents -- those are re-ordered.
If one wants to keep the order consistent through out the deployment lifecycle, it must also reset the value to previous at undeploy.
e.g. we change the order 1st time, using it in some X deployer, then we change it the 2nd time, for Y, expecting both to hold also on undeploy
If there were multiple such changes, my guess is it would probably be hard to keep things under control.
But I doubt there will be more than 1-2 changes in the whole lifecycle.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529405#529405
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: Deployment lazyResolve and lazyStart"
by Ales Justin
User development,
A new message was posted in the thread "Deployment lazyResolve and lazyStart":
http://community.jboss.org/message/529396#529396
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> I propose we add a new META-INF/jboss-deployment.xml which would be some generic
> metadata for this kind of processing and other possible deployment control parameters.
Yeah, this would definitely be needed / useful -- for MC/AS boot time.
> <!-- Deploy this deployment in the described stage initially - i.e. no classloader -->
> <required-stage>DESCRIBE</required-stage>
>
> <!-- Only create the classloader when somebody wants to import our package or module -->
> <lazy-resolve/>
I guess the usage of the 2nd <lazy-resolve> would mean required-stage beyond DESCRIBE doesn't make sense.
Same for <lazy-start> if the required stage is set to REAL or past.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/529396#529396
16 years, 1 month