[JBoss AS7 Development] - Embedded AS
by Kabir Khan
Kabir Khan [http://community.jboss.org/people/kabir.khan%40jboss.com] created the discussion
"Embedded AS"
To view the discussion, visit: http://community.jboss.org/message/569335#569335
--------------------------------------------------------------
I'm having a play with getting the demos working as tests, and thought it would be cool to be able to start standalone in-vm as was done in BatchFailuresUnitTestCase/AbstractDeploymentTest.
The first problem I see is that when trying to use the StandaloneClient and calling SC.getServerModel() I get this exception:
Exception in thread "pool-11-thread-2" java.util.ServiceConfigurationError: org.jboss.marshalling.ProviderDescriptor: Provider org.jboss.mar
shalling.river.RiverProviderDescriptor could not be instantiated: java.lang.IllegalAccessError: tried to access class org.jboss.marshalling.
reflect.ConcurrentReferenceHashMap from class org.jboss.marshalling.reflect.SerializableClassRegistry
at java.util.ServiceLoader.fail(ServiceLoader.java:207)
at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at org.jboss.marshalling.Marshalling.loadMarshallerFactory(Marshalling.java:78)
at org.jboss.marshalling.Marshalling.getMarshallerFactory(Marshalling.java:74)
at org.jboss.as.protocol.ProtocolUtils.<clinit>(ProtocolUtils.java:50)
at org.jboss.as.protocol.mgmt.ManagementProtocolHeader.read(ManagementProtocolHeader.java:75)
at org.jboss.as.protocol.mgmt.ManagementResponseHeader.read(ManagementResponseHeader.java:60)
at org.jboss.as.protocol.mgmt.ManagementProtocolHeader.<init>(ManagementProtocolHeader.java:55)
at org.jboss.as.protocol.mgmt.ManagementResponseHeader.<init>(ManagementResponseHeader.java:45)
at org.jboss.as.protocol.mgmt.ManagementRequest$1.handle(ManagementRequest.java:124)
at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
at org.jboss.as.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:239)
at org.jboss.as.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:198)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalAccessError: tried to access class org.jboss.marshalling.reflect.ConcurrentReferenceHashMap from class org.jboss
.marshalling.reflect.SerializableClassRegistry
at org.jboss.marshalling.reflect.SerializableClassRegistry.<init>(SerializableClassRegistry.java:61)
at org.jboss.marshalling.reflect.SerializableClassRegistry.<clinit>(SerializableClassRegistry.java:42)
at org.jboss.marshalling.river.RiverMarshallerFactory$1.run(RiverMarshallerFactory.java:46)
at org.jboss.marshalling.river.RiverMarshallerFactory$1.run(RiverMarshallerFactory.java:44)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.marshalling.river.RiverMarshallerFactory.<init>(RiverMarshallerFactory.java:44)
at org.jboss.marshalling.river.RiverProviderDescriptor.<clinit>(RiverProviderDescriptor.java:35)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
... 15 more
Exception in thread "pool-11-thread-2" java.util.ServiceConfigurationError: org.jboss.marshalling.ProviderDescriptor: Provider org.jboss.mar
shalling.river.RiverProviderDescriptor could not be instantiated: java.lang.IllegalAccessError: tried to access class org.jboss.marshalling.
reflect.ConcurrentReferenceHashMap from class org.jboss.marshalling.reflect.SerializableClassRegistry
at java.util.ServiceLoader.fail(ServiceLoader.java:207)
at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at org.jboss.marshalling.Marshalling.loadMarshallerFactory(Marshalling.java:78)
at org.jboss.marshalling.Marshalling.getMarshallerFactory(Marshalling.java:74)
at org.jboss.as.protocol.ProtocolUtils.<clinit>(ProtocolUtils.java:50)
at org.jboss.as.protocol.mgmt.ManagementProtocolHeader.read(ManagementProtocolHeader.java:75)
at org.jboss.as.protocol.mgmt.ManagementResponseHeader.read(ManagementResponseHeader.java:60)
at org.jboss.as.protocol.mgmt.ManagementProtocolHeader.<init>(ManagementProtocolHeader.java:55)
at org.jboss.as.protocol.mgmt.ManagementResponseHeader.<init>(ManagementResponseHeader.java:45)
at org.jboss.as.protocol.mgmt.ManagementRequest$1.handle(ManagementRequest.java:124)
at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:59)
at org.jboss.as.protocol.ConnectionImpl.safeHandleMessage(ConnectionImpl.java:239)
at org.jboss.as.protocol.ConnectionImpl$1$1.run(ConnectionImpl.java:198)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalAccessError: tried to access class org.jboss.marshalling.reflect.ConcurrentReferenceHashMap from class org.jboss
.marshalling.reflect.SerializableClassRegistry
at org.jboss.marshalling.reflect.SerializableClassRegistry.<init>(SerializableClassRegistry.java:61)
at org.jboss.marshalling.reflect.SerializableClassRegistry.<clinit>(SerializableClassRegistry.java:42)
at org.jboss.marshalling.river.RiverMarshallerFactory$1.run(RiverMarshallerFactory.java:46)
at org.jboss.marshalling.river.RiverMarshallerFactory$1.run(RiverMarshallerFactory.java:44)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.marshalling.river.RiverMarshallerFactory.<init>(RiverMarshallerFactory.java:44)
at org.jboss.marshalling.river.RiverProviderDescriptor.<clinit>(RiverProviderDescriptor.java:35)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
... 15 more
ADT starts the server without using modules so everything uses the app classpath, so that may be the reason for the exception?
I have created a little 'ServerStarter' module programatically from my tests and added that to the module roots of my LocalModuleLoader. The server is then started with the correct module classloader and most classes are loaded from the module I would expect. The exception is when a module that defines the 'system' dependency tries to load a class and it both exists on the app classpath and in a 'real' module. In this case the class is always loaded from 'system'.
Looking at Module.loadModuleClass() the loaders for the path for this situation seem to always have SystemLocalLoader before the ModuleClassLoaders. Is this intentional? Is there another way to have things both in app classpath and in modules always be loaded by modules?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569335#569335]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 5 months
Re: [jboss-dev-forums] [jBPM Development] - jBPM5 migration tool project
by Giovanni Marigi
Giovanni Marigi [http://community.jboss.org/people/hifly81] commented on the document
"jBPM5 migration tool project"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-15974#comment-4598
--------------------------------------------------
I took this from jboss esb quickstart examples a very easy but informative use case.
Integration between jbpm and esb via EsbActionHandler it's what I'm dreaming :-) (and I think customers too) to have in a bpmn 2 workflow.
<?xml version="1.0" encoding="UTF-8"?>
<process-definition
name="processDefinition2">
<start-state name="start">
<event type="node-leave">
<action name="action1" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.process_actions.MyBPMActionHandler" config-type="bean"></action>
</event>
<transition to="node1"></transition>
</start-state>
<node name="node1">
<action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>BPM_Orchestration_Service1</esbCategoryName>
<esbServiceName>Service1</esbServiceName>
<bpmToEsbVars>
<mapping bpm="theBody" esb="BODY_CONTENT" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="BODY_CONTENT" bpm="theBody" />
</esbToBpmVars>
</action>
<transition to="node2"></transition>
</node>
<node name="node2">
<action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>BPM_Orchestration_Service2</esbCategoryName>
<esbServiceName>Service2</esbServiceName>
<bpmToEsbVars>
<mapping bpm="theBody" esb="BODY_CONTENT" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="BODY_CONTENT" bpm="theBody"/>
</esbToBpmVars>
</action>
<transition to="node3"></transition>
</node>
<node name="node3">
<action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>BPM_Orchestration_Service3</esbCategoryName>
<esbServiceName>Service3</esbServiceName>
<bpmToEsbVars>
<mapping bpm="theBody" esb="BODY_CONTENT" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="BODY_CONTENT" bpm="theBody"/>
</esbToBpmVars>
</action>
<transition to="Send Results"></transition>
</node>
<end-state name="end1"></end-state>
<node name="Send Results">
<event type="node-enter">
<action name="action1" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration1.process_actions.MyBPMActionHandler" config-type="bean"></action>
</event>
<action name="action2" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>BPM_Orchestration_ResultsService</esbCategoryName>
<esbServiceName>ResultsService</esbServiceName>
<bpmToEsbVars>
<mapping bpm="theBody" esb="BODY_CONTENT" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="BODY_CONTENT" bpm="theBody"/>
</esbToBpmVars>
</action>
<transition to="end1"></transition>
</node>
</process-definition>
--------------------------------------------------
13 years, 5 months