Danisevsky, This has been used by loads of people and on all sorts of OSs and versions. I also just successfully tried it on XP, Vista & Ubuntu in case you had come across something that has been missed.
Paste what you copy from "Leg Up" into a text editor to see what's causing that exception on your box and let us know what you find to help others that may hit a similar issue with copy 'n' paste or whatever else it turns out to be specific to your environment (possibly a proxy issue - ie you haven't told Maven about your proxy, but your browser is set up properly to use it). Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com danisevsky danisevsky wrote: > > I can access this file in web browser and it seems that there is no break > line. I will try it later in linux. > > thank you > > > 2009/10/8 richardwilko <richardjohnwilkin...@gmail.com> > >> >> hi, >> >> The error is saying that maven cannot find the archetype catalog file, >> please make sure you can access this file in a web browser [1], and >> ensure >> that you do not have any line breaks in your maven command (not sure if >> it >> is just how the command appears on nabble but it looks like there is a >> line >> break in the middle of the url) >> >> >> [1] - http://legup.googlecode.com/svn/repo/archetype-catalog.xml >> >> >> Hope this helps >> >> Regards - Richard Wilkinson >> Developer, >> jWeekend: OO & Java Technologies - Development and Training >> http://jWeekend.com >> >> >> >> danisevsky danisevsky wrote: >> > >> > Hello, I was trying generate Wicket - Spring - JPA project and I get >> > following error: >> > >> > C:\projects\test>mvn archetype:generate -B -DarchetypeCatalog= >> > http://legup.googl >> > >> ecode.com/svn/repo/archetype-catalog.xml-DarchetypeArtifactId=wicket-spring-jpa >> > -archetype -DarchetypeGroupId=com.jweekend -DarchetypeVersion=0.8.0 >> > -DgroupId=co >> > m.mycompany -DartifactId=mycompany -Dversion=1.0-SNAPSHOT >> > -Dpackage=com.mycompan >> > y >> > [INFO] Scanning for projects... >> > [INFO] Searching repository for plugin with prefix: 'archetype'. >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] Building Maven Default Project >> > [INFO] task-segment: [archetype:generate] (aggregator-style) >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] Preparing archetype:generate >> > [INFO] No goals needed for project - skipping >> > [INFO] Setting property: classpath.resource.loader.class => >> > 'org.codehaus.plexus >> > .velocity.ContextClassLoaderResourceLoader'. >> > [INFO] Setting property: velocimacro.messages.on => 'false'. >> > [INFO] Setting property: resource.loader => 'classpath'. >> > [INFO] Setting property: resource.manager.logwhenfound => 'false'. >> > [INFO] [archetype:generate] >> > [INFO] Generating project in Batch mode >> > [WARNING] Error reading archetype catalog >> > http://legup.googlecode.com/svn/repo/a >> > rchetype-catalog.xml >> > org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate >> > resource >> > in repository >> > at >> > org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD >> > ata(LightweightHttpWagon.java:100) >> > at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) >> > at >> > org.apache.maven.archetype.source.RemoteCatalogArchetypeDataSource.ge >> > tArchetypeCatalog(RemoteCatalogArchetypeDataSource.java:74) >> > at >> > org.apache.maven.archetype.DefaultArchetype.getRemoteCatalog(DefaultA >> > rchetype.java:203) >> > at >> > org.apache.maven.archetype.ui.DefaultArchetypeSelector.getArchetypesB >> > yCatalog(DefaultArchetypeSelector.java:249) >> > at >> > org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetyp >> > e(DefaultArchetypeSelector.java:74) >> > at >> > org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execu >> > te(CreateProjectFromArchetypeMojo.java:180) >> > at >> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >> > nManager.java:453) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >> > ultLifecycleExecutor.java:559) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone >> > Goal(DefaultLifecycleExecutor.java:513) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >> > ltLifecycleExecutor.java:483) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >> > dleFailures(DefaultLifecycleExecutor.java:331) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >> > ts(DefaultLifecycleExecutor.java:228) >> > at >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >> > fecycleExecutor.java:142) >> > at >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) >> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) >> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> > at >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >> > java:39) >> > at >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >> > sorImpl.java:25) >> > at java.lang.reflect.Method.invoke(Method.java:597) >> > at >> > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >> > at >> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >> > >> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >> > Caused by: java.io.FileNotFoundException: >> > http://legup.googlecode.com/svn/repo/a >> > rchetype-catalog.xml/archetype-catalog.xml >> > at >> > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon >> > nection.java:1288) >> > at >> > org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD >> > ata(LightweightHttpWagon.java:83) >> > ... 24 more >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [ERROR] BUILD FAILURE >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] : java.lang.NullPointerException >> > null >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] For more information, run Maven with the -e switch >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > [INFO] Total time: 2 seconds >> > [INFO] Finished at: Thu Oct 08 13:30:48 CEST 2009 >> > [INFO] Final Memory: 8M/14M >> > [INFO] >> > >> ------------------------------------------------------------------------ >> > C:\projects\test> >> > >> > 2009/10/6 richardwilko <richardjohnwilkin...@gmail.com> >> > >> >> >> >> Hi, >> >> >> >> Yes, you will need to bind every dao (and eveything you want to >> inject). >> >> >> >> However there are other ways to do it with guice, like the >> @ImplementedBy >> >> annotation (think its called that, check with the guice docs, sending >> >> this >> >> from my phone so can't check atm). Afaik you would need to make spring >> >> beans >> >> for every dao if using spring, so its not that bad. >> >> >> >> Glad you have it working now, >> >> >> >> Richard >> >> >> >> >> >> Jeffrey Schneller wrote: >> >> > >> >> > Here is the My Guice Module that I created. It looks like the one >> in >> >> the >> >> > archetype. Do I need to bind every DAO? So that then I need to >> inject >> >> > the DAO when it is needed? >> >> > >> >> > >> >> > >> >> > public class AppModule extends AbstractModule { >> >> > /* (non-Javadoc) >> >> > * @see com.google.inject.AbstractModule#configure() >> >> > */ >> >> > @Override >> >> > protected void configure() { >> >> > bind(Initializer.class).asEagerSingleton(); >> >> > >> >> > //warp persist stuff >> >> > install(PersistenceService.usingHibernate() >> >> > .across(UnitOfWork.REQUEST) >> >> > >> >> .transactedWith(TransactionStrategy.LOCAL) >> >> > .buildModule()); >> >> > >> >> > // hibernate stuff >> >> > // default values from development >> >> > String connectionUrl = "<the url>"; >> >> > String username = "<the username>"; >> >> > String password = "<the password>"; >> >> > >> >> > try { >> >> > InitialContext context = new InitialContext(); >> >> > connectionUrl = (String) >> >> > context.lookup("java:comp/env/hibernate.connection.url"); >> >> > username = (String) >> >> > context.lookup("java:comp/env/hibernate.connection.username"); >> >> > password = (String) >> >> > context.lookup("java:comp/env/hibernate.connection.password"); >> >> > } catch (NamingException e1) { >> >> > // TODO Auto-generated catch block >> >> > e1.printStackTrace(); >> >> > } >> >> > >> >> > // annotation and xml >> >> > final Configuration config = new >> >> Configuration().configure(); >> >> > config.setProperty("hibernate.connection.url", >> >> connectionUrl); >> >> > config.setProperty("hibernate.connection.username", >> >> username); >> >> > config.setProperty("hibernate.connection.password", >> >> password); >> >> > >> >> config.setProperty("hibernate.current_session_context_class", >> >> > "managed"); >> >> > >> >> > bind(Configuration.class).toInstance(config); >> >> > >> >> > //dao stuff >> >> > // DO I NEED TO DO THIS FOR EVERY DAO OBJECT????? >> >> > bind(AccountDao.class).to(HibernateAccountDao.class); >> >> > bind(CountryDao.class).to(HibernateCountryDao.class); >> >> > >> bind(LanguageDao.class).to(HibernateLanguageDao.class); >> >> > >> >> > >> >> >> bind(TerritorySalesCodesDao.class).to(HibernateTerritorySalesCodesDao.class); >> >> > >> >> >> bind(RegionSalesCodesDao.class).to(HibernateRegionSalesCodesDao.class); >> >> > >> >> > >> >> >> bind(CountrySalesCodesDao.class).to(HibernateCountrySalesCodesDao.class); >> >> > >> >> bind(AccountTypeDao.class).to(HibernateAccountTypeDao.class); >> >> > >> >> bind(AccountAuditDao.class).to(HibernateAccountAuditDao.class); >> >> > } >> >> > >> >> > @Singleton >> >> > public static class Initializer { >> >> > @Inject >> >> > >> Initializer(com.wideplay.warp.persist.PersistenceService >> >> service) { >> >> > service.start(); >> >> > } >> >> > } >> >> > } >> >> > >> >> > -----Original Message----- >> >> > From: richardwilko [mailto:richardjohnwilkin...@gmail.com] >> >> > Sent: Tuesday, October 06, 2009 2:56 PM >> >> > To: users@wicket.apache.org >> >> > Subject: RE: Leg Up for Wicket, Spring, Guice, JPA, Warp, >> EclipseLink, >> >> > Hibernate ... projects >> >> > >> >> > >> >> > Jeffrey, >> >> > >> >> > I expect the changes you made to the Guice Module are the reason why >> >> the >> >> > session is null, could you paste in the contents of it. >> >> > >> >> > >> >> > Regards - Richard Wilkinson >> >> > Developer, >> >> > jWeekend: OO & Java Technologies - Development and Training >> >> > http://jWeekend.com >> >> > >> >> > >> >> > >> >> > Jeffrey Schneller wrote: >> >> >> >> >> >> Thanks for the idea but this didn't work either. Any other ideas? >> I >> >> >> would expect the archetype to work correctly. >> >> >> >> >> >> >> >> >> >> >> >> -----Original Message----- >> >> >> From: Erik Post [mailto:eriksen...@gmail.com] >> >> >> Sent: Tuesday, October 06, 2009 2:09 PM >> >> >> To: users@wicket.apache.org >> >> >> Subject: Re: Leg Up for Wicket, Spring, Guice, JPA, Warp, >> EclipseLink, >> >> >> Hibernate ... projects >> >> >> >> >> >> Hi Jeffrey, >> >> >> >> >> >> I have *absolutely* no idea if this will help you, but I had the >> same >> >> >> with Spring. It started working when i put the injection annotation >> on >> >> >> the method instead of on the variable. >> >> >> >> >> >> Good luck, >> >> >> Erik >> >> >> >> >> >> On Tue, Oct 6, 2009 at 7:59 PM, Jeffrey Schneller >> >> >> <jeffrey.schnel...@envisa.com> wrote: >> >> >>> I took the archetype for Guice, Warp, Hibernate and modified for >> my >> >> >>> application. All my code looks similar to the code from the >> >> archetype. >> >> >>> The only difference is I am not using the AnnotatinConfiguration >> but >> >> >>> just the plain Configuration. I am also using c3po connection >> >> pooling >> >> >>> with Oracle. >> >> >>> >> >> >>> However, I am still not able to inject the Hibernate Session into >> my >> >> DAO >> >> >>> objects. Any ideas? I don't see any exceptions being thrown. >> >> >>> >> >> >>> @Inject >> >> >>> Provider<Session> session; >> >> >>> >> >> >>> @Transactional(type=TransactionType.READ_ONLY) >> >> >>> public List<T> findAll() { >> >> >>> Criteria criteria = >> >> >>> session.get().createCriteria(persistentClass); >> >> >>> return criteria.list(); >> >> >>> } >> >> >>> >> >> >>> >> >> >>> The session in the findAll method is always coming back as <null>. >> >> >>> >> >> >>> What am I doing wrong? It doesn't seem to be that difficult to >> >> >>> implement. >> >> >>> >> >> >>> >> >> >>> Thanks. >> >> >>> >> >> >>> >> >> >>> >> >> >>> -----Original Message----- >> >> >>> From: jWeekend [mailto:jweekend_for...@cabouge.com] >> >> >>> Sent: Tuesday, October 06, 2009 9:48 AM >> >> >>> To: users@wicket.apache.org >> >> >>> Subject: Leg Up for Wicket, Spring, Guice, JPA, Warp, EclipseLink, >> >> >>> Hibernate ... projects >> >> >>> >> >> >>> We have launched jWeekend's Leg Up page [1]. >> >> >>> >> >> >>> You can generate a command and run it at your console to create a >> >> simple >> >> >>> project using one of our archetypes. The projects you will >> generate >> >> will >> >> >>> include enough configuration, code and/or some tests to get you >> >> started, >> >> >>> quickly. Our archetypes currently support various combinations of >> >> >>> Spring, Guice, WarpPersist, JPA (with one or more implementation >> from >> >> >>> EclipseLink, Hibernate, OpenJPA) and Wicket. >> >> >>> >> >> >>> Let us know if this is useful and if you'd like to see more >> >> >>> combinations. Also feel free to raise any issues [2]. >> >> >>> >> >> >>> Regards - Cemal >> >> >>> jWeekend >> >> >>> OO & Java Technologies, Wicket Training and Development >> >> >>> http://jWeekend.com >> >> >>> >> >> >>> [1] http://jweekend.com/dev/LegUp >> >> >>> [2] http://code.google.com/p/legup/issues/list >> >> >>> >> >> >>> >> >> >>> >> --------------------------------------------------------------------- >> >> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> >>> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >>> >> >> >>> >> >> >>> >> --------------------------------------------------------------------- >> >> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> >>> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >>> >> >> >>> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> >> >> >> >> >> >> > >> >> > >> >> > ----- >> >> > http://richard-wilkinson.co.uk My blog: >> http://richard-wilkinson.co.uk >> >> > -- >> >> > View this message in context: >> >> > >> >> >> http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25774618.html >> >> > Sent from the Wicket - User mailing list archive at Nabble.com. >> >> > >> >> > >> >> > >> --------------------------------------------------------------------- >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> > For additional commands, e-mail: users-h...@wicket.apache.org >> >> > >> >> > >> >> > >> >> >> >> >> >> ----- >> >> http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25774951.html >> >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> > >> > >> >> >> ----- >> http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk >> -- >> View this message in context: >> http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25802816.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > -- View this message in context: http://www.nabble.com/Leg-Up-for-Wicket%2C-Spring%2C-Guice%2C-JPA%2C-Warp%2C-EclipseLink%2C-Hibernate-...-projects-tp25769134p25806632.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org