VIEWING CONSTRAINT NAME IN QUERY TOOL
hi ,
i am using oracle lite 10g database lite R3 in windows platform . Now i have done a fresh client setup and datadownload in my machine. i am using query tool to view the datas . how to get
the constraint names in the query tool of a particular table.
Which tool are you using?
SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME = :TABLE_NAME
Similar Messages
-
How to display the field name in the tabulated view for a content query web part
I have added a content query web part changed the web part file to include custom columns imported and reffered itemstyle.xsl
to include the tabulated view for the content query.
However the way it is displayed is such that only the content is displayed.
As i am using a tabular view wto display the data, i want to display their field names as well.Hi ,
According to your description, my understanding is that you need to display the field in the tabulated view for a content query web part.
For your issue, please refer to the code as below:
<xsl:template name="VendorCustomStyle" match="Row[@Style='VendorCustomStyle']" mode="itemstyle">
<html>
<table width="100%">
<xsl:if test="count(preceding-sibling::*)=0">
<tr>
<td width="8%" valign="top"><div class="item"><b>Vendor ID</b></div></td>
<td width="12%" valign="top"><div class="item"><b>Vendor Name</b></div></td>
<td width="50%" valign="top"><div class="item"><b>Vendor Description</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Vendor Country</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Vendor Date</b></div></td>
<td width="10%" valign="top"><div class="item"><b>Created By</b></div></td>
</tr>
</xsl:if>
<tr>
<td width="8%" valign="top"><div class="item"><xsl:value-of select="@VendorID" /></div></td>
<td width="12%" valign="top"><div class="item"><xsl:value-of select="@Title" /></div></td>
<td width="50%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Description" disable-output-escaping="yes" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Country" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Vendor_x005F_x0020_Date" /></div></td>
<td width="10%" valign="top"><div class="item"><xsl:value-of select="@Author" /></div></td>
</tr>
</table>
</html>
</xsl:template>
For more information, please have a look at the blog:
http://www.codeproject.com/Articles/756834/Customizing-the-Content-Query-Web-Part-and-Item-St
http://msdn.microsoft.com/en-us/library/ms497457.aspx
http://clarksteveb.hubpages.com/hub/Customized-Content-Query-Web-Part-CQWP-in-SharePoint-2007-with-results-Tabbed-Grouped-and-in-an-HTML-Table
http://blog.sharepointexperience.com/customitemstyle/
Best Regards,
Eric
Eric Tao
TechNet Community Support -
Is it too much to ask MS for a simple ad-hoc query tool for end users?
Hello
This is a general MS BI topic and not specific to Power Query, but I couldn't find a more suitable general forum for it.
This posting is the result of the frustration I have with MS BI stack, whereby a simple ad-hoc drag and drop query tool to get the data in a table format (preferably from a relational
data source) is missing, something that other big vendors have, such as SAP Business Objects Universe and the associated tools. The deprecated SSRS Report model and SMDL was the closest MS ever got to this functionality (although that had some limitations
too), which unfortunately is dead now in favour of all sort of "Power" tools that basically can’t deliver the same functionality.
The requirement is pretty simple: provide users with a tool that they can drag and drop fields from different entities in a data model without having to worry about entity relationships and
apply necessary filters and get the data out in Excel or CSV, no fancy (or even simple) aggregation or formatting is required, and users should only see the rows they are authorized to see, i.e. row level security (RLS) of data.
Let’s see what we have at our disposal from MS BI:
From the modeling perspective, we have relational models in the database that support RLS with views, but obviously cannot maintain PK-FK relationships in the database model between views. Other
models are .Net Entity Data model Framework model exposed as OData, and SSAS tabular, SSAS PowerPivot, SSAS multidimensional, which you can find a good comparison of their features here:
http://www.sqlchick.com/entries/2012/3/4/decisions-powerpivot-ssas-tabular -or-ssas-multidimensional-m.html
From the tools perspective we have:
Power Query on top of a relational database (SQL Server): Can connect to relational databases easily, generated queries are optimal, detects relationships with entities, but only when entities
are tables and have PK-FK relationships enforced in the database. So can’t detect relationships with views and hence can’t enforce RLS, so this is not an option unless users keep joining entities, which is not a desirable option either.
Power Query on top of an OData: Works well except that queries generated for multiple entity expansion are terrible (look here for more details:
http://social.technet.microsoft.com/Forums/en-US/7a8b8e52-d3a9-42af-bc52-9d5459c00529/odata-multilevel-expand-query-issue?forum=powerquery). In addition all filtering and projections are done at client side, so even if you want 1 row out of 1 million, all
rows are brought over to Excel before filtered. Overall this results in unacceptable performance even for small sized data.
Power Query on top of a tabular model: Doesn’t support that type of data source yet (http://social.technet.microsoft.com/Forums/en-US/ebcccb5e-7058-4046-917d-3d7fcf60cbdc/tabular-model-as-data-source-for-power-query?forum=powerquery).
Even if it did, tabular models don’t support Many-to-Many relationships out of the box and not sure if there are plans to support tabular models in Direct Query mode in Power Query to take care of RLS.
Excel on top of tabular models or multidimensional models: The tabular model should not be in Direct Query mode and you only get to use PivotTable to query the model. PivotTables are not famous
for generating optimal MDX queries, so performance is not going to be acceptable if you are dealing with large dimensions, especially large junk and degenerate dimensions. You can use drilltrough to get details of a measure, but you have to specify the columns
for a drilltrough action upfront, no flexibility for users to select what they want to see.
PowerPivot on top of relational databases: The query designer cannot detect relationships between views, so users have to perform manual joins, not an option.
PowerPivot on top of a multidimensional or tabular model: The query designer doesn’t generate optimal MDX queries by drag and drop. Especially there doesn’t seem to be a way to add related
attributes of a dimension attribute to the query without cross joins which results in poor performance on large dimensions. Other issues found here
http://sqlblog.com/blogs/marco_russo/archive/2010/08/24/using-ssas-2005-2008-as-powerpivot-data-source-query-designer.aspx. In addition the result set has ugly column names and issues with data types, such as interpreting numeric data types as Text, and
there’s no straight forward way of getting the data from PowerPivot directly to Excel. The user either has to do a copy/paste (which doesn’t work on large datasets) or create a pivot table, bring the measure, and drillthrough the measure to get the details
in table format.
PowerPivot with OData: Treats every entity as a separate table to import, not suitable for our use case.
Report Builder and SSRS on top of relational, multidimensional or tabular model: Given the query designer is the same as PowerPivot, it has similar issues. In addition, there are 4 more steps
from designing a query to generating an Excel or CSV output, not an option.
PowerView: Works against tabular and multidimensional models, but there’s no way of exporting data to Excel sheet. Besides the add-in is not available for Excel 2010.
Good old MS-Access: Link to tables and views through ODBC, create relationships between entities and give each user a copy of that Access database to create their queries, and deal with the
nightmares of updates to the model and distribution of new models to the users! Did I mention Access as an option?
So there you go, 10 options, none of which can deal with a seemingly simple use case sufficiently. At the moment, the best among them appears to be option 6 against a heavily optimized OLAP
cube, and perhaps #3 when/if Power Query support for tabular models in direct query mode arrives. Perhaps I am missing something very obvious, and would like someone to enlighten me here.
Thanks
MRHi, as far as I can infer, that term means it's not loading any resources until needed, opposite of this...
-bind_at_load
Sets a bit in the mach header of the resulting binary which tells dyld to bind all symbols when the binary is loaded, rather than lazily.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/ld.1.html
Load resources lazily.
You should never load a resource file until it is actually needed. Prefetching resource files may seem like a way to save time, but this practice actually slows down your app right away. In addition, if you end up not using the resource, loading it wastes memory for no good purpose.
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneos programmingguide/PerformanceTuning/PerformanceTuning.html
And, higher OS versionsare even worse with Bonjour/mDNSResponder, but might see this...
http://support.apple.com/kb/ht3789 -
How to modify a column name & How to modify a constraint name
How to modify a column name?
How to modify a primary key constraint name if the pk has been referenced by another foreign key?
Thanks.Hi,
What version of oracle are you using? If it is 9i,
then you can the command
alter table <table_name> rename column <column_name> to <new_column>;
if it is 8i or earlier, you can create a view with the required names.
hth
Always post the oracle version and the platform you are using to get better response. -
Create a view based off a query in Access WebApp
I'm trying to create a summary view based on a query. The query is being used to make a simple join two tables. I don't have an issue creating a datasheet or list view off the query, but when I try to create a summary view, I'm unable to
create it.
From the desktop app, I'm able to click on the plus sign to add a new view, give it a name, choose the type and select my record source. When I click on "Add New View" nothing happens. I do not get any progress dialog box as I do for
other views. The popup for the "Add New View" simply disappears. Is this the expected behavior?
Based on this thread I don't think so.
https://social.msdn.microsoft.com/Forums/en-US/a5e60abc-0061-429e-8ce8-2014626c42c2/access-web-app-open-a-subform-from-a-query-based-summary-view?forum=accessdev
Again, this is a simple query table 1 has 8 colums, all of them are simple text except for one lookup column that includes the data with the table, one column stores the a primary key from the second table. The second table is a simple table with
3 columns.
Is this a limitation of the Access Web App?Hi,
You should be able to create a new summary view off a saved query. The behavior you describe sounds very odd but I’m not able to repro this on my computer. Could
you try something for me? Try and create a new summary view and use a table as its record source. Does that get created OK?
Jeff Conrad - Access Junkie - MVP Alumnus
Senior Content Developer - Modern Assistance and Support Experience - Microsoft Corporation
Author - Microsoft Access 2013 Inside Out
Author - Microsoft Access 2010 Inside Out
Co-author - Microsoft Office Access 2007 Inside Out
Access 2007/2010/2013 Info: http://www.AccessJunkie.com
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/en-us/legal/Copyright/Default.aspx -
Invalid column name in query string - using Format function
In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
& "HOME_REGION FROM CCC2.CASE_EPRP " _
& "WHERE (HOME_REGION = 'NCR') AND " _
"(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
& "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
In the Access Query tool I can include this field
Format(CALL_DATE,'mmm-yy')
and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
Format(CALL_DATE,'mmm-yy')
in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
Thanks again,
RichThank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
"date format not recognized"
when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
Thanks again for your help.
Rich -
Viewing file names in vlc in ipad
Hi .. I'm not sure if the topic made sense.. Here is what Im trying to do ..
Say if I'm copying bunch of episodes from a series or movies and copy to vlc via itunes, when i try to open vlc and pick any episode, it only shows me first few letters of the file. Its quite common that all the files starts with same name..(eg. Naruto_Episode or Friends_Season_ )
Is there any way to view file name and then select it accordingly ? OR is there any other software which is out there I can use for this purpose
I spent some amount of time in renaming every files before i copied them to iPad.I dont want to do that everytime ..
Any suggestions / Thoughts ?
Thanks in AdvanceCompletely agree!
What were the developers thinking when they hid info as basic as file name from users once imported. Even mom/pop videos like a hockey high lights vid might have 15-20 vid clips coming in at random times and different sources.
To make users suffer with this crippled GUI just has to be one of those decisions you cynically think were made for $$$$ reasons...
ie cripple a useful cheaper tool like iMovie so users with even modest projects has to buy/learn the more expensive tool.
Thanks apple! -
Check Constraint names aren't synced when engineering to logical
Just learned about this tool at OOW and ran into an issue involving check constraint names being compared but not synced when engineering from the relational model to the logical model. When I set the constraint names in the logical model (and perform one last "Engineer to Logical Model") after that the compare dialog shows the table and entities match. Is this a bug?
Steps to reproduce:
1. importing a relational data model from data dictionary which contains a table with a column level check constraint
2. perform "Engineer to Logical model" to produce the logical model
Issue:
Perform another "Engineer to Logical model" which will show the table with the column level check constraint as being out of sync with the logical model's equivalent entity, when you drill down into the diff in the compare dialog box you see the check constraint name has a value in the relational model and the name is null in the logical model
Verify:
Looking in logical model at the constraint (<Entity>/Attributes/Attribute Properties/Default and Constraint/Constraint Name) the value is empty
Work Around:
Set the constraint name in the spot from verify above and perform "Engineer to Logical model" twice. The first time it will show the same issue, the second time it will show the table and entity matchHi Bo,
thanks for feedback. It's fixed now and you'll get the fix in version 3.0.
Another( probably better workaround) - in engineering dialog - "Compare/Copy options" tab - uncheck "Don't use for new objects" option.
Philip -
Hello people, I want to use console for JPQL I found
https://jpaquerytool.dev.java.net/how-to.html
and install it, but then I added my-app.jar and persistence unit name, after run I have one warning -
"could not load persistance unit
check your database classpath"....
and
Message Stack:
No Persistence provider for EntityManager named TestPU: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory:
javax.persistence.PersistenceException
javax.persistence.PersistenceException: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:252)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.hibernate.ejb.packaging.PersistenceXmlLoader.loadURL(PersistenceXmlLoader.java:70)
at org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(PersistenceXmlLoader.java:79)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:212)
... 12 more
Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Local Exception Stack:
Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
Internal Exception: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
Internal Exception:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
Internal Exception:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:134)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:161)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:99)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:89)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:236)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155)
... 11 more
Caused by:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
at oracle.toplink.essentials.internal.ejb.cmp3.xml.parser.XMLExceptionHandler.error(XMLExceptionHandler.java:52)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:151)
... 16 more
Provider named oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider threw unexpected exception at create EntityManagerFactory:
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Local Exception Stack:
Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
Internal Exception: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
Internal Exception:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
Internal Exception:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:134)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:161)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:99)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:89)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:236)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155)
... 11 more
Caused by:
(1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
(2. XML document structures must start and end within the same entity.)
All this for all my persistance units!
If you know cause of this problem please help me, or
provide other JPQL or JPA query tool.
More ThanksI changed my unit to
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="wn-ejbPU">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/MySQL</jta-data-source>
<properties>
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="root"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/wet"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
<property name="hibernate.c3p0.timeout" value="300"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
<property name="hibernate.c3p0.idle_test_period" value="3000"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="none"/>
</properties>
</persistence-unit>
</persistence>
but now I have
Message Stack:
No Persistence provider for EntityManager named wn-ejbPU: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory:
javax.persistence.PersistenceException
javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
... 12 more
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(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
... 18 more -
Hi everybody,
Could you please tell me that query tool to retrieve data from oracle view and also query control by oracle object rights. Some users should have rights to retrieve and sort data. But some person should have rights to save the data.Though Microsoft access is good tool, it could't control the save option.
best regards
upul indika.>
Could you please tell me that query tool to retrieve data from oracle view and also
query control by oracle object rights. Some users should have rights to retrieve and sort data.
But some person should have rights to save the data.Though Microsoft access is good tool, it
could't control the save option.There is also TOAD freeware edition - limited but fine for a lot of stuff.
What's the matter with SQL*Plus? Of course SQL*Developer is free, but
it mightn't always be available - just see what Tom Kyte has to say about
this - SQL*Plus and vi is his environment of choice.
If your client machine's RAM is limited to < 1GB, then I wouldn't use
SQL Developer - it's a java app and really heavy on RAM... use TOAD
freeware for a low spec Windows machine, for Linux, use SQL*Plus.
Paul...
upul indika. -
Does there exist some kind of common teststand database query tool/gui/form or do all testengineers have to develop their own application for retrieving data ?
I'm using standard TS schema, and Access DB.
I'm sure there are 100's of homemade tools out there, but are any of them free to use, or can i purchase something from NI ?
Bigger companies make their own systems i guess, but this should be a common requirement for everybody using TS
Try to use the database viewer included with TestStand. You can include it to your deployments as well. So all operaters can go in and view the database.
From within TestStand you find it in the menu>>Tools>>Database Viewer...This tool is fairly simple and allows you to search on data and filter data in the database.
-
Constraint names hardcoded !!!
we generated entity and view objects based on a table and tested the application module which was working fine. now we have created a new user by firing the scripts again. as a result, validations on the entity object (eg. not null etc) have started failing. on examining, we found that the system generated constraint names like SYSC000101 for not null columns, have been hardcoded in the XML file and these differ now in the newly generated scheme. what is the solution to this.
what will happen when we go to the client site and fire our scripts there??? will all my entity objects stop working???I have a master and a child table that are linked by a foreign key (name is CITY_STATE_FK). this was working fine in the original schema. but in the new schema, when i try to insert a new city(child), it gives the error "failed to find or invalidate owning entity". In the default association that jdeveloper has made, if i uncheck the Composition check box in the properties of the association, insert is allowed. But why is it forcing me to remove Composition. In this case i have my user defined FK name that is same in the 2 schemas.
-
I noticed the View/Table Name length in 9i is still 30
characters. This poses a problem when migrating applications
from SQLServer to Oracle. Is there a more convenient workaround
in lieu of renaming object and re-writing the existing
application code referencing these objects? Are there any plans
to increase this length in a future release? If so, which
release?
Thanks.
-BrianYou first understand your conditions and put the detailed query, Don't put the whatever you have in your spec. It is very difficult to understand. Just give me your query then i can help you out
Warm Regards,
Vijay -
I have added a constraing for my emp table
ALTER TABLE emp
add CONSTRAINT MyKey PRIMARY KEY (empno);
How can i view what are constraints for a table
How to view constraints?Query ALL_CONSTRAINTS
HR%xe> desc all_constraints
Naam
OWNER
CONSTRAINT_NAME
CONSTRAINT_TYPE
TABLE_NAME
SEARCH_CONDITION
R_OWNER
R_CONSTRAINT_NAME
DELETE_RULE
STATUS
DEFERRABLE
DEFERRED
VALIDATED
GENERATED
BAD
RELY
LAST_CHANGE
INDEX_OWNER
INDEX_NAME
INVALID
VIEW_RELATED
SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME = 'MY_TABLE'; -
How to restrict the generated constraint name with Model Driven Development
Hello
I have a database that has tables INSTRUMENT and EXCHANGE. There has to be a foreign key field called primaryExchange inside INSTRUMENT table that points to the ID of EXCHANGE table. In my fml file, my tables are called Instrument and Exchange. When I create this relation between the two tables in the model and deploy it to LCDS, it tries to create a FK constraint by the name of "FK_Instrument_primaryExchange_TO_Exchage" which fails with ORA-00972 - Identifier is too long. Obviously the generated FK name is more than 30 chars and hence the oracle erorr. The only way to resolve this is to reduce the name of the table/field in the fml file while keeping the database table/field name intact. So the FK might be called FK_Instr_primExch_TO_Exch and which will work but the problem is that in the fml model file, I am loosing the meaningful names of the tables and thus the data services that are generated have truncated names. For this particular example, the truncated name might still be okay but in a large database, it is causing much grief. I would really prefer decent descriptive names for table like MarketOrder instead of MO. Pls advise how I can customize the generated constraint name while keeping the tables names still informative.
Now I edit my DB tables to have a field called ID which is unique to that table but while deploying I get hibernate and fiber exceptions :-
2011-03-10 16:30:44,042 INFO [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Exception trying to build hibernate's session factory: org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
2011-03-10 16:30:44,116 INFO [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Error instantiating application scoped instance of type 'fiber.data.assemblers.FiberAssembler' for destination 'UlltraWebServer.Holiday'.
org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
2011-03-10 16:30:44,229 INFO [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Exception trying to build hibernate's session factory: org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
The above suggests that it does not like the same name for the fields in multiple tables, they all have to be unique like Holiday.holidayID, Client.clientID etc which causes the above constraint length violation issue..
thanksYou should be able to achieve what you want with an explicit criteria filter on your entity.
In the Modeler Design view, select your entity and add a filter. You'll see that there is a an "Order By" field in the Properties view.
Enter the value you want there and then save and redeploy your model. When you don't enter anything in the "Criteria" field, you create a getAll fill.
Here's an example of an entity created with this type of filter; it is sorted by price in ascending order:
<entity name="Product" persistent="true">
<annotation name="ServerProperties" ServerType="LCDS"/>
<annotation name="DMS" Table="PRODUCT"/>
<annotation name="RDS" introspectedColumns="PRODUCTID,DESCRIPTION,PRICE,PRODUCTNAME"/>
<annotation name="VisualModeler" width="115" height="110" x="364" y="203"/>
<id name="productid" type="integer">
<annotation name="DMS" ColumnName="PRODUCTID"/>
</id>
<property name="description" type="string" length="255">
<annotation name="DMS" ColumnName="DESCRIPTION"/>
</property>
<property name="price" type="float">
<annotation name="DMS" ColumnName="PRICE"/>
</property>
<property name="productname" type="string" length="255">
<annotation name="DMS" ColumnName="PRODUCTNAME"/>
</property>
<filter name="MyFill" order="price ASC"/>
</entity>
Maybe you are looking for
-
When using iChat I am able to video chat with some users but not others. I am using a gmail account and I have been able to video chat with some gmail users but not others. Suggestions?
-
Zones on Virtual Local Netowrk?
Networking is not my strong suit so please forgive me if this is basic. I have one nic connected on Solaris 10 with a public IP address on the internet. I have another zone with a public IP address as well. What I would like to do is setup one or mor
-
Using non-breaking spaces in attributes
Hello all, I am writing reusable modules in Structured FrameMaker. Part of the reusability comes from using a variable instead of a hard-coded machine name, so that the machine name does not require variants of the same text. Using the standard Frame
-
Help Please. I am looking for an archived fp 7
I have been having real problems with Flash Player freezing on certain sites - my ISP homepage being one of them. I solved it by finding and installing Flash PLayer 7.0.69.0 stand alone for Netscape and its equivalent for IE. However, during a system
-
so I got some awesome people through Verizon's tech support. I have dealt with my cosmos 2 for over a week now with rebooting issues and i have gone through 3 in a week. after talking to tech support again today and being transferred to the LG manufa