Search Results

Search found 15134 results on 606 pages for 'spring framework'.

Page 25/606 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Problem setting up Zend Framework to run with Netbeans

    - by Starx
    I am trying to get Zend Framework working with netbeans, but every time there is the error "php.exe"' is not recognized as an internal or external command, operable program or batch file. I am using WAMP server 2.0 it is installed in e:\wamp My Zend framework is inside e:\wamp\www\ZendFramework-1.10.5 I have located the ZendFramework script as: E:\wamp\www\ZendFramework-1.10.5\bin\zf.bat I am also registered the module. What am i doing wrong? I am running on Windows 7 32 bit, using NETbean 6.9 RC1

    Read the article

  • Microsoft Silverlight Analytics Framework - Day 2 Part 2 of MIX 2010

    - by GeekAgilistMercenary
    I went to the session on Microsoft Silverlight Analytics Framework (MSAF) today while here at MIX 2010.  It was a great walk through the features, ideas, and what the end goal is.  Michael Scherotter did a great job of lining up the ideas, intentions, and the functional ideas behind the framework. The framework is built around the Silverlight Behaviors.  If you aren't sure what behaviors are, check out these entries from Nikhilk.net Silverlight Behaviors, Silverlight 3 Drag Behavior, An Introduction to Behaviors, Triggers, and Actions, and of course the MSDN Documentation on the matter. Some of the key features of the framework is to support out-of-browser scenarios, which works perfectly with out Webtrends DX Web Services.  Offline scenarios, which again, we have worked toward supporting at Webtrends DC Web Services via caching and other criteria as needed.  Another feature that I was really stoked about is the Microsoft Expression Blend integration that removes the need for coding, thus simplifying the addition of analytics components based on events or other actions within a Silverlight Application.  This framework also easily supports A/B Testing (again, something we do quit a bit of at Webtrends with Webtrends Optimize. The last thing I really wanted to point out was the control support that this framework has support in already from Telerik RadControls, Smooth Streaming Media Element, and Microsoft Silverlight Media Framework Player 1.0.  These are implemented with behaviors and handlers exposed via MEF (Managed Extensibility Framework). All in all, great second day, great analytics framework for Silverlight, and great presentation.  Until tomorrow, adieu. For this original entry and all sorts of other technical gibberish I write, check out my other blog Agilist Mercenary.

    Read the article

  • Problems using HibernateTemplate: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;

    - by user2104160
    I am quite new in Spring world and I am going crazy trying to integrate Hibernate in Spring application using HibernateTemplate abstract support class I have the following class to persist on database table: package org.andrea.myexample.HibernateOnSpring.entity; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="person") public class Person { @Id @GeneratedValue(strategy=GenerationType.AUTO) private int pid; private String firstname; private String lastname; public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } } Next to it I have create an interface named PersonDAO in wich I only define my CRUD method. So I have implement this interface by a class named PersonDAOImpl that also extend the Spring abstract class HibernateTemplate: package org.andrea.myexample.HibernateOnSpring.dao; import java.util.List; import org.andrea.myexample.HibernateOnSpring.entity.Person; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; public class PersonDAOImpl extends HibernateDaoSupport implements PersonDAO{ public void addPerson(Person p) { getHibernateTemplate().saveOrUpdate(p); } public Person getById(int id) { // TODO Auto-generated method stub return null; } public List<Person> getPersonsList() { // TODO Auto-generated method stub return null; } public void delete(int id) { // TODO Auto-generated method stub } public void update(Person person) { // TODO Auto-generated method stub } } (at the moment I am trying to implement only the addPerson() method) Then I have create a main class to test the operation of insert a new object into the database table: package org.andrea.myexample.HibernateOnSpring; import org.andrea.myexample.HibernateOnSpring.dao.PersonDAO; import org.andrea.myexample.HibernateOnSpring.entity.Person; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class MainApp { public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml"); System.out.println("Contesto recuperato: " + context); Person persona1 = new Person(); persona1.setFirstname("Pippo"); persona1.setLastname("Blabla"); System.out.println("Creato persona1: " + persona1); PersonDAO dao = (PersonDAO) context.getBean("personDAOImpl"); System.out.println("Creato dao object: " + dao); dao.addPerson(persona1); System.out.println("persona1 salvata nel database"); } } As you can see the PersonDAOImpl class extends HibernateTemplate so I think that it have to contain the operation of setting of the sessionFactory... The problem is that when I try to run this MainApp class I obtain the following exception: Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session; at org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:323) at org.springframework.orm.hibernate3.SessionFactoryUtils.getSession(SessionFactoryUtils.java:235) at org.springframework.orm.hibernate3.HibernateTemplate.getSession(HibernateTemplate.java:457) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:392) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:737) at org.andrea.myexample.HibernateOnSpring.dao.PersonDAOImpl.addPerson(PersonDAOImpl.java:12) at org.andrea.myexample.HibernateOnSpring.MainApp.main(MainApp.java:26) Why I have this problem? how can I solve it? To be complete I also insert my pom.xml containing my dependencies list: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.andrea.myexample</groupId> <artifactId>HibernateOnSpring</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>HibernateOnSpring</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- Dipendenze di Spring Framework --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>3.2.1.RELEASE</version> </dependency> <dependency> <!-- Usata da Hibernate 4 per LocalSessionFactoryBean --> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>3.2.0.RELEASE</version> </dependency> <!-- Dipendenze per AOP --> <dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>2.2.2</version> </dependency> <!-- Dipendenze per Persistence Managment --> <dependency> <!-- Apache BasicDataSource --> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency> <dependency> <!-- MySQL database driver --> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.23</version> </dependency> <dependency> <!-- Hibernate --> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.1.9.Final</version> </dependency> </dependencies> </project>

    Read the article

  • Linking errors when building against Boost Unit Test Framework

    - by Rafid
    I am trying to use Boost Unit Test Framework by building a stand alone library as detailed here: http://www.boost.org/doc/libs/1_35_0/libs/test/doc/components/utf/compilation.html So I created a VC library project containing the mentioned files and build it and it was successful. Then I created a test project and referenced the library project I just created, but when I tried to build it, I got the following linking errors: 1>Type.obj : error LNK2019: unresolved external symbol "bool __cdecl boost::test_tools::tt_detail::check_impl(class boost::test_tools::predicate_result const &,class boost::unit_test::lazy_ostream const &,class boost::unit_test::basic_cstring<char const >,unsigned __int64,enum boost::test_tools::tt_detail::tool_level,enum boost::test_tools::tt_detail::check_type,unsigned __int64,...)" (?check_impl@tt_detail@test_tools@boost@@YA_NAEBVpredicate_result@23@AEBVlazy_ostream@unit_test@3@V?$basic_cstring@$$CBD@63@_KW4tool_level@123@W4check_type@123@3ZZ) referenced in function "public: void __cdecl test1::test_method(void)" (?test_method@test1@@QEAAXXZ) 1>BoostUnitTestFramework.lib(framework.obj) : error LNK2019: unresolved external symbol "void __cdecl boost::debug::break_memory_alloc(long)" (?break_memory_alloc@debug@boost@@YAXJ@Z) referenced in function "void __cdecl boost::unit_test::framework::init(class boost::unit_test::test_suite * (__cdecl*)(int,char * * const),int,char * * const)" (?init@framework@unit_test@boost@@YAXP6APEAVtest_suite@23@HQEAPEAD@ZH0@Z) 1>BoostUnitTestFramework.lib(framework.obj) : error LNK2019: unresolved external symbol "void __cdecl boost::debug::detect_memory_leaks(bool)" (?detect_memory_leaks@debug@boost@@YAX_N@Z) referenced in function "void __cdecl boost::unit_test::framework::init(class boost::unit_test::test_suite * (__cdecl*)(int,char * * const),int,char * * const)" (?init@framework@unit_test@boost@@YAXP6APEAVtest_suite@23@HQEAPEAD@ZH0@Z) 1>BoostUnitTestFramework.lib(execution_monitor.obj) : error LNK2019: unresolved external symbol "bool __cdecl boost::debug::attach_debugger(bool)" (?attach_debugger@debug@boost@@YA_N_N@Z) referenced in function "public: int __cdecl boost::detail::system_signal_exception::operator()(unsigned int,struct _EXCEPTION_POINTERS *)" (??Rsystem_signal_exception@detail@boost@@QEAAHIPEAU_EXCEPTION_POINTERS@@@Z) 1>BoostUnitTestFramework.lib(execution_monitor.obj) : error LNK2019: unresolved external symbol "bool __cdecl boost::debug::under_debugger(void)" (?under_debugger@debug@boost@@YA_NXZ) referenced in function "public: int __cdecl boost::execution_monitor::execute(class boost::unit_test::callback0<int> const &)" (?execute@execution_monitor@boost@@QEAAHAEBV?$callback0@H@unit_test@2@@Z) 1>BoostUnitTestFramework.lib(unit_test_main.obj) : error LNK2019: unresolved external symbol "class boost::unit_test::test_suite * __cdecl init_unit_test_suite(int,char * * const)" (?init_unit_test_suite@@YAPEAVtest_suite@unit_test@boost@@HQEAPEAD@Z) referenced in function main 1>C:\Users\Rafid\Workspace\MyPhysics\Builds\VC10\Tests\Debug\Tests.exe : fatal error LNK1120: 6 unresolved externals They seem to be mainly caused by Boost debug library, but I can't see a reason why I should get linking errors putting in mind that Boost debug library only need to be included as header files, rather than linking against as a library! Any ideas?!

    Read the article

  • Choosing an installer product that is free and will download/install the .NET Framework

    - by Coder7862396
    I'm currently using the Visual Studio Installer (Setup Project) in Visual Studio 2010 as the installer for MyProgram. It has some quirky bugs and is not very customizable so I would like to switch to another installer product. Here are my requirements: Must be free (and licensed for commercial use) Must install the Windows Installer 3.1 and .NET Framework 4.0 if the client doesn't have them The installer will download them if they are not available The code for detecting the .NET Framework and downloading it must be written by Microsoft (I do not want to have to update hard-coded URLs and registry keys in the future). I know that the Windows SDK includes a setup bootstrap that does this (C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper) In the future, when .NET Framework 5 is released and MyProgram uses it, no installer code will need to be changed, the updated installer product should see that MyProgram now uses the .NET Framework version 5 and will install that Here are my current choices: Visual Studio Installer: Automatically detects/downloads/installs Windows Installer and .NET Framework using a bootstrapper Setup.exe (Good!) Limited/buggy functionality (Uninstall shortcuts in the Start Menu cause empty folders to be left behind during uninstall, asking the user if they want a desktop shortcut requires a lot of work, etc.) NSIS: Doesn't natively support the .NET Framework so adding it as a prerequisite requires excessive coding, hardcoded URLS, etc. Inno Setup: Doesn't natively support the .NET Framework so adding it as a prerequisite requires excessive coding, hardcoded URLs, etc. WiX: Steep learning curve... not sure if I want to spend weeks learning it only to find out that it has the same uninstall problem as the Visual Studio Installer (because they both use MSI files) InstallShield LE 2010: Downloading it requires me to setup a fake email account to register just to download it. Then once it is installed it has to contact the company's servers and transmit some private information to them before I'm even allowed to try the free version. This is the most insidious form of DRM that there is and I will not accept it.

    Read the article

  • iphone: cross platform references and referencing external framework resources

    - by dan
    hi there working on an iphone app and separate framework. the separate framework is for an API that i'm building for use in multiple future apps. this api now needs to reference resources (images). what i would like to do is keep the resources WITH the API framework as local set of resources. i followed the instructions from http://www.clintharris.net/2009/iphone-app-shared-libraries/ to setup my app's project to use the headers from the separate API framework. what i can't seem to figure out is how to automatically load the framework's resources into the app's xcode environment so they can be linked in at app compile time. sure, i can drag the resources across from the framework into the main app's set of resources. but that seems kinda ugly and another step that possibly can be automated (??) anyone know of a better way? it would be great if any changes from the framework would be automatically available in the main app (due to the project 'link-age'). thanks for any help/tips/suggestions...

    Read the article

  • Slides and links for Entity Framework 4 and Azure from Devweek 2010

    - by Eric Nelson
    Last week (March 2010) I presented on Entity Framework 4 and the Windows Azure Platform at www.devweek.com. As usual, it was a great conference and I caught up with lots of old friends and made some new ones along the way. Entity Framework 4 Entity Framework 4 In Microsoft Visual Studio 2010 View more presentations from Eric Nelson. Windows Azure and SQL Azure Building An Application For Windows Azure And Sql Azure View more presentations from Eric Nelson. Entity Framework 4 Related Links Poll on Entity Framework 4 – one year on 101 EF4 Resources Recent resources on Entity Framework 4 Installing all the bits to demo Entity Framework 4 on the Visual Studio 2010 Release Candidate Azure Related Links UK Azure Online Community – join today. UK Windows Azure Site Start working with Windows Azure TCO and ROI calculator for Windows Azure

    Read the article

  • How to add custom SOAP-Header element to the generated WSDL in Spring-WS

    - by Petr Macek
    Hi, we are migrating from WebLogic web-services to Spring-WS (1.5.X). There is currently one issue we are facing: We need to pass a context object (on WLS it is passed as SOAP-Header element) to other services that are still running on WLS from the Spring-WS powered service. The header element is still formulated on client side and the newly created WS (Spring-WS) should just pass it to other services. I can imagine how the custom element would be passed: override the doWithMessage(WebServiceMessage message) method... Is there a way to generate the wsdl with the help of DefaultWsdl11Definition to contain that custom header element? See the example: <wsdl:operation name="GetSomeInformation"> <soap:operation soapAction="http://www.dummyservice.com/InformationService/GetSomeInformation" /> <wsdl:input> <soap:body use="literal" /> <soap:header message="ctx:ServiceContextMessage" part="serviceContext" use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> <wsdl:fault name="Error"> <soap:fault name="Error" use="literal" /> </wsdl:fault> </wsdl:operation> Thanks for help

    Read the article

  • Spring Security: Multiple Logins to the same resources: Form Login + Facebook Connect (uid, sessionK

    - by Daxon
    To begin I know about http://blog.kadirpekel.com/2009/11/09/facebook-connect-integration-with-spring-security/ The only problem is that it completely replaces the Form Login with Facebook Connect. I have the native form login in place, I also have Facebook Connect in place, Upon gathering user information I link it to a native account but without a password. At that point I would like to call a link or method to start process of going into the Spring Security Filter Chain. Here is the source code that works, but am trying to modify. It contains all the files I'm taking about. Now from what I understand I need to add a custom FacebookAuthenticationProvider so that my AuthenticationManager knows about it. <bean id="facebookAuthenticationProvider" class="org.springframework.security.facebook.FacebookAuthenticationProvider"> </bean> <security:authentication-manager alias="authenticationManager"> <security:authentication-provider ref="facebookAuthenticationProvider" /> </security:authentication-manager> Then within the FacebookAuthenticationProvider I would have to call an FacebookAuthenticationToken that would take my the current facebook Uid and SessionKey of the user. Then try authenticate this Token. So where does the FacebookAuthenticationFilter come into it? I'm just trying to understand the order at which these 3 files are called. As if you were trying to implement any other custom authentication. FacebookAuthenticationFilter.java FacebookAuthenticationProvider.java FacebookAuthenticationToken.java I have also posted this on the Spring Security Forum

    Read the article

  • Spring MVC parameter validation

    - by Don
    Hi, I've defined a controller, validator and command class for a Spring 2.5 MVC application like this: public class ResourceController extends AbstractCommandController { private MessageRetriever messageRetriever; protected ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { ResourceCommand resourceCommand = (ResourceCommand) command; // I NEED TO CHECK HERE IF COMMAND IS VALID? } public static class ResourceCommand { private String module; private String site; private String lang; // GETTERS AND SETTERS OMITTED } public static class ResourceValidator implements Validator { public boolean supports(Class clazz) { return ResourceCommand.class.isAssignableFrom(clazz); } public void validate(Object obj, Errors errors) { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "module", "MODULE_REQUIRED"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "site", "SITE_REQUIRED"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "lang", "LANG_REQUIRED"); } } } I have wired these all together in the application context: <bean id="resourceController" class="com.amadeus.jcp.ui.framework.localization.ResourceController"> <property name="commandClass" value="com.amadeus.jcp.ui.framework.localization.ResourceController.ResourceCommand"/> <property name="validator"> <bean class="com.amadeus.jcp.ui.framework.localization.ResourceController.ResourceValidator"/> </property> </bean> However, I can't figure out how to actually check whether the command is valid or not - I assume the framework calls the validator, but how do I get access to the result? Incidentally, I'm using Java 1.4, so can't use any solutions that require annotations or other Java 1.5 features. Thanks, Don

    Read the article

  • google appengine local datastore integration testing with spring

    - by mirror303
    Hi all, I want to write some integration tests to see how my spring-managed DAO's behave when talking to the appengine datastore. Following the spring manual I will be providing my test-classes with the proper annotations: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext.xml" }) After a lot of browsing I found this blog post dating back to august '09 from somebody doing exactly what I want to achieve. It involves writing a TestEnvironment class that implements ApiProxy.Environment plus talking to ApiProxyLocalImpl. However, if I look at the current docs (for version 1.3.1), it seems that this has been replaced by newing an instance of the framework provided LocalDatastoreServiceTestConfig which is passed to a LocalServiceTestHelper. It is too bad that the appengine docs don't show an example how to do this with JPA because then the spring wiring would be trivial. Trying to follow the route outlined in the blog posting has me running into a compiler messages telling me that classes such as ApiProxyLocalImpl are not visible by me. Hence, there must be a new way of doing it, which probably involves the LocalServiceTestHelper. My question: Does anybody know how? I know I will need to configure an EntityManagerFactory and provide it with the Datastore connection somehow... but how? :)

    Read the article

  • appengine local datastore integration testing with spring

    - by mirror303
    Hi all, I want to write some integration tests to see how my spring-managed DAO's behave when talking to the appengine datastore. Following the spring manual I will be providing my test-classes with the proper annotations: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext.xml" }) After a lot of browsing I found this blog post dating back to august '09 from somebody doing exactly what I want to achieve. It involves writing a TestEnvironment class that implements ApiProxy.Environment plus talking to ApiProxyLocalImpl. However, if I look at the current docs (for version 1.3.1), it seems that this has been replaced by newing an instance of the framework provided LocalDatastoreServiceTestConfig which is passed to a LocalServiceTestHelper. It is too bad that the appengine docs don't show an example how to do this with JPA because then the spring wiring would be trivial. Trying to follow the route outlined in the blog posting has me running into a compiler messages telling me that classes such as ApiProxyLocalImpl are not visible by me. Hence, there must be a new way of doing it, which probably involves the LocalServiceTestHelper. My question: Does anybody know how? I know I will need to configure an EntityManagerFactory and provide it with the Datastore connection somehow... but how? :)

    Read the article

  • How to marshall non-string objects with JAXB and Spring

    - by lesula
    I was trying to follow this tutorial in order to create my own restful web-service using Spring framework. The client do a GET request to, let's say http://api.myapp/app/students and the server returns an xml version of the object classroom: @XmlRootElement(name = "class") public class Classroom { private String classId = null; private ArrayList<Student> students = null; public Classroom() { } public String getClassId() { return classId; } public void setClassId(String classId) { this.classId = classId; } @XmlElement(name="student") public ArrayList<Student> getStudents() { return students; } public void setStudents(ArrayList<Student> students) { this.students = students; } } The object Student is another bean containing only Strings. In my app-servlet.xml i copied this lines: <bean id="studentsView" class="org.springframework.web.servlet.view.xml.MarshallingView"> <constructor-arg ref="jaxbMarshaller" /> </bean> <!-- JAXB2 marshaller. Automagically turns beans into xml --> <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="classesToBeBound"> <list> <value>com.spring.datasource.Classroom</value> <value>com.spring.datasource.Student</value> </list> </property> </bean> Now my question is: what if i wanted to insert some non-string objects as class variables? Let's say i want a tag containing the String version of an InetAddress, such as <inetAddress>192.168.1.1</inetAddress> How can i force JAXB to call the method inetAddress.toString() in such a way that it appears as a String in the xml? In the returned xml non-string objects are ignored!

    Read the article

  • Spring configuration of C3P0 with Hibernate?

    - by HDave
    I have a Spring/JPA application with Hibernate as the JPA provider. I've configured a C3P0 data source in Spring via: <bean id="myJdbcDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <!-- Connection properties --> <property name="driverClass" value="$DS{database.class}" /> <property name="jdbcUrl" value="$DS{database.url}" /> <property name="user" value="$DS{database.username}" /> <property name="password" value="$DS{database.password}" /> <!-- Pool properties --> <property name="minPoolSize" value="5" /> <property name="maxPoolSize" value="20" /> <property name="maxStatements" value="50" /> <property name="idleConnectionTestPeriod" value="3000" /> <property name="loginTimeout" value="300" /> I then specified this data source in the Spring entity manager factory as follows: <bean id="myLocalEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="myapp-core" /> <property name="dataSource" ref="myJdbcDataSource" /> </bean> However, I recently noticed while browsing maven artifacts a "hibernate-c3p0". What is this? Is this something I need to use? Or do I already have this configured properly?

    Read the article

  • Spring Stripes framework problem

    - by ali
    I am new to stripes and am attempting to integrate spring into stripes In the following code : public class ContactFormActionBeanTest { private static MockServletContext mockServletContext; private static MockHttpSession mockSession; @BeforeClass public static void setup() throws Exception { mockServletContext = new MockServletContext("webmail"); Map<String,String> params = new HashMap<String,String>(); params.put("ActionResolver.Packages", "stripesbook.action"); params.put("Extension.Packages", "stripesbook.ext," + "net.sourceforge.stripes.integration.spring"); mockServletContext.addFilter(StripesFilter.class, "StripesFilter", params); mockServletContext.setServlet(DispatcherServlet.class, "DispatcherServlet", null); mockSession = new MockHttpSession(mockServletContext); mockServletContext.addInitParameter("contextConfigLocation", "/WEB-INF/applicationContext-test.xml"); ContextLoaderListener springContextLoader = new ContextLoaderListener(); springContextLoader.contextInitialized( new ServletContextEvent(mockServletContext)); // Load mock user MockRoundtrip trip = new MockRoundtrip(mockServletContext, MockDataLoaderActionBean.class, mockSession); trip.execute(); // Login mock user trip = new MockRoundtrip(mockServletContext, LoginActionBean.class, mockSession); trip.setParameter("username", "freddy"); trip.setParameter("password", "nadia"); trip.execute("login"); } I get null in springContextLoader ContextLoaderListener springContextLoader = new ContextLoaderListener(); and test fails. Am I missing something? I am using eclipse with maven. Also when I try to deploy it for tomcat 6.0 I get following warnings: WARN net.sourceforge.stripes.util.ResolverUtil - Could not examine class 'stripesbook/ext/ContactFormatter.class' due to a java.lang.UnsupportedClassVersionError with message: Bad version number in .class file (unable to load class stripesbook.ext.ContactFormatter) I have checked to be sure that I am compiling with Java 5(set JDK compiler to 1.5) instead of 1.6 (Java 6); but didn't work out for me and still have problems running spring-stripes integrated project.

    Read the article

  • Trouble with object injection in Spring.Net

    - by Abdel Olakara
    Hi all, I have a issue with my Spring.Net configuration where its not injecting an object. I have a CommService to which an object named GeneralEmail is injected to. Here is the configuration: <!-- GeneralMail Object --> <object id="GeneralMailObject" type="CommUtil.Email.GeneralEmail, CommUtil"> <constructor-arg name="host" value="xxxxx.com"/> <constructor-arg name="port" value="25"/> <constructor-arg name="user" value="[email protected]"/> <constructor-arg name="password" value="xxxxx"/> <constructor-arg name="template" value="xxxxx"/> </object> <!-- Communication Service --> <object id="CommServiceObject" type="TApp.Code.Services.CommService, TApp"> <property name="emailService" ref="GeneralMailObject" /> </object> The communication service object is again injected to many other aspx pages & service. In one scenario, I need to call the commnucation service from an static WebMethod. I try doing: CommService cso = new CommService(); But when i try to get the emailService object, its null! why didn't the spring inject the GeneralMail object into my cso object? What am I doing wrong and how do I access the object from spring container. Thanks in advance for the suggestions and solutions. Reagrds, Abdel Olakara

    Read the article

  • Long running transactions with Spring and Hibernate?

    - by jimbokun
    The underlying problem I want to solve is running a task that generates several temporary tables in MySQL, which need to stay around long enough to fetch results from Java after they are created. Because of the size of the data involved, the task must be completed in batches. Each batch is a call to a stored procedure called through JDBC. The entire process can take half an hour or more for a large data set. To ensure access to the temporary tables, I run the entire task, start to finish, in a single Spring transaction with a TransactionCallbackWithoutResult. Otherwise, I could get a different connection that does not have access to the temporary tables (this would happen occasionally before I wrapped everything in a transaction). This worked fine in my development environment. However, in production I got the following exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction This happened when a different task tried to access some of the same tables during the execution of my long running transaction. What confuses me is that the long running transaction only inserts or updates into temporary tables. All access to non-temporary tables are selects only. From what documentation I can find, the default Spring transaction isolation level should not cause MySQL to block in this case. So my first question, is this the right approach? Can I ensure that I repeatedly get the same connection through a Hibernate template without a long running transaction? If the long running transaction approach is the correct one, what should I check in terms of isolation levels? Is my understanding correct that the default isolation level in Spring/MySQL transactions should not lock tables that are only accessed through selects? What can I do to debug which tables are causing the conflict, and prevent those tables from being locked by the transaction?

    Read the article

  • Spring bean initialization in a web app

    - by EugeneP
    We work with a web application and autowire beans using WebApplicationContextUtils in the init method. Could you clarify some details about bean initialization? The question rises from the static factory method. Suppose there's a bean that is created in a static factory method. As we can see, when the web app is deployed, the ContextLoaderListener initializes all the beans present in Spring xml config file. Now happens such a thing. In the static factory method we run a timer that starts ticking. But in reality we wouldn't want it to start ticking unless the bean is injected into a property of the object ! That is question number one - all the beans are automatically initialized on deploy - correct? And after that when we need an injection, it simply feels the link with the address of the object created during initialization, though OBJECT WAS CREATED ON WEB APP DEPLOY, immediately ! (I assume the default singleton-creation Spring behavior) Second question: are all copies of a web app use the same beans, so all beans are WEB-APP wide, every Spring bean is shared between all the copies of this web app running?

    Read the article

  • ActiveMq integration with Spring 2.5

    - by Tony
    I am using ActiveMq 5.32 with Spring 2.5.5. I use pretty generic configuration, as long as I include the jmsTransactionManager in DefaultMessageListenerContainer, Spring throw an error on start up: "Error creating bean with name 'org.springframework.jms.listener.DefaultMessageListenerContainer#0'" Without the transactionManager attribute , this works fine, but when I add 10 messages to the message queue, a transaction exception will occur. Part of my configurations : <bean class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="emailDestination" /> <property name="messageListener" ref="emailServiceMDP" /> <property name="transactionManager" ref="jmsTransactionManager" /> </bean> <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager"> <property name="connectionFactory" ref="connectionFactory" /> </bean> Does this version of Spring and Activemq has some know issues in integration ? Or do I need additional libs to get jmsTransactionManager to work ?

    Read the article

  • Spring Dependency Injecting an annotated Aspect

    Using Spring I've had some issues with doing a dependency injection on an annotated Aspect class. CacheService is injected upon the Spring context's startup, but when the weaving takes place, it says that the cacheService is null. So I am forced to relook up the spring context manually and get the bean from there. Is there another way of going about it? Here is an example of my Aspect: import org.apache.log4j.Logger; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import com.mzgubin.application.cache.CacheService; @Aspect public class CachingAdvice { private static Logger log = Logger.getLogger(CachingAdvice.class); private CacheService cacheService; @Around("execution(public *com.mzgubin.application.callMethod(..)) &&" + "args(params)") public Object addCachingToCreateXMLFromSite(ProceedingJoinPoint pjp, InterestingParams params) throws Throwable { log.debug("Weaving a method call to see if we should return something from the cache or create it from scratch by letting control flow move on"); Object result = null; if (getCacheService().objectExists(params))}{ result = getCacheService().getObject(params); } else { result = pjp.proceed(pjp.getArgs()); getCacheService().storeObject(params, result); } return result; } public CacheService getCacheService(){ return cacheService; } public void setCacheService(CacheService cacheService){ this.cacheService = cacheService; } }

    Read the article

  • Spring security ldap: no declaration can be found for element 'ldap-authentication-provider'

    - by wuntee
    Following the spring-security documentation: http://static.springsource.org/spring-security/site/docs/3.0.x/reference/ldap.html I am trying to set up ldap authentication (very simple - just need to know if a user is authenticated or not, no authorities mapping needed) and have put this in my applicationContext-security.xml file <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"> ... <ldap-server url="ldap://adapps.company.com:389/dc=company,dc=com" /> <ldap-authentication-provider user-search-filter="(samaccountname={0})" user-search-base="dc=company,dc=com"/> The problem I run into is that it doesnt seem like ldap-authentication-provider; I fell like i may be missing some configuration isn the beans definition. The error I get when trying to run the application is: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 27 in XML document from ServletContext resource [/WEB-INF/rvaContext-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ldap-authentication-provider'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:465) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:395) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ldap-authentication-provider'. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1955) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:725) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:322) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292) at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388) ... 28 more Can anyone see what im missing? Also, is that all I need to add to the security bean in order to authenticate against ldap?

    Read the article

  • spring mvc vs seam

    - by darko petreski
    Hi, Spring mvc is a framework that has been long time out there, it is well documented and proven technology. A lot of web sites are using spring. Seam is a framework based on jsf - rich faces implementation. It has a lot of ajax based components. It uses some heavy stuff like EJB, JPA. All of this is prone to errors and this framework is so slow (at my computer it is almost impossible do develop something because it is really slow, especially redeploying on jboss) But is is very good for back office applications. Does someone have a professional experience with this two frameworks? Can you recommend the better one ? Why? Regards

    Read the article

  • Confused about using SpringMVC Vs JEE project in Netbeans

    - by Sanju
    Hi all, I want to start a my first JEE project. I have read a lot that springMVC framework is a good choice (never used though) My earlier experience with java is not much. only some small app development using Netbeans. so I have some experience using Netbeans. but I see that I can start a JEE project in Netbeans. so what kind of framework netbeans is using underneath. PS: My understanding of framework (e.g. SpringMVC) is that you follow rule of framework to configure your app. and then framework take care or linking your View, controller and model. so if i am using netbeans, do i need to take care of linking of my MVC by myself?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >