Workflow manager 1.0 and external dll - workflow-manager-1.x

We are trying to publish a workflow and couple of activities to workflow manager. Our scenario is such that we need to create object of classes which resides in an external dll and those objects are calling a service(WCF) to fetch some data.
We have placed the DLLs in C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin\ and C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts folders. Also we have created the AllowedTypes.XML file and have placed it in both the above folders.
The problem which we are facing is that when we declare a variable of a type which is in external DLL and try to invoke a method using InvokeMethod activity(we have also added the InvokeMethod activity type in AllowedTypes.xml) then we receive the following exception on the activity.publish statement.
Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({wf://workflow.windows.net/$Activities}ObjectType)'. HTTP headers received from the server - ActivityId: 33bf5b07-9eda-4f63-bf58-6d85cbfdcd55. NodeId: MachineID. Scope: /WFMgrSample. Client ActivityId : af5e1771-90f7-4610-a2be-5f7b7ce48ee8.
any idea on what is wrong here!!!

Related

AutoMapper and Quartz.Net server - missing type map configuration

I'm attempting to use AutoMapper within Jobs hosted by Quartz.Net server.
At service startup, I load all the mapping profiles, one of which has:
Mapper.CreateMap<Data.Models.ManufacturerAlias, Business.Models.ManufacturerAlias>();
In the Job, I call the Map<>, but I get the following error:
Exception: AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
Mapping types:
ManufacturerAlias -> ManufacturerAlias
SmartBIM.Data.Models.ManufacturerAlias -> SmartBIM.Business.Models.ManufacturerAlias
Destination path:
ManufacturerAlias
Source value:
SmartBIM.Data.Models.ManufacturerAlias
Mapper.AssertConfigurationIsValid() is not giving me any exceptions.
Is this a threading issue - do I need to load the profiles at the Job.Execute()?
Thanks :)
Yes, it's threading issue. We had the similar. Static methods of AutoMapper are not thread-safe.

Same stateless bean in two ears

I have the same EJB module with a bean inside an EAR that is server side and an EAR that is the client side.
Can I have this situation?
Because I'm getting this error http://justpaste.it/gfs3
without understand how to fix it.
You have answer in the stack trace:
The short-form default binding 'com.demo.view.RitornaPersonaRemote'
is ambiguous because multiple beans implement the interface :
[RitornaPersonaSenzaClientEAR#RitornaPersonaSenzaClient.jar#RitornaPersona,
RitornaPersonaWebSenzaClientEAR#RitornaPersonaSenzaClient.jar#RitornaPersona].
Provide an interface specific binding or use the long-form default binding on lookup.]
If you are asking whether you may have same EJB jar in multiple project - the answer is yes you can. However during deployment you have to use long-form JNDI, provide different JNDI name for beans in other module or disable short names. You cannot register two beans under same name.
Long name would be in the form RitornaPersonaSenzaClientEAR#RitornaPersonaSenzaClient.jar#com.demo.view.RitornaPersonaRemote
See detailed info here - EJB 3.0 and EJB 3.1 application bindings overview
UPDATE
To disable short names perform the following steps:
Go to Application servers > server1 > Process definition > Java Virtual Machine > Custom properties
Define new custom property com.ibm.websphere.ejbcontainer.disableShortDefaultBindings with value * to disable short bindings for all apps or AppName1|AppName2 to just disable short bindings in selected apps.
Example default bindings are shown in SystemOut.log:
The binding location is: ejblocal:JPADepEar/JPADepEJB.jar/TableTester#ejb.TableTester
The binding location is: ejblocal:ejb.TableTester
The binding location is: java:global/JPADepEar/JPADepEJB/TableTester!ejb.TableTester
And with disableShortDefaultBindings property set there is no short form:
The binding location is: ejblocal:JPADepEar/JPADepEJB.jar/TableTester#ejb.TableTester
The binding location is: java:global/JPADepEar/JPADepEJB/TableTester!ejb.TableTester
There is a bug in the documentation and the correct property is com.ibm.websphere.ejbcontainer.disableShortDefaultBindings not com.ibm.websphere.ejbcontainer.disableShortFormBinding
In my case:- i did install abc.ear and xyz.ear both ear was independent do dependency with each other.
I was calling abc.ear using client-lookup but that was giving me
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.
[Root exception is com.ibm.websphere.ejbcontainer.AmbiguousEJBReferenceException: The short-form default binding
'com.ejb.abc' is ambiguous because multiple beans implement the interface :
[xyz-ear#rabc-ejb-1.0.jar#abcInrerfaceImpl, rabc-ear#rabc-ejb-1.0.jar
abcInrerfaceImpl]. Provide an interface specific binding or use the long-form default binding on lookup.]
my Solution was:-
i removed the abc.jar that was inside another application(xyz.ear)
C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\wstemp\92668751\workspace\cells\mypc00Node01Cell\applications\xyz-ear.ear
'
Then solution client-lookup works fine.
To avoid this in future this is better practice to create separate node on your IBM-WAS server and install both application on different node.
So both application component will not mess up.

ejb jndi lookup throws ClassCastexception only when invoked from IBM Message Broker

When i try to make a remote ejb jndi look up, IBM message Broker throws ClassCastexception for the factory object.
But the same code works fine for a normal local java application and junit.Why this problem occurs when called only from IBM WMB
Context context = new InitialContext(ejbJndiProperties);
Object factoryObj = context.lookup("SampleBeanTAFJ/remote");
return (SampleBeanRemote) factoryObj;
This is often called by loading parts of the interface in a different classloader to the implementation classes.
I would use the env var:
IBM_JAVA_OPTIONS=-Dibm.cl.verbose=*
Then restart the broker, this will dump classloading trace to stdout / console.txt which might give you some clues.
What are the exact classes involved in the error and what jars are they stored in? Deployed to the EG or referenced via a SHARED-CLASSES? The exact details determine which classloaders should be in use here.

SignalR map hubs

I am using SignalR to build Real time application
I have added the following code to application start in the global.asax file
'Register the default hubs route: ~/signalr
RouteTable.Routes.MapHubs()
and I got the following error:
A route named 'signalr.hubs' is already in the route collection. Route names must be unique.
Parameter name: name
It's most likely you are calling this twice. Check all your code that this is not the case, including any App_Start code. Do a global search within your app for "MapHubs".
Also check you have only one version of Signal installed (older versions had a different namespace).

Component linking tag are not generating in the page

We have set up tridion to publish to two servers-publishing target set to two locations.
License is installed in both the servers
All config and lib files are in place.
When we tried to publish to the servers using second environment-test CME server it is publishing and Component linking tag are generating in the page.
When published from first envirnment-dev CME server Component linking tag are not generating in the page. the below error is logged
WARN Admin - WAI: Could not find a presentation for SiteIdentifier[Protocol=http; Domain=*.*.*.*; Port=****; Path=/HTTPUpload.aspx]
2012-12-18 05:19:28,351 ERROR UserManager - No Data Access Object for Personalization
com.tridion.broker.StorageException: No Data Access Object for Personalization
at com.tridion.storage.filesystem.FSDAOFactory.getDAOForTypeMapping(FSDAOFactory.java:177) ~[cd_datalayer.jar:na]
at com.tridion.storage.StorageManagerFactory.getOriginalDAO(StorageManagerFactory.java:450) ~[cd_datalayer.jar:na]
at com.tridion.storage.StorageManagerFactory.getDAO(StorageManagerFactory.java:271) ~[cd_datalayer.jar:na]
at com.tridion.storage.StorageManagerFactory.getDefaultDAO(StorageManagerFactory.java:178) ~[cd_datalayer.jar:na]
at com.tridion.user.UserManager.checkUser(UserManager.java:56) ~[cd_wai.jar:na]
Also event viewer is showing
Can't initialize application heartbeat monitoring: 0x80040154
Source:
SetupThreadHeartbeat
what are the config needed in CME server for dynamic linking
The CME does not need any configuration for Dynamic Linking, as that is something you configure and use on the Presentation side (your web/application server).
The error message you post indicate that your WAI (Profiling and personalization) setup is incorrect, and maybe more. I suggest you start with a basic setup and make that work, that should have linking working, before you add things like WAI which you might not even need.
The error message about the heartbeat is indicating an issue with the monitoring configuration, which again indicates that you seem to have a lot of configuration issues.Perhaps its best to start from the beginning again and follow the documentation (login required) from step to step in how to setup your Content Delivery server.
Another option always is to call SDl Tridion Professional Services and hire a Infrasturcture Consultant to setup your environment.

Resources