Problems with XML and Datagrid!
Hi!
Trying to follow a similar idea to the app shown on the flex
homepage - i have the following code:
[code]
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="srv.send()">
<mx:HTTPService id="srv"
url="lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml"/>
<mx:DataGrid
dataProvider="{srv.lastResult.videos.video}"/>
</mx:Application>
[/code]
However, when I run the application - it gives the following
error:
[RPC Fault faultString="Error #2148: SWF file
file:///C:/Documents and Settings/Andy/My Documents/Flex Builder
3/HelloWorld/bin-debug/HelloWorld.swf cannot access local resource
lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml. Only
local-with-filesystem and trusted local SWF files may access local
resources." faultCode="InvokeFailed" faultDetail="null"]
at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\ src\mx\rpc\AbstractInvoker.as:263
at mx.rpc.http.mxml::HTTPService/
http://www.adobe.com/2006/flex/mx/internal::invoke()[E:\dev\3.0.x\frameworks\projects\rpc\ src\mx\rpc\http\mxml\HTTPService.as:234
at
mx.rpc.http::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http\HTTP Service.as:758]
at
mx.rpc.http.mxml::HTTPService/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\http \mxml\HTTPService.as:217]
at
HelloWorld/___HelloWorld_Application1_creationComplete()[C:\Documents
and Settings\Andy\My Documents\Flex Builder
3\HelloWorld\src\HelloWorld.mxml:2]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\co re\UIComponent.as:9051]
at mx.core::UIComponent/set
initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:698]
at Function/
http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]
and fails to connect to the xml i think.
Any ideas on what I am doing wrong?!
Thanks
Andy
You need to specify the full URL. I would also suggest using
a result handler to assign the xml to your DataGrid dataProvider.
Below is a sample. I set the resultFormat to e4x, which is XML.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="srv.send()">
<mx:HTTPService id="srv"
url="
http://lab-cs3.cs.st-andrews.ac.uk/~aa322/mytube.xml"
result="videoListLoaded(event)"
resultFormat="e4x"/>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
[Bindable] private var videoList:XML;
private function videoListLoaded(evt:ResultEvent):void {
videoList = evt.result as XML;
]]>
</mx:Script>
<mx:DataGrid x="10" y="10" id="videos_dg"
dataProvider="{videoList.video}">
<mx:columns>
<mx:DataGridColumn width="200" headerText="label"
dataField="label"/>
<mx:DataGridColumn width="300" headerText="URL"
dataField="url"/>
<mx:DataGridColumn width="50" headerText="views"
dataField="views"/>
<mx:DataGridColumn width="150" headerText="Category"
dataField="category"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Vygo
Similar Messages
-
Problem With XML and DataGrid)
Hi,
I do have a question how to get my XML data in the appropriate way into my DataGrid. I wrote a labelFunction to get the data into the grid but I still have the problem that the length of the DataGrid depends on the dataProvider and I can't find a way to specify that it should depend on a child object of the dataProvider.
If you look at the structure of the XML file you can see that for every date a couple of hours exist (normally 24 ) and measurements coming in every hour. So, naturally I would like to show the measurements in connection to the hour. The column 'Date' and 'Time' will be merged anyway to something like '23/2:10-11'. So, if it is easier to combine these values first and create that way a unique date I would be also happy.
However, the XML file and the Flex code you find at http://www2.dmu.dk/thob/Station_Nord/srcview/index.html and the Flex application you find at http://www2.dmu.dk/thob/Station_Nord/Station_Nord.html.
Thanks for your help in advance,
ThomasI don't want to analyze that example. Are you asking how to
get an id or some other value when you select a row in a datagrid?
When you select an item in any list-based control, the
control's selectedItem properety contains a reference to the
dataProvider item object for that selected item. You can access any
property that is present in that object:
var sId:String = myDataGrid.selectedItem.myIDProperty;
If I have misunderstood, please restate your question.
Tracy -
Problems with xml and j2sdk-1.5
Hello everyone,
until i upgraded my version of the jdk (from 1.4.2 to 1.5.0) everything was working fine concerning xml-processing. Now i am having problems with at least two methods that were working just fine before the upgrade.
public void createRootElement(String s) {
Element root = doc.createElement(s);
doc.appendChild(root);
//that was the first one
public void addFirstChildElement(String element, String node) {
Element root = doc.getDocumentElement();
System.out.println("Rootelement: "+root.toString()+" Element: "+element+" node: "+node);
try {
Element nextElement = doc.createElement(element);
System.out.println("Nextelement "+nextElement.toString());
root.appendChild(nextElement);
nextElement.appendChild(doc.createTextNode(node));
catch (DOMException e) {
e.printStackTrace();
//the second onethe problem is now that for some reasong nothing is written into the xml document except "<?xml version='1.0' encoding='UTF-8' ?>".
The result of the System.out.println command in the second method is:
Rootelement: [Preferences: null] Element: DefaultLanguage node: de
As i mentioned already everything was fine before the upgrade, but now i really don't have a clue what's wrong...
Any ideas?
Thanks in advance...It seems that the toSring() method doesn't print out the complete XMl structure. anymore.
Only some "debug" information is printed.
You have to use a transfomer (text transfomer) to print out the XML in text form... -
Problem with XML and XSLT, help...
Okay, I have this XML doc (called stocks.xml):
<?xml:stylesheet type="text/xsl" href="stocks.xsl" version="1.0" encoding="UTF-8"?>
<portfolio>
<stock>
<symbol> SUNW </symbol>
<name> Sun Microsystem </name>
<price> 12.95 </price>
</stock>
<stock>
<symbol> HPW </symbol>
<name> Hewlet Packard </name>
<price> 53.50 </price>
</portfolio>
And I have this XSLT doc (called stocks.xls):
?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title> Stocks </title>
<body bgcolor="#ffffcc">
<xsl:apply-template />
</body>
</head>
</html>
</xsl template>
<xsl:template match="portfolio">
<table border="2">
<tr>
<th> Stock Symbol </th><th> Company Name </th><th> Price </th>
</tr>
<xsl:for-each select="stock">
<tr>
<td>
<i><xsl:value-of select="symbol" /></i>
</td>
<td>
<xsl:value-of select="price" />
</td>
</tr>
</xsl:for-each>
</table>
</xsl template>
</stylesheet>
When I try to retrieve the stocks.xml document with
IE, the browser said, there is an error on line 2, can not
recognize xsl:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Reference to undeclared namespace prefix: 'xsl'. Error processing resource 'http://localhost:8080/examples/jsp/stocks/stocks.xsl'. Line 2, Position 71
<xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
I just follow this from an example of XML tutorial.
Please help, what is it that I miss? Seems everything
I have is okay....??
Thanks,
Ted.Thanks you all!
You have spotted that mistyped.
However, turns out Internet Browser that I have does not permit the use of XSL. After I fixed the file, I got this
message:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
Keyword xsl:apply-template may not be used here.
Oh well...
Anybody knows, if IE can or can not be used to view the
XML that reference XSL??
Thanks,
Ted. -
Problems with reports and XML-publisher - No XML
Hi!
I'm having a problem with Apps and XML-publisher. I made a report file, which queries some views. When executing in reports, I get all the data I expect.
Now, when I upload the reportfile to Apps and let it generate XML, my xml-file is empty (well, almost empty)
<?xml version="1.0" ?>
<!-- Generated by Oracle Reports version 6.0.8.27.0 -->
<T03501684>
<LIST_G_PERSOON>
<LIST_G_PERSOON />
</T03501684>
Anyone who can shed any light upon this problem?OK, finally solved the problem... A good night's sleep always helps ;).
After just trying each queried table one after an other, I found the problem:
The difference between Oracle Apps (Dutch locale) and the reports builder (English) is the language... And our functional people have changed some names, but the Dutch ones, leaving the english names in place and one of the tables I query has language specific data, which is also appears in a where clause. -
Hi B2B Gurus,
We are facing the problem with ECS and XSD files from past 2 weeks, Steps we followed
1. Created a ECS file in document editor version 11g: 6.6.0
2. ECS files consists only from ST and SE segments
Ex: ST
BCH
CUR
REF
PER -- Exclude
TAX -- Exclude
SE
3: Generated a XSD file from ECS file( File --> export---> Oracle B2B) in document ediotr
4. We imported a ECS and XSD file in B2B console( documents---docdef-transaction set ECS file) and XSD File
5. We tested one file from manually we face below error:
Error Code B2B-51507
Error Description Machine Info: (usmtnz-dinfap19.dev.emrsn.org) Description: Payload validation error.
Error Level ERROR_LEVEL_COLLABORATION
Error Severity ERROR
Error Text
and some times it shows Guideline load Error or simply Error
Please help us to resolve this
RegardsAnuj,
We are sending the EDI XML file from backend, then B2B will convert it into EDI file, How can we analyze EDI XML file with ECS file, B2B is not converting to EDI.
1. Can we use 10g ECS file and XSD file in 11G
2. I tried to import it, but it showing below error while doing testing
App Message property {MSG_ID=90422086, Sequencing=false, DOCTYPE_REVISION=5020, MSG_TYPE=1, FROM_PARTY=EMERSON, DOCTYPE_NAME=850, TO_PARTY=APLL, ATTACHMENT=}
Direction OUTBOUND
State MSG_ERROR
Error Code B2B-51507
Error Text Error Brief : The element does not include any significant data.
Error Description Error : The Element PER02 does not include any significant data characters. Segment PER is defined in the guideline at position 3600.{br}{br}This error was detected at:{br}{tab}Segment Count: 11{br}{tab}Element Count: 2{br}{tab}Characters: 5395 through 5397
Created Date 06/20/2011 02:52 PM
Modified Date 06/20/2011 02:52 PM
Note: I used the same files in 10G its working fine.
Regards
Edited by: Francis on Jun 20, 2011 10:48 AM -
Hello,
I am having a strange problem with Tomcat and axis. I have a webservice that uses axis2 for wsdl2java class generation. When I compile my project in maven a Test is performed. During the test a glassfish server is established and the project is deployed -everything work great with the expected results. However when I try to deploy the webservice on tomcat it has some problems.
At first I tried to call axis code in a POST method that takes a MultiPart message. The code is as below:
*@Path("identifyWavestream")*
*@POST*
*@Consumes(MediaType.MULTIPART_FORM_DATA)*
*@Produces(MediaType.APPLICATION_XML)*
*public String multipartTest(com.sun.jersey.multipart.MultiPart multiPart) throws Exception {*
*// get first body part (index 0)*
*//tomcat shows that the first error is here (line 122 is the nest one with bodypart)*
BodyPart bp = multiPart.getBodyParts().get(0);
BodyPartEntity bodyPartEntity = (BodyPartEntity) bp.getEntity();
InputStream stream = bodyPartEntity.getInputStream();
*//the rest of the code either saves the incoming file or implements the wsdl2java axis interface - neither works.*
And the tomcat error is:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.util.ArrayList.RangeCheck(Unknown Source)
java.util.ArrayList.get(Unknown Source)
com.webserv.rest.resources.SearchResource.test.multipartTest(SearchResource.java:122)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
It was strange to me since this simple approach of handling a Multipart method worked for me earlier. Then I decided skip the handling of multipart method and just call the axis code. But the results also caused an error. I then tried to call the axis code in a simple @GET method (to cross out any issues regarding the multipart) and the result where the same. Again everything works on the maven- glassfish test. In this case the tomcat error is the following:
javax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:361)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
com.sun.jersey.api.container.MappableContainerException: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:74)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
org.apache.axis2.transport.http.AbstractHTTPSender.initializeTimeouts(AbstractHTTPSender.java:454)
org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:514)
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:156)
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
com.webserv.rest.webapp.IntSoapServiceStub.getServerData(IntSoapServiceStub.java:2447)
com.webserv..rest.resources.AIntSoapImpl.getServerData(AIntSoapImpl.java:112)
com.webserv..rest.resources.SearchResource.test.pingTest(SearchResource.java:167)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:138)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
I think it is also a good ide to post the pom.xml file :
Edited by: 803864 on 2010-10-21 00:30I think it is also a good ide to post the pom.xml file:
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<modelVersion>4.0.0</modelVersion>+
+<groupId>com.myProjects</groupId>+
+<artifactId>audioid-rest-interface</artifactId>+
+<packaging>war</packaging>+
+<name>AudioID Rest Interface</name>+
+<version>0.1</version>+
+<dependencies>+
+<!--+
+<dependency>+
+<groupId>com.sun.tools.xjc.maven2</groupId>+
+<artifactId>maven-jaxb-plugin</artifactId>+
+<version>1.1</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-client</artifactId>+
+<version>1.0.1</version>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>jersey-multipart</artifactId>+
+<version>1.0.1</version>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.grizzly</groupId>+
+<artifactId>grizzly-servlet-webserver</artifactId>+
+<version>1.9.0</version>+
+<scope>test</scope>+
+</dependency>-->+
+<dependency>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>jersey-multipart</artifactId>+
+<version>1.0.1</version>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-client</artifactId>+
+<version>1.0.1</version>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-bundle</artifactId>+
+<version>1.0.1</version>+
+</dependency>+
+<dependency>+
+<groupId>commons-logging</groupId>+
+<artifactId>commons-logging</artifactId>+
+<version>1.0.4</version>+
+</dependency>+
+<dependency>+
+<groupId>commons-collections</groupId>+
+<artifactId>commons-collections</artifactId>+
+<version>3.1</version>+
+</dependency>+
+<dependency>+
+<groupId>org.slf4j</groupId>+
+<artifactId>slf4j-log4j12</artifactId>+
+<version>1.5.6</version>+
+</dependency>+
+<dependency>+
+<groupId>junit</groupId>+
+<artifactId>junit</artifactId>+
+<version>3.8.2</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>org.glassfish.distributions</groupId>+
+<artifactId>web-all</artifactId>+
+<version>10.0-build-20080430</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>org.glassfish.embedded</groupId>+
+<artifactId>gf-embedded-api</artifactId>+
+<version>1.0-alpha-4</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-server</artifactId>+
+<version>1.0.3.1</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>maven-wadl-plugin</artifactId>+
+<version>1.0.3.1</version>+
+</dependency>+
+<dependency>+
+<groupId>org.hibernate</groupId>+
+<artifactId>hibernate</artifactId>+
+<version>3.2.5.ga</version>+
+<exclusions>+
+<exclusion>+
+<groupId>javax.transaction</groupId>+
+<artifactId>jta</artifactId>+
+</exclusion>+
+<exclusion>+
+<groupId>cglib</groupId>+
+<artifactId>cglib</artifactId>+
+</exclusion>+
+</exclusions>+
+</dependency>+
+<dependency>+
+<groupId>org.apache.axis2</groupId>+
+<artifactId>axis2</artifactId>+
+<version>1.4.1</version>+
+</dependency>+
+<!-- <dependency> -->+
+<dependency>+
+<groupId>org.apache.axis2</groupId>+
+<artifactId>axis2-aar-maven-plugin</artifactId>+
+<version>1.4.1</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>org.apache.axis2</groupId>+
+<artifactId>axis2-java2wsdl</artifactId>+
+<version>1.4.1</version>+
+<scope>test</scope>+
+</dependency>+
+<dependency>+
+<groupId>org.apache.axis2</groupId>+
+<artifactId>axis2-xmlbeans</artifactId>+
+<version>1.4.1</version>+
+</dependency>+
+<!-- <dependency> -->+
+<dependency>+
+<groupId>com.sun.xml.bind</groupId>+
+<artifactId>jaxb-impl</artifactId>+
+<version>2.1.12</version>+
+</dependency>+
+<dependency>+
+<groupId>cglib</groupId>+
+<artifactId>cglib-nodep</artifactId>+
+<version>2.1_3</version>+
+</dependency>+
+</dependencies>+
+<build>+
+<finalName>audioid-rest-interface</finalName>+
+<plugins>+
+<plugin>+
+<!-- This class is just generated for wadl support!!! -->+
+<!-- Take care that folder ../music-dna-core is existing -->+
+<groupId>com.sun.tools.xjc.maven2</groupId>+
+<artifactId>maven-jaxb-plugin</artifactId>+
+<version>1.1</version>+
+<executions>+
+<execution>+
+<phase>generate-sources</phase>+
+<goals>+
+<goal>generate</goal>+
+</goals>+
+</execution>+
+</executions>+
+<configuration>+
+<generatePackage> com.webserv.wsparameters</generatePackage>+
+<schemaDirectory>../audioid-rest-interface/src/main/resources+
+</schemaDirectory>+
+<includeSchemas>+
+<includeSchema>**/*.xsd</includeSchema>+
+</includeSchemas>+
+<extension>true</extension>+
+<strict>false</strict>+
+<verbose>false</verbose>+
+</configuration>+
+</plugin>+
+<plugin>+
+<groupId>org.apache.maven.plugins</groupId>+
+<artifactId>maven-javadoc-plugin</artifactId>+
+<!-- <version>2.6</version> -->+
+<executions>+
+<execution>+
+<goals>+
+<goal>javadoc</goal>+
+</goals>+
+<phase>compile</phase>+
+</execution>+
+</executions>+
+<configuration>+
+<encoding>UTF-8</encoding>+
+<verbose>false</verbose>+
+<show>public</show>+
+<subpackages> com.webserv.rest.rest.resources: com.webserv.rest.rest.commons: com.webserv.wsparameters+
+</subpackages>+
+<doclet>com.sun.jersey.wadl.resourcedoc.ResourceDoclet</doclet>+
+<docletPath>${path.separator}${project.build.outputDirectory}+
+</docletPath>+
+<docletArtifacts>+
+<docletArtifact>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>wadl-resourcedoc-doclet</artifactId>+
+<version>1.0.3.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-server</artifactId>+
+<version>1.0.3.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>xerces</groupId>+
+<artifactId>xercesImpl</artifactId>+
+<version>2.6.1</version>+
+</docletArtifact>+
+</docletArtifacts>+
+<additionalparam>-output+
+${project.build.outputDirectory}/resourcedoc.xml</additionalparam>+
+<useStandardDocletOptions>false</useStandardDocletOptions>+
+</configuration>+
+</plugin>+
+<plugin>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>maven-wadl-plugin</artifactId>+
+<version>1.0.3.1</version>+
+<executions>+
+<execution>+
+<id>generate</id>+
+<goals>+
+<goal>generate</goal>+
+</goals>+
+<phase>compile</phase>+
+</execution>+
+</executions>+
+<configuration>+
+<wadlFile>${project.build.outputDirectory}/application.wadl+
+</wadlFile>+
+<formatWadlFile>true</formatWadlFile>+
+<baseUri>http://192.168.2.149:8080/${project.build.finalName}+
+</baseUri>+
+<packagesResourceConfig>+
+<param> com.webserv.rest.resources</param>+
+</packagesResourceConfig>+
+<wadlGenerators>+
+<wadlGeneratorDescription>+
+<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc+
+</className>+
+<properties>+
+<property>+
+<name>applicationDocsFile</name>+
+<value>${basedir}/src/main/doc/application-doc.xml</value>+
+</property>+
+</properties>+
+</wadlGeneratorDescription>+
+<wadlGeneratorDescription>+
+<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport+
+</className>+
+<properties>+
+<property>+
+<name>grammarsFile</name>+
+<value>${basedir}/src/main/doc/application-grammars.xml</value>+
+</property>+
+</properties>+
+</wadlGeneratorDescription>+
+<wadlGeneratorDescription>+
+<className>com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport+
+</className>+
+<properties>+
+<property>+
+<name>resourceDocFile</name>+
+<value>${project.build.outputDirectory}/resourcedoc.xml</value>+
+</property>+
+</properties>+
+</wadlGeneratorDescription>+
+</wadlGenerators>+
+</configuration>+
+</plugin>+
+<plugin>+
+<groupId>org.codehaus.mojo</groupId>+
+<artifactId>exec-maven-plugin</artifactId>+
+<version>1.1</version>+
+<executions>+
+<execution>+
+<goals>+
+<goal>java</goal>+
+</goals>+
+</execution>+
+</executions>+
+<configuration>+
+<mainClass>com.sun.jersey.samples.generatewadl.Main</mainClass>+
+</configuration>+
+</plugin>+
+<plugin>+
+<groupId>org.apache.maven.plugins</groupId>+
+<artifactId>maven-compiler-plugin</artifactId>+
+<inherited>true</inherited>+
+<configuration>+
+<source>1.5</source>+
+<target>1.5</target>+
+<!--+
exclude temporary types that are only needed for wadl and doc
generation
-->
+<!--+
+<excludes> <exclude>com/webserv/types/temporary/**</exclude>+
+<exclude>com/webserv/rest/commons/Examples.java</exclude>+
+</excludes>+
-->
+</configuration>+
+</plugin>+
+<plugin>+
+<groupId>org.jvnet.jaxb2.maven2</groupId>+
+<artifactId>maven-jaxb2-plugin</artifactId>+
+<executions>+
+<execution>+
+<goals>+
+<goal>generate</goal>+
+</goals>+
+</execution>+
+</executions>+
+</plugin>+
+<plugin>+
+<groupId>org.apache.axis2</groupId>+
+<artifactId>axis2-wsdl2code-maven-plugin</artifactId>+
+<version>1.4.1</version>+
+<executions>+
+<execution>+
+<id>generate reco core</id>+
+<goals>+
+<goal>wsdl2code</goal>+
+</goals>+
+<configuration>+
+<packageName>com.webserv.rest.webapp</packageName>+
+<wsdlFile>src/main/java/com/webserv/wsdl/web.wsdl</wsdlFile>+
+<databindingName>adb</databindingName>+
+</configuration>+
+</execution>+
+</executions>+
+</plugin>+
+<plugin>+
+<groupId>com.sun.tools.xjc.maven2</groupId>+
+<artifactId>maven-jaxb-plugin</artifactId>+
+<version>1.1</version>+
+<executions>+
+<execution>+
+<goals>+
+<goal>generate</goal>+
+</goals>+
+</execution>+
+</executions>+
+<configuration>+
+<generatePackage>com.webserv.wsparameters</generatePackage>+
+<schemaDirectory>src/main/xsd</schemaDirectory> <includeSchemas>+
+<includeSchema>**/*.xsd</includeSchema> </includeSchemas>+
+<extension>true</extension>+
+<strict>false</strict>+
+<verbose>true</verbose>+
+</configuration>+
+</plugin>+
+</plugins>+
+</build>+
+<profiles>+
+<profile>+
+<id>jdk-1.5</id>+
+<activation>+
+<jdk>1.5</jdk>+
+</activation>+
+<dependencies>+
+<dependency>+
+<groupId>com.sun.xml.bind</groupId>+
+<artifactId>jaxb-impl</artifactId>+
+<version>2.1.10</version>+
+</dependency>+
+</dependencies>+
+<build>+
+<plugins>+
+<plugin>+
+<groupId>org.apache.maven.plugins</groupId>+
+<artifactId>maven-javadoc-plugin</artifactId>+
+<configuration>+
+<docletArtifacts>+
+<docletArtifact>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>maven-wadl-plugin</artifactId>+
+<version>1.0.3.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>com.sun.jersey.contribs</groupId>+
+<artifactId>wadl-resourcedoc-doclet</artifactId>+
+<version>1.0.3.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>com.sun.jersey</groupId>+
+<artifactId>jersey-server</artifactId>+
+<version>1.0.3.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>xerces</groupId>+
+<artifactId>xercesImpl</artifactId>+
+<version>2.6.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>javax.xml.bind</groupId>+
+<artifactId>jaxb-api</artifactId>+
+<version>2.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>javax.xml</groupId>+
+<artifactId>jaxb-impl</artifactId>+
+<version>2.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>javax.activation</groupId>+
+<artifactId>activation</artifactId>+
+<version>1.1</version>+
+</docletArtifact>+
+<docletArtifact>+
+<groupId>javax.xml.stream</groupId>+
+<artifactId>stax-api</artifactId>+
+<version>1.0</version>+
+</docletArtifact>+
+</docletArtifacts>+
+</configuration>+
+</plugin>+
+</plugins>+
+</build>+
+</profile>+
+<profile>+
+<id>xsltproc</id>+
+<activation>+
+<file>+
+<exists>../xsltproc_win32/xsltproc.exe</exists>+
+</file>+
+</activation>+
+<build>+
+<plugins>+
+<!-- Create/generate the application.html using xsltproc -->+
+<!-- Create/generate the application.html using xsltproc -->+
+<plugin>+
+<groupId>org.codehaus.mojo</groupId>+
+<artifactId>exec-maven-plugin</artifactId>+
+<version>1.1</version>+
+<executions>+
+<execution>+
+<id>copy-docs-to-builddir</id>+
+<goals>+
+<goal>exec</goal>+
+</goals>+
+<phase>compile</phase>+
+<configuration>+
+<executable>copy</executable>+
+<commandlineArgs>src\\main\\doc\\*.* target\\classes+
+</commandlineArgs>+
+</configuration>+
+</execution>+
+<execution>+
+<id>prepare-xsltproc</id>+
+<goals>+
+<goal>exec</goal>+
+</goals>+
+<phase>package</phase>+
+<configuration>+
+<executable>copy</executable>+
+<commandlineArgs>..\\audioid-rest-interface\\src\\main\\resources\\*.xsd+
target\\classes</commandlineArgs>
+</configuration>+
+</execution>+
+<execution>+
+<id>exec-xsltproc: target/application.html</id>+
+<goals>+
+<goal>exec</goal>+
+</goals>+
+<phase>package</phase>+
+<configuration>+
+<!--<executable>xsltproc</executable>-->+
+<executable>../xsltproc_win32/xsltproc.exe</executable>+
+<commandlineArgs>-o target/application.html+
src/main/doc/wadl_documentation.xsl
target/classes/application.wadl</commandlineArgs>
+</configuration>+
+</execution>+
+</executions>+
+</plugin>+
+</plugins>+
+</build>+
+</profile>+
+</profiles>+
+<pluginRepositories>+
+<pluginRepository>+
+<id>maven2-repository.dev.java.net</id>+
+<name>Java.net Repository for Maven</name>+
+<url>http://download.java.net/maven/2/</url>+
+<layout>default</layout>+
+</pluginRepository>+
+<pluginRepository>+
+<id>maven-repository.dev.java.net</id>+
+<name>Java.net Maven 1 Repository (legacy)</name>+
+<url>http://download.java.net/maven/1</url>+
+<layout>legacy</layout>+
+</pluginRepository>+
+</pluginRepositories>+
+<repositories>+
+<repository>+
+<id>maven2-repository.dev.java.net</id>+
+<name>Java.net Repository for Maven</name>+
+<url>http://download.java.net/maven/2/</url>+
+<layout>default</layout>+
+</repository>+
+<repository>+
+<id>maven-repository.dev.java.net</id>+
+<name>Java.net Maven 1 Repository (legacy)</name>+
+<url>http://download.java.net/maven/1</url>+
+<layout>legacy</layout>+
+</repository>+
+<repository>+
+<id>glassfish-repository</id>+
+<name>Java.net Repository for Glassfish</name>+
+<url>http://download.java.net/maven/glassfish</url>+
+</repository>+
+</repositories>+
+</project>+
Can anyonr contribute? -
Problem with XMLTABLE and LEFT OUTER JOIN
Hi all.
I have one problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns correct result but in 10g it doesn't, it is trated as INNER JOIN.
SELECT * FROM v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
--test for 11g
CREATE TABLE XML_TEST(
ID NUMBER(2,0),
XML XMLTYPE
INSERT INTO XML_TEST
VALUES
1,
XMLTYPE
<msg>
<data>
<fields>
<id>g1</id>
<dat>data1</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
2,
XMLTYPE
<msg>
<data>
<fields>
<id>g2</id>
<dat>data2</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
3,
XMLTYPE
<msg>
<data>
<fields>
<id>g3</id>
<dat>data3</dat>
</fields>
<fields>
<id>g4</id>
<dat>data4</dat>
</fields>
<fields>
<dat>data5</dat>
</fields>
</data>
</msg>
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4
3 data5 Here's everything fine, now the problem:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
"CORE 10.2.0.1.0 Production"
TNS for HPUX: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
--exactly the same environment as 11g (tables and rows)
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4As you can see in 10g I don't have the last row, it seems that Oracle 10g doesn't recognize the LEFT OUTER JOIN.
Is this a bug?, Metalink says that sometimes we can have an ORA-0600 but in this case there is no error returned, just incorrect results.
Please help.
Regards.Hi A_Non.
Thanks a lot, I tried with this:
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x,
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)(+) y ;And is giving me the complete output.
Thanks again.
Regards. -
hi everybody,
I've a big problem with XML on Linux, in details I see my program stopping on Linux at the instruction
XMLReader xr = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
and it's strange because on Windows it runs and there aren't problems about permissions on files, does anyone knows what to do?
thanks in advance!
StefanoWhat happens on that line? I'm assuming you get some kind of error or exception.
Make sure the JAR file for Crimson is in your classpath. -
Problem with XML in APEX ORA-06502
i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
declare
l_XML varchar2(32767);
begin
select xmlElement
"iva",
xmlElement("numeroRuc",J.RUC),
xmlElement("razonSocial", J.RAZON_SOCIAL),
xmlElement("idRepre", J.ID_REPRE),
xmlElement("rucContador", J.RUC_CONTADOR),
xmlElement("anio", J.ANIO),
xmlElement("mes", J.MES),
xmlElement
"compras",
select xmlAgg
xmlElement
"detalleCompra",
--xmlAttributes(K.ID_COMPRA as "COMPRA"),
xmlForest
K.COD_SUSTENTO as "codSustento",
K.TPLD_PROV as "tpldProv",
K.ID_PROV as "idProv",
K.TIPO_COMPROBANTE as "tipoComprobante",
to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
K.ESTABLECIMIENTO as "establecimiento",
K.PUNTO_EMISION as "puntoEmision",
K.SECUENCIAL as "secuencial",
to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
K.AUTORIZACION as "autorizacion",
to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
xmlElement
"air",
select xmlAgg
xmlElement
"detalleAir",
xmlForest
P.COD_RET_AIR as "codRetAir",
to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
from ANEXO_COMPRAS P
where P.ID_COMPRA = K.ID_COMPRA
AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
xmlElement("secRetencion1", K.SEC_RETENCION_1),
xmlElement("autRetencion1", K.AUT_RETENCION_1),
xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
xmlElement("docModificado", K.DOC_MODIFICADO),
xmlElement("estabModificado", K.ESTAB_MODIFICADO),
xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
xmlElement("secModificado", K.SEC_MODIFICADO),
xmlElement("autModificado", K.AUT_MODIFICADO)
from SRI_COMPRAS K
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
AND K.ID BETWEEN 1 AND 25
).getClobVal()
into l_XML
from ANEXO_INFORMANTE J
where J.ID_INFORMANTE =:P3_MES
and J.RUC =:P3_ID_RUC
and J.ANIO =:P3_ANIO
and J.MES =:P3_MES;
--HTML
sys.owa_util.mime_header('text/xml',FALSE);
sys.htp.p('Content-Length: ' || length(l_XML));
sys.owa_util.http_header_close;
sys.htp.print(l_XML);
end;
Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
declare
l_XML CLOB;
begin
--Oculta XML
sys.htp.init;
wwv_flow.g_page_text_generated := true;
wwv_flow.g_unrecoverable_error := true;
--select XML
select xmlElement
from SRI_COMPRAS K
WHERE K.ID IS NOT NULL
AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
).getClobVal()
into l_XML
from ANEXO_INFORMANTE J
where J.ID_INFORMANTE =:P3_MES
and J.RUC =:P3_ID_RUC
and J.ANIO =:P3_ANIO
and J.MES =:P3_MES;
--HTML
sys.owa_util.mime_header('text/xml',FALSE);
sys.htp.p('Content-Length: ' || length(l_XML));
sys.owa_util.http_header_close;
sys.htp.print(l_XML);
end;
The error generated is ORA-06502: PL/SQL: numeric or value error+_
Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+JohannaCevallos07 wrote:
Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
The error generated is ORA-06502: PL/SQL: numeric or value error+_
Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
Thanks -
My wife has been having problems with Safari, and many third party software and malware programs infecting her Mac Book Pro. I have tried to reset Safari but it keeps coming back, taking over Safari, changing defaults, start pages, and search engines, Etc.
Is it safe to use programs like MacKeeper, who keeps send my wife's computer message and alerts, or should I just wipe the drive and start over?
SkipI am having lot's of lag time with Safari, etc..
I'll type in a website.. and it will take 15-20 seconds to start..
Start time: 17:51:37 12/02/14
Model Identifier: MacBookPro11,3
System Version: OS X 10.10.1 (14B25)
Kernel Version: Darwin 14.0.0
Time since boot: 14 days 3:02
USB
My Passport 07B8 (Western Digital Technologies, Inc.)
Diagnostic reports
2014-11-13 QuickLookSatellite crash x2
2014-11-21 com.apple.WebKit.Plugin.64 crash
Log
Nov 30 21:32:39 PM notification timeout (pid 345, Adobe CEF Helper)
Nov 30 21:32:39 PM notification timeout (pid 99018, CEPHtmlEngine)
Nov 30 21:32:39 PM notification timeout (pid 99019, CEPHtmlEngine He)
Dec 1 09:09:03 [[0xffffff802bfa4000] OpCode 0x0C01 (Set Event Mask) from: kernel_task (0) Synchronous status: 0x00 (kIOReturnSuccess) state: 2 (BUSY) timeout: 5000] Bluetooth warning: An HCI Req timeout occurred.
Dec 1 09:52:03 PM notification timeout (pid 266, Creative Cloud)
Dec 1 09:52:03 PM notification timeout (pid 346, Adobe CEF Helper)
Dec 1 09:52:03 PM notification timeout (pid 345, Adobe CEF Helper)
Dec 1 10:04:37 process WindowServer[114] caught causing excessive wakeups. Observed wakeups rate (per sec): 170; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 12755007
Dec 1 10:31:08 ALF: ifnet_get_address_list_family error 12
Dec 1 10:59:17 process Meeting Center[2921] caught causing excessive wakeups. Observed wakeups rate (per sec): 647; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45104
Dec 1 12:24:35 process com.apple.WebKit[4567] caught causing excessive wakeups. Observed wakeups rate (per sec): 297; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 76962
Dec 1 14:31:01 process com.apple.WebKit[7400] caught causing excessive wakeups. Observed wakeups rate (per sec): 397; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 53188
Dec 1 14:43:52 process com.apple.WebKit[7400] caught causing excessive wakeups. Observed wakeups rate (per sec): 224; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 150084
Dec 1 14:47:34 process com.apple.WebKit[7400] caught causing excessive wakeups. Observed wakeups rate (per sec): 332; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 222103
Dec 1 15:03:29 process com.apple.WebKit[7400] caught causing excessive wakeups. Observed wakeups rate (per sec): 214; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 370572
Dec 1 16:38:03 SIOCPROTODETACH_IN6: utun2 error=6
Dec 1 16:38:08 SIOCPROTODETACH_IN6: utun2 error=6
Dec 1 20:08:30 jnl: disk3s2: replay_journal: from: 112328704 to: 113115136 (joffset 0x3a38000)
Dec 1 20:08:30 jnl: disk3s2: journal replay done.
Dec 1 20:27:11 com.adobe.acc.AdobeCreativeCloud.75292.UUID: Service exited with abnormal code: 5
Dec 2 08:23:00 process com.apple.WebKit[11891] caught causing excessive wakeups. Observed wakeups rate (per sec): 161; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 527508
Dec 2 09:29:37 firefox (map: 0xffffff80317c5960) triggered DYLD shared region unnest for map: 0xffffff80317c5960, region 0x7fff9ae00000->0x7fff9b000000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
Dec 2 10:04:39 SIOCPROTODETACH_IN6: utun2 error=6
Dec 2 10:04:44 SIOCPROTODETACH_IN6: utun2 error=6
Dec 2 16:42:24 process com.apple.WebKit[26151] caught causing excessive wakeups. Observed wakeups rate (per sec): 153; Maximum permitted wakeups rate (per sec): 150; Observation period: 300 seconds; Task lifetime number of wakeups: 45002
Swap (MiB): 41556
Activity
Net: 210 in, 20 out (KiB/s)
Memory: kernel_task (UID 0) is using 1632 MB
kexts
com.cisco.kext.acsock (1.1.0)
com.wdc.driver.USB.64.10.9 (1.0.1)
Daemons
com.cisco.anyconnect.vpnagentd
com.oracle.java.JavaUpdateHelper
com.apple.installer.osmessagetracing
com.microsoft.office.licensing.helper
com.google.keystone.daemon
com.wdc.WDSmartWareService
com.oracle.java.Helper-Tool
com.adobe.fpsaud
com.wdc.SmartwareDriveService
Agents
com.adobe.AdobeCreativeCloud
com.zimbra.desktop
com.citrix.ServiceRecords
com.google.keystone.system.agent
com.apple.photostream-agent
com.genieo.completer.download
com.genieo.completer.update
com.cisco.anyconnect.gui
com.citrix.ReceiverHelper
com.citrix.AuthManager_Mac
com.citrix.FMDAgent.14800.UUID
com.oracle.java.Java-Updater
com.fiplab.MailTabProHelper
com.adobe.PDApp.AAMUpdatesNotifier.74724.UUID
com.citrixonline.GoToMeeting.G2MUpdate
com.apple.AirPortBaseStationAgent
com.microsoft.SyncServicesAgent
Startup items
/System/Library/StartupItems/ciscod/ciscod
/System/Library/StartupItems/ciscod/StartupParameters.plist
Bundles
/System/Library/Extensions/hp_fax_io.kext
- com.hp.kext.hp-fax-io
/System/Library/Extensions/hp_Inkjet1_io_enabler.kext
- com.hp.print.hpio.Inkjet1.kext
/System/Library/Extensions/hp_Inkjet4_io_enabler.kext
- com.hp.print.hpio.Inkjet4.kext
/System/Library/Extensions/hp_Inkjet8_io_enabler.kext
- com.hp.print.hpio.inkjet8.kext
/System/Library/Extensions/JMicronATA.kext
- com.jmicron.JMicronATA
/System/Library/Extensions/WD1394_64_109HPDriver.kext
- com.wdc.driver.1394.64.10.9
/System/Library/Extensions/WDUSB_64_109HPDriver.kext
- com.wdc.driver.USB.64.10.9
/Library/Extensions/hp_io_printerclassdriver_enabler.kext
- com.hp.hpio.hp-io-printerclassdriver-enabler
/Library/Internet Plug-Ins/AdobeAAMDetect.plugin
- com.AdobeAAMDetectLib.AdobeAAMDetect
/Library/Internet Plug-Ins/CitrixICAClientPlugIn.plugin
- com.citrix.citrixicaclientplugIn
/Library/Internet Plug-Ins/Flash Player.plugin
- N/A
/Library/Internet Plug-Ins/googletalkbrowserplugin.plugin
- com.google.googletalkbrowserplugin
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin
- com.oracle.java.JavaAppletPlugin
/Library/Internet Plug-Ins/npg.plugin
- npg.graphon.com
/Library/Internet Plug-Ins/o1dbrowserplugin.plugin
- com.google.o1dbrowserplugin
/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin
- com.microsoft.sharepoint.browserplugin
/Library/Internet Plug-Ins/SharePointWebKitPlugin.webplugin
- com.microsoft.sharepoint.webkitplugin
/Library/Internet Plug-Ins/Silverlight.plugin
- com.microsoft.SilverlightPlugin
/Library/Internet Plug-Ins/SlingPlayer.plugin
- com.slingmedia.slingplayer.plugin.nspapi
/Library/PreferencePanes/Flash Player.prefPane
- com.adobe.flashplayerpreferences
/Library/PreferencePanes/FMDSysPrefPane.prefPane
- Citrix.FMDSysPrefPane
/Library/PreferencePanes/JavaControlPanel.prefPane
- com.oracle.java.JavaControlPanel
/Library/PreferencePanes/WDQuickViewPrefsPane.prefPane
- com.westerndigital.quickview.prefpanel
/Library/PreferencePanes/Zimbra.prefPane
- com.zimbra.prefpanel
/Library/ScriptingAdditions/Adobe Unit Types.osax
- N/A
Library/Address Book Plug-Ins/SkypeABDialer.bundle
- com.skype.skypeabdialer
Library/Address Book Plug-Ins/SkypeABSMS.bundle
- com.skype.skypeabsms
Library/Internet Plug-Ins/CitrixOnlineWebDeploymentPlugin.plugin
- com.citrixonline.mac.WebDeploymentPlugin
Library/Internet Plug-Ins/Google Earth Web Plug-in.plugin
- com.Google.GoogleEarthPlugin.plugin
Library/Internet Plug-Ins/WebEx.plugin
- com.webex.WebEx
Library/Internet Plug-Ins/WebEx.plugin/Contents/Resources
- com.webex.WebEx
Library/Internet Plug-Ins/WebEx64.plugin
- com.cisco_webex.plugin.gpc64
dylibs
/usr/lib/libaudioc.dylib
/usr/lib/libclipc.dylib
/usr/lib/libcs.dylib
/usr/lib/libdc.dylib
/usr/lib/libfilec.dylib
/usr/lib/libMonoPosixHelper.dylib
/usr/lib/libpbr.dylib
/usr/lib/libprintc.dylib
/usr/lib/libsc.dylib
/usr/lib/libSFFileMonitor.32.dylib
/usr/lib/libSFIPC.32.dylib
/usr/lib/libSFIPC.I.dylib
/usr/lib/libSFsqlite3.7.4.dylib
/usr/lib/libSFSyncEngine.I.dylib
/usr/lib/libupc.dylib
App extensions
it.bloop.airmail.beta10.Airmail-Today-Beta
it.bloop.airmail.beta10.Airmail-Composer-Beta
com.wunderkinder.wunderlistdesktop.sharingextension
com.wunderkinder.wunderlistdesktop.todayextension
com.readitlater.PocketMac.AddToPocketShareExtension
com.stylemac.instadesk.Photodesk-Feed
it.bloop.airmail.beta10.Airmail-Share-Beta
Apps
/Applications/Uninstall IM Completer.app
Contents of /Library/LaunchAgents/com.cisco.anyconnect.gui.plist (checksum 1087717482)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/opt/cisco/anyconnect/gui_keepalive</key>
<true/>
</dict>
</dict>
<key>Label</key>
<string>com.cisco.anyconnect.gui</string>
<key>LimitLoadToSessionType</key>
<string>Aqua</string>
<key>ProgramArguments</key>
<array>
<string>open</string>
<string>--wait-apps</string>
<string>/Applications/Cisco/Cisco AnyConnect Secure Mobility Client.app</string>
</array>
</dict>
</plist>
Contents of /Library/LaunchAgents/com.citrix.AuthManager_Mac.plist (checksum 1591517921)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ServiceIPC</key>
<true/>
<key>MachServices</key>
<dict>
<key>com.citrix.AuthManager_Mac</key>
<true/>
</dict>
<key>Label</key>
<string>com.citrix.AuthManager_Mac</string>
<key>WaitForDebugger</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/AuthManager_Mac.app/Contents/MacOS/AuthManager_Mac</ string>
</array>
<key>LimitLoadToSessionType</key>
<string>Aqua</string>
<key>Disabled</key>
<false/>
</dict>
</plist>
Contents of /Library/LaunchAgents/com.citrix.ReceiverHelper.plist (checksum 676087606)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.citrix.ReceiverHelper</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>WaitForDebugger</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/ReceiverHelper.app/Contents/MacOS/ReceiverHelper</st ring>
</array>
<key>LimitLoadToSessionType</key>
<string>Aqua</string>
<key>Disabled</key>
<false/>
</dict>
</plist>
Contents of /Library/LaunchAgents/com.citrix.ServiceRecords.plist (checksum 1445213025)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ServiceIPC</key>
<true/>
<key>MachServices</key>
<dict>
<key>com.citrix.Beacons</key>
<true/>
<key>com.citrix.ServiceRecords</key>
<true/>
</dict>
<key>Label</key>
<string>com.citrix.ServiceRecords</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WaitForDebugger</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/ServiceRecords.app/Contents/MacOS/ServiceRecords</st ring>
</array>
...and 8 more line(s)
Contents of /Library/LaunchAgents/com.oracle.java.Java-Updater.plist (checksum 3453356730)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.oracle.java.Java-Updater</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Java Updater.app/Contents/MacOS/Java Updater</string>
<string>-bgcheck</string>
</array>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>9</integer>
<key>Minute</key>
<integer>57</integer>
<key>Weekday</key>
<integer>3</integer>
</dict>
</dict>
...and 1 more line(s)
Contents of /Library/LaunchDaemons/com.cisco.anyconnect.vpnagentd.plist (checksum 2630047092)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.cisco.anyconnect.vpnagentd</string>
<key>ProgramArguments</key>
<array>
<string>/opt/cisco/anyconnect/bin/vpnagentd</string>
<string>-execv_instance</string>
</array>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>AbandonProcessGroup</key>
<true/>
<key>EnableTransactions</key>
<false/>
</dict>
</plist>
Contents of /Library/LaunchDaemons/com.wdc.SmartwareDriveService.plist (checksum 2733252498)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.wdc.SmartwareDriveService</string>
<key>Program</key>
<string>/Library/Application Support/WD SmartWare Services/SmartwareDriveService</string>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/dev/null</string>
</dict>
</plist>
Contents of /Library/LaunchDaemons/com.wdc.WDSmartWareService.plist (checksum 1153517838)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.wdc.WDSmartWareService</string>
<!-- <key>Program</key>
<string>/Library/Application Support/WD SmartWare Services/SmartwareServerApp.app/Contents/MacOS/SmartwareServiceApp</string> -->
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/WD SmartWare Services/SmartwareServiceApp.app/Contents/MacOS/SmartwareServiceApp</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/dev/null</string>
</dict>
</plist>
Contents of Library/LaunchAgents/com.genieo.completer.download.plist (checksum 1894818845)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.genieo.completer.download</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USER/Library/Application Support/com.genieoinnovation.Installer/Completer.app/Contents/MacOS/Installer</ string>
<string>-trigger</string>
<string>download</string>
<string>-isDev</string>
<string>0</string>
<string>-installVersion</string>
<string>15886</string>
<string>-firstAppId</string>
<string>19340001</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Users/USER/Downloads</string>
</array>
</dict>
</plist>
Contents of Library/LaunchAgents/com.genieo.completer.update.plist (checksum 2339121592)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.genieo.completer.update</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USER/Library/Application Support/com.genieoinnovation.Installer/Completer.app/Contents/MacOS/Installer</ string>
<string>-trigger</string>
<string>update</string>
<string>-isDev</string>
<string>0</string>
<string>-installVersion</string>
<string>15886</string>
<string>-firstAppId</string>
<string>19340001</string>
</array>
<key>StartInterval</key>
<integer>86400</integer>
</dict>
</plist>
Contents of Library/LaunchAgents/com.microsoft.LaunchAgent.SyncServicesAgent.plist (checksum 3051698494)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>com.microsoft.SyncServicesAgent</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Applications/Microsoft Office 2011/Office/SyncServicesAgent.app/Contents/MacOS/SyncServicesAgent</string>
</array>
</dict>
</plist>
Contents of Library/LaunchAgents/com.zimbra.desktop.plist (checksum 3676173668)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.zimbra.desktop</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USER/Library/Zimbra Desktop/bin/zdesktop</string>
<string>start</string>
<string>-w</string>
</array>
-
I am facing a new problem with xml schema, plz help me
Hi @,
I am facing a problem with xml schema validation. Below is my code.
public void initialize(String cfgFileName) {
try {
try {
DOMParserWrapper parser = (DOMParserWrapper)Class.forName("dom.wrappers.DOMParser").newInstance();
parser.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion",true );
parser.setFeature( "http://xml.org/sax/features/validation",true);
parser.setFeature( "http://xml.org/sax/features/namespaces",true );
parser.setFeature( "http://apache.org/xml/features/validation/schema",true );
parser.setFeature( "http://apache.org/xml/features/validation/schema-full-checking",true );
Document document = parser.parse(cfgFileName);
System.out.println("Vijay .. code .. damar\n");
}catch (org.xml.sax.SAXParseException spe) {
} catch (org.xml.sax.SAXNotRecognizedException ex ){
} catch (org.xml.sax.SAXNotSupportedException ex ){
} catch (org.xml.sax.SAXException se) {
if (se.getException() != null)
se.getException().printStackTrace(System.err);
else
se.printStackTrace(System.err);
}catch (Exception e) {
System.out.println("Caught unknown exception : \n");
e.printStackTrace(System.err);
System.out.println("Vijay .. code .. success\n");
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
//docBuilder.setErrorHandler(myErrorHandler);
cfg = docBuilder.parse(new File(cfgFileName));
cfg .getDocumentElement ().normalize ();
} catch (Exception e) {
e.printStackTrace();
In the above code I am parsing the xml file and i am doing schema validation. Schema validation is proper and it is validating correctly. Only problem is that, It is validating and showing error correctly correctly but it is not catching that error.
For clear understanding I am printing one statement before parsing and after parsing.
SYSTEM.OUT.PRINTLN("Vijay .. code .. damar\n") this is before parsing
SYSTEM.OUT.PRINTLN("Vijay .. code .. success\n") this is after parsing
Here what is happening means, It is validating correctly and showing error :
[Error] nw_layout-new.xml:800:97: Datatype error: Value 'y' does not match regular expression facet 'yes|no'..
Vijay .. code .. damar
Vijay .. code .. success
Here it is showing error and still continueing not catching.
Plz give solution for this.
Thanks
vijay KHello dipthebe,
Check out the articles below go through troubleshooting steps for your iPhone when the screen is unresponsive. You may want to try and restore your iPhone as a new device and then test out what happens when you miss a call to see if the issue is still present afterwards.
iPhone, iPad, iPod touch: Troubleshooting touchscreen response
http://support.apple.com/kb/ts1827
Use iTunes to restore your iOS device to factory settings
http://support.apple.com/kb/HT1414
Regards,
-Norm G. -
Hi,
How are all of you. Well I am new to Flex. But I have started
building simple applications. One of the top most problem I am
facing is working with XML and Button. Can you please assist me in
this. I am explaining my problem:
I have an external XML file like this:
<Menu>
<button>
<idnt>0</idnt>
<label>General Health</label>
<text>General Health pages is currently under
construction</text>
</button>
<button>
<idnt>1</idnt>
<label>Mental Health</label>
<text>Mental Health pages is currently under
construction</text>
</button>
</Menu>
Now I want to generate Buttons Dynamically from this XML. And
the second thing which is the most problematic is that how I code
it so that when I press the Button labled "General Health", it will
show the same text as in the XML tag coresponding to tag
"<label>General Health</label>" ?
I badly need this. I am realy confused on this. Kindly help
me.
Regards
..::DeXLet's assume that variable "node" contains one element of the
XML. For example,
<button>
<idnt>0</idnt>
<label>General Health</label>
<text>General Health pages is currently under
construction</text>
</button>
such that node.label would be "General Health", node.idnt
would be 0, etc.
You can build a Button like this:
var b:Button = new Button();
b.label = node.label;
b.data = node; // more on this later
b.width = 60;
b.height = 26;
addChild(b); // critical - adds the button to the display
list so you can see it
b.addEventHandler( MouseEvent.CLICK, handleClick );
You must set the button's width and height unless the button
will be in a container that will size its own children (like Tile).
Every Flex component has a data property. You can set it to
whatever you like. For your needs it makes sense to set each
Button's data property to the node it relates to.
Now suppose that code above is in a function, createButton:
private function createButton( node:XML ) : void {
// code from above
Here's how to make all the buttons where "menu" is a variable
that contains your XML:
for(var k:int=0; k < menu.button; k++) { // menu.button is
an XMLList
createButton( menu.button[k] );
Now to handle the event:
private function handleEvent( event:MouseEvent ) : void
var b:Button = event.currentTarget as Button;
trace( b.data.text);
When a button is picked, the description element will print
in the debug console. Replace the trace with whatever code you
need. -
Problem with JFrame and busy/wait Cursor
Hi -- I'm trying to set a JFrame's cursor to be the busy cursor,
for the duration of some operation (usually just a few seconds).
I can get it to work in some situations, but not others.
Timing does seem to be an issue.
There are thousands of posts on the BugParade, but
in general Sun indicates this is not a bug. I just need
a work-around.
I've written a test program below to demonstrate the problem.
I have the problem on Solaris, running with both J2SE 1.3 and 1.4.
I have not tested on Windows yet.
When you run the following code, three JFrames will be opened,
each with the same 5 buttons. The first "F1" listens to its own
buttons, and works fine. The other two (F2 and F3) listen
to each other's buttons.
The "BUSY" button simply sets the cursor on its listener
to the busy cursor. The "DONE" button sets it to the
default cursor. These work fine.
The "SLEEP" button sets the cursor, sleeps for 3 seconds,
and sets it back. This does not work.
The "INVOKE LATER" button does the same thing,
except is uses invokeLater to sleep and set the
cursor back. This also does not work.
The "DELAY" button sleeps for 3 seconds (giving you
time to move the mouse into the other (listerner's)
window, and then it behaves just like the "SLEEP"
button. This works.
Any ideas would be appreciated, thanks.
-J
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class BusyFrameTest implements ActionListener
private static Cursor busy = Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR);
private static Cursor done = Cursor.getDefaultCursor();
JFrame frame;
JButton[] buttons;
public BusyFrameTest (String title)
frame = new JFrame (title);
buttons = new JButton[5];
buttons[0] = new JButton ("BUSY");
buttons[1] = new JButton ("DONE");
buttons[2] = new JButton ("SLEEP");
buttons[3] = new JButton ("INVOKE LATER");
buttons[4] = new JButton ("DELAY");
JPanel buttonPanel = new JPanel();
for (int i = 0; i < buttons.length; i++)
buttonPanel.add (buttons);
frame.getContentPane().add (buttonPanel);
frame.pack();
frame.setVisible (true);
public void addListeners (ActionListener listener)
for (int i = 0; i < buttons.length; i++)
buttons[i].addActionListener (listener);
public void actionPerformed (ActionEvent e)
System.out.print (frame.getTitle() + ": " + e.getActionCommand());
if (e.getActionCommand().equals ("BUSY"))
frame.setCursor (busy);
else if (e.getActionCommand().equals ("DONE"))
frame.setCursor (done);
else if (e.getActionCommand().equals ("SLEEP"))
frame.setCursor (busy);
try { Thread.sleep (3000); } catch (Exception ex) { }
frame.setCursor (done);
System.out.print (" finished");
else if (e.getActionCommand().equals ("INVOKE LATER"))
frame.setCursor (busy);
SwingUtilities.invokeLater (thread);
else if (e.getActionCommand().equals ("DELAY"))
try { Thread.sleep (3000); } catch (Exception ex) { }
frame.setCursor (busy);
try { Thread.sleep (3000); } catch (Exception ex) { }
frame.setCursor (done);
System.out.print (" finished");
System.out.println();
Runnable thread = new Runnable()
public void run()
try { Thread.sleep (3000); } catch (Exception ex) { }
frame.setCursor (done);
System.out.println (" finished");
public static void main (String[] args)
BusyFrameTest f1 = new BusyFrameTest ("F1");
f1.addListeners (f1);
BusyFrameTest f2 = new BusyFrameTest ("F2");
BusyFrameTest f3 = new BusyFrameTest ("F3");
f2.addListeners (f3); // 2 listens to 3
f3.addListeners (f2); // 3 listens to 2I've had the same problems with cursors and repaints in a swing application, and I was thinking of if I could use invokeLater, but I never got that far with it.
I still believe you would need a thread for the time consuming task, and that invokeLater is something you only need to use in a thread different from the event thread. -
Problem with installing and running some applications or drivers
When installing and installing some items, towards the end of the installation I get this message:
/System/Library/Extensions/comcy_driver_USBDevice.kext
*was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update*
The end result is that some things do not seem to work properly, such as my HP printer. Would anybody have any ideas on how to fix this problem?Thank you for your response. Originally, I had a problem with Airport and ended up reinstalling Snow Leopard. Since then, when downloading upgrades etc, such as HP printer drivers, iTunes etc., towards the end of the download when its running the script, I get this message: /System/Library/Extensions/comcy_driver_USBDevice.kext
+was installed improperly and cannot be used. Please try reinstalling it or contact product's vendor for update+
Sometimes, the download hangs and is unable to complete. The main problem I've encountered so far with an application is when I use the printer to scan an image via Preview, it's blank: there's nothing there.
Maybe you are looking for
-
Hiding Image filed based on the page number in Adobe Forms - scripting
Hi Folks, I have a problem with the print form that I am working on. I need to insert an image of lines (OMR) based on the page numbers. For the OMR part, the first page will always have 4 lines as a image, the middle pages will have 3 lines as a ima
-
Is there something wrong with the cable in area of zip code 30830?
My channels are frozen . I turn off the box and still frozen . I have only one channel that works. clear channel and volume. it same channel when turn the tv off.
-
Can't figure out remote app to get it work with iPhone 3GS
I try to find some solution to get 3GS to be working with my remote app with iTunes. I was following the instructions from the following website: http://lifehacker.com/398278/remote-app-controls-itunes-playback-from-your-iphon e It looks like the "Lo
-
Hi Guys, We have new CRM online system. I have created a custom lead type by copying the Lead transaction type. When I create a lead and assign status "hot" & priority "very high" isnt it supposed to create an opportunity automatically? Or atleast it
-
Spatial query performance is slooow
I'm running numerous contiguous 3D spatial filter queries on a table of around 1.5million rows, however am getting slow performance. What can I do to improve this? is there some DB tuning I can do?