help me with this simple query
Hi, I have reached the results by querying the table twice. so, how can I get the results by hitting the table only once.version 10g
with t as
(select 100 parent , 1 child , 'Y' flag from dual union all
select 100 parent , 2 child , 'N' flag from dual union all
select 100 parent , 3 child , 'N' flag from dual union all
select 100 parent , 4 child , 'N' flag from dual union all
select 100 parent , 5 child , 'Y' flag from dual union all
select 100 parent , 6 child , 'N' flag from dual union all
select 100 parent , 7 child , 'N' flag from dual union all
select 100 parent , 8 child , 'Y' flag from dual union all
select 100 parent , 9 child , 'N' flag from dual)
select * from t where parent in (
select parent from t
where child = 1)
and flag = 'N'
order by child;
Hello
Here's one way:
WITH got_good_cnt AS
(
SELECT t.*
, SUM (CASE WHEN child = 1 THEN 1 END)
OVER (PARTITION BY parent) AS good_cnt
FROM t
)
SELECT * -- or list all columns except good_cnt
FROM got_good_cnt
WHERE good_cnt >= 1
AND flag = 'N'
ORDER BY child
;
The best way may depend on your data, for example, the columns that are unique.
Each line in your sample data has the same value for parent. Is this the best game of test data?
Tags: Database
Similar Questions
-
Please help me with this SQL query
I'm practicing of SQL queries and met one involving the extraction of data from 3 different tables.
The three paintings are as below
< pre >
Country
Location_id country
LOC1 Spain
loc2 England
LOC3 Spain
loc4 USA
loc5 Italy
loc6 USA
loc7 USA
< / pre >
< pre >
User
user_id location_id
loc1 U1
loc1 U2
loc2 U3
loc2 U4
loc1 U5
U6 loc3
< / pre >
< pre >
Publish
user_id post_id
P1 u1
P2 u1
U2 P3
P4 u3
P5 u1
P6 u2
< / pre >
I am trying to write a SQL query - for each country of the users, showing the average number of positions
I understand the logic behind all this that we must first consolidate all locations, and then the users in one country and then find the way to their positions.
But, I'm having a difficulty to this format SQL. Could someone help me please with this request.
Thank you.Select
Country.Country,
Count (*) Totalpostspercountry,
Count (distinct post.user_id) Totaldistincuserspercountry,
count (*) / count (distinct post.user_id) Avgpostsperuserbycountry
Of
countries, have, post
where country.location_id = muser.location_id
and muser.user_id = post.user_id
Country.country groupThe output is like this for your sample data - hope that's what you're looking for :)
COUNTRY, TOTALPOSTSPERCOUNTRY, TOTALDISTINCUSERSPERCOUNTRY, AVGPOSTSPERUSERBYCOUNTRY
In England, 1, 1, 1.
Spain, 5, 2, 2.5. -
Wat is the problem with this simple query?
I use 10gxe.
This is the query that does not work
Whenever I'm him running a pop-up windows is coming
and asks me to enter the bind variables... Should wat I do?
Here's a question prntscrn.
http://potupaul.webs.com/at.html
G_message VARIABLE VARCHAR2 (30)
BEGIN
: g_message: = "Œuvres of My PL/SQL block;
END;
/
G_message IMPRESSION
Edited by: user4501184 may 18, 2010 12:42 AMuse sqlplus 't's work' ng
run
cmd
sqlplus / as sysdba
G_message VARIABLE VARCHAR2 (30)
BEGIN
: g_message: = "Œuvres of My PL/SQL block;
END;
/
G_message IMPRESSIONhope this helps
Daniele -
Not sure if I can do this with a simple query.
CREATE TABLE primary_table (SSN VARCHAR2 (15) VARCHAR2 (30) FIRST_NAME, LAST_NAME VARCHAR2 (30), VARCHAR2 (20)) of the STATE;
insert into primary_table VALUES ('111-11-1111, 'Elvis', 'Presley', 'ACTIVE');
insert into primary_table VALUES (222-22-2222', 'Gift', 'King', 'ACTIVE');
insert into primary_table VALUES ('33-333-3333, 'Lex', 'Harrison', 'ACTIVE');
CREATE TABLE secondary_table (SSN VARCHAR2 (15) NOT NULL, ARRIVAL DATE, NUMBER of LENGTH_OF_STAY);
insert into secondary_table VALUES ('11-111-1111 ", 1 January 2011", 10);
insert into secondary_table VALUES (' ' 222-22-2222 ", March 1, 2011", 10);
insert into secondary_table VALUES (' ' 222-22-2222 ", June 1, 2011", 20);
insert into secondary_table VALUES ('' 33-333-3333, January 1, 2011 ", 10);
========================================================================================
Hello
I created two very simple tables for this exercise. I don't know if I can do this with a simple query, or must use pl/sql.
I want to join primary_table secondary_table of SSNand list the fields of primary_table, but only if the join returns only a line.
In other words, I would like to create a list of data primary_table for primary_table lines that have only one line on the secondary table.
ConcerningRF25 wrote:
CREATE TABLE primary_table (SSN VARCHAR2 (15) VARCHAR2 (30) FIRST_NAME, LAST_NAME VARCHAR2 (30), VARCHAR2 (20)) of the STATE;insert into primary_table VALUES ('111-11-1111, 'Elvis', 'Presley', 'ACTIVE');
insert into primary_table VALUES (222-22-2222', 'Gift', 'King', 'ACTIVE');
insert into primary_table VALUES ('33-333-3333, 'Lex', 'Harrison', 'ACTIVE');CREATE TABLE secondary_table (SSN VARCHAR2 (15) NOT NULL, ARRIVAL DATE, NUMBER of LENGTH_OF_STAY);
insert into secondary_table VALUES ('11-111-1111 ", 1 January 2011", 10);
insert into secondary_table VALUES (' ' 222-22-2222 ", March 1, 2011", 10);
insert into secondary_table VALUES (' ' 222-22-2222 ", June 1, 2011", 20);
insert into secondary_table VALUES ('' 33-333-3333, January 1, 2011 ", 10);========================================================================================
Hello
I created two very simple tables for this exercise. I don't know if I can do this with a simple query, or must use pl/sql.
I want to join primary_table to secondary_table of NSSand the list of fields in the primary_table, but only if the join returns only a line.
In other words, I would like to create a list of data primary_table for primary_table lines that have only one line on the secondary table.
Concerning
Something like...
select p.
from primary_table p where p.ssn in (select s.ssn from secondary_table s group by s.ssn having count(*) = 1) -
The address bar where I can type in the Web addresses does not appear on my Mozilla, please help me with this... How to activate it?
Hi kdwis,
Going to try view > toolbars and activation of the Bar of Navigation and in the bookmarks toolbar.
Hope this helps!
-
Asslam o aliakum. I have a problem with itunes 12.3.2 it is not downloaded the 10 windows and when I connect m iphone with itunes and want to update to 9.2 says please download itunes new version for ios 9.2... help me with this... How to solve this problem.
Greetings Dani56777,
Thank you for using communities Support from Apple!
I understand that you run Windows 10 and you must update iTunes to the latest version so that your iPhone will be recognized when connected. I do not know if you receive an error when you try to update iTunes or not.
If you need information on how to update iTunes, please follow the instructions in the following link.
Download the latest version of iTunes for Windows - Apple Support
If you receive an error or alert, you can consider removing iTunes and all of its associated components and then reinstalling fresh iTunes on your computer. That would give you the latest version of iTunes. If you need execute this process, please follow the steps described in the following article.
Remove iTunes Control Panel and its associated components
Use the control panel to uninstall iTunes and software components in the following order:
- iTunes
- Apple Software Update
- Apple Mobile Device Support
- Hello
- Apple Application Support 32-bit
- Apple Application Support 64-bit
On some systems, iTunes can install two versions of the Apple Application Support. What is expected. If both are present, do not forget to uninstall both versions.
Do these elements in a different order, uninstall or uninstall only some of them. This could have unintended effects. After you uninstall a component, you may be asked to restart your computer. Wait to restart your computer until you finish remove all components.
Remove and reinstall iTunes and software for Windows 7 and later versions - Apple Support components
Have a great day!
-
Ideas:
- When you install the 2007 Microsoft Office Suite Service Pack 2 (SP2), I still received the error code 646... I tried to download the RegCure as advised, but the problem still exists... Please help me with this problem... Thank you
I tried to download the RegCure as advised, but the problem still exists...
Who advised you to 'download... '. RegCure? Doing so could only worse issues! If you ever think that your registry database must be cleaned, repaired, boosted or optimized (it isn't), read http://aumha.net/viewtopic.php?t=28099 and draw your own conclusions.
See http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/6e716883-7af4-4a9f-8665-2f4dd57eee8d ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft
-
help me with this error code 80070005 Code...
help me with this error code 80070005 Code...
my windows is not updated for a few days...
Please help me...You don't have to know which operating system you use, this discussion is for Windows XP, etc. of Vista and Windows 7.
Error message when you use Microsoft Update or Windows Update Web sites to install updates on Windows 2000, Windows XP and Windows Server 2003: 0 x 80070005
http://support.Microsoft.com/kb/968003/If you are using Vista, then the denied access is handled differently-
Error code 0 x 80070005 is also described as ACCESS DENIED (you may not to install updates.
Please check that you are logged into an account with administrative privileges.
Please follow these instructions if you encounter this error code during checking or install updates via Windows Udpate. What follows applies only to Windows Vista.
2. save the zip on your desktop and extract the file:
-Right-click on the file and select extract all...
-Click Next when prompted for the Destination.Therefore, you should see a folder called AccessChk on your desktop.
3. open the folder AccessChk
4 press and hold the shift key and right-click in the window. Select "open here command prompt.
5. a command prompt window should open a similar message:
C:\Users\\Desktop\accesschk > 6. type the following command and press ENTER:
"" AccessChk.exe "nt service TrustedInstaller" s - n k ' hklm\software\Microsoft\Windows\CurrentVersion\Component Based Servicing "> accesskchk.txt
Tip: You should be able to copy and paste the command into the command prompt.7. close the command prompt window. Open the Accesschk folder on your desktop (if it has been closed).
8. double-click on Accesschk.txt (text file), it should open Notepad.
If this is insufficient,
1 if please download the subinacl.msi from the following link and save the patch to installation on the desktop:
http://www.Microsoft.com/downloads/details.aspx?FamilyId=e8ba3e56-d8fe-4A91-93Cf-ed6985e3927b&displaylang=en#AffinityDownloads
SubInACL (SubInACL.exe)
2. go to your desktop and double-click on the downloaded file.
3. Please select the C:\Windows\System32 folder as the Destination folder during installation. Later, we will use this tool to reset the permissions on the current computer settings.
4. click on the button 'Start' in the 'Search' bar type: "Notepad" (without the quotes) and press ENTER.
5. copy the following commands, and then paste them into the opened Notepad window:
off @echo
Subinacl /subkeyreg HKEY_LOCAL_MACHINE/Grant = administrators = f
Subinacl /subkeyreg HKEY_CURRENT_USER/Grant = administrators = f
Subinacl /subkeyreg HKEY_CLASSES_ROOT/Grant = administrators = f
Subinacl % lecteur_systeme % /subdirectories / Grant = administrators = f
Subinacl /subkeyreg HKEY_LOCAL_MACHINE/Grant = system = f
Subinacl /subkeyreg HKEY_CURRENT_USER/Grant = system = f
Subinacl /subkeyreg HKEY_CLASSES_ROOT/Grant = system = f
Subinacl % lecteur_systeme % /subdirectories / Grant = system = f
@Echo =========================
Completed @Echo.
@Echo =========================
@pause
6. After you paste the above commands, please close the Notepad window. Choose "Save" when you are prompted to save the file. Type "reset.bat" as the file name and choose "Desktop" in the Panel on the left as the save location.7. refer to the desktop and right click the reset.bat file, then choose "Run as Administrator".
8. you will see a window of type BACK treatment.
NOTE: It may take several minutes, please be patient. When it is finished, you will be prompted with the message: "finished, press any key to continue."Note: On some driver update installation procedure, we also received this error code, please redirect this kind of case to the Team System Vista, because it can be considered for structure of third-party programs.
Look for updates after that.
Hope this information is useful.
This problem may be caused by third-party security programs such as firewalls and antivirus software. You can disable or remove to check the issue.
From: Microsoft Answers Support Engineer
TaurArian [MVP] 2005-2010 - Update Services
-
Account Hotmail has been hacked. Can someone help me with this, please?
I tried logging into my facebook today and he told me that someone had changed my password at 04:18 .hich is certainly not me.
then when I tried to have facebook send me an email to reset my password... my hotmail was hacked too.
So I had to create a new email and block my facebook account. I would really like to make my od emil back however. is there someone who can help me with this? I can verify who I am and everything. Please contact me at my new email. its * address email is removed from the privacy *.Thank you!
-Ashley Groff
Hello
You should also check with Facebook help and Support and their Forums.
Facebook - help and Support
http://www.Facebook.com/help.phpFacebook - Facebook Contact and support of Facebook
http://www.Facebook.com/help/?page=835Facebook - Forums
http://getsatisfaction.com/Facebook---------------------------------------------------------------------------------------------------------------
Answers is a peer group supported and unfortunately has no real influence on Hotmail.
HotMail has its own Forums, so you can ask your questions there.
Windows Live Solution Center - HotMail - HotMail Forums Solutions
http://windowslivehelp.com/Hotmail - Forums
http://windowslivehelp.com/forums.aspx?ProductID=1Hotmail - Solutions
http://windowslivehelp.com/solutions.aspx?ProductID=1How to contact Windows Live Hotmail Support
http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htmWindows Live Hotmail Top issues and Support information
http://support.Microsoft.com/kb/316659/en-usError message "your account has been locked" when trying to connect
http://windowslivehelp.com/thread.aspx?ThreadId=77be7d82-a0e9-49c7-b46d-040ec654a9e2Compromised account - access unauthorized account - how to recover your account
http://windowslivehelp.com/solution.aspx?SolutionID=6ea0c7b3-1473-4176-b03f-145b951dcb41Hotmail hacked? Take these steps
http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspxI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">->
-
original title: windows dates
on my computer windows vista home basic, is Drive - D were all my windows updates are stored. I do not stor photos or other long-term files on my computer.
I ' am up to 22 gigabytes of 69.5 gigabits on drive D. Can someone help me with this problem so I don't run out of space.
Also all update my windows go back as far as the year 2008. Note-windows update are the only element which appear on the D drive and also when I backup windows is were I notice less space on this drive. Is there something I can do so I don't run out of space on this drive?
could someone help me with this problem.I have found, do not delete the old windows updates.
they could corrupt your entire system. -
WindowsUpdate_80246007 - cannot install Service Pack 2 for Vista. Can someone help me with this error message? What di I do to solve it?
WindowsUpdate_80246007 - cannot install Service Pack 2 for Vista. Can someone help me with this error message? What di I do to solve it?
2 forums: you can go:
1 Windows Vista IT Pro forum, section of Windows Vista service packs:
Section of Windows Vista service packs:2. Windows Update section:
http://social.answers.Microsoft.com/forums/en-us/vistawu/threadsFor the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.
-
Hello everyone: need someone to help me with something simple.
HP technical support has not been much help to solve this problem. Could someone help me with this problem please.
OK here is the scenerio. I just bought an Officejet Pro 8600 Premiunm AIO Printer. I am replacing an Officejet 8500 Pro with this new which is just one generation located under the new.
The problem is that no caller ID appears on the display screen. I saw him once, but that's all. Technical support told me that he is not supposed to appear. But I have to disagree. Whenever I receive an incoming call, the display shows "incoming call of" but no caller ID information. The old 8500 displays information and I also saw him 1 time on the 8600. But technical support still said no. I got in touch with them 3 times on this issue and I have still a few words right person English, which is frustrating to try to commuicate with them.
Please someone with the Officejet Pro 8600 printer, could check you how the caller ID works on your printer. So I need to know if mine is not working properly I can get it exchanged. But if she does not appear on yours, then I know that this is not supposed to appear. I just bought this printer 2 weeks ago. All my phones in the House appears the identifying information from the appellant, but just not on the printer, so I know that's not on the end of the phone company. ANY help will be greatly appreciated by everyone. Thank you!!!
Yes, the caller ID should be appear. I can't think many that might interfere with it. You can try to update the firmware, just follow the link and it will take you to the instructions, but I don't know if this is a problem in the firmware or not. What phone company you use? Do you have digital services through this company, such as DSL or VOIP?
-
I have a Dell Inspiron Mini Windows 7 starter from a pawn shop and it has the previous owner on this subject and I can not log on because I need there password. Can someone help me with this?
The only safe option is to perform a factory restore. If you do not, then you are likely to be confronted with a machine that is seriously infected or was hacked. Have a look here for instructions:
http://support.Dell.com/support/topics/global.aspx/support/KCS/document?c=us&l=en&s=Gen&docid=DSN_336966&isLegacy=true -
I am trying to download adobe 10 but my computer says that it is blocked and dangerous to download. Can someone help me with this problem
Temporarily disable your Antivirus utility and try again.
-
Hello friends of the forum!
I am a JSF tutorial, and when generating a coming sell order page, I get the following error in Tomcat:
There are 28, 2015 start 13:48:19 org.apache.tomcat.util.digester.SetPropertiesRule
WARNING: [SetPropertiesRule] {Server/Service/engine/host/context} set the property 'source' 'org.eclipse.jst.jee.server:PrimeFacesVenta6' option did not find a corresponding property.
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Server Version: Apache Tomcat/8.0.24
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Server built: July 1, 2015 20:19:55 UTC
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Number of server: 8.0.24.0
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Name of operating system: Windows Server 2008 R2
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: OS Version: 6.1
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Architecture: x 86
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: Home of Java: C:\Java-JRE-32
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: JVM Version: 1.7.0_72 - b14
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: JVM vendor: Oracle Corporation
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: CATALINA_BASE: E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: CATALINA_HOME: C:\Tomcat
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: command line argument:-Dcatalina.base=E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: command line argument:-Dcatalina.home = C:\Tomcat
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: command line argument:-Dwtp.deploy=E:\Proyectos\OpenXava\openxava-5.3\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: :-Djava.endorsed.dirs=C:\Tomcat\endorsed command line argument
There are 28, 2015 connect 13:48:19 org.apache.catalina.startup.VersionLoggerListener
INFO: command line argument:-Dfile.encoding = Cp1252
There are 28, 2015 13:48:19 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
NEWS: APR based Apache Tomcat Native library that allows optimal performance in production environments was not found on the java.library.path: C:\Java-JRE-32\bin. C:\Windows\Sun\Java\bin; C:\Windows\System32; C:\Windows; C:/Java-JRE-32/bin/client; C:/Java / JRE / 32/location; C:/Java-JRE-32/lib/i386; C:\Program Files (x 86) \Common Files\Crystal Decisions\2.0\bin\NOTES\; C:\Program Files (x 86) \Common Files\Crystal Decisions\2.0\bin\NOTES\DATA\; C:\Program Files\ibm\gsk8\lib64; C:\Program Files\ibm\gsk8\bin; C:\Informix-SDK-410\bin; C:\Windows\System32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0\; C:\informix\bin; C:\jrex64\bin; C:\jdkx64\bin; C:\Program Files (x86)\MySQL\Connector.J 5.1\;) C:\Program Files (x 86) \ibm\gsk7\bin; C:\Program Files (x 86) \ibm\gsk7\lib; C:\Gradle\bin; C:\JDBC-Informix\lib; C:\Users\gechenique\Downloads\xBaseJ\bin; C:\Program Files (x 86) \Common Files\Bosch\VideoSDK; C:\Eclipse-Luna;.
There are 28, 2015 init org.apache.coyote.AbstractProtocol 13:48:19
INFO: Initializing ProtocolHandler ['http-nio-8080"]
There are 28, 2015 13:48:19 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a switch shared for read/write to servlet
There are 28, 2015 init org.apache.coyote.AbstractProtocol 13:48:19
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
There are 28, 2015 13:48:19 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a switch shared for read/write to servlet
There are 28, 2015 13:48:19 org.apache.catalina.startup.Catalina load
INFO: Initializing processed in ms 780
There are 28, 2015 13:48:19 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
There are 28, 2015 13:48:19 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting the Servlet engine: Apache Tomcat/8.0.24
There are 28, 2015 13:48:20 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creating instance of SecureRandom for the generation of using [SHA1PRNG] session ID a [121] milliseconds.
There are 28, 2015 13:48:22 org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one POT has been analyzed for TLDS still did not contain any TLDs. activate record debugging for this logger for a list complete pots that were analysed but found no TLD in their. Skip the useless jars when scanning can improve boot time and JSP compilation time.
There are 28, 2015 13:48:22 org.omnifaces.ApplicationInitializer logOmniFacesVersion
INFO: Using version 2.1 OmniFaces
There are 28, 2015 13:48:22 com.sun.faces.config.ConfigureListener contextInitialized
INFO: initializing Mojarra 2.2.9 (-SHOT 20141218-0939 https://svn.java.net/svn/mojarra~svn/tags/2.2.9@14083) to the context ' / PrimeFacesVenta6'
There are 28, 2015 createInstance com.sun.faces.spi.InjectionProviderFactory 13:48:23
INFO: JSF1048: PreDestroy/PostConstruct annotation present. Servlet methods marked with these annotations have tell processed annotations.
There are 28, 2015 13:48:23 com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
java.lang.ExceptionInInitializerError
to org.omnifaces.application.OmniApplication. < init > (OmniApplication.java:69)
at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)
at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at com.sun.faces.application.InjectionApplicationFactory.getApplication (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
to com.sun.faces.lifecycle.ClientWindowFactoryImpl. < init >(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (unknown Source)
the impossible (unknown Source)
to java.lang.Class.newInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl (unknown Source)
at javax.faces.FactoryFinderInstance.getImplementationInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getFactory (unknown Source)
at javax.faces.FactoryFinder.getFactory (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.process (unknown Source)
at com.sun.faces.config.ConfigManager.initialize (unknown Source)
at com.sun.faces.config.ConfigureListener.contextInitialized (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
Caused by: java.lang.IllegalStateException: CDI API is not available in this environment.
to org.omnifaces.config.BeanManager. < init > (BeanManager.java:88)
to org.omnifaces.config.BeanManager. < clinit > (BeanManager.java:49)
... 28 more
Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)
at java.lang.Class.forName0 (Native Method)
at java.lang.Class.forName (unknown Source)
to org.omnifaces.config.BeanManager. < init > (BeanManager.java:82)
... more than 29
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Context Exception initialization instance of listener class com.sun.faces.config.ConfigureListener event sending
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
at com.sun.faces.config.ConfigureListener.contextInitialized (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
Caused by: java.lang.ExceptionInInitializerError
to org.omnifaces.application.OmniApplication. < init > (OmniApplication.java:69)
at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)
at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at com.sun.faces.application.InjectionApplicationFactory.getApplication (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
to com.sun.faces.lifecycle.ClientWindowFactoryImpl. < init >(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (unknown Source)
the impossible (unknown Source)
to java.lang.Class.newInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl (unknown Source)
at javax.faces.FactoryFinderInstance.getImplementationInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getFactory (unknown Source)
at javax.faces.FactoryFinder.getFactory (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.process (unknown Source)
at com.sun.faces.config.ConfigManager.initialize (unknown Source)
... more than 10
Caused by: java.lang.IllegalStateException: CDI API is not available in this environment.
to org.omnifaces.config.BeanManager. < init > (BeanManager.java:88)
to org.omnifaces.config.BeanManager. < clinit > (BeanManager.java:49)
... 28 more
Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.spi.BeanManager
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1164)
at java.lang.Class.forName0 (Native Method)
at java.lang.Class.forName (unknown Source)
to org.omnifaces.config.BeanManager. < init > (BeanManager.java:82)
... more than 29
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Context Exception initialization instance of listener class org.omnifaces.ApplicationListener event sending
java.lang.NoClassDefFoundError: has not been initialized class org.omnifaces.config.BeanManager
at org.omnifaces.ApplicationListener.checkCDIAvailable(ApplicationListener.java:63)
at org.omnifaces.ApplicationListener.contextInitialized(ApplicationListener.java:55)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
There are 28, 2015 13:48:23 com.sun.faces.config.ConfigureListener contextInitialized
INFO: initializing Mojarra 2.2.9 (-SHOT 20141218-0939 https://svn.java.net/svn/mojarra~svn/tags/2.2.9@14083) to the context ' / PrimeFacesVenta6'
There are 28, 2015 createInstance com.sun.faces.spi.InjectionProviderFactory 13:48:23
INFO: JSF1048: PreDestroy/PostConstruct annotation present. Servlet methods marked with these annotations have tell processed annotations.
There are 28, 2015 13:48:23 com.sun.faces.config.ConfigureListener contextInitialized
SEVERE: Critical error during deployment:
java.lang.NoClassDefFoundError: has not been initialized class org.omnifaces.config.BeanManager
to org.omnifaces.application.OmniApplication. < init > (OmniApplication.java:69)
at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)
at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at com.sun.faces.application.InjectionApplicationFactory.getApplication (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
to com.sun.faces.lifecycle.ClientWindowFactoryImpl. < init >(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (unknown Source)
the impossible (unknown Source)
to java.lang.Class.newInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl (unknown Source)
at javax.faces.FactoryFinderInstance.getImplementationInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getFactory (unknown Source)
at javax.faces.FactoryFinder.getFactory (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.process (unknown Source)
at com.sun.faces.config.ConfigManager.initialize (unknown Source)
at com.sun.faces.config.ConfigureListener.contextInitialized (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext listenerStart
GRAVE: Context Exception initialization instance of listener class com.sun.faces.config.ConfigureListener event sending
java.lang.RuntimeException: java.lang.NoClassDefFoundError: has not been initialized class org.omnifaces.config.BeanManager
at com.sun.faces.config.ConfigureListener.contextInitialized (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
Caused by: java.lang.NoClassDefFoundError: has not been initialized class org.omnifaces.config.BeanManager
to org.omnifaces.application.OmniApplication. < init > (OmniApplication.java:69)
at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)
at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at com.sun.faces.application.InjectionApplicationFactory.getApplication (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
to com.sun.faces.lifecycle.ClientWindowFactoryImpl. < init >(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (unknown Source)
the impossible (unknown Source)
to java.lang.Class.newInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl (unknown Source)
at javax.faces.FactoryFinderInstance.getImplementationInstance (unknown Source)
at javax.faces.FactoryFinderInstance.getFactory (unknown Source)
at javax.faces.FactoryFinder.getFactory (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist (unknown Source)
at com.sun.faces.config.processor.FactoryConfigProcessor.process (unknown Source)
at com.sun.faces.config.ConfigManager.initialize (unknown Source)
... more than 10
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more listeners could start. You will find all the details in the appropriate container log file
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ PrimeFacesVenta6] startup failed due to previous errors
There are 28, 2015 13:48:23 org.apache.catalina.core.StandardContext listenerStop
GRAVE: Sending Exception context destroyed instance of listener class com.sun.faces.config.ConfigureListener event
java.lang.NoClassDefFoundError: has not been initialized class org.omnifaces.config.BeanManager
to org.omnifaces.application.OmniApplication. < init > (OmniApplication.java:69)
at org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:89)
at org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at com.sun.faces.application.InjectionApplicationFactory.getApplication (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
at com.sun.faces.config.ConfigureListener.contextDestroyed (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
There are 28, 2015 getFactory javax.faces.FactoryFinderInstance 13:48:23
SEVERUS: Application has not been properly initialized at startup, could not find factory: javax.faces.application.ApplicationFactory. Try to find relief.
There are 28, 2015 13:48:23 com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected Exception When you try to tear down the length of the Mojarra
java.lang.IllegalStateException: could not find relief for javax.faces.application.ApplicationFactory of the factory.
at javax.faces.FactoryFinderInstance.getFactory (unknown Source)
at javax.faces.FactoryFinder.getFactory (unknown Source)
at com.sun.faces.config.InitFacesContext.getApplication (unknown Source)
at com.sun.faces.config.ConfigureListener.contextDestroyed (unknown Source)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4776)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1408)
to org.apache.catalina.core.ContainerBase$ StartChild.call (ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
There are 28, 2015 start 13:48:23 org.apache.coyote.AbstractProtocol
INFO: From ProtocolHandler ['http-nio-8080"]
There are 28, 2015 start 13:48:23 org.apache.coyote.AbstractProtocol
INFO: From ProtocolHandler ["ajp-nio-8009"]
There are 28, 2015 start 13:48:23 org.apache.catalina.startup.Catalina
INFO: 4262 SP server startup
These errors were installed after Omnifaces to send an object to a bean.
The page code that generates the error is:
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN".
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.DTD "> "
" < html xmlns =" http://www.w3.org/1999/xhtml "
' xmlns:ui = ' http://xmlns.JCP.org/JSF/Facelets "" "
' xmlns:f = ' http://xmlns.JCP.org/JSF/core "" "
' xmlns:h = ' http://xmlns.JCP.org/JSF/HTML "" "
' xmlns:p = ' http://PrimeFaces.org/UI ">
< h:head >
by default, < title > < ui:insert name = "title" > title < / ui:insert > < / title >
< / h:head >
< h:body >
"< ui:composition template="./WEB-INF/templates/plantilla.xhtml ">
< ui: set name = "content" >
< f: event type = listener = "#{personaBean.listar ('F')"preRenderView"}" / > "
< f: event type = listener = "#{productoBean.listar ('F')"preRenderView"}" / > "
< h:form >
< p:outputLabel value = "Persona" >
< / p:outputLabel >
< p:selectOneMenu value = "#{ventaBean.venta.persona}" converter = "omnifaces. SelectItemsConverter">
< f: selectItem noSelectionOption = 'true' itemLabel = "select' Valeurelement = ' #{null}" / >
"< f: selectItems value =" #{personaBean.lstPersonas} "var = 'by' itemLabel =" #{per.nombre} "Valeurelement =" #{by} "/ >
< / p:selectOneMenu >
< p:outputLabel value = "Producto" >
< / p:outputLabel >
< p:selectOneMenu value = "#{ventaBean.producto}" converter = "omnifaces. SelectItemsConverter">
< f: selectItem noSelectionOption = 'true' itemLabel = "select' Valeurelement = ' #{null}" / >
"< f: selectItems value =" #{productoBean.lstProductos} "var = itemLabel =" #{pro.nombre 'pro'} ' Valeurelement = ' #{pro} "/ >
< / p:selectOneMenu >
< p:outputLabel value = "Price" >
< / p:outputLabel >
< p:inputText value = "#{ventaBean.cantidad}" / > "
< p:commandButton value = "Add" actionListener = "#{ventaBean.agregar ()}" updated = "detail" / > ""
< p:dataTable id = value = "#{ventaBean.lista"detail"} ' var 'det' = >"
< p:column headerText = "Product number" >
#{det.producto.nombre}
< / p:column >
< p:column headerText = "Price" >
#{det.producto.precio}
< / p:column >
< p:column headerText = "Amount" >
#{det.cantidad}
< / p:column >
< / p:dataTable >
< p:commandButton value = "Clerk Venta" / >
< / h:form >
< / ui: define >
< / ui:composition >
< / h:body >
< / html >
El Código del bean es el siguiente:
package com.mitocode.bean;
import java.util.ArrayList;
import java.util.List;
Import javax.faces.bean.ManagedBean;
Import javax.faces.view.ViewScoped;
import com.mitocode.model.DetalleVenta;
import com.mitocode.model.Producto;
import com.mitocode.model.Venta;
@ManagedBean
@ViewScoped
public class VentaBean {}
venta of Venta private = new Venta();
private product product = new Producto();
private int amount;
private list < DetalleVenta > lista = new ArrayList < DetalleVenta > ();
public list < DetalleVenta > getLista() {}
return the list;
}
{} public void setLista (list list < DetalleVenta >)
This.Lista = list;
}
public int getCantidad() {}
to return the amount;
}
{} public void setCantidad (int amount)
This.Cantidad = amount;
}
public getProducto() {} Producto
return of product;
}
{} public void setProducto (product product)
This.producto = product;
}
public getVenta() {} Venta
return her venta;
}
{} public void setVenta (Venta venta)
This.Venta = venta;
}
public void agregar() {}
Det DetalleVenta = new DetalleVenta();
det.setCantidad (amount);
det.setProducto (product);
This.Lista.Add (Det);
}
}
I googled as could be, but is no solution to my problem.
Maven already added to the CDI module, as recommended by StackOverflow, which makes the page is rendered, but when any button is active, is displayed a 404 error page.
Maven is also added to the module "welder".
What strikes me is that in the tutorial of the CDI and modules 'welder' are not added.
My work environment is the following:
Eclipse of March (4.5)
Mojarra 2.2.9
5.2 PrimeFaces
OmniFaces 2.1
Tomcat 8
I hope you can help me with this.
Thank you much in advance.
Message editado por: gechenique
Hello
As the error seems to occur in OmniFaces I recommend the rattling.
Thank you!
Maybe you are looking for
-
A HP Officejet H470wl will work with the MacBook Air
A HP Officejet H470wl will work with the MacBook Air? The driver is still supported? I'll buy an Air.
-
Satellite M30 does not show the connection of the battery after 5 min of use
Hello My Satellite M30 recognize the battery when placed first in and for 5-10 minutes.After that the power meter shows I'm on sector without battery. Any advice? Anyone know if it is an issue that could be fixed with a new battery, or if it might ha
-
camera W700 is very laggy in windows 8.1
My acer w700p delivered in 2013 with window 8.0 iconia tablet, the camera has functioned... the image on the screen was clear, that the windows camera app has been very sensitive. If you have moved the Tablet/camera, the screen updated instantly, li
-
I HAVE DEFRAGED AND COMPACT OUTLOOK EXPRESS FILES ACCORDING TO THE RECOMMENDED SITE MS. HELP I ALWAYS GET THIS ERROR MESSAGE WHEN I TRY TO DOWNLOAD MY MAIL. HE RECEIVES ON MY BLACKBERRY BUT NOT ON PC. CAN SOMEONE HELP ME?
-
Nothing happens when I insert a San disk in the drive
Original title: JONANDERSON_703When I insert the San disk in the drive, nothing happens.