Copy link to clipboard
Copied
Hello,
Here is my code
<cftry>
<cfobject action=create type=java class="RList" name=MyReportView>
<cfscript>
myRpt = MyReportView.getDetails(sItemNumber);
</cfscript>
<cfoutput>#myRpt#</cfoutput>
<cfcatch type = "any">
<cfset pErrorDetail = CFCATCH.Detail>
<cfset pErrorMessage = CFCATCH.Message>
<cfoutput>#pErrorDetail# , #pErrorMessage#</cfoutput>
</cfcatch>
</cftry>
Other details
Java Virtual Machine Path : C:/ColdFusion9/runtime/jre
CF 9.0/64 bit
Cognos 8.3 sp5
Window 2008/64 bit
Thanks in advance.
Copy link to clipboard
Copied
Have you looked at:
1) JavaCast-ing sItemNumber
2) Checking to make sure the profile that CF is running as on your box has the correct permissions? Try logging on as the CF user.
3) Perform a dump of the catch block instead of just outputing Detail/Message and see if that gives you any additional details.
Copy link to clipboard
Copied
Thanks for the reply.
1. I have tried JavaCast for my varibale and same result (blank page)
2. Local System Account radio button has been checked in for CF 7.0 and CF 9.0
3. Have dumped the catch block, no errors but just a blank page.
Not sure what else to verify at this point.
Thanks
Copy link to clipboard
Copied
My only other suggestion that might be helpful is to check the following:
1) Make sure your classpath settings in the CF administrator include the correct directory/location of your java files. If your directory structure differs between servers, this could be a problem.
2) Make sure your local system account has access to execute the java class (e.g. write a test class outside of CF just to test to make sure your java is working)
3) Are there any DSN's or other resources that need to be configured on the CF9 server in order for the Java object or Cognos system to work that might be missing?
Does your code include any other formatting that would appear on the screen? i.e. when you say you are getting a blank page back do you mean that NO content is being sent to the browser from the page or that there was no content to begin with outside of the output from your method call? Sometimes a CF error 500 can cause a blank screen in certain circumstances, however, no catch block dump seems to indicate that there is no error coming back, its just that your method call is returning a null or empty value.
My suspicion is still on account access permissions for the resources involved - however, I don't have any specific suggestions on how to troubleshoot that aside from diving into the system account/folder permissions.
Copy link to clipboard
Copied
What about the rest of question #2? You said you successfully ran the class from the command line. Which account were you logged in under? Did you try running CF under that account?:
-Leigh
Copy link to clipboard
Copied
1. My class path settings are correct
2. I am postive that LocalSystemaccount has access to execute the javaclass
3. All the DSNs are defined and working as expected
4. I have tried to dump the "MyReportView" from the following code and it does list out all the methods that class has
<cfobject action=create type=java class="RList" name=MyReportView>
5. One thing I found from CF9.0/runtime/logs/coldfusion-out folder
java.lang.NullPointerException
at com.cognos.org.apache.axis.serviceContext.ServiceContext.updateImplicitHeader(ServiceContext.java:270)
at com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub.logon(ContentManagerServiceStub.java:5388)
6. I logged in as myself and just opened up the Command prompt and used my .jar/class path there it does return the outout there, which is HTML.
Not sure whether it is a CF 9.0 problem or cognos connection problem
Pl let me know if you need any further information
Thanks
Copy link to clipboard
Copied
One thing I found from CF9.0/runtime/logs/coldfusion-out folder
Can you post the complete trace from the log? Exceptions are usually chained, meaning the real cause might be listed
further down.
I am postive that LocalSystemaccount has access to execute the javaclass
Permissions was just an educated guess. But to clarify something - permissions extend beyond the class itself to include anything that class touches. A good example is cffile (internally it is a java class too). You can execute it under the local system. But it may not complete successfully if local system does not have permission to access the file you specified.
That said, I am not saying your problem is permissions. In fact, from the stack trace snippet, I am starting to wonder if it is a possible class path problem. However the reason for (temporarily) changing the CF service user account was to try and rule it out. ie If changing the permissions still did not work, it would suggest the problem is something else.
-Leigh
Copy link to clipboard
Copied
I have tried with quotes for the attributes in <CFOBJECT> and is the same result.
Here is my logfile (i.e. coldfusion-out.txt) trace
java.lang.NullPointerException
at com.cognos.org.apache.axis.serviceContext.ServiceContext.updateImplicitHeader(ServiceContext.java:270)
at com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub.logon(ContentManagerServiceStub.java:5388)
at CRNConnectLite.connectCognosServer(CRNConnectLite.java:95)
at CRNReportService.setRptService(CRNReportService.java:95)
at CRNReportService.runReport(CRNReportService.java:249)
at ReportList.getmyReport(ReportList.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:97)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfdsp_myView2ecfm809776710.runPage(D:\mypath\my.cfm:73)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
at cfindex2ecfm278755501._factor151(D:\mypath\index.cfm:621)
at cfindex2ecfm278755501.runPage(D:\mypath\index.cfm:1)
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.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
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)
Thanks
Copy link to clipboard
Copied
Here is the solution guys.
A big THANK YOU to my colleague who started debugging the .jar file and found this based on the error message
Thanks to all of you for your inputs.
Copy link to clipboard
Copied
Tpaul wrote:
Here is the solution guys.
A big THANK YOU to my colleague who started debugging the .jar file and found this based on the error message
Thanks to all of you for your inputs.
What a long shot! And what a find! Thanks to you too for sharing this with us.
Copy link to clipboard
Copied
Tpaul wrote:
Here is my code<cftry>
<cfobject action=create type=java class="RList" name=MyReportView>
<cfscript>
myRpt = MyReportView.getDetails(sItemNumber);
</cfscript>
<cfoutput>#myRpt#</cfoutput>
<cfcatch type = "any">
<cfset pErrorDetail = CFCATCH.Detail>
<cfset pErrorMessage = CFCATCH.Message>
<cfoutput>#pErrorDetail# , #pErrorMessage#</cfoutput>
</cfcatch>
</cftry>
This might not mean much, but it does no harm to rule it out. Introduce quotes for the attributes, thus:
<cfobject action="create" type="java" class="RList" name="MyReportView">