Search Results

Search found 2584 results on 104 pages for 'richard bean williams'.

Page 16/104 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Spring security custom ldap authentication provider

    - by wuntee
    I currently have my ldap authentication context set up like this: <ldap-server url="ldap://host/dn" manager-dn="cn=someuser" manager-password="somepass" /> <authentication-manager> <ldap-authentication-provider user-search-filter="(samaccountname={0})"/> </authentication-manager> Now, I need to be able to set up a custom authorities mapper (it uses a different ldap server) - so I am assuming I need to set up my ldap-server similar to (http://static.springsource.org/spring-security/site/docs/2.0.x/reference/ldap.html): <bean id="ldapAuthProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider"> <constructor-arg> <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator"> <constructor-arg ref="contextSource"/> <property name="userDnPatterns"> <list><value>uid={0},ou=people</value></list> </property> </bean> </constructor-arg> <constructor-arg> <bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator"> <constructor-arg ref="contextSource"/> <constructor-arg value="ou=groups"/> <property name="groupRoleAttribute" value="ou"/> </bean> </constructor-arg> </bean> But, how do I reference that 'ldapAuthProvider' to the ldap-server in the security context? I am also using spring-security 3, so '' does not exist...

    Read the article

  • JAVA: ICEFACES: component <ice:selectInputDate> mapped on a "java.util.Calendar" field

    - by blummihaela
    Does anybody knows how can component <ice:selectInputDate> be mapped on a java.util.Calendar field, not java.util.Date? I am using from IceFaces version 1.8.2, the component <ice:selectInputDate>. This component requires to be bound with a java.util.Date proeprty. For example, value="#{bean.myDate}", the myDate field must be of type java.util.Date. But I need my date field to be of type java.util.Calendar. My trials: I have tried to use standard converter or a custom one: Standard one: <f:convertDateTime pattern="dd/MM/yyyy" /> it formats correct the value in GUI, but when setting it on the property bean.myDate of type Calendar I get following error message: [5/3/10 12:09:18:398 EEST] 00000021 lifecycle I WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=j_id12:j_id189:myDate[severity=(ERROR 2), summary=(/WEB-INF/xhtml............file.xhtml @507,51 value="#{bean.myDate}": Can't set property 'myDate' on class 'bean' to value '5/11/10 3:00 AM'.), detail=(/WEB-INF/xhtml........file.xhtml @507,51 value="#{bean.myDate}": Can't set property 'myDate' on class '...bean...' to value '5/11/10 3:00 AM'.)] Custom one: <f:converter converterId="c2d"/> getAsObject - returns the java.util.Calendar object out of the submitted String. getAsString - receives an Object, and returns the String formatted. NOTE: this method was hacked so instead of expecting java.util.Calendar, to be complementary with getAsObject method. Instead, the hacked method getAsString, expects an java.util.Date, provided as parameter (by ice:selectInputDate) and returns the String formatted. But still an error message occurs: [5/3/10 12:55:34:299 EEST] 0000001f D2DFaceletVie E com.icesoft.faces.facelets.D2DFaceletViewHandler renderResponse Problem in renderResponse: java.util.GregorianCalendar incompatible with java.util.Date java.lang.ClassCastException: java.util.GregorianCalendar incompatible with java.util.Date at com.icesoft.faces.component.selectinputdate.SelectInputDate.getTextToRender(SelectInputDate.java:252) Any hint is very useful! Thanks, Mihaela

    Read the article

  • Jaxb2Marshaller and primitive types

    - by Thomas Einwaller
    Is it possible to create a web service operation using primitive or basic Java types when using the Jaxb2Marschaller in spring-ws? For example a method looking like this: @Override @PayloadRoot(localPart = "AddTaskRequest", namespace = "http://example.com/examplews/") public long addTask(final Task task) throws AddTaskFault { // do something return 0; } I am using the maven jaxws plugin to generate the interface and model classes from my WSDL. When I try to call the webservice I get the following error: java.lang.IllegalStateException: No adapter for endpoint [...]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint I found out that if I change the method to that: @Override @PayloadRoot(localPart = "AddTaskRequest", namespace = "http://example.com/examplews/") public JAXBElement<Long> addTask(final JAXBElement<Task> task) throws AddTaskFault { final ObjectFactory objectFactory = new ObjectFactory(); return objectFactory.createAddTaskResponse(0L); } I am able to call it - but this signature is not compatible with the interface generated by the maven jaxws plugin. What can I do to configure either spring-ws to be able to use the first kind of implementation or to tell maven jaxws plugin to generate the second variant of the interface? UPDATE: My relevant spring-ws config entries look like that: <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="contextPath" value="com.example.examplews" /> </bean> <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter"> <constructor-arg ref="marshaller" /> </bean> <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="order" value="1" /> </bean>

    Read the article

  • Spring MVC and Weblogic integration

    - by Jeune
    I get this error whenever I try to view my tutorial app in the browser WARNING: No mapping found for HTTP request with URI [/HelloWorld.Web] in DispatcherServlet with name 'dispatcher' That just means the request is being received by the dispatcher servlet but it can't forward it to a controller. But I can't seem to know where the problem is. I think I've mapped this correctly: <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/HelloWorld.Web">indexController</prop> </props> </property> </bean> <bean id="indexController" class="com.helloworld.controller.IndexController"> <property name="artistDao" ref="artistDao"/> <property name="methodNameResolver"> <bean class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver"> <property name="alwaysUseFullPath" value="true"/> <property name="mappings"> <props> <prop key="/HelloWorld.Web">getAllArtists</prop> </props> </property> </bean> </property> </bean> I am using Spring 2.5.6 and Bea Weblogic Server 9.2

    Read the article

  • Groovy on Grails: GORM and BitSets?

    - by Visionary Software Solutions
    I don't see anything in the official documentation about unsupported persistence data types, so I'm working under the assumption that types available in the Groovy language should be handled. However, for the following domain class: class DocGroupPermissions { Workgroup workgroup; Document document; BitSet permissions = new BitSet(2) public DocGroupPermissions() {} void setPermissions(boolean canRead, boolean canWrite){ setReadPermissions(canRead) setWritePermissions(canWrite) } BitSet getPermissions() { return permissions } void setReadPermissions(boolean canRead) { permissions.set(0,canRead) } void setWritePermissions(boolean canWrite) { permissions.set(1,canWrite) } boolean getReadPermissions() { return permissions.get(0) } boolean getWritePermissions() { return permissions.get(1) } static belongsTo = [workgroup:Workgroup, document:Document] static constraints = { workgroup(nullable:false, blank:false) document(nullable:false, blank:false) } } I'm getting: 2009-11-15 16:46:12,298 [main] ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: An association from the table doc_group_permissions refers to an unmapped class: java.util.BitSet Has anyone run into this before?

    Read the article

  • filterSecurityInterceptor and metadatasource implementation spring-security

    - by Mike
    Hi! I created a class that implements the FilterInvocationSecurityMetadataSource interface. I implemented it like this: public List<ConfigAttribute> getAttributes(Object object) { FilterInvocation fi = (FilterInvocation) object; Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Long companyId = ((ExtenededUser) principal).getCompany().getId(); String url = fi.getRequestUrl(); // String httpMethod = fi.getRequest().getMethod(); List<ConfigAttribute> attributes = new ArrayList<ConfigAttribute>(); FilterSecurityService service = (FilterSecurityService) SpringBeanFinder.findBean("filterSecurityService"); Collection<Role> roles = service.getRoles(companyId); for (Role role : roles) { for (View view : role.getViews()) { if (view.getUrl().equalsIgnoreCase(url)) attributes.add(new SecurityConfig(role.getName() + "_" + role.getCompany().getName())); } } return attributes; } when I debug my application I see it reaches this class, it only reaches getAllConfigAttributes method, that is empty as I said, and return null. after that it prints this warning: Could not validate configuration attributes as the SecurityMetadataSource did not return any attributes from getAllConfigAttributes(). My aplicationContext- security is like this: <beans:bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy"> <filter-chain-map path-type="ant"> <filter-chain filters="sif,filterSecurityInterceptor" pattern="/**" /> </filter-chain-map> </beans:bean> <beans:bean id="filterSecurityInterceptor" class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor"> <beans:property name="authenticationManager" ref="authenticationManager" /> <beans:property name="accessDecisionManager" ref="accessDecisionManager" /> <beans:property name="securityMetadataSource" ref="filterSecurityMetadataSource" /> </beans:bean> <beans:bean id="filterSecurityMetadataSource" class="com.mycompany.filter.FilterSecurityMetadataSource"> </beans:bean> what could be the problem?

    Read the article

  • Spring MVC: How to resolve the path to subdirectories of the root 'JSP' folder in a web application

    - by chrisjleu
    What is a simple way to resolve the path to a JSP file that is not located in the root JSP directory of a web application using SpringMVCs viewResolvers? For example, suppose we have the following web application structure: web-app |-WEB-INF |-jsp |-secure |-admin.jsp |-admin2.jsp index.jsp login.jsp I would like to use some out-of-the-box components to resolve the JSP files within the jsp root folder and the secure subdirectory. I have a *-servlet.xml file that defines: an out-of-the-box, InternalResourceViewResolver: <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property> <property name="prefix" value="/WEB-INF/jsp/"></property> <property name="suffix" value=".jsp"></property> </bean> a handler mapping: <bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/index.htm">urlFilenameViewController</prop> <prop key="/login.htm">urlFilenameViewController</prop> <prop key="/secure/**">urlFilenameViewController</prop> </props> </property> </bean> an out-of-the-box UrlFilenameViewController controller: <bean id="urlFilenameViewController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"> </bean> The problem I have is that requests to the JSPs in the secure directory cannot be resolved, as the jspViewResolver only has a prefix defined as /jsp/ and not /jsp/secure/. Is there a way to handle subdirectories like this? I would prefer to keep this structure because I'm also trying to make use of Spring Security and having all secure pages in a subdirectory is a nice way to do this. There's probably a simple way to acheive this but I'm new to Spring and the Spring MVC framework so any pointers would be appreciated.

    Read the article

  • Can I use a property placeholder with Spring EL?

    - by David Easley
    Before upgrading to Spring 3 I had this in my applicationContext.xml file: <bean class="com.northgateis.pole.ws.PolePayloadValidatingInterceptor"> <property name="validateRequest" value="${validateRequest}" /> <property name="validateResponse" value="${validateResponse}" /> </bean> where ${validateRequest) and ${validateRequest) refer to properties that may or may not be defined in my properties file. In Spring 2, if these proeprties were not present in the properties file the setters on the bean were not called and so the defaults hard-coded in PolePayloadValidatingInterceptor were used. After upgrading to Spring 3, it seems the behaviour is different: If the properties are not present in the properties file I get the following exception: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) I tried dabbling with Spring EL but the following doesn't seem to work: <bean class="com.northgateis.pole.ws.PolePayloadValidatingInterceptor"> <property name="validateRequest" value="${validateRequest?:true}" /> <property name="validateResponse" value="${validateResponse?:false}" /> </bean> The value after the Elvis operator is always used, even when the properties are defined in the proeprties file. Interesting that the syntax is accepted. Any suggestions?

    Read the article

  • How do I add array indices to the XML produced by JAXB?

    - by oconnor0
    I have a Java bean ala @XmlRootElement public class Bean { @XmlElementWrapper(name = "ints") @XmlElement(name = "int") int[] values; // constructors, getters, setters, etc... } JAXB is producing XML like <bean> <ints> <int>12</int> <int>34</int> <int>56</int> </ints> </bean> I would like the array indices to be included on the <int> tags as array position conveys important value. Preferably as attributes like <bean> <ints> <int id='0'>12</int> <int id='1'>34</int> <int id='2'>56</int> </ints> </bean> Is there a way to do this?

    Read the article

  • JSF2.0: variable list of custom component

    - by rattaman
    Hello Is there any way of using JSF2.0 in connection with variable lists of components? For example, lets say I have list o people that I would like to edit. They are presented on the page as list of components PersonEditor, which allow changing person data. Each editor is associated with single Person element. In order for this to work I need to perform following steps: On initial request: Get list of people For each person create PersonEditor and associate it with Person object. Fill editor's data. On user action: When user changes values and presses Save, data is processed by backing bean. I can either fill editor with data from list of people or bind it to the backing bean, but not at the same time, so I am stuck. I tried people.xhtml <ui:render value="#{bean.people}" var="person"> <example:personEditor person="#{person}"/> </ui:render> where personEditor.xhtml: a) proper association with person object, but no connection to backing bean <h:form> <h:outputText value="#{cc.attr.person.name}"/> <h:commandButton name="Save" actionListener="editorBean.save"> <f:ajax execute="@form" render="@form"/> </h:commandButton> </h:form> b) no association with person object, but there is connection to backing bean - there is no way to pass that person to the backing bean <h:form> <h:outputText value="#{editorBean.name}"/> <h:commandButton name="Save" actionListener="editorBean.save"> <f:ajax execute="@form" render="@form"/> </h:commandButton> </h:form> If I had each editor on separate page, I could pass the person id as url parameter (either using f:param or f:attribute) and initialize it accordingly. Is there any solution to this problem?

    Read the article

  • How do i change the property of jaxrs endpoint to support "mtom"

    - by rocwing
    I created a RESTful web service, and i want to send binary files to this service without soap. There are some information on CXF website: link text But i can't find a way to get the CXF jaxrs endpoints,and set an "mtom-enabled" property. My Spring config is: <jaxrs:server id="fis" address="http://172.20.41.40:8080/fis"> <jaxrs:serviceBeans> <ref bean="FaultInfoResource" /> <ref bean="ExplorationResultResource" /> </jaxrs:serviceBeans> </jaxrs:server> <bean id="FaultInfoService" parent="baseService" class="com.dfe.demo.FaultInfoService"> </bean> <bean id="FaultInfoResource" class="com.dfe.demo.FaultInfoResource"> <property name="faultInfoService" ref="FaultInfoService"/> </bean> And i server class is: ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"com/dfe/iss/config/applicationContext.xml","com/dfe/demo/yearlyplan/cxf-servlet.xml"}); JAXRSServerFactoryBean fib = (JAXRSServerFactoryBean)ctx.getBean("fis"); fib.create();

    Read the article

  • How to print a web page that contains flash

    - by Richard
    I am using the chromium browser to display the following web page: http://www.primaryworksheets.co.uk/multiws/multi23.html I want to print off this maths worksheet for my son, but all I ever get out of my printer is a blank page. The web page appears to be produced using flash. I have been to the software centre and re-installed the flash plugin, but that did not help. I don't seem to have problems printing anything else. Firefox isn't any better. Can anyone tell me what else I might try? I'm using '11.04'. Thanks, Richard

    Read the article

  • Wecam not detected

    - by Richard
    after much research ang googling, my web cam is still not recognized. In the time of Ubuntu 11.04 it was working fine. I did a fresh install of 11.10 and not more web cam. All the cheese and camera monotor and V4L tests and all failes with "cannot connect to /dev/video0" or equivalent. The output of 'lsusb' shows the webcam Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam What I noticed is that neither /dev/v4l nor /dev/video* exists. If I re-install the v4l package all the /dev/video* are created, but no /dev/v4l If I reboot the /dev/video* are NOT created. I think the trouble is that the device are not created at boot time. I have a DELL Inspiron 1525 and until this fresh install the web cam worked fine. Can somebody help ? Thanks a lot Richard

    Read the article

  • Next Fusion CRM Webinar for Partners (Monday March 19th, 3pm GMT): Fusion CRM User Interface, Activity Streams and Opportunity management

    - by Richard Lefebvre
    The next session of our weekly Fusion CRM webinar for EMEA partners will take place Monday March the 19th at 3pm GMT / 4pm CET and will address the Fusion CRM User Interface, Activity Streams and Opportunity management In order to check the complete agenda and see login-details, please visit our dedicated microsite. How to join the dedicated microsite: Click on http://isdportal.oracle.com/isd_html/sf.htm Enter your Email Address in the corresponding field Enter fusion_crm in the “Access URL/Page Token” field Agenda: The list of sessions is published and will be regularly updated in the microsite. Duration: Each session lasts up to 60 minutes Webex: The respective webinar link and session ID are published in the microsite Audio:  The audio call details (telephone numbers by country, call number and password) is indicated in the microsite Slides: For your convenience, a pdf copy of each presentation will be stored in the microsite’s document section. We hope that this series of webcasts will be instrumental to your way of Fusion CRM business success!  For further information please contact me at richard[email protected]

    Read the article

  • CRM on Demand Marketing (ODM) Training for Partners - Munich - Dec 14-16th, 2011

    - by Richard Lefebvre
    We are pleased to inform you that we will be conducting a CRM on Demand Marketing (ODM) training workshop for EMEA Partners on December 14th - 16th in Munich (Germany). This 2.5-day Instructor lead course will be focusing on preparing Oracle CRM on Demand Practitioners and Clients to implement and operationalize ODM. The course will be consisting of 2 main tracks: Marketing User Product Specialist The course will be limited to 50 participants (with a maximum of 3 attendees per Partner Company). For detailed information and registration link, please refer to the invitation which will be sent shortly to the EMEA CRM on Demand Partners community or contact richard[email protected]. To join the EMEA CRM on Demand Partners community, follow this link:www.oracle.com/partners/goto/crm-saas-emea

    Read the article

  • How to reduce your CRM migration project's risks?

    - by Richard Lefebvre
    In this 1'38 video, discover how you can dramatically reduce your CRM migration project's risks, costs and budgets with the market leading CRM Data Migration tool that offers turnkey migration platform from Salesforce, Microsoft Dynamics or Oracle CRM OnDemand on to Oracle Sales Cloud. This solution is open to any Oracle CRM & CX implementation partner (e.g. System Integrators) as a mean to complement their own offer. For any additional details or for an introduction to the tool, please contact richard[email protected]  or visit www.conemis.com

    Read the article

  • USB Bose speakers with ubuntu 12.04

    - by Richard
    On a fresh install of ubuntu 12.04 my Bose USB weren't working at all. I read through a large number of posts here and elsewehre on Bose or USB speakers. I tried many things (modifying a number of different files, etc.). This worked... sort of: USB Audio on 0 volume on startup The AlsaMixer works after I turn up the volume, but the sound crackles a lot. Also, having to use a term mixer to change sound isn't ideal. Any other ideas? Thank you, Richard

    Read the article

  • Should I use rel=index or rel=contents in this instance?

    - by Martin Bean
    I’m creating an MMA website. There’s the home page, there’s a fighters section whose index page lists fighters in the organisation, and then each fighter has a profile page. The URL structure is like this: / /fighters/ /fighters/john-doe My question is: on the fighter’s profile page I want to link to the fighters index page (/fighters). In my HTML page, which meta tag would be the most appropriate? <link href="/fighters/" rel="index" /> Or: <link href="/fighters/" rel="contents" /> I’m having trouble distinguishing which would be best, and whether rel="index" would be the index for the whole site or the current page/section I’m viewing?

    Read the article

  • Creating Asynchronous Methods in EJB 3.1

    - by cindo
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} OBE of the Month: Creating Asynchronous Methods in EJB 3.1 This OBE covers creating an EJB 3.1 application that demonstrates the use of the @Asynchronous annotation in an Enterprise Java Bean (EJB) class or specific method. In this tutorial, you will create a Java EE 6 Web Application and add the following components to it - a Stateless Session Bean with two asynchronous methods. You define a Servlet to call the asynchronous methods and to keep track of the invocation and completion times to demonstrate the asynchronous nature of the method calls. The index.jsp will contain a form with a submit button, Run allowing you to execute the application. The form will submit to the Servlet which invokes the asynchronous methods defined in the session bean and the response is re-directed to response.jsp. Information about the asynchronous handling procedure is displayed to users. From this information, users will notice that the invoker thread and the called asynchronous thread are working concurrently. Check out this new OBE on the Oracle Learning Library: Creating Asynchronous Methods in EJB 3.1. This OBE is part of the new EJB 3.1 New Features Series. Related OBE’s that might interest you: Creating a No-Interface View Session Bean and Packaging in a WAR File Creating and Accessing a Session Bean in a  Web Application

    Read the article

  • New user to Linux Mint and Alinux

    - by Richard
    which is better for a new Linux user, Linux Mint or Alinux i had trouble getting Alinux to run after install Mint ran fine. We are also with the Tucson Refugee ministry and we have computers given to us all the time then we reload the OS clean it up then we give them to the refugee families. We need something that will run on older computers with 256 or 512m of ram, and i do not want to use Micro Soft Please help. PS is there any other Linux OS you would recommend?????? Thanks Richard Smith [email protected]

    Read the article

  • java.lang.NoClassDefFoundError: org/springframework/transaction/interceptor/TransactionInterceptor

    - by user1137146
    I am trying to integrate spring 3.1.1 with hibernate 4.0. This is my dispatcher-servlet.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:component-scan base-package="com.future.controllers" /> <context:annotation-config /> <context:component-scan base-package="com.future.services.menu" /> <context:component-scan base-package="com.future.dao" /> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://localhost:3306/bar_visitor2" p:username="root" p:password=""/> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/views/" /> <property name="suffix" value=".jsp" /> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="configLocation"> <value>classpath:hibernate.cfg.xml</value> </property> </bean> <tx:annotation-driven /> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> When I try to use @Transactional annotation I am getting an error java.lang.NoClassDefFoundError: org/springframework/transaction/interceptor/TransactionInterceptor. I checked my classpath and there is TransactionInterceptor.class. What am I doing wrong? Should I add something? Edit This is my lib folder:

    Read the article

  • Starting ActiveMQ message listener in Tomcat?

    - by Nick Swarr
    I've created an ActiveMQ MessageListener and configured it using Spring. I'm hosting the listener in Tomcat. When I start up the web application (that features only the listener), should the listener automatically start? Or do I need additional configuration? Here's what I have. First, updated the web.xml to allow spring to configure itself on startup, <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/classes/spring/applicationContext.xml</param-value> </context-param> </web-app> Then I created the applicationContext.xml to configure the ActiveMQ listener, <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:amq="http://activemq.apache.org/schema/core" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:annotation-config /> <context:component-scan base-package="com.somepackage"/> <context:property-placeholder location="classpath:env.properties"/> <bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="tcp://localhost:61616" /> </bean> <bean id="documentListener" class="com.somepackage.SomeListener" /> <bean id="container" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="cachingConnectionFactory"/> <property name="messageListener" ref="documentListener"/> <property name="destinationName" value="STOCKS.MSFT" /> </bean> <bean id="cachingConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"> <property name="targetConnectionFactory" ref="jmsFactory" /> <property name="sessionCacheSize" value="1" /> </bean> </beans> And that's it. Based on what I've seen around the web, I can't tell if that's all I need? Maybe I need some other configuration in Tomcat to kick off the listener?

    Read the article

  • Criticise/Recommendations for my code

    - by aLk
    Before i go any further it would be nice to know if there is any major design flaws in my program so far. Is there anything worth changing before i continue? Model package model; import java.sql.*; import java.util.*; public class MovieDatabase { @SuppressWarnings({ "rawtypes", "unchecked" }) public List queryMovies() throws SQLException { Connection connection = null; java.sql.Statement statement = null; ResultSet rs = null; List results = new ArrayList(); try { DriverManager.registerDriver(new com.mysql.jdbc.Driver()); connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "password"); statement = connection.createStatement(); String query = "SELECT * FROM movie"; rs = statement.executeQuery(query); while(rs.next()) { MovieBean bean = new MovieBean(); bean.setMovieId(rs.getInt(1)); bean.setTitle(rs.getString(2)); bean.setYear(rs.getInt(3)); bean.setRating(rs.getInt(4)); results.add(bean); } } catch(SQLException e) { } return results; } } Servlet public class Service extends HttpServlet { @SuppressWarnings("rawtypes") protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Movies!"); MovieDatabase movies = new MovieDatabase(); try { List results = movies.queryMovies(); Iterator it = results.iterator(); while(it.hasNext()) { MovieBean movie = new MovieBean(); movie = (MovieBean)it.next(); out.println(movie.getYear()); } } catch(SQLException e) { } } } Bean package model; @SuppressWarnings("serial") public class MovieBean implements java.io.Serializable { protected int movieid; protected int rating; protected int year; protected String title; public MovieBean() { } public void setMovieId(int movieidVal) { movieid = movieidVal; } public void setRating(int ratingVal) { rating = ratingVal; } public void setYear(int yearVal) { year = yearVal; } public void setTitle(String titleVal) { title = titleVal; } public int getMovieId() { return movieid; } public int getRating() { return rating; } public int getYear() { return year; } public String getTitle() { return title; } }

    Read the article

  • How to use a local Leopard Server Mail server acting "like" an Exchange mail server

    - by Richard Chevre
    We have a local Exchange 2003 server (company .local) who is collecting POP3 mail accounts on a distant (company .com) mailserver. The mails are collected by the Exchange server every 5-10 minutes and stored locally (on company .local), so the users can read them without going on the "real" mail server (company.com) What was explaned to me is that the mail collection is made with POP Now we are migrating on Snow Leopard Server. We have chosen to use a new extension for our local domain: .leo So our mailserver's FQDN is mail.company.leo, and the users have a user [email protected] formated mail address. A) All works fine except that I can't find how to tell the mail.company.leo that he must retreive the mails from the "real" public server (mail.company.com) I'm hoping to use IMAP and not POP. I can send mail using SMTP relay from mail.company.leo but (I know it's trivial) answering is not possible, even if I specify the reply-to as [email protected] (this seems to be related to A) ) I don't know if it's very complicated (I suspect not, but...) to achieve what I want to do, and I'm not a genius. But as I'm a little bit lost, I hopesomebody can or will help me. Solving this will allow us to use iCal invitations too, so a lot of services depends of these mailserver settings Some of you discuss the fact thta we choose to use a "new" tld with the .leo extension. We have no problem for that, we could use .local. no problem ;) We used .leo instead of .local just to differentiate the two systems (Exchange and SnowLeopardServer). The question was not about that, it was just to know if we can set a SnowLeopard mail server to act like an Exchange Server. Again thank you for your advice and help Richard Thanks in advance Richard

    Read the article

  • javamail smtp issue

    - by lepricon123
    I am using spring to send mail and for some reason its stripping the from email address. I ma sending the complete address form the sender to the mails server. Following is the log 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 2250, 11, 199, 250, 0, EHLO, -, taq02, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 14, 34, 250, 0, MAIL, -, FROM:<{}>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 32, 35, 250, 0, RCPT, -, TO:<[email protected]>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 681, 130, 250, 0, DATA, -, <27317520.11273009832239.JavaMail.root@taq02>, 10.105.21.299, taq02, 5/4/2010, 14:50:32, SMTPSVC1, taser10, 10.100.20.106, 0, 4, 78, 240, 2265, QUIT, -, taq02, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1110, 0, 95, 0, 0, -, -, 220 *******************************************************************************************, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1110, 0, 4, 0, 0, EHLO, -, TASER10.ccdomain.com, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1188, 0, 65, 0, 0, -, -, 250-acsinet11.emailserver.com Hello [4.79.35.186], pleased to meet you, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1188, 0, 4, 0, 0, MAIL, -, FROM:<{}@TASER10> SIZE=945, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1328, 0, 34, 0, 0, -, -, 250 2.1.0 <{}@TASER10>... Sender ok, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1328, 0, 4, 0, 0, RCPT, -, TO:<[email protected]>, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1375, 0, 87, 0, 0, -, -, 553 5.1.8 <[email protected]>... Domain of sender address {}@TASER10 does not exist, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1375, 0, 4, 0, 0, RSET, -, -, 148.142.126.203, OutboundConnectionResponse, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1407, 0, 21, 0, 0, -, -, 250 2.0.0 Reset state, 148.142.126.203, OutboundConnectionCommand, 5/4/2010, 14:50:33, SMTPSVC1, TASER10, -, 1422, 0, 4, 0, 0, RSET, -, -, The mail server is taser10 and the sender is on taq02 erver as follows http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" <bean id="smtpAuthenticator" class="SmtpAuthenticator"> <constructor-arg value="[email protected]" /> <constructor-arg value="password" /> </bean> <bean id="mailSession" class="javax.mail.Session" factory-method="getInstance"> <constructor-arg> <props> <prop key="mail.smtp.auth">false</prop> <prop key="mail.smtp.socketFactory.port">465</prop> <prop key="mail.smtp.socketFactory.class"> javax.net.ssl.SSLSocketFactory</prop> <prop key="mail.smtp.socketFactory.fallback"> false </prop> </props> </constructor-arg> <constructor-arg ref="smtpAuthenticator" /> </bean> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="10.100.20.106" /> </bean> <bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage"> <property name="from" value="[email protected]" /> <property name="subject" value="Subject AB"/> </bean>

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >