Application.cfc not compiling
My application.cfc not compiling. I'm using application.cfc
first time, i'm used to using application.cfm, but now trying to
switch.
I've attached the code. Application.cfc is not being executed
for some reason.
My environment:
win2008
cf8
iis7
Thank you,
Syed
> application.cfc is not listed in Execution file list
like application.cfm. Non
> of the application or session variables are being
created.
OK, thanks clarifying that.
Application.cfc will only be listed in the debugging if
there's an event
handler to be run; if you don't have an onRequestStart
handler, it won't be
running anything _every request_.
I suspect you - and jbird5k - have both added code to your
onApplicationStart event handler after the application had
already started.
The onApplicationStart event handler is only run ONCE during
the life of
the application (IE: when it's first hit after the CF service
starts).
For changes to onApplicationStart to be run, you need to
restart your
application.
I think it was BKBK who suggested that the quickest way to do
this is to
change the name of the application - temporarily - so that CF
thinks it's a
different application. Or just restarting CF.
It might be an idea to add an onRequestStart event handler
which checks for
a restartApp URL variable, and if found and if true, re-run
onApplicationStart(). This means less monkeying with your
code or CF to
get the app to restart.
Adam
Similar Messages
-
Identical flex-air applications do not compile
I'm having terrible difficulty with writing Air Applications for compiling with the flex 3.2 SDK.
I have two identical basic flex air applications, but one will not compile, the other will.
When I try to run the application from flex builder the first app runs fine while the second one doesn't.
any ideas?
http://www.andy-hayes.com/download/TestApp.zip
http://www.andy-hayes.com/download/TestTransparentApplication.zip
I've just about had enough of flex builder's bs. tbh.Hi Randy,<br /><br />This forum really isn't the place to try to get support on app compilation. We try to keep discussion here to development of the SDK itself. I'd suggest looking at the regular Flex forums or flexcoders and posting more details as to the error you're seeing.<br /><br />Matt<br /><br /><br />On 1/13/09 3:51 AM, "randy gland" <[email protected]> wrote:<br /><br />A new discussion was started by randy gland in<br /><br />Developers --<br /> Identical flex-air applications do not compile<br /><br />I'm having terrible difficulty with writing Air Applications for compiling with the flex 3.2 SDK.<br /><br />I have two identical basic flex air applications, but one will not compile, the other will.<br /><br />When I try to run the application from flex builder the first app runs fine while the second one doesn't.<br /><br />any ideas?<br /><br />http://www.andy-hayes.com/download/TestApp.zip<br />http://www.andy-hayes.com/download/TestTransparentApplication.zip<br /><br />I've just about had enough of flex builder's bs. tbh.<br /><br />________________________________<br />View/reply at Identical flex-air applications do not compile <a href=http://www.adobeforums.com/webx?13@@.59b78044><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b78044!folder=.3c060fa3> form to cancel your email subscription.
-
AIR application do not compile
Hi All,
I created a new AIR Application in my Flex Builder Version 3 (build 3.0.2.214193). Say, the name of the new AIR application is 'Test10'. So the main mxml file is created autimatically as;
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
</mx:WindowedApplication>
Now I run this application and I get a empty window. So far so good..
Now I change the code a bit as;
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
</mx:Application>
And now when I run the application, I don't get the window. I deleted the content of the bin-debug folder and executed it again. But I don't see Test10.swf file generated in bin-debug. I don't see any problem or console window too..
Any idea as why this happens???
Thanks
A * RIf you use mx:Application in your AIR app, the app will not display. You must use WindowedApplication as your root tag.
I agree that we don't provide good feedback, but this would have required some special-casing in the compiler which we have tried to avoid.
Jason -
JDBC application will not compile
I have a fairly simple Oracle JDBC application that used to compile and now it won't
C:\java>javac CreateCompViews.java
CreateCompViews.java:64: incompatible types
found : java.sql.ResultSet
required: ResultSet
rset1 = stmt.executeQuery (SQLQuery1);
^
CreateCompViews.java:72: cannot resolve symbol
symbol : method next ()
location: class ResultSet
while (rset1.next ())
^
CreateCompViews.java:77: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
viewName = rset1.getString (1);
^
CreateCompViews.java:83: incompatible types
found : java.sql.ResultSet
required: ResultSet
rset2 = ViewQuery.executeQuery ();
^
CreateCompViews.java:84: cannot resolve symbol
symbol : method next ()
location: class ResultSet
rset2.next ();
^
CreateCompViews.java:85: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
ViewDefinition = rset2.getString(1);
^
CreateCompViews.java:104: cannot resolve symbol
symbol : method close ()
location: class ResultSet
rset1.close();
^
.\ResultSet.java:82: cannot resolve symbol
symbol : method next ()
location: class ResultSet
while (rset.next())
^
.\ResultSet.java:84: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
String myText = rset.getString(1);
^
.\ResultSet.java:88: cannot resolve symbol
symbol : method close ()
location: class ResultSet
rset.close();
^
10 errors
C:\java>
I am running Windows 2000, Oracle 9.2 and JDK 1.4.1.01
Please Help!
ladI have a fairly simple Oracle JDBC application that
used to compile and now it won't
C:\java>javac CreateCompViews.java
CreateCompViews.java:64: incompatible types
found : java.sql.ResultSet
required: ResultSet
rset1 = stmt.executeQuery (SQLQuery1);
^
CreateCompViews.java:72: cannot resolve symbol
symbol : method next ()
location: class ResultSet
while (rset1.next ())
^
CreateCompViews.java:77: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
viewName = rset1.getString (1);
^
CreateCompViews.java:83: incompatible types
found : java.sql.ResultSet
required: ResultSet
rset2 = ViewQuery.executeQuery ();
^
CreateCompViews.java:84: cannot resolve symbol
symbol : method next ()
location: class ResultSet
rset2.next ();
^
CreateCompViews.java:85: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
ViewDefinition = rset2.getString(1);
^
CreateCompViews.java:104: cannot resolve symbol
symbol : method close ()
location: class ResultSet
rset1.close();
^
.\ResultSet.java:82: cannot resolve symbol
symbol : method next ()
location: class ResultSet
while (rset.next())
^
.\ResultSet.java:84: cannot resolve symbol
symbol : method getString (int)
location: class ResultSet
String myText = rset.getString(1);
^
.\ResultSet.java:88: cannot resolve symbol
symbol : method close ()
location: class ResultSet
rset.close();
^
10 errors
C:\java>
I am running Windows 2000, Oracle 9.2 and JDK
1.4.1.01
Please Help!
ladHere's the CLASSPATH settings
.;c:\oracle\jdbc\lib\classes12.zip;c:\oracle\jdbc\lib\nls_charset12.zip
The packages included in the source code are
import java.sql.*;
import java.io.*;
import java.lang.*;
import java.util.*;
import oracle.jdbc.driver.*;
import oracle.sql.*;
The Java directory is
c:\j2sdk1.4.1_01
Oracle 9.2 directory is
c:\oracle\jdbc\lib -
Application.cfc site variables
I switched over to using application.cfc not too long ago. One thing I have struggled with is how to set variables that I use on individual pages of my site like I used to do in application.cfm. I have some passowrds for sftp services etc that I used to set in application.cfm. I have not been able to figure out how to make them work with application.cfc so I can call them where I need to.
I have tried setting them in onrequeststart, onapplicationstart etc. but nothing seems to work. The variables are never defined.
Does anyone have a working example of how to set variables that can be used on your site globally?
Is there a better way to store account passwords and variables like that that I am missing?For security reasons, I would try to avoid embedding the password anywhere in your ColdFusion code. You might put it in a "config" file outside of the webroot, then use ColdFusion to read it into an appropriately scoped variable. Assuming you don't <cfdump> or WriteDump() your variable scopes anywhere in your production code, and that you don't have "Enable Request Debugging Output" enabled on your production server, you could store the password in either the Application scope or a local page's variables scope. If there is only one page that will do FTP communication, then loading the password into a variable on that page would be fine. If you modularize the FTP stuff so it can be reused elsewhere in your application, then put the password in a variable in the application scope.
Since you'll need to pass an the password to the FTP connection, you can't hash it for added security, which is the best way to handle passwords. But you can encrypt/de-encrypt it using various functions within ColdFusion. I'd consider at least storing it in an encrypted form in the "config" file. While being no where near perfect security, it is better than storing the password in plain text in a file.
-Carl V. -
Revision: 16929
Revision: 16929
Author: [email protected]
Date: 2010-07-15 07:38:44 -0700 (Thu, 15 Jul 2010)
Log Message:
Add a class that will register the required class aliases in the event the mxml compiler generation [RemoteClass(alias="")] code is not called because an application does not use the Flex UI framework.
Add a reference to this class in the RPCClasses file so it always gets loaded.
QE notes: Need a remoting and messaging regression test that doesn't use Flex UI.
Bugs: Watson bug 2638788
Modified Paths:
flex/sdk/trunk/frameworks/projects/rpc/src/RPCClasses.as
Added Paths:
flex/sdk/trunk/frameworks/projects/rpc/src/mx/utils/RpcClassAliasInitializer.asGreat exercise to document the problem like this. It got me thinking about how an app with modules would be different from an app that does not use modules. Solution: I moved the dummy reference of PersonPhotoView out to the main application file (as opposed to being inside the module) and it worked. I've probably been lucky not to have experienced this problem earlier, because for most other entities I have an instance attached to my model which is linked / compiled with the main application.
-
Windows xp runs java application but does not compile it - urgent please
Hi
My new PC(portable) does not compile my java progran:
'javac' is not recognized as an internal or external command, operatable program or batch file.
If you have any suggestion, please let me know!
AriaThanks anyhow;
The following information is sent to beginners site.
I have talked to british, belgian and others regarding this problem. They said it is very expensive and we laughed.
Hi,
Windows XP runs java application but does not compile it. I get following message:
'javac' is not recognized as an internal or external command, operatable program or batch file.
MS-DOS does not exists but a command line edits autoexec.nt having allinformation regarding installed jdk5. I run my java applicat
ion from here. But no compilation.
Environment variables has following information.
JAVA_HOME C:\jdk5.0
CLASSPATH C:\jdk5.0\myPrograms
path %JAVA_HOME%bin
All information in autoexec.nt exists as windows 98 and I run it from command line.
Would you please tell me what is wrong?
Thanks
Aria -
Tracking users in the Application.cfc, please help
Hello;
I wrote a small tracking system for my web site. I am trying
to upfrade it to work in CF 8. Here is what I am doing.
I had this code on the index.cfm page of my site. I am
attempting to move it to the Application.cfc file. When I do, it
registers in the DB every time the user hits a page or clicks a
link. I don't want it to do that. I do want it to tell me when they
hit the site, and if I can what page they came in on.
Here is my code:
<cfquery name="tracking" datasource="my-DB"
dbtype="ODBC">
INSERT INTO tracking (REMOTE_ADDR, HTTP_USER_AGENT,
TRACK_DATE, PageID)
VALUES('#REMOTE_ADDR#', '#HTTP_USER_AGENT#',
#CreateOdbcDateTime(now())#)
</cfquery>
My pageID is where I want the information on what page the
user came in on to go.
I placed teh query inside a session function code, but it
doesn't work at all right now, I need to limit the hits counted by
the Application.cfm, if I place it inside the area of the app that
is for global variables, it adds info to the DB everytime they
click a link and I don't want that. As for the entry page of the
user, I am trying to make it so if someone enters the site lets say
on the about.cfm page, that is added to the db and so on. Is this
possible? If so how would I do that?
Here is my application.cfc code so far:
<cfcomponent output="false">
<cfset THIS.name = "my-web">
<cfset this.sessionManagement="yes">
<cfset this.clientManagement=true>
<cffunction name="onApplicationStart" returntype="boolean"
output="false">
<cfset APPLICATION.appStarted = now()>
<cfreturn true>
</cffunction>
<cffunction name="onApplicationEnd" returntype="void"
output="false">
<cfargument name="appScope" required="True">
<cflog file="#THIS.name#" text="App ended after
#dateDiff('n' , ARGUMENTS.appscope.appStarted,now())# minutes.">
</cffunction>
<cffunction name="onSessionStart" returntype="query"
output="true">
<cfquery name="tracking" datasource="creative"
dbtype="ODBC">
INSERT INTO tracking (REMOTE_ADDR, HTTP_USER_AGENT,
TRACK_DATE)
VALUES('#REMOTE_ADDR#', '#HTTP_USER_AGENT#',
#CreateOdbcDateTime(now())#)
</cfquery>
</cffunction>
<cffunction name="onRequestStart" returntype="boolean"
output="true">
<cfset request.datasource = "my-db">
<cfset sitePath = "
http://www.myweb">
<!--- this is where I was putting the tracking code and it
added to the DB everytime someone clicked a link. not what I want
--->
<!--- Start True Url Variables --->
<cfloop
list="#removeChars(cgi.path_info,1,len(cgi.script_name))#"
delimiters="/" index="variableSet">
<cfscript>
variableName = "url." & listGetAt(variableSet,1,'.');
expression = listGetAt(variableSet,2,'.');
</cfscript>
<cfparam name="#variableName#" default="#expression#">
</cfloop>
<!--- Finish True Url Variables --->
<cfreturn true>
</cffunction>
</cfcomponent>
Thank you.
PhoenixI did a dump and got it to error out, so it is recognizing
the session, but it doesn't add any info to the DB. I also had to
change it, I had it like this:
<cffunction name="onSessionStart" returntype="query"
output="true">
<cfquery name="tracking" datasource="my-db"
dbtype="ODBC">
INSERT INTO tracking (REMOTE_ADDR, HTTP_USER_AGENT,
TRACK_DATE)
VALUES('#REMOTE_ADDR#', '#HTTP_USER_AGENT#',
#CreateOdbcDateTime(now())#)
</cfquery>
</cffunction>
Changed it to this:
<cffunction name="onSessionStart" returntype="any"
output="true">
<cfquery name="tracking" datasource="creative"
dbtype="ODBC">
INSERT INTO tracking (REMOTE_ADDR, HTTP_USER_AGENT,
TRACK_DATE)
VALUES('#REMOTE_ADDR#', '#HTTP_USER_AGENT#',
#CreateOdbcDateTime(now())#)
</cfquery>
</cffunction>
it was erroring on the query attribute before in the session
function. Even that change didn't get it to work properly. -
"application descriptor not found" when trying to create .ane file
I have been trying to create a very simple native extention for the better part of a week now and I just can't seem to figure it out.
Using tutorials and guides from the following sources:
http://www.adobe.com/devnet/air/articles/extending-air.html
http://www.adobe.com/content/dam/Adobe/en/devnet/devices/pdfs/DevelopingActionScriptExtens ionsForAdobeAIR.pdf
http://custardbelly.com/blog/2011/09/21/air-native-extension-example-ibattery-for-ios/
I managed to get up to the point where I need to create the ane file, but I am getting "application descriptor not found".
So, here is the detailed explanation of everything I have done to date. Can someone tell me where I have gone wrong?
1. On the mac, I created an xcode project, using the iBattery example code from the link above, I managed to create static library .a file. I am not going to discount the possiblity that there are many errors still in this file, but I am going to assume for the moment that my current problem is not related to any issues in this static library.
2. Copied the static library "DaveExtention.a" to my PC where I have flash CS5.5 installed (yes, I know there is a typo in the name)
3. In my app folder, I created a lib folder that now contains the following files:
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\DaveExtension.fla
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\DaveExtension-app.xml
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\com\extensions\DaveExtension\DaveExtension.as
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\com\extensions\DaveExtension\BatteryStateEnum.as
I set my project to compile an swc into the build folder and simply put the following code into my project:
import com.extensions.DaveExtension.BatteryStateEnum;
import com.extensions.DaveExtension.DaveExtension;
var ext:DaveExtension = new DaveExtension;
var batterystate:BatteryStateEnum;
stop();
I then publish the swc.
4. Once the swc is created in the build folder, I copy the libDaveExtention.a to the build folder and create the extension.xml file, which looks like this:
<extension xmlns="http://ns.adobe.com/air/extension/2.5">
<id>com.extensions.DaveExtension</id>
<versionNumber>1</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libDaveExtention.a</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>ExtFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>
5. I make a copy of the swc file and rename it to .zip... I then extract library.swf from it and delete the zip. My build folder now looks like this:
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\DaveExtension.swc
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\extension.xml
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\libDaveExtention.a
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\library.swf
6. I downloaded the flex 4.5.1.21328 sdk and the Air 3.0 sdk, which I copied into the flex sdk folder (which is located in "D:\SDKs\flex_sdk_4.5.1.21328")
7. In my build folder, I create a simple batch file called buildane.bat with the following command:
D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
8. I then open a command prompt to my build folder and run buildane.bat and this is my output:
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>buildane.bat
D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
application descriptor not found
No matter what I try, I can't get passed this.
Can anyone tell me what I am doing wrong?>>D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
Either its a typo or by mistake you wrote adl in yout bat file. Change it to adt since that is the file that will package your ane. adl is just used for debugging/running on Desktop.
Hope this helps. let me know how it goes.
Thanks,
Meet -
Error while transforming XSLT,"Could not compile stylesheet"
Hi,
During transformation of my XSLT I needs to fetch data from method named *"myMethod(String str)"*, which is in *"mypackage.test.MyClass"* class. MyClass is in{color:#000000} XXX.jar. {color}
This XXX.jar is not in context of my web application.*
Following is part of XSLT which I am using.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:aaa="mypackage.test.MyClass">
<xsl:template match="/responseData">
<xsl:for-each select="response">
<XMLResponse>
<xsl:for-each select="status">
<xsl:variable name="Vvar_ResResponseType" select="."/>
<xsl:attribute name="ResResponseType">
<xsl:value-of select="aaa:myMethod($Vvar_ResResponseType)"/>
</xsl:attribute>
</xsl:for-each>
</XMLResponse>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>So I tried to use reflection API to load XXX.jar file at runtime.
But while transforming Transformer does not find "myMethod(String str)" and gives error like "Could not compile stylesheet"
Following is full exception stacktrace
ERROR: 'The first argument to the non-static Java function 'myMethod' is not a valid object reference.'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
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:585)
...........Please suggest is there any other way, so that Transformer can find required bean class from XXX.jar duruing transformation process.
Thanks & Regards,
Rohit Lad
Edited by: Rohit_Lad on Jan 29, 2009 7:38 PM
Edited by: Rohit_Lad on Jan 30, 2009 9:57 AM
Edited by: Rohit_Lad on Jan 30, 2009 10:02 AMGot the solution from forum named
"Reflections & Reference Objects"
Following is link for whom encountered this issue.
http://forums.sun.com/thread.jspa?threadID=5362426
Edited by: Rohit_Lad on Jan 30, 2009 2:35 PM -
The definition of base class Application was not found.
Hello:
I have been coding in Flash Builder Burrito and publishing to my Xoom for a few weeks. All of a sudden at the end of the day I'm getting this compiler error which says:
1017: The definition of base class Application was not found. AppName.mxml /AppName/src Unknown Flex Problem
I sometimes hit the wrong key with I try to copy and paste and all of a sudden a new window will open for source of a default component which I never wanted to edit. I'm afraid I somehow deleted or modified the default class defnition of Application?
I don't understand why this would come out of the blue, I was working on a function within a class that was drawing points ... Then all off a sudden I'm getting this error and it's driving me nuts.
I tried to reinstall FB Burrito on my Mac, but after all that work it still says the same thing. Wouldn't it replace the default class defs?
Please help!Wow, some really strange behavior.
OK, so here is what I'm going through. I reinstall, import the project and compiles.
Then I uncomment the new section which contains the following code:
lineStyle(1.0,0x8ea4bf);
var line_commands:Vector.<int> = new Vector.<int>();
line_commands.push(GraphicsPathCommand.LINE_TO, GraphicsPathCommand.LINE_TO, GraphicsPathCommand.LINE_TO, GraphicsPathCommand.LINE_TO);
var line_coord:Vector.<Number> = new Vector.<Number>();
line_coord.push(0,0, newW, angle, newW, (newH+angle), 0, newH);
drawPath(line_commands, line_coord);
I get 3 diffrent errors, which lead up to the error listed in the topic.
At first it says that "int" isn't a valid type and it points to this line:
var line_commands:Vector.<int> = new Vector.<int>();
Then I take int out so the line looks like this:
var line_commands:Vector = new Vector();
Then it says I can't nest classes and it points to the main MXML. I go to the main MXML then the error switches to say "The definition of base class Application was not found.".
I did figure out how to fix this with out reinstalling. I have to delete the project from my list (making sure to comment out the code above), then re-launch FB Burrito, then re-import the project and it works.
This is way nuts! I dont understand ... am I crazy? -
Why is my application name not showing up in the SQL Server connection properties?
If I understand correctly I should be able to have the application name from application.cfc show up in my SQL Server connection string (i.e. in the program_name column of sp_who2) if I go in to the DSN advanced settings and check "Application Name" under Client Settings.
However having done that I still don't see anything in the program name columns of the sp_who2 result set. Any ideas?
Thanks!I drew my shape, then went to the GRADIENT panel and clicked in the default gradient box to apply the default white to black gradient. Normally you can click on either color to change it using the ways I described in my original post but those are not available to me. The only way I could add a color was to drag it from the SWATCHES panel into the gradient colors slider.
This means that I cannot make changes to colors directly in the gradient panel like before. I have to make changes to the individual colors but clicking on the color in the gradient slider then going to the COLOR panel and adjusting the color there. Or by dragging in a whole new color from the COLOR or SWATCHES panels. This is really killing my work flow. -
Moving to CF10, Need help with Application.cfc
I've been googling about how to work with Application.cfc since last week but I still have some questions and I can't find the answers.
My application is under the root (in unix) and there are many subfolders underneath it. Each sub-folder is hosting a different web application.
From what I read, I can create 1 root Application.cfc and then on subsequent sub-folder, when I need to have another Application.cfc on that level, I can create ProxyApplication (see below) and then create a sub-folder level Applicatin.cfc
So, when I set an application.DSN on my root Application.cfc, using proxyApplication I don't have to reset this dsn again in my sub folder level Application.cfc
Since my loginform.cfm and loginaction.cfm is right under root directory too, I also set OnsessionStart in the root Application.cfc to handle user login. Then this means, I don't have to reset session variable again anywhere because session.username, etc has been set on the highest level.
Is this correct?
In addition, Am I correct when I do the following:
1. Since I have root level and sub-folder level Application.cfc, I should set this.name with a different name, am I right?
On the root Application.cfc I set this.name = "StudentServices" because this represent the global application
On the sub-folder level's Application.cfc, I set this.name to "StudentServices_stdLoad" becaus this sub-folder only handle student load application.
2. On the root Application.cfc, I set the DSN to the application scope. So on the sub-folder level Application.cfc I can check if a particular db is working or not
because as awhole, in the global sense, this web application uses more than one Databases. Each sub-folder may use a database that is dfferent than the other sub folder.
Am I doing the right thing? Please advice
Below is example of what I have, Thank you!
I created a root Application.cfc under the root directory:
<CFCOMPONENT displayname="Application" output="true" hint="My Root Application component">
<!--- Set up the application ---> <cfset THIS.Name = "StudentServices" /> <cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,30,0) /> <cfset THIS.SessionManagement = true /> <cfset THIS.SetClientCookies = false />
<cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
<cfset application.MainDSN = "DSN1">
<cfset application.ReportDSN = "DSN2">
<cfreturn true/>
</cffunction>
<cffunction name="onApplicationEnd" output="false">
<cfargument name="applicationScope" required="true"> </cffunction>
<cffunction name="onSessionEnd">
</CFCOMPONENT>
Then, in this root directory I also created a ProxyApplication:
<!--- it's empty and it Serves merely to create an alias for your root /Application.cfc --->
<cfcomponent name="ApplicationProxy" extends="AdvancementServices.Application">
</cfcomponent>
Then in the Sub-Directory, I can create a sub-folder level Application.cfc extending the root Application.cfc:
<CFCOMPONENT displayname="Application" extends="ApplicationProxy">
<!--- Set up the sub-folder application --->
<cfset THIS.Name = "StudentServices_stdLoad"/>
<cfset THIS.ApplicationTimeout = CreateTimeSpan(0,0,30,0) />
<cfset THIS.SessionManagement = true/>
<cfset THIS.SetClientCookies = false/>
<cffunction name="OnApplicationStart" access="public" returntype="boolean" output="false">
<!--- ****** Testing whether the ADVUPGRD is accessible by selecting some data.****** --->
<cftry>
<cfquery name="TestMain_DSN" datasource="#application.MainDSN#" maxrows="2">
SELECT Count(*) FROM MyTable
</cfquery>
<!--- If we get a database error, report an error to the user, log the error information, and do not start the application. --->
<cfcatch type="database">
<cflog file="#this.name#" type="error" text="Main DSN is not available. message: #cfcatch.message# Detail: #cfcatch.detail# Native Error: #cfcatch.NativeErrorCode#" >
<cfthrow message="This application encountered an error when connecting to the Main Database. Please contact support." />
<cfreturn false>
</cfcatch>
</cftry>
<cflog file="#this.name#" type="Information" text="Application #this.name# Started">
<cfreturn true/>
</cffunction>
</CFCOMPONENT>
<cfargument name = "SessionScope" required=true/> <cfargument name = "AppScope" required=true/>
</cffunction>
<cffunction name="OnSessionStart" access="public" returntype="void" output="false">
<CFSET session.UserGroup = ""/>
<CFSET session.UserName = ""/>
<CFSET session.currentPage = ""/>
<CFSET session.loggedin = "No"/>
<CFSET session.userrights = ""/>
<cfreturn/>
</cffunction>OK. It sounds to me like you really shouldn't be using a single root Application.cfc at all, if all you want to do is share some settings between your "sub-applications". I would look at storing the common settings in an external file that all of the applications can read in. The simplest way is to put the settings in a .CFM file somwhere outside of the web root (so it is not directly web accessible) and load it with <cfinclude> tag into the OnApplicationStart() method of each sub-application's App.cfc. That .CFM file can be as simple as:
<cfset application.myCustomSetting = "blahblah">
<cfset application.myOtherSetting = "foo">
Alternatively, you can look at using a config file like this Ray Camden blog post suggests, and use the GetProfileSection(), GetProfileString(), and SetProfileString() functions as needed within OnApplicationStart(). You could even put ALL of your settings in
A third option is to store your settings in an XML file or in JSON format in a text file. You could then write code to read in the XML file, and use something like xml2struct.cfc to convert the XML into a struct, then append the struct to your application scope. If you go the JSON route, then just read in the JSON file and use DeserializeJSON() to convert it into a struct, and append it to the application scope.
What I think is probably the best approach is to use a community-supported MVC framework like FW/1 or ColdBox (maybe you already are, I don't think you've said so though). One of the many advantages to doing so is that they have built-in "environment" support that can be used to configure common settings, depending on your environment (dev/qa/production). You would handle reading in your external settings through the "environment" mechanism.
One other thing to think about: your login mechanism. I think you want to use one set of login tools that is shared by all of the "sub-applications". You can do this also by putting the login/authentication-related code somewhere outside the webroot of your applications, and then either set up a mapping to that location in CF Admin, or set an application-specific mapping in your various App.cfc files. That way all the "sub-applications" share a common set of code for the login process. I don't know how your login process works (do all users go to the same login page then get redirected into their relevant "sub-application", or does each "sub-application" have a discrete login page that utilizes common back-end processes to authenticate and redirect), so you'll have to judge how that is best accomplished.
Hopefully this gives you some useful ideas.
-Carl V. -
Application does not work properly when I press a CommanButton
Hi all, I am having a problem with weblogic 10.3.5.
It turns out that an application built with JDeveloper 11.1.5, I test it, and everything goes well in the JDeveloper integrated Weblogic.
But when deploy in a standalone weblogic 10.3.5 server, the application does not work properly when I press a CommanButton to go to another page search (the property "action" is set correctly) , but nothing happens, stays in the same home page. Similarly when a commanButton link to run a task-flow, It do not work , however in the JDeveloper integrated Weblogic it runs correctly.
How I can solve these problems?
Thanks.Thanks Frank for help us, but when I writing this comment we are doing at home. So, we going to test the page in a stand alone weblogic server 10.3.5. We wrote the URL as :
" http://<our ip>:7001/myApp/faces/index.jspx "
this application contains a report desing and compiled with iReport 4.5.1 ( last version in the moment ), we can see the report when I press a commanButton without any problem.
But now, we need try your suggestions in the office, and give you more information about it . Thanks for the moment.
In the Afternoon we gonna give you more information about it . -
Package body greater than 2160 bytes does not compile in Object Browser
Hi there,
I initially created a package in Apex 2.1.0.0.39 using the Object Browser and it compiled OK. The message in the box above the source code says "PL/SQL code successfully compiled (17:51:08)". I then added more code and eventually when I clicked the "Compile" button" the message to say successfull compilation or any error message was not displayed. The box above the source code remains blank. After much trial and error I found that by adding just one more letter to the end of a comment that it would not compile, but by removing the letter then it would compile most of the time. I downloaded the package and found that the size of the download .PLB file was 2160 bytes. Editing the PLB file using a text editor to increase the size and executing it in SQL*PLUS does work.
Is this a fundamental limit on the size of packages that can be compiled using the Object Browser, or is there an Apex configuration parameter that can be modified to allow larger packages? If this is a limit then why isn't an informational message displayed? Or is this in fact an installation issue or an issues with Apex Object Browser?
Further information:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
I installed this version back at the beginning of the year for training purposes and have not made any conifiguration changes that I am aware of, or installed any further upgrades/software since.
All help gratefully received by this "definitely a nubie".
Regards.
John.John,
If you are using, as you said, Application Express version 2.1.0.0.39, be aware that this is a very old (and not a supported) version. If you have trouble with the latest version (currently 3.2), feel free to report them here.
Scott
Maybe you are looking for
-
Analysis Process Designer (APD) and EMail
Hi, Following due to data discrepancy in PO value,We developed a re conciliation report based on direct cube,The re conciliation report displays PO No,Po Value in BW and PO Value from ECC and a Difference column. My requirement is to develop a APD w
-
I am trying to do a check deposit on my bank app and had previously disallowed camera access. How do I now allow access?
-
ORA-00001 When I try and create an interactive query/report
Interactive report in APEX 3.2 I have a query like this that does a country lookup based on the physical address and the mailing address. The query executes fine through SQL plus but when I try and create an interactive report I get ORA-00001: unique
-
In Customer Master we have maintained payment terms for e.g. Z001 i.e. 12 Days There is only one Sales Area One sales order contain One Material Only In the sales area multiple products are allowed for sales In this Sales Area
-
Creating Editable UDFs in Batch Selection Screen
Hi, I want to create editable UDFs in Serial/Batches screen. I already created a field but it appears in Non-Editable format any suggestion Plz Regards Sree