Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
JJBBDD #1
java class instantiation problem
i have a custom java class in [cfroot]..webinf/classes. the class works fine
on my dev box, but fails to instantiate on my prodcution box. both boxes have
the exact same features-- CFMX 7, mysql -- except the production box is running
server 2003, and the dev box is running XP
I;ve pasted below the error I get when I call the java class. I;m fairly sure
this is not a cf code issue since this is the same code that works on the dev
box. Based on the last line of the error: Caused by:
java.lang.NullPointerException
at PPReaderWEB.<init>(PPReaderWEB.java:41)-- it seems JRUN is looking for the
..java file which is in the same class dir. Is there a setting to tell it to
load these classes? any help would be greatly appreciated.
Object Instantiation Exception.
An exception occurred when instantiating a java object. The cause of this
exception was that: .
The error occurred in C:\Inetpub\wwwroot\index.cfm: line 128
126 : <cfswitch expression = "#session.nowProcessLogs#"><!---TO DO: passing
the sourceSite to the java objects is redundant. axe it--->
127 : <cfcase value="partyPoker">
128 : <cfset objPPReader =
createObject("java","PPReaderWEB").init(javacast(" String","partyPoker"),
javacast("String",session.userName_pp) )>
129 : </cfcase>
130 : <cfcase value="pokerStars"> <!--- for now invoking bogus PSReaderWEB
-- idnetical to PPReaderWEB and using pplogs --->
Please try the following:
* Check the ColdFusion documentation to verify that you are using the
correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050317 Firefox/1.0.2
Remote Address 24.61.12.168
Referrer
Date/Time 01-Jul-05 01:04 AM
Stack Trace
at cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128) at
cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at coldfusion.runtime.java.JavaProxy.CreateObject(Jav aProxy.java:128)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy .java:56)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.jav a:1627)
at cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343)
at coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:210)
at coldfusion.filter.PathFilter.invoke(PathFilter.jav a:86)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:27)
at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50)
at coldfusion.filter.BrowserDebugFilter.invoke(Browse rDebugFilter.java:52)
at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38)
at coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:204)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:349)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:457)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:295)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
Caused by: java.lang.NullPointerException
at PPReaderWEB.<init>(PPReaderWEB.java:41)
... 31 more
JJBBDD Guest
-
Dynamic Class Instantiation with getDefinitionByName
Ok so I am trying to follow the following example in instantiating a class dynamically: ... -
Coldfsuion + Java Instantiation Exception
Hi, This is the error I am getting: An exception occurred when instantiating a java object. The cause of this exception was that: . when I... -
WebService class instantiation
I have a question regarding WebService class instantiation through ActionScript for Flex. Everywhere I have seen the WebService class... -
Class Instantiation in PHP5
I need to do something like the following with php5.0.1 and it's not working no matter what I try... Any suggestions? class foo extends blah{... -
PHP dynamic class instantiation like Java
I've leafed through the docs and user comments on php.net, but haven't been able to find anything related to this. Is there a way to dynamically... -
JJBBDD #2
java class instantiation problem
i have a custom java class in [cfroot]..webinf/classes. the class works fine
on my dev box, but fails to instantiate on my prodcution box. both boxes have
the exact same features-- CFMX 7, mysql -- except the production box is running
server 2003, and the dev box is running XP
I;ve pasted below the error I get when I call the java class. I;m fairly sure
this is not a cf code issue since this is the same code that works on the dev
box. Based on the last line of the error: Caused by:
java.lang.NullPointerException
at PPReaderWEB.<init>(PPReaderWEB.java:41)-- it seems JRUN is looking for the
..java file which is in the same class dir. Is there a setting to tell it to
load these classes? any help would be greatly appreciated.
Object Instantiation Exception.
An exception occurred when instantiating a java object. The cause of this
exception was that: .
The error occurred in C:\Inetpub\wwwroot\index.cfm: line 128
126 : <cfswitch expression = "#session.nowProcessLogs#"><!---TO DO: passing
the sourceSite to the java objects is redundant. axe it--->
127 : <cfcase value="partyPoker">
128 : <cfset objPPReader =
createObject("java","PPReaderWEB").init(javacast(" String","partyPoker"),
javacast("String",session.userName_pp) )>
129 : </cfcase>
130 : <cfcase value="pokerStars"> <!--- for now invoking bogus PSReaderWEB
-- idnetical to PPReaderWEB and using pplogs --->
Please try the following:
* Check the ColdFusion documentation to verify that you are using the
correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050317 Firefox/1.0.2
Remote Address 24.61.12.168
Referrer
Date/Time 01-Jul-05 01:04 AM
Stack Trace
at cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128) at
cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at coldfusion.runtime.java.JavaProxy.CreateObject(Jav aProxy.java:128)
at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy .java:56)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.jav a:1627)
at cfindex2ecfm944125949.runPage(C:\Inetpub\wwwroot\i ndex.cfm:128)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343)
at coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:210)
at coldfusion.filter.PathFilter.invoke(PathFilter.jav a:86)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:27)
at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50)
at coldfusion.filter.BrowserDebugFilter.invoke(Browse rDebugFilter.java:52)
at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38)
at coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257)
at jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:204)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:349)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:457)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:295)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
Caused by: java.lang.NullPointerException
at PPReaderWEB.<init>(PPReaderWEB.java:41)
... 31 more
JJBBDD Guest



Reply With Quote

