Invalid Nested CFOUTPUT
I am reading from a table that contains a list of country
names, and I am using it as as a dropdown. Here is what I have :
<cfquery datasource="intltransquote" name="getcntry">
SELECT * FROM country
order by cntryname
</cfquery>
<tr>
<td valign=top><font
color="red">*</font>Country:</td>
<td><select name="tocntry">
<option selected value="">Scroll down to select
country</option>
<cfoutput query="getcntry">
<option
value="#getcntry.cntryname#">#getcntry.cntryname#</option>
</cfoutput>
</select>
</td>
</tr>
After I submit the form, I redisplay all the informational.
For the dropdown, I display what was originally selected, then want
to have the list available again if they want to change it. So the
first item in the list should be the selected value and the rest of
the list should follow. This is what I have :
<tr>
<td valign=top><font
color="red">*</font>Country:</td>
<td><select name="tocntry">
<option selected
value="#session.tocntry#">#session.tocntry#"</option>
<cfoutput query="getcntry">
<option
value="#getcntry.cntryname#">#getcntry.cntryname#</option>
</cfoutput>
</select>
</td>
</tr>
However, I get an error about invalid nested cfoutput. Here
is the error message :
Error Occurred While Processing Request
Invalid tag nesting configuration.
A query driven CFOUTPUT tag is nested inside a CFOUTPUT tag
that also has a QUERY= attribute. This is not allowed. Nesting
these tags implies that you want to use grouped processing.
However, only the top-level tag can specify the query that drives
the processing.
How do I correct this ?
Yep, you cannot nest cfoutput except for gruop processing
queries.
You can do something like
<cfoutput>
html.. cf vars..
<tr>
<td valign=top><font
color="red">*</font>Country:</td>
<td><select name="tocntry">
<option selected value="">Scroll down to select
country</option>
</cfoutput>
<cfoutput query="query">
<option
value="#getcntry.cntryname#">#getcntry.cntryname#</option>
</cfoutput>
<cfoutput>
</select>
</td>
</tr>
</cfoutput>
Similar Messages
-
Error while create trigger on for nested table
I want to insert a record into a nested table.For this, I created a view for the table, which includes the nested table.It told me ORA-25015 cannot perform DML on this nested table view column.So I created a trigger for the nested table.However, it told me that ORA-25010 Invalid nested table column name in nested table clause.I think my nested table is valid, i don't konw why did it appear this kind of problem?
My table is
CREATE TABLE ENT
ID NUMBER(7) NOT NULL,
CREATE_DATE VARCHAR2(11 BYTE),
UPDATE_DATE VARCHAR2(11 BYTE),
DEPTS VARRAY_DEPT_SEQ
CREATE OR REPLACE
TYPE DEPT AS OBJECT
ID NUMBER(8),
ANCHOR VARCHAR2(20),
CREATE OR REPLACE
TYPE " VARRAY_DEPT_SEQ" as varray(930) of DEPT
CREATE OR REPLACE VIEW ENT_NESTED_VIEW
(ID, CREATE_DATE, UPDATE_DATE, DEPTS)
AS
select e.ID,cast(multiset(select r.id,r.anchor from ent z, table(z.depts) r where z.ID=e.ID )as varray_dept_seq)
FROM ENT e
Then when I created trigger;
CREATE OR REPLACE TRIGGER EMP.ENT_NESTED_TRI
INSTEAD OF INSERT
ON NESTED TABLE DEPTS OF EMP.ENT_NESTED_VIEW
REFERENCING NEW AS New OLD AS Old PARENT AS Parent
FOR EACH ROW
BEGIN
END ;
I met the problem: ORA-25010 Invalid nested table column name in nested table clause
Could you please tell me the reason
Thank you!
My insert SQL is:
insert into table(select depts from ent_nested_view where id=1856) values(varray_dept_seq(dept(255687,'AF58743')))
Message was edited by:
user589751Hi,TongucY
Compared with the "Referencing Clause with Nested Tables" part of this reference -
http://psoug.org/reference/instead_of_trigger.html, I found the answer of this
quesion. That is "CREATE OR REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of
DEPT". It turns to be a varying array, not a nested table. It should be "CREATE OR
REPLACE TYPE " VARRAY_DEPT_SEQ" as table of DEPT". That is OK. Thank you very
much!
While there is an another question, if I create a varying array like" CREATE OR
REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of DEPT " and I want to insert
a record into the varying array, which the record has been existed.The method that
create a view and a trigger seems not to be effective.
For instance,
There is a record in the table
ID:1020
CREATE_DATE:2005-10-20
UPDATE_DATE:2007-2-11
DETPS: ((10225,AMY))
I want to ask this record to be
ID:1020
CREATE_DATE:2005-10-20
UPDATE_DATE:2007-2-11
DETPS: ((10225,AMY),(10558,TOM))
How should I do?
Could you please help me?
Best regards.
Message was edited by:
user589751 -
I have two tables in a MySQL database, members and
committees.
members table
member_id
member_first_name
member_last_name
committees table
committee_id
committee_name
committee_leader_member_id
committee_co_leader_member_id
I need to display the committees and the leader and co-leader
names on a
page.
Right now my SQL looks like this:
SELECT c.committee_id, c.committee_name,
c.committee_leader_member_id,
c.committee_co_leader_member_id, m.member_first_name,
m.member_last_name
FROM committees c
LEFT JOIN members m
ON c.committee_leader_member_id = m.member_id
OR c.committee_co_leader_member_id = m.member_id
And this is my CFOUTPUT
<cfoutput query="rsCommittees" group="committee_name">
<tr>
<td><strong>Committee Name</strong>:
#rsCommittees.committee_name#<br>
<strong>Committee Co-Leader</strong>: <cfif
rsCommittees.committee_leader_member_id NEQ
"">#rsCommittees.committee_leader_member_id#
#rsCommittees.member_last_name#,
#rsCommittees.member_first_name#<cfelse>VACANT</cfif><br>
<strong>Committee Co-Leader</strong>: <cfif
rsCommittees.committee_co_leader_member_id NEQ
"">#rsCommittees.committee_co_leader_member_id#
#rsCommittees.member_last_name#,
#rsCommittees.member_first_name#<cfelse>VACANT</cfif>
</td>
</tr>
</cfoutput>
The #rsCommittees.committee_leader_member_id# and
#rsCommittees.committee_co_leader_member_id# numbers appear
correctly, but I
can't figure out how to get the names to display correctly.
Anyone help?
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS3
Fordwebs, LLC
http://www.fordwebs.comOMG don't i feel stupid!!!!!!!
<cfoutput query="rsCommittees" group="committee_name">
<tr>
<td
colspan="6">#rsCommittees.committee_name#</td>
</tr>
<cfoutput>
<tr>
<td>#rsCommittees.committee_id#</td>
<td>#rsCommittees.committee_leader_member_id#</td>
<td>#rsCommittees.committee_co_leader_member_id#</td>
<td>#rsCommittees.member_first_name#</td>
<td>#rsCommittees.member_last_name#</td>
<td>#rsCommittees.member_id#</td>
</tr>
</cfoutput>
</cfoutput>
Thanks for smacking me in the forehead Azadi
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS3
Fordwebs, LLC
http://www.fordwebs.com
"Azadi" <[email protected]> wrote in message
news:g9l4aa$3qd$[email protected]..
> don't you need a nested <cfoutput> to show the
names for a grouped
> committee_name?
>
> if that does not solve it, try a union query instead?
get leader in the
> first select, co-leader in the 'unioned' select, maybe
adding some extra
> column to define who is leader and who is co-leader (if
you need to):
>
> (SELECT c.committee_id, c.committee_name,
c.committee_leader_member_id
> AS mid, m.member_first_name, m.member_last_name, 1 AS
is_leader
> FROM committees c LEFT JOIN members m ON
c.committee_leader_member_id =
> m.member_id)
> UNION
> (SELECT c.committee_id, c.committee_name,
> c.committee_co_leader_member_id AS mid,
m.member_first_name,
> m.member_last_name, 0 AS is_leader
> FROM committees c LEFT JOIN members m ON
c.committee_co_leader_member_id
> = m.member_id)
>
> hth
>
> Azadi Saryev
> Sabai-dee.com
>
http://www.sabai-dee.com/ -
I have a report and need the results displayed in multiple
groups. From one query result set I am using the cfoutput tag with
the query and group attributes to display the results (types and
number of workers) by mealtime (Lunch and Dinner). This works fine
but I also need the types of workers grouped (with each mealtime)
by which part of the restaurant they work in (front, back,
management). To do this within the aforementioned cfoutput tag I
added another cfoutput tag with a second group option. This almost
worked but the problem is that I am only getting the first row of
data from each one of the subgroups (where they work) and not all
of the rows. I tried adding the query attribute to the nested
cfquery attribute but that is not allowed.
Has any one used multiple group attributes in nested cfoutput
tags? Can it be done? If so, what am I don't wrong. If not is there
another way?
Thanks,
Jasonjasonpresley wrote:
> Has any one used multiple group attributes in nested
cfoutput tags?
Yes, many times.
> Can it be done?
Of course, that is the whole point of the group attribute.
> If so, what am I don't wrong.
I don't know. You did not show what you actually did!
> If not is there another way?
Several, but it does not sound like they are necessary.
If I had to *guess* from your imprecise description, it
sounds like you
have forgotten the final inner <cfoutput> block without
any group
parameter.
The basic structure is as follows:
<cfoutput query="aQuery" group="aColumn">
Stuff to output once per value of aColumn
<cfoutput group="bColumn">
Stuff to output once per value of bColumn
<cfoutput group="nColumn">
Stuff to output once per value of nColumn
<cfoutput>
Stuff to output for every record in the query
</cfoutput>
Stuff to output oncer per value of nColumn
</cfoutput>
Stuff to output once per value of bColumn
</cfoutput>
Stuff to output once per value of aColumn
</cfoutput> -
Can't see my page in design view, usind split screen
Hi everyone, I am new to these forums and new to dreamweaver,
I have a problem which I have no idea how to fix.
I have been using the program (in my limited ability) saved
my work, then when I opened it today, I have no design view in Code
and Design view. The top part is fine but all I have is lots of
lines at the bottom.
The actual website seems fine, but just means I can't make
any changes other than in code view, which I a not skilled enough
to do.
Please help.
Regards
HypnomanThere are a lot of problems with this page!!
You will need to clean up your code! You have invalidly
nested tags, empty tags, unclosed tags!
If you would like a quote to clean up this page, send me a
message! -
Xmlparserv2.jar with xerces and xalan
Hello,
I have a Spring/Spring Web Flow application. I also have a separate web application that's using the XML Publisher API to generate reports from RTF files. I am now in the process of merging these two into one application.
The Spring app requires the xerces.jar and xalan.jar JARs in order to parse the various XML files required to configure Spring. The XML Publisher app requires the xmlparserv2.jar JAR in order to parse the XML required for generating reports.
When I have all of these JARs in my one web application, I receive an error when I call the FOProcessor.generate() method. Here it is:
oracle.xml.parser.v2.XMLParseException: Bad character (1).
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:324)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:287)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:292)
at oracle.xml.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:590)
at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:260)
at oracle.apps.xdo.common.xml.XSLTClassic.transform(XSLTClassic.java:200)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:174)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1022)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
I was thinking this was because there was a conflict between xalan, xerces and xmlparserv2, so I removed the xalan and xerces JARs from the classpath. Now I get the following whenever I try to hit one of my spring MVC actions:
DEBUG org.springframework.beans.factory.xml.DelegatingEntityResolver(99) - Attempting to resolve XML Schema [http://www.springframework.org/schema/beans/spring-beans-2.0.xsd] using [org.springframework.beans.factory.xml.PluggableSchemaResolver]
<Line 43, Column 57>: XML-24509: (Error) Duplicated definition for: 'identifiedType'
<Line 60, Column 28>: XML-24509: (Error) Duplicated definition for: 'beans'
<Line 145, Column 34>: XML-24509: (Error) Duplicated definition for: 'description'
<Line 158, Column 29>: XML-24509: (Error) Duplicated definition for: 'import'
<Line 180, Column 28>: XML-24509: (Error) Duplicated definition for: 'alias'
<Line 209, Column 33>: XML-24509: (Error) Duplicated definition for: 'beanElements'
<Line 223, Column 44>: XML-24509: (Error) Duplicated definition for: 'beanAttributes'
<Line 486, Column 43>: XML-24509: (Error) Duplicated definition for: 'meta'
<Line 494, Column 35>: XML-24509: (Error) Duplicated definition for: 'metaType'
<Line 511, Column 27>: XML-24509: (Error) Duplicated definition for: 'bean'
<Line 531, Column 38>: XML-24509: (Error) Duplicated definition for: 'constructor-arg'
<Line 600, Column 51>: XML-24509: (Error) Duplicated definition for: 'property'
<Line 611, Column 36>: XML-24509: (Error) Duplicated definition for: 'lookup-method'
<Line 647, Column 38>: XML-24509: (Error) Duplicated definition for: 'replaced-method'
<Line 684, Column 31>: XML-24509: (Error) Duplicated definition for: 'arg-type'
<Line 711, Column 26>: XML-24509: (Error) Duplicated definition for: 'ref'
<Line 749, Column 28>: XML-24509: (Error) Duplicated definition for: 'idref'
<Line 783, Column 28>: XML-24509: (Error) Duplicated definition for: 'value'
<Line 811, Column 27>: XML-24509: (Error) Duplicated definition for: 'null'
<Line 825, Column 39>: XML-24509: (Error) Duplicated definition for: 'collectionElements'
<Line 842, Column 48>: XML-24509: (Error) Duplicated definition for: 'list'
<Line 853, Column 47>: XML-24509: (Error) Duplicated definition for: 'set'
<Line 862, Column 41>: XML-24509: (Error) Duplicated definition for: 'map'
<Line 869, Column 45>: XML-24509: (Error) Duplicated definition for: 'entry'
<Line 877, Column 45>: XML-24509: (Error) Duplicated definition for: 'props'
<Line 886, Column 26>: XML-24509: (Error) Duplicated definition for: 'key'
<Line 897, Column 27>: XML-24509: (Error) Duplicated definition for: 'prop'
<Line 916, Column 39>: XML-24509: (Error) Duplicated definition for: 'propertyType'
<Line 960, Column 45>: XML-24509: (Error) Duplicated definition for: 'baseCollectionType'
<Line 971, Column 46>: XML-24509: (Error) Duplicated definition for: 'typedCollectionType'
<Line 987, Column 34>: XML-24509: (Error) Duplicated definition for: 'mapType'
<Line 1008, Column 36>: XML-24509: (Error) Duplicated definition for: 'entryType'
<Line 1047, Column 40>: XML-24509: (Error) Duplicated definition for: 'listOrSetType'
<Line 1056, Column 36>: XML-24509: (Error) Duplicated definition for: 'propsType'
<Line 1069, Column 45>: XML-24509: (Error) Duplicated definition for: 'defaultable-boolean'
ERROR org.springframework.web.servlet.FrameworkServlet(229) - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 10 in XML document from class path resource [spring/servlet/sellitem-webflow-config.xml] is invalid; nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
Caused by:
oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:431)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:290)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:287)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:181)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:151)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
So it seems like these JARs are incompatible with each other. Is there any way I can use the Oracle DocumentBuilder for my XML Publisher classes and the xerces for the rest of the app?
Thanks,
Leo HartNow one has any advice? :(
-
Design View Issue Dreamweaver CS4 - Taking forever to load design view
I am having an issue where my site takes literally almost a full day to load in design view. Once it is loaded everything works seemlessly but once I close down Dreamweaver and reopen it, I have to wait another day to get to design view of my site. All files open just fine in code view.
I have deleted the Dreamweaver CS4 cache folder, completely formatted my drive and reinstalled creative suite. I have also validated my code on W3c and everything checks out fine.
The majority of my site is based off of a template, but even when I remove all the template references in the html files from Notepad I am still having the same issue. My site renders fine and quickly however on Explorer, Firefox, Chrome, and Safari.
When loading any other site off the web into Dreamweaver I do not run into the problem so there must be something wrong with how my site is set up. Either the Template file is no good or somewhere else I am falling short. Can someone, please, please, please ( I am begging) help me figure out what is going on here.
My index file is located at - http://www.thebluedot.net/index.html and the template file is located at - http://www.thebluedot.net/Templates/index.dwt
I have searched high and low and even made a post on this same topic about a month ago but never came up with a resolution to my issue. I had given up on finding a solution to this problem for some time, but I really need to figure out where I am going wrong here!
Additional Details -
I am running - Windows Vista Ultimate on a Core 2 Processor with 12 GB of Ram & Solid State Hard Drive. Everything on my system runs super smoothly except loading my site in Dreamweaver CS4 design view.
I really appreciate any help you can provide.I have used CS2 Adobe GoLive to create and manage a website (pro-prosperity.com). Now, I have CS4 Dreamweaver. I got a new site set up on Dreamweaver using the site management facility. I then have the contents of website available locally on Dreamweaver. I can edit files. But the main home page, index.html, is not displaying on design view mode for editing, although it displays everything on live view mode. I have struggled for days and am not getting any difference in attributes of index.html and another .html that is displaying fine on design view and is editable.
I am really lost and am begging for any help. Can you, for example, copy the home page from pro-prosperity.com and display on design view and edit it? Please tell me what is in this file that is troublesome. Thanks.
The first thing you should do is to make sure that this feature is turned on (it's off by default):
View > Code View Options > Highlight Invalid Html
It's not perfect, but it will notify you of some problems. In Code View, there are many problems highlighted. Some of them don't make sense, but are triggered because of a problem with a parent tag.
Be sure to make a backup copy of your file before doing the next step. Close your page. Go to Preferences > Code Rewriting, and turn on "Fix invalidly nested and unclosed tags", "Remove extra closing tags", and "Warn when fixing or removing tags". Click OK, then re-open your page. The messages in the dialog to tell you what was changed. This allowed me to see your page in Design View (I am using CS5).
Note: I suggested that you reset your preferences to turn off those 3 settings as they can cause problems with some markup.
In the long term, I suggest that you avoid nesting tables wherever possible.
Hope this helps,
Randy -
Adobe dreamweaver cc div option not to be seen, how do i get it back?
Hi all,
Am using dreamweaver CC, creating a fluid layout using div's, when a div is selected there is option panel, that allows you to: hide, re-position it, delete it, copy, move up and move down.
This works fine for a while then it disappears and I can't re-size div's or move them around, but now doing manually which would consume more time, which i wouldn't opt for.
Could i please know how do i get back this option panel for div's?sharath.k wrote:
@Nancy:
Thanks for the reply nancy.
Not able to figure out the connection between, having the DIV editing options being disbaled and if there are errors on html/css layout.
DW does some pretty strange things when it runs into code errors.
For example, placing the letter "x" in the CSS column definitions for a fluid grid layout disables the FGL tools AND brings back Design View in DW CC2014.1. Design View is normally disabled for Fluid Grid Layouts in that version and a single misplaced character defeats DW's detection of FGL entirely.
Other code errors, like unclosed tags, invalid nesting and unclosed quotes can cause problems up to and including making Design View completely blank, even though you have hundreds of lines of html in Code View.
It may not be the problem, but it's definitely worthwhile to validate code frequently to catch small issues before they turn into big ones. -
I have a table like the example below. I am looking to get
the results like the example - I have included my code that I have
this far, but it is not giving me the right results.
Can someone point me in the right direction?
This is what I want it to do:
orders table
orderid | vendor | product | color | size
1 | sammoon | watch | silver | Large
2 | beckam | necklace | silver | Medium
3 | sammoon | watch | silver | large
4 | sammoon | watch | gold | Medium
5 | beckam | necklace | gold | medium
6 | switse | ring | gold | small
7 | sammoon | earring | silver | small
8 | switse | ring | gold | medium
9 | beckam | necklace | gold | small
10 | switse | necklace | platinum | large
Results for Report
Sammoon
watch
Large
1 - Silver
3 - Silver
Medium
4 - Gold
earrings
Small
7 - silver
Beckam
Necklace
Medium
2 - silver
5 - gold
Small
9 - gold
Switse
Ring
Medium
8 - gold
Small
6 - gold
Necklace
Large
10 - platinum
This is my current code (note: not exactly like example but
same principle):
<CFOUTPUT>
<CFQUERY name="q1" datasource="#DSN#" username="#USER#"
password="#PASS#">
SELECT avendor,orderid
FROM smorders s
WHERE orderstatus='released to production'
Group By avendor,orderid
Order By avendor
</CFQUERY>
<CFLOOP query="q1">
#q1.avendor#<BR>
<CFQUERY name="q2" datasource="#DSN#" username="#USER#"
password="#PASS#">
SELECT vasku,shortdesc
FROM smorders s
WHERE avendor='#q1.avendor#'
Group By vasku,shortdesc
Order By vasku
</CFQUERY>
<CFLOOP query="q2">
#vasku# -
#q2.shortdesc#<BR>
<CFQUERY name="q3" datasource="#DSN#" username="#USER#"
password="#PASS#">
SELECT color
FROM smorders
WHERE avendor='#q1.avendor#'
GROUP BY color
ORDER BY color
</CFQUERY>
<CFLOOP query="q3">
#q3.color#<BR>
<CFQUERY name="q4" datasource="#DSN#" username="#USER#"
password="#PASS#">
SELECT size,orderid
FROM smorders
WHERE avendor='#q1.avendor#' and orderid=#q1.orderid#
GROUP BY size,orderid
ORDER BY size
</CFQUERY>
<CFLOOP query="q4">
Order
##: #q4.orderid# - Size: #q4.size#<BR>
</CFLOOP>
</CFLOOP>
</CFLOOP>
</CFLOOP>
</CFOUTPUT>
Anyone? Thanks in advance.No need for all those nested queries. If I'm understanding
correctly, you only need 1 query and a series of nested cfoutput
statements. Use an ORDER BY clause to order the results the way you
want them grouped.
Sammoon (By Vendor)
watch (then by Product)
Large (then by Size)
1 - Silver (then by Color) (and finally by OrderId)
3 - Silver
Medium
4 - Gold
earrings
Small
7 - silver
So your SQL clause would be: ORDER BY Vendor, Product, Size,
Color then OrderId. Finally use nested cfoutput statements to group
the output. See the attached example
I noticed your table contains duplicated data. If that is the
actual table structure you should consider normalizing to eliminate
the duplication. You should have a separate table for the distinct
Products, Colors, Sizes and Vendors and the orders table should
store the id's not the names.
Table | Columns
Product | ProductID, ProductName
Vendor | VendorID, VendorName
Color | ColorID, ColorName
Size | SizeID, SizeName
SMOrders | OrderId, ProductID, VendorID, ColorID, SizeID -
Parse form variable to insert in my query
I have a report where I want to group my output. The only
problem is the field I want to group by comes in as a comma
deliimeter from the form.
If I use the
in() function it doesnt group the output correctly.
<cfoutput>#form.id#</cfoutput><br><br>
<cfquery name="que" datasource="mydsn">
SELECT *
FROM myTable
WHERE id in (#form.id#)
</cfquery>
<cfoutput query="que" group="id">
#id#<br>
<cfoutput>#name#<br></cfoutput>
</cfoutput>
Output -
2
Jones
2
Smith
But if I use one form value at a time it correctly groups my
output:
<cfquery name="que" datasource="mydsn">
SELECT *
FROM myTable
WHERE id = 6
</cfquery>
Output -
2
Jones
Smith
Please advise how I can take the form values and input them
one at a time in my cfquery?
I assume I need to parse the
form.id output and then loop through each value to insert
into my cfquery but not sure how I can do this?quote:
Originally posted by:
drforbin1970
Also, you don't need nested CFOUTPUTs.
While you don't need nested cfoutputs for grouping,
you do if you want the group ID header to work properly and show
up - it's even in the CFDOCs and the only way I have ever
easily grouped with headers. -
XML Parse issues when using Network Data Model LOD with Springframework 3
Hello,
I am having issues with using using NDM in conjuction with Spring 3. The problem is that there is a dependency on the ConfigManager class in that it has to use Oracle's xml parser from xmlparserv2.jar, and this parser seems to have a history of problems with parsing Spring schemas.
My setup is as follows:
Spring Version: 3.0.1
Oracle: 11GR2 and corresponding spatial libraries
Note that when using the xerces parser, there is no issue here. It only while using Oracle's specific parser which appears to be hard-coded into the ConfigManager. Spring fortunately offers a workaround, where I can force it to use a specific parser when loading the spring configuration as follows:
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl But this is an extra deployment task we'd rather not have. Note that this issue has been brought up before in relation to OC4J. See the following link:
How to change the defaut xmlparser on OC4J Standalone 10.1.3.4 for Spring 3
My question is, is there any other way to configure LOD where it won't have the dependency on the oracle parser?
Also, fyi, here is the exception that is occurring as well as the header for my spring file.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 11 in XML document from URL [file:/C:/projects/lrs_network_domain/service/target/classes/META-INF/spring.xml] is invalid;
nested exception is oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
[snip]
... 31 more
Caused by: oracle.xml.parser.schema.XSDException: Duplicated definition for: 'identifiedType'
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:331)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)Here is my the header for my spring configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">Thanks, TomI ran into this exact issue while trying to get hibernate and spring working with an oracle XMLType column, and found a better solution than to use JVM arguments as you mentioned.
Why is it happening?
The xmlparserv2.jar uses the JAR Services API (Service Provider Mechanism) to change the default javax.xml classes used for the SAXParserFactory, DocumentBuilderFactory and TransformerFactory.
How did it happen?
The javax.xml.parsers.FactoryFinder looks for custom implementations by checking for, in this order, environment variables, %JAVA_HOME%/lib/jaxp.properties, then for config files under META-INF/services on the classpath, before using the default implementations included with the JDK (com.sun.org.*).
Inside xmlparserv2.jar exists a META-INF/services directory, which the javax.xml.parsers.FactoryFinder class picks up and uses:
META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines oracle.xml.jaxp.JXDocumentBuilderFactory as the default)
META-INF/services/javax.xml.parsers.SAXParserFactory (which defines oracle.xml.jaxp.JXSAXParserFactory as the default)
META-INF/services/javax.xml.transform.TransformerFactory (which defines oracle.xml.jaxp.JXSAXTransformerFactory as the default)
Solution?
Switch all 3 back, otherwise you'll see weird errors. javax.xml.parsers.* fix the visible errors, while the javax.xml.transform.* fixes more subtle XML parsing (in my case, with apache commons configuration reading/writing).
QUICK SOLUTION to solve the application server startup errors:
JVM Arguments (not great)
To override the changes made by xmlparserv2.jar, add the following JVM properties to your application server startup arguments. The java.xml.parsers.FactoryFinder logic will check environment variables first.
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
However, if you run test cases using @RunWith(SpringJUnit4ClassRunner.class) or similar, you will still experience the error.
BETTER SOLUTION to the application server startup errors AND test case errors:
Option 1: Use JVM arguments for the app server and @BeforeClass statements for your test cases.
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory","com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
If you have a lot of test cases, this becomes painful.
Option 2: Create your own Service Provider definition files in the compile/runtime classpath for your project, which will override those included in xmlparserv2.jar.
In a maven spring project, override the xmlparserv2.jar settings by creating the following files in the %PROJECT_HOME%/src/main/resources directory:
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory (which defines com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl as the default)
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory (which defines com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl as the default)
%PROJECT_HOME%/src/main/resources/META-INF/services/javax.xml.transform.TransformerFactory (which defines com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl as the default)
These files are referenced by both the application server (no JVM arguments required), and solves any unit test issues without requiring any code changes.
This is a snippet of my longer solution for how to get hibernate and spring to work with an oracle XMLType column, found on stackoverflow. -
Cycle through list and build compound array...
I have a database that I'm pulling data from that is already existing. There is a designs table and a details table. The designs table stores the id's of the details items that are associated with the design. Since I'm using Flash remoting I would like to just get all the designs and their details back in one compound array instead of making a bunch of calls. I'm stuck on how to make the string "5,8,12,19" into an array, cycle through the array and then get the details info for each id. Then return the compound array when finished.
I would prefer the array be like this:
[design item 1 and it's data][details array of the design 1 items], [design item 2 and it's data][details array of the design 2 items]....
Here is what I have so far
<cffunction name="getDesignsByAct" access="remote" returntype="query" hint="gets activities by id">
<cfargument name="send_id" type="numeric" required="yes" />
<cfquery name="getDesignsByActQuery" datasource="#dsn#">
SELECT design_id, design_items
FROM designs_table
WHERE design_activity = #send_id#
</cfquery>
<cfquery name="getDetailsQuery" datasource="#dsn#">
SELECT
FROM
details_table
WHERE <!-- cycle through the list of "design_items" in the above query -->
</cfquery>
<cfset this_return[1] = getDesignsByActQuery>
<cfset this_return[2] = getDetailsQuery>
<cfreturn this_return >
</cffunction>
Thanks in advance.Is your end goal to get a multi-dimensional array? a query recordset object? or an array of structs? Based on your description, it looks like you want something like this:
arrMultiDimArray = NewArray(2)
arrMultiDimArray[1][1] = Query Data from Design Record 1
ArrMultiDimArray[1][2] = Array of Detail records data structures (or query recordset object?) associated with design record 1
If that is the case, then you should be able to put something together like this:
1) Query your design & details data from the database as a joined recordset
2) Initialize your multi dimensional array
3) You can use the <cfoutput group=""> attribute to create an outer loop that only changes once for each new design ID
4) Increment your first dimension array and add your design data to position one of your 2nd dimension
5) Create a new array to store your Detail record items
6) Use a nested <cfoutput> loop to loop over your detail item records and populate your new array
7) Store your new array in position two of your 2nd dimension
8) Return your 2D array to your flash remoting app -
Flex not resolving a DTD document
Hi,
I am trying to call a method on a java remote object. My
server is set up fine because I have done this before but in this
case the .jar file contains an XML file: AppSpringContext.xml and
this is calling a DTD: spring-beans.dtd.
Both of these files exist in the jar on the root directory.
When the java developer runs his Unit Test it works fine, however
when I attempt to call a method I get the following error:
Line 2 in XML document from class path resource
[AppSpringContext.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: Relative URI "spring-beans.dtd"; can
not be resolved without a base URI.
Has anyone any ideas on this - PLEASE :o)Hi,
According to your post, my understanding is that you got an error when clicking on the Document ID link of an item.
I recommend to rerun the time jobs: Document ID Assignment Job and Document ID enable/disable under Central Administration > Monitoring > Review Job Definitions.
More information:
SharePoint 2010 Document ID Feature
Activate and configure Document IDs in a site collection
Thanks,
Linda Li
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Linda Li
TechNet Community Support -
Best practices - parameter objects
I'm programming Java EE, Hibernate, Spring... I know you shouldn't use parameter objects to try to bring down the number of in-parameters to a method. (I try to stay below 4.) You should always try to create a real object with non-trivial methods. But that object can't be a Spring Bean. All our Spring Beans are singletons. I tried to declare <id="somename" singleton=false> in ApplicationContext.xml but got a bunch of errors when initializing the Spring context. It reacted on the word sigleton. It didn't recognize it. It seems I can't declare a bean as a prototype and maybe I shouldn't. So my in-parameter should be a real object but not a bean unless I can use it as the singleton it is.
Or is it OK to use parameter objects?853368 wrote:
The declaration:
<bean id="ruleService" class="com........ .......RuleServiceImpl" singleton="false">
Results in:
2011-09-19 14:28:47,743 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 125 in XML document from ServletContext resource [WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'singleton' is not allowed to appear in element 'bean'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)Try scope="singleton" (more information [url http://forum.springsource.org/showthread.php?30209-Attribute-singleton-is-not-allowed-to-appear-in-element-bean-.]here). Post your namespace declarations in the spring bean configuration if what i suggested doesn't work. -
Content is not allowed in the Prolog
Hi All,
I am getting this error while trying to run my Spring based app in the browser
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:359)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:82)
javax.servlet.GenericServlet.init(GenericServlet.java:261)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:158)
org.apache.catalina.startup.Embedded.start(Embedded.java:1030)
com.sun.enterprise.web.WebContainer.start(WebContainer.java:490)
com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:506)
com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:295)
com.sun.enterprise.server.PEMain.run(PEMain.java:220)
com.sun.enterprise.server.PEMain.main(PEMain.java:172)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
root cause
org.xml.sax.SAXParseException: Content is not allowed in prolog.
org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:266)
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:206)
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:351)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:82)
javax.servlet.GenericServlet.init(GenericServlet.java:261)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:158)
org.apache.catalina.startup.Embedded.start(Embedded.java:1030)
com.sun.enterprise.web.WebContainer.start(WebContainer.java:490)
com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:506)
com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:295)
com.sun.enterprise.server.PEMain.run(PEMain.java:220)
com.sun.enterprise.server.PEMain.main(PEMain.java:172)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)here is my xml file which is throwing the error
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="aquofusionController" class="org.aquosine.aquofusion.controller.AquofusionController"/>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/hello.htm">aquofusionController</prop>
</props>
</property>
</bean>
</beans>please help as i am breaking head over this for last two days.cause of the error:
After some extensive research on the web, it is found that that you are using an UTF-8 encoded file with byte-order mark (BOM). Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. UTF-8 files with BOMs are commonly generated by tools such as Window's Notepad. This is a known bug in Java, but it still needs fixing after almost 8 years...
There are some hexadecimal character at the begining of the file, which is giving error"content not allowed in prolog". No solution is provided for this till now.
Example: suppose your file start with <?xml version="1.0" encoding="utf-8"?>. you will see this in a editor. But if you open this file with any hexadecimal editor you will find some junk character in the start of the file.that is causing the problem
solution:
1) convert your file into a string and then read the file from the forst character that in my case the first character will be "<".so the junk character will not be there in the string and then again convert it into a file.
2) some people are able to solve this problem by changing the "utf-8" to "utf-16". remember only in some case. some times this problem also exits in "utf-16" file.
3) some are able to solve this problem by changing the LANG to US.en.
4) If the first three bytes of the file have hexadecimal values EF BB BF then the file contains a BOM.so you can also handle by your own.
5)Download a hexadecimal editor and remove the BOM.
6) In case you are not able to think furthe then please to more research in internet may be you find some other solution to this problem. But These solution are some type of hack not exactly a solution.
Maybe you are looking for
-
Internet access to new sharepoint foundation 2013 site collection
I had sharepoint 2010 installed on my WHS 2011. I successfuly created a new web application and site collection. I created a new SP default site on a port different from 80 and restarted the WHS 2011 default site in IIS. I could see both the WHS 2011
-
Windows 7 Desktop goes Black after a period of inactivity and the user accesses their machine again
Hi There, Wonder if someone can offer some help to an unusual problem? Users have Windows 7 machines which all have a desktop background theme...Blue with a company Logo. User will go for lunch and leave their position, after a period of time screen
-
UTF-8 file via process chain doesn't load
Hello all! I've a big problem. I try to load a UTF-8 file via process chain. I have a script which generate the correct name and the process chain will load the file daily. The file format is UTF-8. I've created a info package with the adapter OPEN_D
-
How to connect iPad to printer
I have iPad and want to connect it to canon MP280 printer, please advise
-
I doubt there is a solution... 5 versions in, but I'm scrolling to the bottom of 2000 images -- I let go of the cursor and the scroll bar jumps up to the top near image 100. Ongoing issue. thanks.