Problem In loading Application_context.xml using CustomContextListener
Hi,
I had a problem with Acegi Security 2.0.2 as we are using our customLoaderListener class.We are using Mevan Build tool, Weblogic11g Application server and We are create EAR File . CustomLoaderListener we are configuring in Weblogic-application.xml and We are placing application-context.xml,application-context-security.xml,Data-access-context.xml in META-INF folder .I will post my CustomLoaderListener tell me a way to run SpringSecurity .
Jar files We are using for Security:
1)spring-security-acl-2.0.2.jar
2)spring-security-core-2.0.2.jar
3)spring-security-core-tiger-2.0.2.jar
4)spring-security-taglibs-2.0.2.jar
<Dec 30, 2010 4:49:13 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Dec 30, 2010 4:49:13 PM IST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Dec 30, 2010 4:49:14 PM IST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Dec 30, 2010 4:49:14 PM IST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log00014. Log messages will continue to be logged in C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log.>
<Dec 30, 2010 4:49:14 PM IST> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
<Dec 30, 2010 4:49:21 PM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Dec 30, 2010 4:49:24 PM IST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\access.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Dec 30, 2010 4:49:24 PM IST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\access.log00007. Log messages will continue to be logged in C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\logs\access.log.>
<Dec 30, 2010 4:49:28 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Dec 30, 2010 4:49:28 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
Dec 30, 2010 4:49:37 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/PBAWeb'
Dec 30, 2010 4:49:40 PM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
SEVERE: JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.
Dec 30, 2010 4:49:40 PM com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
<Dec 30, 2010 4:49:42 PM IST> <Error> <HTTP> <BEA-101165> <Could not load user defined filter in web.xml: org.springframework.security.util.FilterToBeanProxy.
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:95)
at org.springframework.security.util.FilterToBeanProxy.getContext(FilterToBeanProxy.java:178)
at org.springframework.security.util.FilterToBeanProxy.doInit(FilterToBeanProxy.java:120)
at org.springframework.security.util.FilterToBeanProxy.init(FilterToBeanProxy.java:190)
at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:332)
Truncated. see log file for complete stacktrace
>
EJP wrote:
You need to give the InitialContext some properties, there's no magical way it'll configure itself (outside of a Java EE container).If you lookup a URL with a known protocol, e.g. ldap: or in this case java:, it will configure itself in any environment that has a factory for the protocol.Is this a recent change? Last time I was accessing Ldap, it did require me to specify the com.sun.jndi.ldap.LdapCtxFactory separately.
Similar Messages
-
Problem in parsing an XML using SAX parser
Hai All,
I have got a problem in parsing an XML using SAX parser.
I have an XML (sample below) which need to be parsed
<line-items>
<item num="1">
<part-number>PN1234</part-number>
<quantity uom="ea">10</quantity>
<lpn>LPN1060</lpn>
<reference num="1">Line ref 1</reference>
<reference num="2">Line ref 2</reference>
<reference num="3">Line ref 3</reference>
</item>
<item num="2">
<part-number>PN1527</part-number>
<quantity uom="lbs">5</quantity>
<lpn>LPN2152</lpn>
<reference num="1">Line ref 1</reference>
<reference num="2">Line ref 2</reference>
<reference num="3">Line ref 3</reference>
</item>
<item num="n">
</item>
</line-items>
There can be any number of items( 1 to n). I need to parse these
item values using SAX parser and invoke a stored procedure for
each item with its
values(partnumber,qty,lpn,refnum1,refnum2,refnum3).
Suppose if there are 100 items, i need to invoke the stored
procedure sp1() 100 times for each item.
I need to invoke the stored procedure in endDocument() method of
SAX event handler and not in endelement() method.
What is the best way to store those values and invoke the stored
procedure in enddocument() method.
Any help would br greatly appreciated.
Thanks in advance
Pooja.VO or ValueObject is a trendy new name for Beans.
So just create an item class with variables for each of the sub elements.
<item>
<part-number>PN1234</part-number>
<quantity uom="ea">10</quantity>
<lpn>LPN1060</lpn>
<reference num="1">Line ref 1</reference>
<reference num="2">Line ref 2</reference>
<reference num="3">Line ref 3</reference>
</item>
public class ItemVO
String partNumber;
int quantity;
String quantityType;
String lpn;
List references = new ArrayList();
* @return Returns the lpn.
public String getLpn()
return this.lpn;
* @param lpn The lpn to set.
public void setLpn(String lpn)
this.lpn = lpn;
* @return Returns the partNumber.
public String getPartNumber()
return this.partNumber;
* @param partNumber The partNumber to set.
public void setPartNumber(String partNumber)
this.partNumber = partNumber;
* @return Returns the quantity.
public int getQuantity()
return this.quantity;
* @param quantity The quantity to set.
public void setQuantity(int quantity)
this.quantity = quantity;
* @return Returns the quantityType.
public String getQuantityType()
return this.quantityType;
* @param quantityType The quantityType to set.
public void setQuantityType(String quantityType)
this.quantityType = quantityType;
* @return Returns the references.
public List getReferences()
return this.references;
* @param references The references to set.
public void setReferences(List references)
this.references = references; -
Problem in rendering the XML using XSLT in Netscape 7
Hi there,
I have used the XSLT to generate HTML codes from the XML datafiles.
It works fine in Internet Explorer, but when I tried it on Netscape
7.0 , it just displayed the xml data, without the tags..
For example,
In the xml ,I have the following :
<id>11111111111111112</id>
<name>adegf1</name>
<date>Mar 24 2003Jan 01</date>
In the IE, it was transformed into the html perfectly but
when i used Netscape 7.0, it was displayed as the following in a single
line:
11111111111111112adegf1Mar 24 2003Jan 01
Can anybody tell me how to overcome this ? Does the problem lie in the xml or the xslt ? I am using XSL Transform version 1.0 and XML version 1.0.
Thanks in advance !
KirkHello,
The generated XML refers to the XSLT which is in the server.
So, the browser's parsers affects the output..
Any sugestions ?
Thanks ! -
Beginner Has Problem With Loading JDBC Driver Using MySQL
Hi, I am having problem with loading JDBC driver, and need your diagnotic help.
1. I have installed MySQL (C:\mysql), created a databse (soup), and created a littel table (VIDEOS). I am able to see the table in the console:
sql> select * from videos
2. I have downloaded the latest version of Connector/J (mysql-connector-java-3.1.0-alpha.zip), and unzip the zip file into my C:\ directory.
3. I copied the mysql-connector-java-3.1.0-alpha-bin.jar to the C:\j2sdk1.4.1_02\jre\lib\ext folder and it is in my CLASSPATH
4. MySQL server is running
C:\> C:\mysql\bin\mysqld-nt --standalone
5. open another DOS window and use the database
mysql>USE SOUP
6. succesfully compiled a Java program (javac Test.java):
import java.sql.* ;
public class Test
public static void main( String[] args )
try
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
try
Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/soup" );
try
Statement statement = con.createStatement();
ResultSet rs = statement.executeQuery("SELECT TITLE FROM VIDEOS");
while ( rs.next() )
System.out.println( rs.getString( "TITLE" ) );
rs.close();
statement.close();
catch ( SQLException e )
System.out.println( "JDBC error: " + e );
finally
con.close();
catch( SQLException e )
System.out.println( "could not get JDBC connection: " + e );
catch( Exception e )
System.out.println( "could not load JDBC driver: " + e );
7. when I run the Java program (java Test), I got
the message:
could not load JDBC driver: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
What am I missing?Hi,
I missed to specify test in my last post.
Try running your program by explicitly setting the classspath when
running your program . java -classpath c:\mysql-connector-java-3.1.0-alpha-bin.jar test
Make sure your jar file contains org.gjt.mm.mysql.Driver class -
Problem in loading AdobeSpellingConfig.xml.
I am using Squiggly for my spellcheck requirement in flex.
I confired it as describe in douments and its works great in local machine.
I am using SpellUI class to get spell check done.
Now, My problem start when i upload it to the server.
I am using WAS 7 on server side.
I think internall SpellUI class load the AdobeSpellingConfig.xml. Now problem is I think SpellUI class always expect the xml should be in location (URL) which is been shown in browser addressbar.
We have configured some logical folders on the server which actually manupulates the path, and the path shown in browser is different than the physical path.
I just wanted to know can i set the path forAdobeSpellingConfig.xml while i am using SpellUI class.You can't specify the path in 0.3. They're trying to make it customizable in the next release.
-
Problem in loading an applet using JRE 1.5
Hi,
I have an applet which is working fine under JRE 1.4, but the same applet failing to load by using JRE 1.5
Problem Description:
1. The images in the applet fails to load using JRE 1.5
2. The Username and Password text box are also failing to initialize.
Can anyone help me out in this.
Is there any code changes required ?I wonder if you have the same problem as me... Maybe we can find a solution for us both, no need for me to open a new thread for this topic then...
I wrote an applet using Swing and compiled it using JavaSDK 1.4.x. I also installed the 1.4.x JRE for both of my test browsers. In Mozilla 1.1 the applet displays properly all the time. In IE6 SP1 it sometimes works as intended but sometimes the applet simply stops working, as per my Java Console somewhere after invoking the "start" method. Parts of the applet simply become gray and when I resize it - I have a JFrame in my applet - the whole JFrame becomes gray and does not respond to input nor it redraws itself. Shutting down IE does not close the JFrame(although the java console reports normal program termination and cleanup) and the only way to close it is through the task manager. I am using Windows 98SE btw.
Does it sound similiar to your problem? It happens ONLY with IE, not with Mozilla. Anybody has an idea on what it could be? I doubt there's an error in my code... -
Urgent: Problem to load Flat file using DTP.
Hi Experts,
I try to load a flat file PSA->DSO->INFOCUBE using DTP.
I my flatfile in the application server in csv format.
in the My data source I opted Adapter as Load Text -Type file from Application Server.
Data Format : I test with both the potions : Fixed length & Separated with Separator( For example CSV) .
If I check the preview: I cant find any data and get the message: Inbound processing of data package 000001 finished
when I try to Load the data thorough PC the load was successfull but only 0 records are transfered and added to PSA:; DSO and Info Cube.
The test file contains around 20 records.
Any suggestions please.
Thanks & RegardsHi Sailekha..
in the My data source I opted Adapter as Load Text -Type file from Application Server.
Data Format : I test with both the potions : Fixed length & Separated with Separator( For example CSV) .
Note: As per ur info:
In the Flat file Data source :
1. You have to maintain the Adapter as:
Load Text -Type file from Application Server
Data Format : Separated with Separator
Then Use the "Proposal" Tab to generate the field proposals.
(Only in BI 7.0 this option is available).
After that check the Preview in "Preview" Tab.
Hope it works...
Cheers,...
Varma -
Get problem in loading the xml code
Hi all,
I have got one problem in program. </method >not get generates after method block.
I want output like this:
<?xml version="1.0" encoding="UTF-8"?>
<interface>
---<name>the name of package</name>
---<className>The name of class</className>
----<methods>
---------<name>the name of the method</name>
---------<returnType>the return type of the method</returnType>
-----</methods>
----<methods>
---------<name>the name of the method22</name>
---------<returnType>the return type of the method22</returnType>
---------</methods>
</interface>
But the output comes like:
<?xml version="1.0" encoding="UTF-8"?>
<interface>
---<name>the name of package</name>
---<className>The name of class</className>
----<methods>
---------<name>the name of the method</name>
---------<returnType>the return type of the method</returnType>
---------<name>the name of the method22</name>
---------<returnType>the return type of the method22</returnType>
---------</methods>
</interface>
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.Node;
public class TryXML
public static void main(String args[])
try
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = factory.newDocumentBuilder();
Document methoddoc = parser.parse(new File("methodinfo.xml"));
Document packageDoc = parser.parse(new File("interface.xml"));
Node packagenameNode = packageDoc.getElementsByTagName("name").item(0);
Node packageclassNode = packageDoc.getElementsByTagName("className").item(0);
Node methodnode = packageDoc.getElementsByTagName("methods").item(0);
packagenameNode.setTextContent("the name of package");
packageclassNode.setTextContent("The name of class");
Node nameNode = methoddoc.getElementsByTagName("name").item(0);
Node returnTypeNode = methoddoc.getElementsByTagName("returnType").item(0);
nameNode.setTextContent("the name of the method");
returnTypeNode.setTextContent("the return type of the method");
Node node = packageDoc.importNode(methoddoc.getDocumentElement(), true);
// Create the document fragment node to hold the new nodes
DocumentFragment docfrag = packageDoc.createDocumentFragment();
// Move the nodes into the fragment
while (node.hasChildNodes())
docfrag.appendChild(node.removeChild(node.getFirstChild()));
methodnode.appendChild(docfrag);
nameNode.setTextContent("the name of the method22");
returnTypeNode.setTextContent("the return type of the method22");
node = packageDoc.importNode(methoddoc.getDocumentElement(), true);
// Create the document fragment node to hold the new nodes
docfrag = packageDoc.createDocumentFragment();
// Move the nodes into the fragment
while (node.hasChildNodes())
docfrag.appendChild(node.removeChild(node.getFirstChild()));
methodnode.appendChild(docfrag);
DOMSource source = new DOMSource(packageDoc);
StreamResult result = new StreamResult(System.out);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
System.out.println("This is the content of the XML document:\n");
transformer.transform(source, result);
catch (Exception e)
Please help me.
Thanks
buntyReplace the following line:methodnode.appendChild(docfrag);with these lines:Node methodnode2 = packageDoc.createElement("methods");
packageDoc.getDocumentElement().appendChild(methodnode2);
methodnode2.appendChild(docfrag);The problem was that you omitted to create a new <methods> element for the document fragment to be inserted in, so it got inserted in the original <methods> element. -
Problem in parsing an xml using DOM parser.
Hi,
I have created an action block for client.
it takes a xml file present on D drive and generates a pdf by parsing the xml file.
My code was working perfectly fine till yesterday.
But now i getting , [INFO ]: Error-- Premature end of file. org.xml.sax.SAXParseException: Premature end of file.
But xml is perfectly fine. Also the code work from eclipse.
Need some inputs on this.
Regards,
Vishal Jadhav
Edited by: vishal jadhav on Jan 23, 2009 9:49 AMVishal,
what exactly did you change? How do you call the action block? What version/Support package/Build of MII do you use?
Have you see the following thread? There a user had the same message which was caused by missing credentials.
[https://forums.sdn.sap.com/click.jspa?searchID=21364701&messageID=6756453]
Michael
Edited by: Michael Otto on Jan 23, 2009 11:57 AM -
Problem in loading Context.xml file
Hi,
I just tried to create datasource from context.xml. i did the following steps
1. i added context.xml file in webapps/META-INF/
2. I added the below values to that xml file.
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/myApp" >
<Resource name="jdbc/dbtest" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" password="test_dev" minIdle="1" maxIdle="1" maxActive="10" maxWait="5000" username="test_dev" url="jdbc:oracle:thin:@22.4.55.6:1521:TEST"/>
</Context>3.
public class TestDB {
private static Logger log = Logger.getLogger(TestDB.class.getName());
private final static String JNDI_PATH_DB = "java:comp/env/jdbc/dbtest";
public javax.sql.DataSource getCatalogDS() throws NamingException
try
InitialContext initCtx = new InitialContext();
return (DataSource)initCtx.lookup(JNDI_PATH_DB);
catch (NamingException ex)
log.info("NamingException: " + ex.getMessage());
throw ex;
public Connection getConnection() throws Exception
try
DataSource catalogDS = getCatalogDS();
return catalogDS.getConnection();
catch(Exception ex)
log.info(ex.getMessage());
throw ex;
public static void main (String args[]){
try {
TestDB obj = new TestDB();
System.out.println("before lookup");
System.out.println("Datasource is "+obj.getConnection());
} catch( NamingException ne ) {
throw new RuntimeException( "Unable to aquire data source", ne );
catch (Exception e)
String st = StringUtils.StackTraceToString( e );
}4. i run this class to get connection.
i am getting an error
Exception in thread "main" java.lang.RuntimeException: Unable to aquire data source
at it.sscenter.escape.admintools.TestDB.main(TestDB.java:51)
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at it.sscenter.escape.admintools.TestDB.getCatalogDS(TestDB.java:22)
at it.sscenter.escape.admintools.TestDB.getConnection(TestDB.java:35)
at it.sscenter.escape.admintools.TestDB.main(TestDB.java:49)Is that right way or do i need to configure the context file in somewhere OR do i need to create an properties file?
Kindly help to resolve this issue.
Thanks
JasminEJP wrote:
You need to give the InitialContext some properties, there's no magical way it'll configure itself (outside of a Java EE container).If you lookup a URL with a known protocol, e.g. ldap: or in this case java:, it will configure itself in any environment that has a factory for the protocol.Is this a recent change? Last time I was accessing Ldap, it did require me to specify the com.sun.jndi.ldap.LdapCtxFactory separately. -
Problems with loading source model using omw from sql server 7 into oracle 9i
I am migrating data from sql servr 7 into oracle 9i. when doing capture phase i get the following error.
==>failed to load source model.[microsoft][odbc sql server][sql server]select permission
denied on column 'password' of object 'syslogins', database master, owner dbo.
Why is this so...is it bcz of something with my odbc link...
also is there any way to load only tables and not system tables when doing capture phase.
any help asap will be much appreciated.
thanksHi,
You must ensure that you have the correct password to login to SQL Server.
The Workbench requires some of the tables in the Master database.
Regards
John -
Facing problem in loading table using IKM Oracle Slowly Changing Dimension
Hi,
I am facing problem in loading dimension table using IKM Oracle Slowly Changing Dimension
Following is the setup :-
SRC :- source_table (MSSQL)
Staging :- staging_table (MSSQL)
TRGT :- target_table (Oracle)
-------- source_table
group_id int
group_version_id int
name varchar (255)
description varchar (255)
comments varchar (2000)
ref_number varchar (255)
is_latest_version decimal (5)
is_deleted decimal (5)
--------- target_table
id number (38,0) - Mapped to <%=odiRef.getObjectName( "L" , "SEQ_NAME" , "D" )%>.nextval
- Executed on target
- defined the column as SK in model
group_id number (38,0) - defined the column as NK in model
group_version_id number (38,0) - defined the column as NK in model
name varchar (255) - undefined on the model description
description varchar (255) - Add row on change
comments varchar (2000) - Add row on change
ref_number varchar (255) - Add row on change
is_latest_version number (1,0) - Add row on change
is_deleted number (1,0) - Add row on change
start_datetime date - SYSDATE
- Executed on target
- Starting Timestamp
end_datetime date - NULL
- Executed on target
- End Timestamp
I am using following KM's:-
LKM SQL to SQL
IKM Oracle Slowly Changing Dimension
CKM SQL
it gives me the following error -
920:Invalid relational operatorHi,
Yes, this is a run-time error. Currently I am debugging it by checking SNP_SESS_TXT_LOG based on sess_no ID.
Now, I get the following error.
I just see the following in the operator:-
911 : 42000 : java.sql.BatchUpdateException: ORA-00911: invalid character
911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
java.sql.BatchUpdateException: ORA-00911: invalid character
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:342)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10720)
at com.sunopsis.sql.SnpsQuery.executeBatch(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
So, I do not get any idea of the exact step that is causing failure.
Is there any setting in the operator that I am missing on? -
dear,
i have problem to load a xml file from flash.
see in below:
when i put this : xmlpath.load(_root.xmlFile==undefined?"datas.xml":_root.xmlFile); it works perfect in flash but not in the browser.
kindly help me on this...
i will appreciate your help
regards,
MELAS076I solved the URL But i have some issues between 2 flashs and 2 xml files which they are loading and navigate together....
let me explain my problem is:
- i have 2 flashs (main + index) and 2 xmls(data + datas) but they are not in the same path.
in the main.swf : we have pictures of product which is load datas from data.xml and it is loading MC when clicked on one of picture.
is in the root path.
in the index.swf: we have all details and pictures of product which is loaded from datas.xml clicked by main.swf
is in the root path/products/name1/ and we have root path/products/name2/.
and each product has datas.xml in their folder with index.swf
so how can i let the index.swf load its datas.xml when i clicked from main.swf?
My main.swf code:
stop();
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
links = [];
description = [];
thumbnails = [];
a =[];
total = xmlNode.firstChild.childNodes.length;
for (i=0; i<total; i++) {
links[i] = xmlNode.firstChild.childNodes[i].attributes.datas;
description[i] = xmlNode.firstChild.childNodes[i].attributes.label;
thumbnails[i] = xmlNode.firstChild.childNodes[i].attributes.thumbs;
a[i] = xmlNode.firstChild.childNodes[i].attributes.folder;
thumbnails_fn(i);
//trace(xmlNode.firstChild.childNodes[1].attributes.thumbs);
initPreloading();
//firstImage();
} else {
content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("data.xml");
p = 0;
function thumbnails_fn(k) {
this.thumbnail_mc.createEmptyMovieClip("t"+k, this.thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = (eval("this.thumbnail_mc.t"+k)._width+20)*k;
target_mc.pictureValue = k;
aa = xmlData.firstChild.firstChild.childNodes[k].attributes.datas;
target_mc.onRelease = function() {
LOADmc.loadMovie(aa);
//trace();
p = this.pictureValue;
//nextImage();
target_mc.onRollOver = function() {
this._alpha = 90;
//thumbNailScroller();
target_mc.onRollOut = function() {
this._alpha = 100;
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
LOADmc._x=(alignmc.width-LOADmc._width)/2;
LOADmc._y=(alignmc.height-LOADmc._height)/2;
my data.xml:
<?xml version="1.0"?>
<data>
<category title="OUR PRODUCTS">
<item id="1" folder="Products/Multihost" thumbs="Products/Multihost/thumbs/1.jpg" label="Multihost" datas="Products/Multihost/index.swf"/>
<item id="2" folder="Products/VOIP" thumbs="Products/VOIP/thumbs/image1.jpg" label="VO IP" datas="Products/VOIP/index.swf"/>
</category>
</data>
my index.swf in each product/name :
var xmlfiles:XML = new XML();
xmlfiles.ignoreWhite = true;
xmlfiles.load("../../data.xml");
xmlfiles.onLoad=function(success) {
if (success) {
// total = xmlfiles.firstChild.firstChild.childNodes.length;
//for (i=0; i<total; i++) {
var ba = xmlNodes.firstChild.firstChild.childNodes[k].attributes.folder;
var xmlOb:XML = new XML();
xmlOb.ignoreWhite = true;
xmlOb.onLoad = function() {
var aux:main = new main(xmlOb);
trace(ba+"/datas.xml");
xmlOb.load(a+"/datas.xml");
//xmlOb.load(_root.xmlFile==undefined?"datas.xml":_root.xmlFile);
//xmlOb.load("products/multihost/datas.xml");
my datas.xml for prduct name 1:
<?xml version="1.0" encoding="utf-8"?>
<product>
<gallery>
<button id="1" title="Multihost 20" subtitle="MH20" thumb="Products/Multihost/thumbs/2.jpg" ProductTitle="MH20">
<picture thumb="Products/Multihost/thumbs/1.jpg" image="Products/Multihost/images/1.jpg"/>
<picture thumb="Products/Multihost/thumbs/2.jpg" image="Products/Multihost/images/2.jpg"/>
<picture thumb="Products/Multihost/thumbs/3.jpg" image="Products/Multihost/images/3.jpg"/>
<picture thumb="Products/Multihost/thumbs/5.jpg" image="Products/Multihost/images/5.jpg"/>
<description linkname="MH Overview.pdf"><![CDATA[Marwan salem tests]]></description>
</button>
</gallery>
<mainTitle MainTitle="Multihost"/>
</product>
my datas.xml for prduct name 2:
<?xml version="1.0" encoding="utf-8"?>
<product>
<gallery>
<button id="0" title="VO IP 20" subtitle="VO IP 20" thumb="Products/VO IP/thumbs/image1.jpg" ProductTitle="VO IP 20"><picture thumb="Products/VO IP/thumbs/image1.jpg" image="Products/VO IP/images/image1.jpg"/><description linkname="Multi-Host Flyer.pdf"><![CDATA[MArwan VO IP 20]]></description></button></gallery>
<mainTitle MainTitle="VO IP"/>
</product>
thanks for your help.
best regards,
MELAS076
Message was edited by: melas076 -
Problem in loading Flash Components
Hai,
I have a problem in loading flash components using
actionscript.
Example( List Components).
I can load List components dynamically using frame script
like.
import mx.controls.List;
var myList:List = createObject("List","nList",10);
But I can't load dynamically from inside a class file like.
import mx.controls.List;
class testClass{
private var myList;
function testClass( ){
myList = createObject( "List","nList",10 );
But it is not working i don't know why ?
If any one knows Please reply me.
Thank you.The over flash file works if i'm loading images direct from a
path but, i'm using php script to pull the files in binary format
and, it's causing problems in in firefox.. -
Weird problem with loading data from an XML using a for loop
Hi,
I have a strange problem. I have encountered this thing many a times but still don't know the proper workaround for it.
I am trying to load swf file, a video file or an image. They can be present on a local system or on a remote server also. All the entries corresponding to the files to be loaded is made in an XML file. I traverse through the nodes of the XML using a for loop. On the complete event of loader info, example:.
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
I fill a container with the loaded data.
My problem is when I am using for loop it doesn't works properly but if i use a statement like this:
someFunc()
if(i<arr.length())
... do something...
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
private function onComplete(e:Event):void
... do something...
i++;
All files are loaded properly.
I think this can be because the for loop processes pretty fast but the content takes time to load, which ultimately leads to some wierd results.
Please let me know how can this thing be done correctly by using a for loop also.You don't want to use a for loop to load several items. The way you almost appear to have it is the proper approach... load a file and use the completion of its loading to trigger loading the next file.
Maybe you are looking for
-
Hi Folks, I'm stuck in weird situation. User complaints fetching data from table A is timing-out ( as per application standards). I decided to collect latest statistics(dbms_stats) on index used by query which is running for more than 12 hours. Ideal
-
IPod classic formated for MAc and Windows
Hello I have a problem with my iPod classic. I use both Windows and Mac platforms and have iTunes library on both. Or course i would like to use my iPod with both as well. But each time i connect my iPod classic th any of the computers it asks me to
-
Hi all, our production is oracle 9.2.0.1.0 on windows which we want to migrate on windows server.i have taken full export of the database but it comes with warnings and tried 2 to 3 times the same with warning and while import full database i got the
-
Create a logical column with more than one data source
I'm having a problem to create a logical column with more than one data source in Siebel 7.8. What I want to do is the union of 2 physical tables in one logical table. For example, I have a "local_clients" table and a "abroad_clients" table. What I w
-
Battery problems with Windows 8.1?
I read on this forum that some have had battery problems with windows 8.1. Is that the issue for all or just some people? Need to know before updating from 8 to 8.1.