[flexcoders] c3p0 logging with LCDS Tomcat
Hello, I'm trying to set up c3p0 logging to default system.err. I created a properties file (mchange-log.properties) and put it in WEB-INF/classes/ with the following configuration parameters: com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=ALL I can't see any logging to the system.err, I only see the following error log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly. I think he doesn't recognizes the properties file and switches to default (log4j). Somebody had this problem before? Thanks! Ward
[flexcoders] IE8/Vista exit fullscreen - inputtext locked
Hello, I have an issue with IE8 and Vista. When you toggle fullscreen and exit fullscreen you're unable to use a textinput. Anybody noticed this bug before? Any workaround? I attached a small test application to illustrate the problem. Greets, Ward Loockx ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.events.StateChangeEvent; private function openFullScreen(e:Event):void { //Application.application.stage.addEventListener(FullScreenEvent.FULL_SCREEN,testje); Application.application.verticalScrollPosition = 0; Application.application.invalidateDisplayList(); Application.application.stage.fullScreenSourceRect = new Rectangle(0, 0, 100, 100); Application.application.stage.scaleMode = StageScaleMode.EXACT_FIT; Application.application.stage.displayState = StageDisplayState.FULL_SCREEN; } ]] /mx:Script mx:VBox mx:TextInput id=dsdsds / mx:Button label=fullcreen click=openFullScreen(event) / /mx:VBox /mx:Application
Re: [flexcoders] Livecycle CommunicationsException: Communications link failure
Hello Pedro, Increasing the connection timeout is not possible because other applications use these database too. I try'd to use C3Po but looks like the connections still timeout. Here is an example I have a remoting service. In the constructor I create my pool. *Class.forName(com.mysql.jdbc.Driver); String dbString = jdbc:mysql:// + properties.getProperty(x) + :3306/ + properties.getProperty(x); DataSource unpooled = DataSources.unpooledDataSource(dbString,properties.getProperty(),properties.getProperty(x)); this.dataConnection = DataSources.pooledDataSource(unpooled); *I have a method in the remoting class that get's some data from the database. When I call this method below from flex the first +- 10times it is not a problem but then I can't get any connection anymore and stops after OPENING CONNECTION. Looks like there is something very wrong. Any idea? I just need that the connections stay open during the livecycle uptime. *public String getTeaserUrl(String account) { System.out.println(#REQUESTING TEASER\n\n); try { System.out.println(OPENING CONNECTION\n); Connection connect = this.dataConnection.getConnection(); System.out.println(GOT CONNECTION +connect.toString()); String select = SELECT FILENAME FROM TEASERS WHERE ACCOUNT = ? LIMIT 0,1; PreparedStatement statement = connect.prepareStatement(select); statement.setString(1,account); ResultSet result = statement.executeQuery(); System.out.println(GOT TEASER RESULT!! +result.toString()); while(result.next()) { return http://xxx/teasers/+result.getString(FILENAME)+.flv; } connect.close(); } catch(SQLException e) { e.printStackTrace(); } return ; } *Greets, Ward* * Pedro Sena schreef: 1) Try to increase your connection timeout 2) Double check if you are releasing the connections correctly. 3) Use a connection pooling mechanism :) C3P0 is a good one and easy to use If you are using hibernate, it will be very easy to configure it. HTH On Thu, Jun 18, 2009 at 2:11 PM, Ward Loockx w...@loockx.be mailto:w...@loockx.be wrote: Hello Pedro, Thanks for your reply! Here are the answers 1) What is your connection timeout? - connect timeout 5 2) Are your application and database in the same machine? - No (the DAO's make multiple connections to mysql servers and non of them are installed on the localhost) 3) Are you using some kind of connection pool mechanism? If so, what are you using? - Don't think so 4) Is it ocurring when your execute some specific query or it occurs anytime? - No, it just occurs after 20minutes. (every connection). So I get multiple errors in my application 5) What engine are you using(MyISAM, InnoDB, ...) ? - MyISAM Thanks, Ward On Thursday 18 June 2009 06:28:26 pm Pedro Sena wrote: I had this problem before. It's related to mysql(obviously) not to flex, but I'll try to help you. To do that, please answer some questions: 1) What is your connection timeout? 2) Are your application and database in the same machine? 3) Are you using some kind of connection pool mechanism? If so, what are you using? 4) Is it ocurring when your execute some specific query or it occurs anytime? 5) What engine are you using(MyISAM, InnoDB, ...) ? PS On Thu, Jun 18, 2009 at 1:04 PM, Ward Loockx w...@loockx.be mailto:w...@loockx.be wrote: Hello, I'm having a problem with my connections to the mysql server that are timing out(and get the communicationsException). We use autoreconnect=true when creating the connections, the problem is that whole application is crashing at this point because the connection has been lost. The Dao's just create one connection at startup for all clients (that should stay open). Does somebody has experience with this problem or any advice how to keep the connections open? Here is the stacktrace com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 19 ms ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc cessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst ructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895
[flexcoders] Livecycle CommunicationsException: Communications link failure
Hello, I'm having a problem with my connections to the mysql server that are timing out(and get the communicationsException). We use autoreconnect=true when creating the connections, the problem is that whole application is crashing at this point because the connection has been lost. The Dao's just create one connection at startup for all clients (that should stay open). Does somebody has experience with this problem or any advice how to keep the connections open? Here is the stacktrace com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 19 ms ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912) at com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java:86) 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 flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421) at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884) at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121) at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158) at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44) at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67) at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146) at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278) at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2452) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2906) ... 36 more Thanks in advance! Ward Loockx
Re: [flexcoders] Livecycle CommunicationsException: Communications link failure
Hello Pedro, Thanks for your reply! Here are the answers 1) What is your connection timeout? - connect timeout 5 2) Are your application and database in the same machine? - No (the DAO's make multiple connections to mysql servers and non of them are installed on the localhost) 3) Are you using some kind of connection pool mechanism? If so, what are you using? - Don't think so 4) Is it ocurring when your execute some specific query or it occurs anytime? - No, it just occurs after 20minutes. (every connection). So I get multiple errors in my application 5) What engine are you using(MyISAM, InnoDB, ...) ? - MyISAM Thanks, Ward On Thursday 18 June 2009 06:28:26 pm Pedro Sena wrote: I had this problem before. It's related to mysql(obviously) not to flex, but I'll try to help you. To do that, please answer some questions: 1) What is your connection timeout? 2) Are your application and database in the same machine? 3) Are you using some kind of connection pool mechanism? If so, what are you using? 4) Is it ocurring when your execute some specific query or it occurs anytime? 5) What engine are you using(MyISAM, InnoDB, ...) ? PS On Thu, Jun 18, 2009 at 1:04 PM, Ward Loockx w...@loockx.be wrote: Hello, I'm having a problem with my connections to the mysql server that are timing out(and get the communicationsException). We use autoreconnect=true when creating the connections, the problem is that whole application is crashing at this point because the connection has been lost. The Dao's just create one connection at startup for all clients (that should stay open). Does somebody has experience with this problem or any advice how to keep the connections open? Here is the stacktrace com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 19 ms ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAc cessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConst ructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3009) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2895) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3438) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1 761) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912 ) at com.dnxlive.cammer.remoting.CammerService.getShortcuts(CammerService.java :86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter. java:421) at flex.messaging.services.RemotingService.serviceMessage(RemotingService.ja va:183) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:150 3) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint .java:884) at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilt er.java:121) at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158) at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44) at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter .java:67) at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilt er.java:146) at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:2 78) at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:322 ) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat ionFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte rChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve .java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve .java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 102) at org.apache.catalina.core.StandardEngineValve.invoke
Re: [flexcoders] chaining effects together
Just use the effectend event.. small quick and dirty example included ;) Greets, Ward Loockx mx:script private var fadeBIn:fade; private var fadeBOut:fade; private var fadeAIn:fade; private var fadeAOut:fade; private function creationcomplete():void { fadeAOut.alphaTo = 0; fadeAOut.alphafrom = 1; fadeAOut.target= comp1; fadeAOut.addEventListener(Effect.effectEnd,fadeToControlA); fadeBOut.alphaTo = 0; fadeBOut.alphafrom = 1; fadeBOut.target= comp2; fadeBOut.addEventListener(Effect.effectEnd,fadeToControlB); fadeBIn.alphaTo = 1; fadeBIn.alphafrom = 0; fadeBIn.target= comp2; fadeAIn.alphaTo = 1; fadeAIn.alphafrom = 0; fadeAIn.target= comp1; } private function fadeToControlA():void { fadeBIn.play(); } private function fadeToControlB():void { fadeAIn.play(); } /mx:script mx:component1 id=comp1 / mx:component1 id=comp2 / mx:Button label=A click={fadeAOut.play()} / mx:Button label=B click={fadeBOut.play()} / simonjpalmer schreef: I have two custom controls which I want to fade in and out in response to a button click, so, control A is showing, press the B button, A fades out and control B fades in. I know how to set show and hide effects but they seems to happen simultaneously, which is really ugly. How do I make B's fade in start as A's fade out finishes? I'm using FLex 2, although I doubt that matters much.
[flexcoders] Zoom effect absolute positioning
Hello, I have a canvas within my application that contains polaroid images (own flex component). When I click on a polaroid I wan't it to zoom all over my application. When I do this now it stays within the canvas and I get scrollbars (on that canvas). Is there a way to keep the pictures on the canvas and still be able to zoom over my whole application (When zooming - go to absolute layout)? Somebody that knows if this is possible ? Thanks, Ward
[flexcoders] dataProvider binding in own component
Hello, I have a search component that uses a carousel component to display the search results. Now I want to bind my searchresult arraycollection (search component) to my dataProvider property in carousel component. So when data changed in the search the arraycollection dispatches an event so that my carousel knows that it needs to update. Any suggestions? Ward
Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property
Alex Harui schreef: Please post the entire contents of the window that shows the exception. I would expect to see a call stack with line numbers if you are using a debug build -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] On Behalf Of Ward Loockx Sent: Thursday, November 20, 2008 8:30 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property Alex Harui schreef: First you have to identify which code is causing the violation. Post the entire violation. It should contain more information about which component is doing the violation. Once you figure that out, then you can try to workaround it, but testing from the server instead of the local filesystem is recommended as someday you will deploy the app to a server and you'll have different security rules in such a configuration. A workaround if a SWFLoader has trustContent=true SWFLoader id=ldr trustContent=true / Is SWFLOader id=ldr preinitialize=if (Security.sandboxType=='remote') ldr.trustContent=true else ldr.trustContent=false / *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] *On Behalf Of *Ward Loockx *Sent:* Tuesday, November 18, 2008 12:06 AM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property Alex Harui schreef: Some code somewhere is trying to set a SecurityDomain parameter in a LoaderContext. There are parameters like trustContent on SWFLoader that can trigger that code. Unfortunately you can only run such code when deployed to HTTP:// and not from FILE:://. You might need to put in some conditional code to deal with it *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com] *On Behalf Of *Ward Loockx *Sent:* Monday, November 17, 2008 9:07 AM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property valdhor schreef: Try adding your bin-debug directory to your Global Security Settings Manager (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ward Loockx [EMAIL PROTECTED] wrote: Hello, When I'm trying to load images from a remote server I get the following error message.. *Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property* I've been googling and nothing that works for me. When I put the swf on the remote server it loads the images perfect! I've tried everything (Crossdomain
Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property
Alex Harui schreef: First you have to identify which code is causing the violation. Post the entire violation. It should contain more information about which component is doing the violation. Once you figure that out, then you can try to workaround it, but testing from the server instead of the local filesystem is recommended as someday you will deploy the app to a server and you’ll have different security rules in such a configuration. A workaround if a SWFLoader has trustContent=true SWFLoader id=”ldr” trustContent=”true” / Is SWFLOader id=”ldr” preinitialize=”if (Security.sandboxType==’remote’) ldr.trustContent=true else ldr.trustContent=false” / *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ward Loockx *Sent:* Tuesday, November 18, 2008 12:06 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property Alex Harui schreef: Some code somewhere is trying to set a SecurityDomain parameter in a LoaderContext. There are parameters like trustContent on SWFLoader that can trigger that code. Unfortunately you can only run such code when deployed to HTTP:// and not from FILE:://. You might need to put in some conditional code to deal with it *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] *On Behalf Of *Ward Loockx *Sent:* Monday, November 17, 2008 9:07 AM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property valdhor schreef: Try adding your bin-debug directory to your Global Security Settings Manager (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ward Loockx [EMAIL PROTECTED] wrote: Hello, When I'm trying to load images from a remote server I get the following error message.. *Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property* I've been googling and nothing that works for me. When I put the swf on the remote server it loads the images perfect! I've tried everything (Crossdomain,addSecuritydomain on application, ...). Someone that managed to solve this ? Looks like a lot of people have this problem... Thanks! Ward I added the SWF, but that didn't worked out :( Hello, Thanks for the reply. If I get it right, there is a workaround but requires additional code? Can you specify a bit please ? Thanks, Ward I've been trying with trustcontent mx:Image id=image source={imageUrl} trustContent=true/ But this didn't worked out for me... still same error. Any suggestions? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property
Alex Harui schreef: Some code somewhere is trying to set a SecurityDomain parameter in a LoaderContext. There are parameters like trustContent on SWFLoader that can trigger that code. Unfortunately you can only run such code when deployed to HTTP:// and not from FILE:://. You might need to put in some conditional code to deal with it *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Ward Loockx *Sent:* Monday, November 17, 2008 9:07 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property valdhor schreef: Try adding your bin-debug directory to your Global Security Settings Manager (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ward Loockx [EMAIL PROTECTED] wrote: Hello, When I'm trying to load images from a remote server I get the following error message.. *Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property* I've been googling and nothing that works for me. When I put the swf on the remote server it loads the images perfect! I've tried everything (Crossdomain,addSecuritydomain on application, ...). Someone that managed to solve this ? Looks like a lot of people have this problem... Thanks! Ward I added the SWF, but that didn't worked out :( Hello, Thanks for the reply. If I get it right, there is a workaround but requires additional code? Can you specify a bit please ? Thanks, Ward
[flexcoders] Data service fill returns null objects
Hello, When I do a call to my livecycle data service (fill approach), it will populate my specified arraycollection with result from server side. Now the problem is that my arraycollection is populated with the objects but there are places in the array where there are no objects but just a null reference. I'm not using paging I did a test to print every object in livecycle that is returned but there are no null objects there. Thanks, Ward
[flexcoders] Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property
Hello, When I'm trying to load images from a remote server I get the following error message.. *Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property* I've been googling and nothing that works for me. When I put the swf on the remote server it loads the images perfect! I've tried everything (Crossdomain,addSecuritydomain on application, ...). Someone that managed to solve this ? Looks like a lot of people have this problem... Thanks! Ward
Re: [flexcoders] Re: Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property
valdhor schreef: Try adding your bin-debug directory to your Global Security Settings Manager (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ward Loockx [EMAIL PROTECTED] wrote: Hello, When I'm trying to load images from a remote server I get the following error message.. *Security sandbox violation: local SWF files cannot use the LoaderContext.securityDomain property* I've been googling and nothing that works for me. When I put the swf on the remote server it loads the images perfect! I've tried everything (Crossdomain,addSecuritydomain on application, ...). Someone that managed to solve this ? Looks like a lot of people have this problem... Thanks! Ward I added the SWF, but that didn't worked out :(
[flexcoders] Flex dataservices paging question
Hello, I'm trying to use paging on my resultset retrieved from livecycle 2.6. In my resulthandler I only get 1result in my arraycollection(but the pagesize is set to 10!) and the count of the arraycollection 3500 (so in total 3500 results). When I try to loop over the array (he should automaticly retrieve more items - said in documentation), I get *Error: Item requested is not available. A request for the item is now pending. * I've been googling and saw that it was a bug toward 2.4 of livecycle but running 2.6... And why am I just retrieving one result instead of 10(my specified page size)? Here is some extra code The looping in teh resulthandler * private function searchResult(evt:ResultEvent):void { for each(var obj:Webcam in foundCams) { trace(--+obj); } } *and the initializing of the data service object * searchService = new DataService(search); var myrtmp:RTMPChannel = new RTMPChannel(my-rtmp, rtmp://*:2038); searchService.channelSet = new ChannelSet(); searchService.channelSet.addChannel(myrtmp); searchService.addEventListener(ResultEvent.RESULT,searchResult);* Thanks, Ward
Re: [flexcoders] Flex dataservices paging question
Ward Loockx schreef: Hello, I'm trying to use paging on my resultset retrieved from livecycle 2.6. In my resulthandler I only get 1result in my arraycollection(but the pagesize is set to 10!) and the count of the arraycollection 3500 (so in total 3500 results). When I try to loop over the array (he should automaticly retrieve more items - said in documentation), I get *Error: Item requested is not available. A request for the item is now pending. * I've been googling and saw that it was a bug toward 2.4 of livecycle but running 2.6... And why am I just retrieving one result instead of 10(my specified page size)? Here is some extra code The looping in teh resulthandler * private function searchResult(evt:ResultEvent):void { for each(var obj:Webcam in foundCams) { trace(--+obj); } } *and the initializing of the data service object * searchService = new DataService(search); var myrtmp:RTMPChannel = new RTMPChannel(my-rtmp, rtmp://*:2038); searchService.channelSet = new ChannelSet(); searchService.channelSet.addChannel(myrtmp); searchService.addEventListener(ResultEvent.RESULT,searchResult);* Thanks, Ward Looks like I'm trying to populate my own component and when an item isn't found it throws an ItemPendingError where I should add an responder to... I'm retrieving the search result in my search class and then use a component to show my results (later with next/previous button)... I'm calling the creation of the component when the resulthandler of the searchresult is called. I give my arraycollection as parameter to the component to create the results. But how can I change my code that the component can handle the errors when an item isn't found and continues populating?? Can somebody give some examples how this is done? Looks like the datagrid component can handle it by itself, how should I build in that support in my component? Thanks!
[flexcoders] Parameter deserialization data services
Hello, I'm trying to serialize an Actionscript associative array to Java Map. When I do my request I get an error *[RPC Fault faultString=The fill method is not defined for destination 'search' which matches fill parameters: '[ { nickname = }] (class: java.util.ArrayList)' faultCode=Server.Processing faultDetail=null]* (Even with a value it doesn't work). Looks like he makes an ArrayList at serverside... - but is this possible because ArrayList only can contain numeric keys (I think?) This is my data-services destination config * destination id=search adapter ref=java-dao / properties sourcebe.enjoy.SearchServiceAssembler/source scopeapplication/scope metadata identity property=account / /metadata server fill-method namefill/name paramsjava.util.Map/params /fill-method /server /properties /destination* And my method * public Collection fill(Map criteria) { System.out.println(criteria.toString()); //SearchServiceDAO service = new SearchServiceDAO(); //List results = service.searchCams(criteria); Vector v = new Vector(); return v; //return results; }* Thx! Ward
Re: [flexcoders] Parameter deserialization data services
Ward Loockx schreef: Hello, I'm trying to serialize an Actionscript associative array to Java Map. When I do my request I get an error *[RPC Fault faultString=The fill method is not defined for destination 'search' which matches fill parameters: '[ { nickname = }] (class: java.util.ArrayList)' faultCode=Server.Processing faultDetail=null]* (Even with a value it doesn't work). Looks like he makes an ArrayList at serverside... - but is this possible because ArrayList only can contain numeric keys (I think?) This is my data-services destination config * destination id=search adapter ref=java-dao / properties sourcebe.enjoy.SearchServiceAssembler/source scopeapplication/scope metadata identity property=account / /metadata server fill-method namefill/name paramsjava.util.Map/params /fill-method /server /properties /destination* And my method * public Collection fill(Map criteria) { System.out.println(criteria.toString()); //SearchServiceDAO service = new SearchServiceDAO(); //List results = service.searchCams(criteria); Vector v = new Vector(); return v; //return results; }* Thx! Ward Looks like the array is put in an array @ serverside... any suggestions? * (Command method=null (0) trxId=2.0) null (Typed Object #0 'flex.data.messages.DataMessage') identity = null operation = 1 correlationId = clientId = E10FD859-16F0-3472-4D61-916E0FD454A4 destination = search messageId = 19D4D897-2125-5944-A1C2-916E30B82FD9 body = (Array #1) [0] = [1] = (ECMA Array #2) european timeToLive = 0 timestamp = 0 headers = (Object #3) DSEndpoint = my-rtmp DSId = 300DE9BB-E309-F9EB-87D7-B9869B31683A *
[flexcoders] passing parameters to fill method of Data services
Hello, I'm trying to pass some parameters to livecycle server using the fill method. The problem is that I'm unable to pass an object or Array/ArrayCollection. I've used this page as source for the parameter binding http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1103.html. But it's always resulting in [RPC Fault faultString=Unable to locate a fill method for destination 'search' which matches the following parameters: [[Ljava.lang.Object;@107f8ba]. faultCode=Server.Processing faultDetail=null]. I did a test with 2 strings and that worked fine.. Anybody that can help? Ward
[flexcoders] fill method problem with parameters (Flex data management services)
Hello, I'm trying to perform a search with flex data management services to use the advantages like caching/paging. The problem is each time I try to perform the call (fill arraycollection with results), I get an error message. [RPC Fault faultString=Unable to locate a fill method for destination 'search' which matches the following parameters: [TEST, TEST123]. faultCode=Server.Processing faultDetail=null] I've been playing with the parameter options (switching from List to map etc.), but nothing worked. *My server side java code looks like this* import java.util.List; import java.util.Map; import java.util.Vector; import java.util.Collection; public class SearchServiceAssembler { public SearchServiceAssembler() { System.out.println(SearchServiceAssembler Constructor \n); } //Other methods public Collection fill(List test) { System.out.println(###+test.toString()+###); System.out.println(SearchServiceAssembler fill \n); Vector v = new Vector(); return v; } } *Here is my data-management configuration* destination id=search adapter ref=java-dao / properties sourcemy.package.SearchServiceAssembler/source scopeapplication/scope metadata identity property=account / /metadata server fill-method namefill/name paramsjava.util.List/params /fill-method /server /properties /destination *and offcourse my client side Actionscript code * - Creation of dataService searchService = new DataService(search); var myrtmp:RTMPChannel = new RTMPChannel(my-rtmp, rtmp://*:2038); searchService.channelSet = new ChannelSet(); searchService.channelSet.addChannel(myrtmp); - call to searchService searchService.fill(found,'TEST','TEST'); //With found initialized (ArrayCollection) When I'm start the livecycle server I can see he is passing the constructor of my assembler. So he's loaded I think Thanks ;) Ward
[flexcoders] [Fwd: fill method problem with parameters (Flex data management services)]
---BeginMessage--- Hello, I'm trying to perform a search with flex data management services to use the advantages like caching/paging. The problem is each time I try to perform the call (fill arraycollection with results), I get an error message. [RPC Fault faultString=Unable to locate a fill method for destination 'search' which matches the following parameters: [TEST, TEST123]. faultCode=Server.Processing faultDetail=null] I've been playing with the parameter options (switching from List to map etc.), but nothing worked. *My server side java code looks like this* import java.util.List; import java.util.Map; import java.util.Vector; import java.util.Collection; public class SearchServiceAssembler { public SearchServiceAssembler() { System.out.println(SearchServiceAssembler Constructor \n); } //Other methods public Collection fill(List test) { System.out.println(###+test.toString()+###); System.out.println(SearchServiceAssembler fill \n); Vector v = new Vector(); return v; } } *Here is my data-management configuration* destination id=search adapter ref=java-dao / properties sourcemy.package.SearchServiceAssembler/source scopeapplication/scope metadata identity property=account / /metadata server fill-method namefill/name paramsjava.util.List/params /fill-method /server /properties /destination *and offcourse my client side Actionscript code * - Creation of dataService searchService = new DataService(search); var myrtmp:RTMPChannel = new RTMPChannel(my-rtmp, rtmp://*:2038); searchService.channelSet = new ChannelSet(); searchService.channelSet.addChannel(myrtmp); - call to searchService searchService.fill(found,'TEST','TEST'); //With found initialized (ArrayCollection) When I'm start the livecycle server I can see he is passing the constructor of my assembler. So he's loaded I think Thanks ;) Ward ---End Message---