• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Class not found in the specified assembly list.

Participant ,
Feb 24, 2012 Feb 24, 2012

Copy link to clipboard

Copied

Hi All,

I am creating a .dll object from ColdFusion but I am getting the following error message.

"Class GenerateSQLReport not found in the specified assembly list. The assembly that contains the class must be provided to the assembly attribute."

The Process I have followed:

- Updated the ColdFusion 9.0.1

- Uninstall the  .NET Integration Service

- Install the .NET Integration Service for 9.0.1

- Run the code.

My Code is : "<cfobject type="dotnet" name="MDBDTable" class="GenerateSQLReport" assembly="#expandPath('./GenerateSQLReportDLL.dll')#">"

I got the following StackStrace:

________________________________________________________________________________________________________________________________________________________________________

coldfusion.runtime.dotnet.Assembly$DotNetClassNotFoundException: Class GenerateSQLReport not found in the specified assembly list.

    at coldfusion.runtime.dotnet.Assembly.generateProxy(Assembly.java:272)

    at coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:248)

    at coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:223)

    at coldfusion.runtime.dotnet.DotNetProxyFactory.getProxy(DotNetProxyFactory.java:78)

    at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65)

    at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:4949)

    at coldfusion.tagext.lang.ObjectTag.doStartTag(ObjectTag.java:427)

    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)

    at cfDotNetDll2ecfm375138657.runPage(D:\Projects_Upendra\CodeForTesting\DotNetDll.cfm:2)

    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)

    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)

    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363)

    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

    at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)

    at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)

    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)

    at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)

    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)

    at coldfusion.CfmServlet.service(CfmServlet.java:200)

    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

    at jrun.servlet.FilterChain.service(FilterChain.java:101)

    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

    at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

_____________________________________________________________________________________________________________________

Please help.

Views

6.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Mar 07, 2012 Mar 07, 2012

I don't know .NET very well. If I am missing something please suggest.

The CF code must include the full path to the class, including any namespace. When you create a C# project in Visual studio it typically uses the project name as the  "default namespace". So if your project is named "MyProject" the full path would be:

   <cfobject type="dotnet" class="MyProject.HelloWorldProc" ...>

Message was edited by: -==cfSearching==-

Votes

Translate

Translate
Community Expert ,
Feb 26, 2012 Feb 26, 2012

Copy link to clipboard

Copied

This might be a dumb question, but have you verified that this assembly does, in fact, contain this class? How did you perform this verification?

Dave Watts, CTO, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 28, 2012 Feb 28, 2012

Copy link to clipboard

Copied

I have verified the class of the .dll file  from the .net code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 29, 2012 Feb 29, 2012

Copy link to clipboard

Copied

class="GenerateSQLReport"

Is it a public class - and is that the full path (including namespace)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

Sorry for the late response, I was out of town .

Yes, the class specified is a public class. The above specified dll renders SQL Server Reporting.

I also tried with other sample dll but each time I failed .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

I also tried with other sample dll but each time I failed .

Can you invoke any dll's at all? If not that suggests a different problem.

class="GenerateSQLReport"

Otherwise, I do not know if you saw the earlier question but is that the full path to the class (including any namespace)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

I was not able to call a dll .

After reinstalling the .NET Service I can able to create a dll object.(I have used this http://tutorial11.learncf.com/ ).

But, when I create a sample dll with the following code it throws the previous error.

.NET Code

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

using System;

public class HelloWorldProc {  

     public HelloWorldProc()

     {    

     }   

 

     public string HelloWorld()

     {        

          return "HelloWorldProc:HelloWorld called and returns Hello world!";  

      }

}

__________________________________________

I don't know .NET very well. If I am missing something please suggest.

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 07, 2012 Mar 07, 2012

Copy link to clipboard

Copied

I don't know .NET very well. If I am missing something please suggest.

The CF code must include the full path to the class, including any namespace. When you create a C# project in Visual studio it typically uses the project name as the  "default namespace". So if your project is named "MyProject" the full path would be:

   <cfobject type="dotnet" class="MyProject.HelloWorldProc" ...>

Message was edited by: -==cfSearching==-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 08, 2012 Mar 08, 2012

Copy link to clipboard

Copied

Hi -==cfSearching==-,

Many thanks to you for helping me in this.

I was making mistake by not passing the namespace while creating the dll object. Any way now it is working Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 09, 2016 Feb 09, 2016

Copy link to clipboard

Copied

LATEST

Can you post the working code?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation