Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VB Sample from SDK 2012 does NOT work (for me)

10 REPLIES 10
Reply
Message 1 of 11
glanard
913 Views, 10 Replies

VB Sample from SDK 2012 does NOT work (for me)

Hi, I'm trying to test the main VB sample from the SDK 2012, but it does NOT work ;(

 

For information, my configuration is:

- Windows 7 Entreprise N SP1 64 bits

- Visual Studio 2010 Professional (10.0.30319)

- Vault Professional 2012 SP1

 

This is what I've done;

- I open the VS solution : C:\Program Files (x86)\Autodesk\Autodesk Vault 2012 SDK\VS9\VB\JobProcessorApiSamples\JobProcessorApiSamples.sln

 

- I compile it to : C:\Program Files (x86)\Autodesk\Autodesk Vault 2012 SDK\VS9\VB\JobProcessorApiSamples\bin\Debug

   Just one warning about 'bytes', but this is not important.

 

- I create the folder : C:\Program Files\Autodesk\Vault Professional 2012\Extensions\JobProcessorApiSamples

 

- In this folder, from ...\Debug, I copy the files :  

  • JobProcessorApiSamples.dll
  • JobProcessorApiSamples.pdb
  • JobProcessorApiSamples.xml
  • JobProcessorApiSamples.vcet.config

 - I edit the file : C:\Program Files\Autodesk\Vault Professional 2012\Explorer\JobProcessor.exe.config

   and add the following line :   

<jobHandlers>

 =>    <jobHandler class="MyCompany.File.Publish" handler="JobProcessorApiSamples.FolderPublishJobHandler, JobProcessorApiSamples"/>

       <jobHandler class="Autodesk.Vault.DWF.Create.iam" handler="Connectivity.Explorer.JobHandlerDwfPublish.InventorDwfJobHandler, Connectivity.Explorer.JobHandlerDwfPublish"/>

 

- I check the job server feature is enabled.

 

- I start my VP2012 and reset the menues.

 

- Right-cliking on a file, i do NOT have the "Queue Publish Job" command. FIRST PROBLEM.

 

- I start the : C:\Program Files\Autodesk\Vault Professional 2012\Explorer\JobProcessor.exe

   and directly I have the JobProcessor.log giving this :

 

Information 26/04/2012 10:18:34

Application logging subsystem initialized

----------------------------------------

Error 26/04/2012 10:18:34

La valeur ne peut pas être null.

Nom du paramètre : key

Exception: System.ArgumentNullException: La valeur ne peut pas être null.

Nom du paramètre : key

    à System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)

    à System.Collections.Generic.Dictionary`2.FindEntry(TKey key)

    à JobProcessor.HandlerManager.LoadHandlerTypes()

----------------------------------------

 

off course, I do not see my job in the list ;(

 

Someone can help me to understand where are the problems?

Thanks

10 REPLIES 10
Message 2 of 11
Daniel.Dulzo
in reply to: glanard

Hello glanard,

 

I noticed in the steps you describe that you're deploying the extension to "C:\Program Files\Autodesk\Vault Professional 2012\Extensions\JobProcessorApiSamples". If you look at the readme file that is in the same directory as the JobProcessorApiSamples solution, it states that you should deploy the extension to "%programData%\Autodesk\Vault 2012\Extensions\JobProcessorApiSamples", which if you're using Windows Vista/Windows 7 is usually  "C:\ProgramData\Autodesk\Vault Professional 2012\Extensions\JobProcessorApiSamples". Please try deploying the extension to that location and let me know how it goes.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 3 of 11
glanard
in reply to: glanard

Hi Daniel,

 

The ProgramData folder exists... but is empty.

 

In the doubt, I try to manually create the folder structure and deploy the files.

 

But, the problem is still here.

 

Am I the only one to work on Seven 64 bits?

 

Best regards,

 

Note: The VP2012 installation has been done by default, without any customization.

Message 4 of 11
glanard
in reply to: glanard

Well, I tested the 'Load Tester' from Doug, and the result is:

 

26-04-2012 17-13-28.jpg

 

Man Surprised

 

I will try to uninstall and reinstall VP2012 Client in ProgramData...

 

If it is this, it's not normal.

Message 5 of 11
Daniel.Dulzo
in reply to: glanard

I wouldn't suggest reinstalling the Vault Professional client. Vault Explorer should stay installed, with all of it's program files in the Program Files location that it defaults to. Only your extension should be deployed to "C:\ProgramData\Autodesk\Vault 2012\Extensions" as described in the readme file.  This folder is not created during the Vault Explorer install and will not exist until you deploy and extension and create it yourself. The error you're seeing in the Load Tester means that you have deployed your extension to the wrong location. All of the files from the sample's bin directory should be copied to "C:\ProgramData\Autodesk\Vault 2012\Extensions\JobProcessorApiSamples". You should create this folder structure if it does not already exist.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 6 of 11
glanard
in reply to: glanard

Hello,

 

I have created manually the folder structure, first in order to be able to use the 'Load Tester':

 

27-04-2012 08-33-21.jpg

 

Note that 'Vault Professional 2012' instead of 'Vault 2012' is not accepted.

 

When I start my Vault Client, I got this error:

 

27-04-2012 08-57-59.jpg

 

And if I try the JobProcessor.exe, this one:

 

27-04-2012 08-37-25.jpg

 

Well, it's better...

 

Any Idea?

 

Thanks.

Message 7 of 11
Daniel.Dulzo
in reply to: glanard

Considering you are already using the Load Tester, I assume you've already found this article: http://justonesandzeros.typepad.com/blog/2011/05/extension-deployment-checklist.html. It would probably help to go through the checklist just to make sure it's not any of the issues listsed there. Also, have you modified the sample in any way? I'm able to get the sample working if I just build and deploy the sample as it is, so I would start with getting the sample to work before making any edits to the code.

 

Another thing that you might not be aware of it that you have to deploy all the depedencies for your extension alongside it in it's extension folder. This includes some of the DLL's that are part of the SDK. More information on what DLL's to deploy can be found here: http://justonesandzeros.typepad.com/blog/2011/10/which-sdk-dlls-to-deploy.html. In particular, you might not be deploying Autodesk.Connectivity.WebServicesTools.dll. If I delete this DLL from "C:\ProgramData\Autodesk\Vault 2012\Extensions\JobProcessorApiSamples", I get an extension load error, but the Load Tester still succeeds, so maybe this is what you're seeing.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 8 of 11
xavier_dumont2
in reply to: glanard

Are you sure that c:\programdata is empty? It's a Windows System folder.

 

If you type in Windows Explorer %programdata% which folder is displayed?

 

 

Message 9 of 11
m.sabotto
in reply to: glanard

I've the same problem with Vault Collaboration 2013.

I get the same error message: "...TypeLoadException" but tryied with the sample provided with the SDK and that worked.

There's a way to log all the callstack for example?

 

 

thank you anyone

Message 10 of 11
Daniel.Dulzo
in reply to: m.sabotto

Hi m.sabotto,

 

If you're using the 2013 SDK, there is a new feature available that allows you to turn on error logging for extension loading. You can find more information about it on Doug's blog here: http://justonesandzeros.typepad.com/blog/2012/07/extension-loading-error-logging.html. Hopefully this will give you some more information about your TypeLoadException.

 

Regards,

Dan



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 11 of 11
m.sabotto
in reply to: glanard

Hi Daniel,

    thank you for the information.

I've solved the problem and understood why that error:

in our implementation of Vault Collaboration 2011 we developed more than one JobProcessor handler for our businness.

some of them are hosted inside the same .NET assembly, now with Vault Collaboration 2013 it seems to be unsupported because only one class need to be exported from a .NET assembly.

Maybe I've missed this feature from the "What's New" SDK help so I was a little bit surprised Smiley Frustrated about this change also because the Exception being thrown is too generic to gives the exact direction to investigate on.

 

Thank you in Advance

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report