[JBoss ESB Development] - Exception handling between actions and ftp-listener
by Phillip Schulte
Phillip Schulte [http://community.jboss.org/people/phillip.schulte] created the discussion
"Exception handling between actions and ftp-listener"
To view the discussion, visit: http://community.jboss.org/message/564097#564097
--------------------------------------------------------------
Hello.
Thats one service in my jboss-esb.xml
<service category="de.eskalon.kn.garuda.invoice.HistoricalExchangeRates" name="HistoricalExchangeRateImporter" description="Imports historical exchange rates from ftp directory files" invmScope="GLOBAL">
<service category="de.eskalon.kn.garuda.invoice.HistoricalExchangeRates" name="HistoricalExchangeRateImporter" description="Imports historical exchange rates from ftp directory files" invmScope="GLOBAL">
<listeners>
<ftp-listener busidref="currency-ftp-in" is-gateway="true" maxThreads="2" name="ftp-listener-gateway" scheduleidref="everyminute" />
</listeners>
<actions mep="OneWay">
<action name="transform" class="org.jboss.soa.esb.actions.converters.ByteArrayToString">
<property name="encoding" value="UTF-8" />
</action>
<action name="properties" class="de.eskalon.kn.garuda.esb.GetPropertiesFromMessage"> </action>
<action class="org.jboss.soa.esb.actions.EJBProcessor" name="callPersist">
<property name="ejb3" value="true" />
<property name="jndi-name" value="garuda-invoicing/HistoricalExchangeRatesManagerBean/remote" />
<property name="initial-context-factory" value="org.jnp.interfaces.NamingContextFactory" />
<property name="provider-url" value="localhost:1099" />
<property name="method" value="persistRate" />
<property name="ejb-params">
<arg0 type="java.lang.String">FILE_NAME</arg0>
<arg1 type="java.lang.String">org.jboss.soa.esb.message.defaultEntry</arg1>
</property>
</action>
</actions>
</service>
<listeners>
And here my ftp-provider
<ftp-provider hostname="${currency.ftp.host}" name="currency-provider">
<ftp-bus busid="currency-ftp-in">
<ftp-message-filter directory="${currency.ftp.directory}" error-delete="false" error-suffix=".HAS_ERROR"
input-suffix=".csv"
passive="true" password="${currency.ftp.password}" post-delete="false" post-rename="true"
post-suffix=".COMPLETE" username="${currency.ftp.username}" work-suffix=".garudaWorking" />
</ftp-bus>
</ftp-provider>
So its possible tthat something goes wrong in my persistRate method. But in any case the ftp-listener will rename the file to <filename>.COMPLETE independently of throwing an exception in my method. So my question is how do I handle this correctly. What I want to have is, if anything goes wrong rename the file to <filename>.HAS_ERROR
Best regards
Phillip
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564097#564097]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM Development] - error using ant scripts in deploying process archive
by sunil deshpande
sunil deshpande [http://community.jboss.org/people/desunil] created the discussion
"error using ant scripts in deploying process archive"
To view the discussion, visit: http://community.jboss.org/message/624240#624240
--------------------------------------------------------------
hi all, I am using jbpm 3.2.8 and jboss server 5.0.1 I m trying to deploy a test process using ant scripts , but getting folowing error..., unable to find the error, i have attached build.xml file and properties file, plz post the solution..
D:\jbpm\redhat training\JBPM-Training\labs\lab3-deployment>ant deploy.process
Buildfile: D:\jbpm\redhat training\JBPM-Training\labs\lab3-deployment\build.xml
build.process:
declare.jbpm.tasks:
deploy.process:
[deployprocess] parsing process archive insuranceprocess.par
[deployprocess] parsed process definition InsuranceProcess
[deployprocess] failed to deploy process InsuranceProcess
BUILD FAILED
D:\jbpm\redhat training\JBPM-Training\labs\lab3-deployment\build.xml:46: org.hib
ernate.MappingException: Could not determine type for: longstring, for columns:
[org.hibernate.mapping.Column(MESSAGE_)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:4
40)
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclas
s.java:43)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1287)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory
(DbPersistenceServiceFactory.java:104)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPers
istenceService.java:84)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
Service.java:89)
at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersis
tenceService.java:320)
at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:604)
at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:165)
at org.jbpm.ant.DeployProcessTask.deployProcessDefinition(DeployProcessT
ask.java:108)
at org.jbpm.ant.DeployProcessTask.handleProcessFile(DeployProcessTask.ja
va:82)
at org.jbpm.ant.DeployProcessTask.execute(DeployProcessTask.java:58)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 4 seconds
D:\jbpm\redhat training\JBPM-Training\labs\lab3-deployment>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/624240#624240]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss AS7 Development] - How to specify a SAR's module dependencies?
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"How to specify a SAR's module dependencies?"
To view the discussion, visit: http://community.jboss.org/message/606619#606619
--------------------------------------------------------------
Hi all,
I'm trying to get a simple SAR deployed to AS7. It has an mbean class in it that implements ServiceMBean. However, when I deploy it, I get a ClassNotFoundException for ServiceMBean. I suspect I need to somehow tell Jboss Modules that my SAR needs to access whichever module has that class. But I don't know how to do that. I suspect http://docs.jboss.org/author/display/MODULES/Manifest+module+information http://docs.jboss.org/author/display/MODULES/Manifest+module+information is what I'd need, except that that page hasn't been written yet. Any suggestions?
Log output:
15:15:00,565 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "jboss-addons-3.0-SNAPSHOT.sar"
15:15:00,633 WARN [org.jboss.modules] (MSC service thread 1-3) Failed to define class org.ccci.ha.HighAvailabilityDataSourceMBean in Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/ccci/ha/HighAvailabilityDataSourceMBean (Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:398) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:258) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [:1.0.0.CR2]
at org.jboss.modules.Module.loadModuleClass(Module.java:588) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:180) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_24]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:394) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:258) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [:1.0.0.CR2]
at org.jboss.modules.Module.loadModuleClass(Module.java:588) [:1.0.0.CR2]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:180) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
at java.lang.Class.forName0(Native Method) [:1.6.0_24]
at java.lang.Class.forName(Class.java:247) [:1.6.0_24]
at org.jboss.as.service.ReflectionUtils.getClass(ReflectionUtils.java:100)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.addServices(ParsedServiceDeploymentProcessor.java:111)
at org.jboss.as.service.ParsedServiceDeploymentProcessor.deploy(ParsedServiceDeploymentProcessor.java:102)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
Caused by: java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBean
at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_24]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_24]
at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_24]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_24]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:394) [:1.0.0.CR2]
... 32 more
Caused by: java.lang.ClassNotFoundException: org.jboss.system.ServiceMBean from [Module "deployment.jboss-addons-3.0-SNAPSHOT.sar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:357) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:329) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:306) [:1.0.0.CR2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:100) [:1.0.0.CR2]
... 37 more
Thanks for your time,
-Matt
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606619#606619]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months