Search Results

Search found 1192 results on 48 pages for 'listener'.

Page 8/48 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Problem manipulating text using grep

    - by moata_u
    I want to search for a line that contains log4j and take 7 lines before and 3 lines after the match. grep -B7 -A3 "log4j" web.xml After that I want to add comment tags before this paragraph and after it. <!-- paragraph that i found by grep --> I wrote this script bellow: search=`find . -name 'web.xml'` text=`grep -B7 -A3 "log4j" $search` sed -i "/$text/c $newparagraph" $search It's not working. Is there any way to just add comment symbol not replace the paragraph? What I want to the script to do: search for the paragraph append append -- at the end Edit: This is the paragraph that am trying manipulate : <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <listener> <listenerclass> org.springframework.web.util.Log4jConfigListener </listener-class> </listener> This paragraph is part of many paragraphs! I want make it like this: <!-- <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <listener> <listenerclass> org.springframework.web.util.Log4jConfigListener </listener-class> </listener> -->

    Read the article

  • glassfish v3.0 hangs no app is ever deployed and no error is ever shown

    - by Samuel Lopez
    I have a web app that uses JSF 2.0 with richFaces and primeFaces, hibernate and java and I use NetBeans 7.1.2 as the IDE when I run the app the glassfish server is started and the log shows this: Launching GlassFish on Felix platform Información: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23) Información: Grizzly Framework 1.9.46 started in: 20ms - bound to [0.0.0.0:4848] Información: Grizzly Framework 1.9.46 started in: 32ms - bound to [0.0.0.0:8181] Información: Grizzly Framework 1.9.46 started in: 59ms - bound to [0.0.0.0:8080] Información: Grizzly Framework 1.9.46 started in: 32ms - bound to [0.0.0.0:3700] Información: Grizzly Framework 1.9.46 started in: 21ms - bound to [0.0.0.0:7676] Información: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry Información: SEC1002: Security Manager is OFF. Información: SEC1010: Entering Security Startup Service Información: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. Información: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. Información: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. Información: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. Información: SEC1011: Security Service(s) Started Successfully Información: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] Información: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] Información: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848] Información: WEB0171: Created virtual server [server] Información: WEB0171: Created virtual server [__asadmin] Información: WEB0172: Virtual server [server] loaded default web module [] Información: Inicializando Mojarra 2.1.6 (SNAPSHOT 20111206) para el contexto '/test' Información: Hibernate Validator 4.2.0.Final Información: WEB0671: Loading application [test] at [/test] Información: CORE10010: Loading application test done in 4,885 ms Información: GlassFish Server Open Source Edition 3.1.2 (23) startup time : Felix (1,848ms), startup services(5,600ms), total(7,448ms) Información: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://SJ007:8686/jndi/rmi://SJ007:8686/jmxrmi Información: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] Información: Grizzly Framework 1.9.46 started in: 14ms - bound to [0.0.0.0:8080] Información: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] Información: Grizzly Framework 1.9.46 started in: 12ms - bound to [0.0.0.0:8181] but right there it hangs and the deploy bar keeps running but no more actions are shown, nothing else is logged either it just stays there until I stop the deploy Is there any other error log to debug glassfish server? Any thoughts? I have re installed glassfish and NetBeans but it all seems the same. I think this started happening after I had to force-restart my computer with NetBeans stil open and the app deployed, but it's hard to know for sure if this was the real catalyst. Any thoughts or help is appreciated thanks. Is it an app error? if so why no errors in the log are shown?

    Read the article

  • log4j:WARN No appenders could be found for logger in web.xml

    - by cometta
    I already put the log4jConfigLocation in web.xml, but still, i get warning log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. what did i missed out? <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml </param-value> </context-param> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>suara2</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>suara2</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>

    Read the article

  • tried to update hudson via dashboard and now it doesn;t work (windows)

    - by Tim
    I get the following now in the output log. I really wish I hadn't attempted to update teh version. What a hassle. Can anyone diagnose the issue here? Running from: C:\hudson\hudson.war [Winstone 2010/06/14 23:33:54] - Beginning extraction from war file hudson home directory: C:\hudson [Winstone 2010/06/14 23:33:56] - Error during HTTP listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:33:56] - HTTP Listener shutdown successfully [Winstone 2010/06/14 23:33:56] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/06/14 23:33:56] - Error during AJP13 listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:33:56] - AJP13 Listener shutdown successfully Running from: C:\hudson\hudson.war [Winstone 2010/06/14 23:38:49] - Beginning extraction from war file hudson home directory: C:\hudson [Winstone 2010/06/14 23:38:51] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled [Winstone 2010/06/14 23:38:51] - Error during AJP13 listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.ajp13.Ajp13Listener.run(Ajp13Listener.java:99) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:38:51] - AJP13 Listener shutdown successfully [Winstone 2010/06/14 23:38:51] - Error during HTTP listener init or shutdown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at winstone.HttpListener.getServerSocket(HttpListener.java:102) at winstone.HttpListener.run(HttpListener.java:116) at java.lang.Thread.run(Unknown Source) [Winstone 2010/06/14 23:38:51] - HTTP Listener shutdown successfully

    Read the article

  • C# Accepting sockets in async fasion - best practices

    - by psulek
    What is the best way to accept new sockets in async way. First way: while (!abort && listener.Server.IsBound) { acceptedSocketEvent.Reset(); listener.BeginAcceptSocket(AcceptConnection, null); bool signaled = false; do { signaled = acceptedSocketEvent.WaitOne(1000, false); } while (!signaled && !abort && listener.Server.IsBound); } where AcceptConnection should be: private void AcceptConnection(IAsyncResult ar) { // Signal the main thread to continue. acceptedSocketEvent.Set(); Socket socket = listener.EndAcceptSocket(ar); // continue to receive data and so on... .... } or Second way: listener.BeginAcceptSocket(AcceptConnection, null); while (!abort && listener.Server.IsBound) { Thread.Sleep(500); } and AcceptConnection will be: private void AcceptConnection(IAsyncResult ar) { Socket socket = listener.EndAcceptSocket(ar); // begin accepting next socket listener.BeginAcceptSocket(AcceptConnection, null); // continue to receive data and so on... .... } What is your prefered way and why?

    Read the article

  • How to force my method to accept objects from external software?

    - by Roman
    I have a method which needs to take a callback object as an argument and then (at the moment when it's needed) my method will call a specific method of the callback object. I wrote a class called Manager which has a method called addListener. As the argument for this method I need to use a callback object which is defined by the external software. So, I define the addListener in the following way: public void addListener(Listener listener). Of course Eclipse complains because it does not know what Listener is (because the Listener is defined by the external software). The only think that I know (should know) about the Listener is that it has a method called doSomething. So, to pleasure Eclipse I add an interface before my Manager class: interface Listener { void doSomething(); } public class CTManager { ... The problem seems to be solved but then I try to test my software. So, I create a class called test. In this class I create an instance of the Manager class and try to use addListener method of this instance. I also create a class Listener, instantiate it and give the instance to the addListener. And it's the place where the problem appears. Eclipse writes that addListener is not applicable to the given argument. I think it's because it expect something from my Listenr interface but gets something from the Listener class. How can I solve this problem?

    Read the article

  • I have Oracle SQL Developer Installed, Now What?

    - by thatjeffsmith
    If you’re here because you downloaded a copy of Oracle SQL Developer and now you need help connecting to a database, then you’re in the right place. I’ll show you what you need to get up and going so you can finish your homework, teach yourself Oracle database, or get ready for that job interview. You’ll need about 30 minutes to set everything up…and about 5 years to become proficient with Oracle Oracle Database come with SQL Developer but SQL Developer doesn’t include a database If you install Oracle database, it includes a copy of SQL Developer. If you’re running that copy of SQL Developer, please take a second to upgrade now, as it is WAY out of date. But I’m here to talk to the folks that have downloaded SQL Developer and want to know what to do next. You’ve got it running. You see this ‘Connection’ dialog, and… Where am I connecting to, and who as? You NEED a database Installing SQL Developer does not give you a database. So you’re going to need to install Oracle and create a database, or connect to a database that is already up and running somewhere. Basically you need to know the following: where is this database, what’s it called, and what port is the listener running on? The Default Connection properties in SQL Developer These default settings CAN work, but ONLY if you have installed Oracle Database Express Edition (XE). Localhost is a network alias for 127.0.0.1 which is an IP address that maps to the ‘local’ machine, or the machine you are reading this blog post on. The listener is a service that runs on the server and handles connections for the databases on that machine. You can run a database without a listener and you can run a listener without a database, but you can’t connect to a database on a different server unless both that database and listener are up and running. Each listener ‘listens’ on one or more ports, you need to know the port number for each connection. The default port is 1521, but 1522 is often pretty common. I know all of this sounds very complicated Oracle is a very sophisticated piece of software. It’s not analogous to downloading a mobile phone app and and using it 10 seconds later. It’s not like installing Office/Access either – it requires services, environment setup, kernel tweaks, etc. However. Normally an administrator will setup and install Oracle, create the database, and configure the listener for everyone else to use. They’ll often also setup the connection details for everyone via a ‘TNSNAMES.ORA’ file. This file contains a list of database connection details for folks to browse – kind of like an Oracle database phoneboook. If someone has given you a TNSNAMES.ORA file, or setup your machine to have access to a TNSNAMES file, then you can just switch to the ‘TNS’ connection type, and use the dropdown to select the database you want to connect to. Then you don’t have to worry about the server names, database names, and the port numbers. ORCL – that sounds promising! ORCL is the default SID when creating a new database with the Database Creation Assistant (DBCA). It’s just me, and I need help! No administrator, no database, no nothing. What do you do? You have a few options: Buy a copy of Oracle and download, install, and create a database Download and install XE (FREE!) Download, import, and run our Developer Days Hands-on-Lab (FREE!) If you’re a student (or anyone else) with little to no experience with Oracle, then I recommend the third option. Oracle Technology Network Developer Day: Hands-on Database Application Development Lab The OTN lab runs on a A Virtual Box image which contains: 11gR2 Enterprise Edition copy of Oracle a database and listener running for you to connect to lots of demo data for you to play with SQL Developer installed and ready to connect Some browser based labs you can step through to learn Oracle You download the image, you download and install Virtual Box (also FREE!), then you IMPORT the image you previously downloaded. You then ‘Start’ the image. It will boot a copy of Oracle Enterprise Linux (OEL), start your database, and all that jazz. You can then start up and run SQL Developer inside the image OR you can connect to the database running on the image using the copy of SQL Developer you installed on your host machine. Setup Port Forwarding to Make It Easy to Connect From Your Host When you start the image, it will be assigned an IP address. Depending on what network adapter you select in the image preferences, you may get something that can get out to the internet from your image, something your host machine can see and connect to, or something that kind of just lives out there in a vacuum. You want to avoid the ‘vacuum’ option – unless you’re OK with running SQL Developer inside the Linux image. Open the Virtual Box image properties and go to the Networking options. We’re going to setup port forwarding. This will tell your machine that anything that happens on port 1521 (the default Oracle Listener port), should just go to the image’s port 1521. So I can connect to ‘localhost’ and it will magically get transferred to the image that is running. Oracle Virtual Box Port Forwarding 1521 listener database Now You Just Need a Username and Password The default passwords on this image are all ‘oracle’ – so you can connect as SYS, HR, or whatever – just use ‘oracle’ as the password. The Linux passowrds are all ‘oracle’ too, so you can login as ‘root’ or as ‘oracle’ in the Linux desktop. Connect! Connect as HR to your Oracle database running on the OTN Developer Days Virtual Box image If you’re connecting to someone else’s database, you need to ask the person that manages that environment to create for you an account. Don’t try to ‘guess’ or ‘figure out’ what the username and password is. Introduce yourself, explain your situation, and ask kindly for access. This is your first test – can you connect? I know it’s hard to get started with Oracle. There are however many things we offer to make this easier. You’ll need to do a bit of RTM first though. Once you know what’s required, you will be much more likely to succeed. Of course, if you need help, you know where to find me

    Read the article

  • JW Player - How can I add an event listener for fullscreen toggling?

    - by Charles
    I'm using JW Player 4.5 on my site and I need to add an event listener for when fullscreen is toggled. The reason for this is to switch between a low-def version and high-def version. The default video will be the low-def version and when they switch to a fullscreen display, it will change to the high-def version. According to http://developer.longtailvideo.com/trac/wiki/Player5Events, the ViewEvent.JWPLAYER_VIEW_FULLSCREEN1 event can only be called from Actionscript. I need it to be from Javascript... Is there any way to achieve this? Can you recommend a better solution?

    Read the article

  • Listener to prevent System.out display on the screen.

    - by harshit
    Hi, I was doing my academic project and while building and testing i have put many println() statements. But when I had to submit all prints should not be displayed. Can i implement something like listener which will be invoked when System.out is tried to be executed and prevents it from displaying. I dont know how feasible this idea is but just want to know whether its possible or not. I know i could have used a log file or write into a file but again its just a thought came into my mind if I have to disable SOP how can i do it .. thanks

    Read the article

  • Possible to bind an event listener to a (hypothetical) onChangeInnerHTML event?

    - by DustMason
    In my app, I have an OL tag whose contents are changed by various other dynamic events. Is there some way to put a listener on that OL so that I can execute a function whenever its contents are altered in any way? In this example I need to update a count of items in the list which appears in another spot in the interface. I am using jQuery if that helps. The contents of the OL are being changed with OL.append() and LI.remove(), in case those methods have some special events that I don't know about Thanks!

    Read the article

  • Spring-security not processing pre/post annotations

    - by wuntee
    Trying to get pre/post annotations working with a web application, but for some reason nothing is happening with spring-security. Can anyone see what im missing? web.xml contextConfigLocation /WEB-INF/rvaContext-business.xml /WEB-INF/rvaContext-security.xml <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <!-- Spring security filter --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- - Publishes events for session creation and destruction through the application - context. Optional unless concurrent session control is being used. --> <listener> <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class> </listener> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <servlet> <servlet-name>rva</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>rva</servlet-name> <url-pattern>/rva/*</url-pattern> </servlet-mapping> rvaContext-secuity.xml: <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <global-method-security pre-post-annotations="enabled"/> <http use-expressions="true"> <form-login /> <logout /> <remember-me /> <!-- Uncomment to limit the number of sessions a user can have --> <session-management invalid-session-url="/timeout.jsp"> <concurrency-control max-sessions="1" error-if-maximum-exceeded="true" /> </session-management> <form-login login-page="rva/login" /> </http> ... LoginController class: @Controller @RequestMapping("/login") public class LoginController { @RequestMapping(method = RequestMethod.GET) public String login(ModelMap map){ map.addAttribute("title", "Login: AD Credentials"); return("login"); } @RequestMapping("/secure") @PreAuthorize("hasRole('ROLE_USER')") public String secure(ModelMap map){ return("secure"); } } In the logs, there is nothing even related to spring-security: logs: INFO: Initializing Spring FrameworkServlet 'rva' INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'rva': initialization started INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Refreshing WebApplicationContext for namespace 'rva-servlet': startup date [Fri Mar 26 10:28:51 MDT 2010]; parent: Root WebApplicationContext INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/rva-servlet.xml] INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@a2fc31: defining beans [loginController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,freemarkerConfig,viewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@cc74e7 INFO [org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer] - ClassTemplateLoader for Spring macros added to FreeMarker configuration INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login/secure] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login/secure.*] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login/secure/] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login.*] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - Mapped URL path [/login/] onto handler [com.cable.comcast.neto.nse.rva.controller.LoginController@79b32a] INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'rva': initialization completed in 417 ms Mar 26, 2010 10:28:52 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Mar 26, 2010 10:28:52 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Mar 26, 2010 10:28:52 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/31 config=null Mar 26, 2010 10:28:52 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 1873 ms WARN [org.springframework.web.servlet.PageNotFound] - No mapping found for HTTP request with URI [/rva-web/] in DispatcherServlet with name 'rva'

    Read the article

  • Application error with MyFaces 1.2: java.lang.IllegalStateException: No Factories configured for this Application.

    - by IgorB
    For my app I'm using Tomcat 6.0.x and Mojarra 1.2_04 JSF implementation. It works fine, just I would like to switch now to MyFaces 1.2_10 impl of JSF. During the deployment of my app a get the following error: ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myApp]] StandardWrapper.Throwable java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions! If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml. A typical config looks like this; <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:106) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:137) at org.apache.myfaces.webapp.MyFacesServlet.init(MyFacesServlet.java:113) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371) ... Here is part of my web.xml configuration: <servlet> <servlet-name>Faces Servlet</servlet-name> <!-- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> --> <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> ... <listener> <listener- class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> Has anyone experienced similar error, and what should I do i order to fix it? Thanx!

    Read the article

  • RabbitMQ message broker unable to open unused port 61613

    - by mjn
    On a Windows Vista system, RabbitMQ fails to open port 61613 which is not used (as netstat and TCPView show). The server log indicates that it is possible to bind port 5672, but the next lines show the problem with port 61613. I have cleared all firewall settings and rebooted. Several times in the past this helped to solve the problem. But as the problem frequently reappears, I would like to know if there is somthing I am missing to solve its root cause. =INFO REPORT==== 29-Jun-2013::12:09:16 === started TCP Listener on [::]:5672 =INFO REPORT==== 29-Jun-2013::12:09:16 === started TCP Listener on 0.0.0.0:5672 =INFO REPORT==== 29-Jun-2013::12:09:16 === rabbit_stomp: default user 'guest' enabled =INFO REPORT==== 29-Jun-2013::12:09:16 === started STOMP TCP Listener on [::]:61613 =ERROR REPORT==== 29-Jun-2013::12:09:16 === failed to start STOMP TCP Listener on 0.0.0.0:61613 - eacces (permission denied) =INFO REPORT==== 29-Jun-2013::12:09:16 === stopped STOMP TCP Listener on [::]:61613

    Read the article

  • BeansBinding Across Modules in a NetBeans Platform Application

    - by Geertjan
    Here's two TopComponents, each in a different NetBeans module. Let's use BeansBinding to synchronize the JTextField in TC2TopComponent with the data published by TC1TopComponent and received in TC2TopComponent by listening to the Lookup. The key to getting to the solution is to have the following in TC2TopComponent, which implements LookupListener: private BindingGroup bindingGroup = null; private AutoBinding binding = null; @Override public void resultChanged(LookupEvent le) { if (bindingGroup != null && binding != null) { bindingGroup.getBinding("customerNameBinding").unbind(); } if (!result.allInstances().isEmpty()){ Customer c = result.allInstances().iterator().next(); // put the customer into the lookup of this topcomponent, // so that it will remain in the lookup when focus changes // to this topcomponent: ic.set(Collections.singleton(c), null); bindingGroup = new BindingGroup(); binding = Bindings.createAutoBinding( // a two-way binding, i.e., a change in // one will cause a change in the other: AutoBinding.UpdateStrategy.READ_WRITE, // source: c, BeanProperty.create("name"), // target: jTextField1, BeanProperty.create("text"), // binding name: "customerNameBinding"); bindingGroup.addBinding(binding); bindingGroup.bind(); } } I must say that this solution is preferable over what I've been doing prior to getting to this solution: I would get the customer from the resultChanged, set a class-level field to that customer, add a document listener (or action listener, which is invoked when Enter is pressed) on the text field and, when a change is detected, set the new value on the customer. All that is not needed with the above bit of code. Then, in the node, make sure to use canRename, setName, and getDisplayName, so that when the user presses F2 on a node, the display name can be changed. In other words, when the user types something different in the node display name after pressing F2, the underlying customer name is changed, which happens, in the first place, because the customer name is bound to the text field's value, so that the text field's value will also change once enter is pressed on the changed node display name. Also set a PropertyChangeListener on the node (which implies you need to add property change support to the customer object), so that when the customer object changes (which happens, in the second place, via a change in the value of the text field, as defined in the binding defined above), the node display name is updated. In other words, there's still a bit of plumbing you need to include. But less than before and the nasty class-level field for storing the customer in the TC2TopComponent is no longer needed. And a listener on the text field, with a property change listener implented on the TC2TopComponent, isn't needed either. On the other hand, it's more code than I was using before and I've had to include the BeansBinding JAR, which adds a bit of overhead to my application, without much additional functionality over what I was doing originally. I'd lean towards not doing things this way. Seems quite expensive for essentially replacing a listener on a text field and a property change listener implemented on the TC2TopComponent for being notified of changes to the customer so that the text field can be updated. On the other other hand, it's kind of nice that all this listening-related code is centralized in one place now. So, here's a nice improvement over the above. Instead of listening for a customer, listen for a node, from which the customer can be obtained. Then, bind the node display name to the text field's value, so that when the user types in the text field, the node display name is updated. That saves you from having to listen in the node for changes to the customer's name. In addition to that binding, keep the previous binding, because the previous binding connects the customer name to the text field, so that when the customer display name is changed via F2 on the node, the text field will be updated. private BindingGroup bindingGroup = null; private AutoBinding nodeUpdateBinding; private AutoBinding textFieldUpdateBinding; @Override public void resultChanged(LookupEvent le) { if (bindingGroup != null && textFieldUpdateBinding != null) { bindingGroup.getBinding("textFieldUpdateBinding").unbind(); } if (bindingGroup != null && nodeUpdateBinding != null) { bindingGroup.getBinding("nodeUpdateBinding").unbind(); } if (!result.allInstances().isEmpty()) { Node n = result.allInstances().iterator().next(); Customer c = n.getLookup().lookup(Customer.class); ic.set(Collections.singleton(n), null); bindingGroup = new BindingGroup(); nodeUpdateBinding = Bindings.createAutoBinding( AutoBinding.UpdateStrategy.READ_WRITE, n, BeanProperty.create("name"), jTextField1, BeanProperty.create("text"), "nodeUpdateBinding"); bindingGroup.addBinding(nodeUpdateBinding); textFieldUpdateBinding = Bindings.createAutoBinding( AutoBinding.UpdateStrategy.READ_WRITE, c, BeanProperty.create("name"), jTextField1, BeanProperty.create("text"), "textFieldUpdateBinding"); bindingGroup.addBinding(textFieldUpdateBinding); bindingGroup.bind(); } } Now my node has no property change listener, while the customer has no property change support. As in the first bit of code, the text field doesn't have a listener either. All that listening is taken care of by the BeansBinding code.  Thanks to Toni for help with this, though he can't be blamed for anything that is wrong with it, only thanked for anything that is right with it. 

    Read the article

  • How to avoid using this in a contructor

    - by Paralife
    I have this situation: interface MessageListener { void onMessageReceipt(Message message); } class MessageReceiver { MessageListener listener; public MessageReceiver(MessageListener listener, other arguments...) { this.listener = listener; } loop() { Message message = nextMessage(); listener.onMessageReceipt(message); } } and I want to avoid the following pattern: (Using the this in the Client constructor) class Client implements MessageListener { MessageReceiver receiver; MessageSender sender; public Client(...) { receiver = new MessageReceiver(this, other arguments...); sender = new Sender(...); } . . . @Override public void onMessageReceipt(Message message) { if(Message.isGood()) sender.send("Congrtulations"); else sender.send("Boooooooo"); } } The reason why i need the above functionality is because i want to call the sender inside the onMessageReceipt() function, for example to send a reply. But I dont want to pass the sender into a listener, so the only way I can think of is containing the sender in a class that implements the listener, hence the above resulting Client implementation. Is there a way to achive this without the use of 'this' in the constructor? It feels bizare and i dont like it, since i am passing myself to an object(MessageReceiver) before I am fully constructed. On the other hand, the MessageReceiver is not passed from outside, it is constructed inside, but does this 'purifies' the bizarre pattern? I am seeking for an alternative or an assurance of some kind that this is safe, or situations on which it might backfire on me.

    Read the article

  • How to avoid using this in a constructor

    - by Paralife
    I have this situation: interface MessageListener { void onMessageReceipt(Message message); } class MessageReceiver { MessageListener listener; public MessageReceiver(MessageListener listener, other arguments...) { this.listener = listener; } loop() { Message message = nextMessage(); listener.onMessageReceipt(message); } } and I want to avoid the following pattern: (Using the this in the Client constructor) class Client implements MessageListener { MessageReceiver receiver; MessageSender sender; public Client(...) { receiver = new MessageReceiver(this, other arguments...); sender = new Sender(...); } . . . @Override public void onMessageReceipt(Message message) { if(Message.isGood()) sender.send("Congrtulations"); else sender.send("Boooooooo"); } } The reason why i need the above functionality is because i want to call the sender inside the onMessageReceipt() function, for example to send a reply. But I dont want to pass the sender into a listener, so the only way I can think of is containing the sender in a class that implements the listener, hence the above resulting Client implementation. Is there a way to achive this without the use of 'this' in the constructor? It feels bizare and i dont like it, since i am passing myself to an object(MessageReceiver) before I am fully constructed. On the other hand, the MessageReceiver is not passed from outside, it is constructed inside, but does this 'purifies' the bizarre pattern? I am seeking for an alternative or an assurance of some kind that this is safe, or situations on which it might backfire on me.

    Read the article

  • How do I add a listener that will work on individual Fieldset in Extjs? Clicking the "Add" button sh

    - by Nair
    Testing Window /*! * Ext JS Library 3.0.0 * Copyright(c) 2006-2009 Ext JS, LLC * [email protected] * http://www.extjs.com/license */ Ext.onReady(function(){ Ext.override( Ext.data.Store, { findExact: function( fld, val ) { var hit = null; this.each( function(rec) { if( rec.get(fld) == val ) { hit = rec; return false; }; } ); return hit; } }); var listAdded = 0; var addListBtn = { text: 'Add', handler: function() { Ext.getCmp('tab_list').add(getList()); Ext.getCmp('tab_list').doLayout(); } } var testData = new Ext.data.SimpleStore({ fields: ['no', 'name', 'address','phone','businessPhone'], data: [['68', 'Target','123 Valley Road','(345) 908-9087','(345) 908-9087'], ['69', 'Walmart','456 Main Road','(345) 908-9999','(345) 908-9990']] }); var getList = function() { listAdded++; var items = new Ext.form.FieldSet( { id:listAdded, title: listAdded, collapsible: true, layout: 'form', autoHeight: true, defaults: {width: 300}, defaultType: 'textfield', bodyStyle: 'padding:5px', labelWidth: 225, items: [ { xtype: 'combo', fieldLabel: 'Customer No', name: 'changescustomerNo', hiddenName: 'changescustomerNo', store: new Ext.data.SimpleStore({ fields: ['id','value'], data: [['68','Test1'],['69','Test2']] }), displayField: 'value', valueField: 'id', selectOnFocus: true, mode: 'local', editable: false, triggerAction: 'all', value: ' ', listeners:{select:{ fn:function(combo, value) { var m = testData.findExact( 'no', this.value ); if(m) { //alert(this.id); Ext.getCmp('currentName').setValue(m.get('name')); Ext.getCmp('currentAddress').setValue(m.get('address')); Ext.getCmp('currentTelephoneNumber').setValue(m.get('phone')); Ext.getCmp('currentBusTelephoneNumber').setValue(m.get('businessPhone')); } }//function }//select }//listeners },{ id: 'currentName', fieldLabel: 'Current Name', name: 'currentName', value: '' },{ id: 'currentAddress', width: 298, xtype: 'textarea', fieldLabel: 'Current Address', name: 'currentAddress', value: '' },{ id:'currentTelephoneNumber', fieldLabel: 'Current Telephone Number', name: 'currentTelephoneNumber', value: '' },{ id: 'currentBusTelephoneNumber', fieldLabel: 'Current Business Telephone Number', name: 'currentBusTelephoneNumber', value: '' } ] } ); return items; } var pnlMain = new Ext.Panel({ id: 'theForm', title: 'Sample List', bodyStyle:'padding:5px', autoWidth: true, frame: true, items: [{ xtype: 'tabpanel', id: 'tabpanel', activeTab: 0, height: 540, width: '100%', resizeTabs: true, tabWidth: 125, minTabWidth: 125, layoutOnTabChange: true, deferredRender: false, // Create all form elements on load defaults: { bodyStyle: 'padding:10px', autoScroll: true, layout: 'form', defaultType: 'textfield', labelWidth: 160 }, items:[{ id: 'tab_list', title: 'List', items: getList(), buttons: [ addListBtn ] }] }] }); pnlMain.render('main'); });

    Read the article

  • is there a default back key(on device) listener in android???

    - by androidbase Praveen
    hi all, i am having two activities A and B. when i click the button in A that will shows B. when i click the Button in B it backs to A. i had set the overridePendingTransition method after the finish() method. it works properly. but in case the current Activity is B. on that time i click the default back button in the device. it shows the right to left transition to show the Activity A. how i can listen that Default back key on device.?????

    Read the article

  • Android how to get gps location

    - by Faisal khan
    I want to detect location from gps listener and also from network my code is as follows For network location listen locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, WLConstants.DELAY_HOUR, 500.0f, nsl); // where nsl is listener implements LocationListener and for the gps location listen locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, WLConstants.DELAY_HOUR, gpsListener .getMinDistance(), gpsListener);// where gps listener implements LocationListener Can we have one listener to listen both rather then launching two different listeners to listen from network and gps???

    Read the article

  • Adding a JLabel to JLayeredPane from event listener not dragging.

    - by Cody
    Ok, So for some reason When I add components to a JLayeredPane in its constructor: JLabel label = new JLabel(); label.setSize(100,100); label.setText("This works"); add(label); It works perfectly fine, but If a add it later in the JLayeredPane's parent EDT it doesnt let me move the objects around but they let me see the objects. Adding from EDT: JLabel label = new JLabel(); label.setToolTipText(url.getHost()); label.setIcon(icon); label.setBorder(new LineBorder(null)); label.setSize(icon.getIconWidth(), icon.getIconHeight()); dressFrame.layeredPane.add(label, JLayeredPane.DRAG_LAYER); Dragging method: Component c = findComponentAt(e.getX(), e.getY()); if (c instanceof JLayeredPane) { pieceSelected = false; return; } Point parentLocation = c.getLocation(); xAdjustment = parentLocation.x - e.getX(); yAdjustment = parentLocation.y - e.getY(); movingPiece = c; movingPiece.setLocation(e.getX() + xAdjustment, e.getY() + yAdjustment); pieceSelected = true;

    Read the article

  • MultiActionController no longer receiving requests?

    - by Stefan Kendall
    I was attempting to make changes to my controller, and all of a sudden, I no longer seem to receive any requests (404 when attempting to hit the servlet mapped URLs). I'm sure I've broken my web.xml or app-servlet.xml, but I just don't see where. I can access index.jsp from tomcat (http://IP/app/index.jsp), but I can't get my servlet mapping to work correctly. Help? web.xml: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app version = "2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>app</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> </servlet> <servet-mapping> <servlet-name>app</servlet-name> <url-pattern>/myRequest</url-pattern> </servet-mapping> app-servlet.xml: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app version = "2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>app</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> </servlet> <servet-mapping> <servlet-name>app</servlet-name> <url-pattern>/myRequest</url-pattern> </servet-mapping> </web-app>

    Read the article

  • How can I give a variable to an action listener?

    - by Roman
    I have a static variable partner in the class. And I want to set a value of these variable whenever a radio button is pressed. This is the code I tried to use: for (String playerName: players) { option = new JRadioButton(playerName, false); option.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent evt) { partner = playerName; } }); partnerSelectionPanel.add(option); group.add(option); } The problem here is that the actionPerformed does not see the variable playerName created in the loop. How can I pass this variable to the actionListener?

    Read the article

  • Powershell: Cannot connect via SSL

    - by JSWork
    Am following "secrets to powershell remoting" to setup an SLL account and seem to be missing a step. I ran Winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Hostname="redacted";CertificateThumbprint="redacted"} and got PS WSMan:\localhost&gt; dir wsman:\localhost\listener\Listener_1184937132 WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_1184937132 Name Value Type ---- ----- ---- Address * System.String Transport HTTP System.String Port 5985 System.String Hostname System.String Enabled true System.String URLPrefix wsman System.String CertificateThumbprint System.String ListeningOn_756355952 10.0.0.54 System.String ListeningOn_1201550598 127.0.0.1 System.String PS WSMan:\localhost&gt; dir wsman:\localhost\listener\Listener_1187163138 WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_1187163138 Name Value Type ---- ----- ---- Address * System.String Transport HTTP System.String Port 80 System.String Hostname System.String Enabled true System.String URLPrefix wsman System.String CertificateThumbprint System.String ListeningOn_756355952 10.0.0.54 System.String ListeningOn_1201550598 127.0.0.1 System.String PS WSMan:\localhost&gt; dir wsman:\localhost\listener\Listener_220862350 WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Listener\Listener_220862350 Name Value Type ---- ----- ---- Address * System.String Transport HTTPS System.String Port 5986 System.String Hostname redacted System.String Enabled true System.String URLPrefix wsman System.String CertificateThumbprint redacted System.String ListeningOn_756355952 10.0.0.54 System.String ListeningOn_1201550598 127.0.0.1 System.String Trouble is when i do this PS C:\Users\redacted> enter-pssession -Computername redacted -Credential redacted\redacted -UseSSL I get this Enter-PSSession : Connecting to remote server failed with the following error message : The client cannot connect to th e destination specified in the request. Verify that the service on the destination is running and is accepting requests . Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or Win RM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more information, see the about_Remote_Troubleshooting Help topic. At line:1 char:16 + enter-pssession <<<< -Computername redacted -Credential redacted\redacted -UseSSL + CategoryInfo : InvalidArgument: (redacted:String) [Enter-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : CreateRemoteRunspaceFailed This happens even when the firewall is off completely and when the machine tires to connect to itself locally. On top of that, despite the listners eing lsited on wsman, when I run PS WSMan:\localhost&gt; Get-PSSessionConfiguration I get Name PSVersion StartupScript Permission ---- --------- ------------- ---------- Microsoft.PowerShell 2.0 PS WSMan:\localhost&gt; Any ideas what I'm missing/doing wrong? edit: Windows 2003. Powershell v2.0

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >