cancel
Showing results for 
Search instead for 
Did you mean: 

Spring surf and surf plateform

nihil
Champ in-the-making
Champ in-the-making
Hi everyone,
I'm a newbee here and Ijust installed the Alfresco community 3.3. I need to customise and add new pages and new applications on Share.
But I had a problem in finding useful tutorials for beginners. Infact since the 3.3 is using the Spring surf and most of the tutorial that I could find is for surf platform, I'm wondering if we can still follow these tutorial like:
http://www.benh.co.uk/alfresco/surf-part-1-getting-started/
http://edlovesjava.blogspot.com/2008/12/extending-share-1-creating-share.html

If not, do you have some suggestion for beginner like me for the platform Spring Surf?

Thx very much for your help!!
4 REPLIES 4

nihil
Champ in-the-making
Champ in-the-making
Hi again
Infact I'm trying the add a new page to alfresco share by following the tutorial
http://edlovesjava.blogspot.com/2008/12/extending-share-1-creating-share.html
but I got the following error after deloied the jar

15:44:09,671 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.web.scripts.SearchPath] for bean with name 'webframework.searchpath' defined in URL [jar:file:/C:/Alfresco/tomcat/webapps/share/WEB-INF/lib/deals-share-ext.jar!/alfresco/web-extension/custom-slingshot-application-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.web.scripts.SearchPath
   at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1208)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:568)
   at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1277)
   at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:844)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:539)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   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:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.alfresco.web.scripts.SearchPath
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
   at org.springframework.util.ClassUtils.forName(ClassUtils.java:258)
   at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1229)
   at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1200)
   … 33 more

Plus there's no web-framework-application-context.xml in the repository. Can some tell me how to resolve this problem please, thx very much

mrogers
Star Contributor
Star Contributor
The examples should be O.K. once you correct the package names.   The web script framework and surf are now in spring.

org.springframework.extensions.webscripts

brollie
Champ in-the-making
Champ in-the-making
Hi I got a similar problem.

I just downloaded sts-2.3.3.M1 from SPRING. But can't seem to get the example on this url to work
http://www.springsurf.org/sites/1.0.0.M3/spring-surf-devtools/spring-surf-roo-addon/reference/html/i...

Since I am new to all this I assume that I must be missing something –>" addon install –url http://www.springsurf.org/downloads/1.0.0.M3/spring-surf-roo-addon-1.0.0.M3-roo-addon.zip "

In Roo when I type this out it tells me that there is not such a function… When enquiring help It only gives me the following functions :

* */ - End of block comment
* /* - Start of block comment
* // - Inline comment markers (start of line only)
* ; - Inline comment markers (start of line only)
* backup - Backup your project to a zip file
* class - Creates a new Java class source file in any project path
* controller all - Scaffold a controller for all entities without an existing co
ntroller
* controller class - Create a new manual Controller (ie where you write the meth
ods)
* controller scaffold - Create a new scaffold Controller (ie where we maintain C
RUD automatically)
* database properties list - Shows database configuration details
* database properties remove - Removes a particular database property
* database properties set - Changes a particular database property
* date - Displays the local date and time
* dependency add - Adds a new dependency to the Maven project object model (POM)

* dependency remove - Removes an existing dependency from the Maven project obje
ct model (POM)
* development mode - Switches the system into development mode (greater diagnost
ic information)
* dod - Creates a new data on demand for the specified entity
* email sender setup - Install a Spring JavaMailSender in your project
* email template setup - Configures a template for a SimpleMailMessage
* entity - Creates a new JPA persistent entity in SRC_MAIN_JAVA
* enum constant - Inserts a new enum constant into an enum
* enum type - Creates a new Java enum source file in any project path
* exit - Exits the shell
* felix shell - Passes a command directly through to the Felix shell infrastruct
ure
* field boolean - Adds a private boolean field to an existing Java source file
* field date - Adds a private date field to an existing Java source file
* field email template - Inserts a MailTemplate field into an existing type
* field enum - Adds a private enum field to an existing Java source file
* field jms template - insert a JmsTemplate field into an existing type
* field number - Adds a private numeric field to an existing Java source file
* field other - Inserts a private field into the specified file
* field reference - Adds a private reference field to an existing Java source fi
le (eg the 'many' side of a many-to-one)
* field set - Adds a private Set field to an existing Java source file (eg the '
one' side of a many-to-one)
* field string - Adds a private string field to an existing Java source file
* finder add - Install finders in the given target (must be an entity)
* finder list - List all finders for a given target (must be an entity
* focus - Changes focus to a different type
* gwt setup - Install Google Web Toolkit (GWT) into your project
* help - Shows system help
* hint - Provides step-by-step hints and context-sensitive guidance
* interface - Creates a new Java interface source file in any project path
* jms listener class - Create a new class which is a asynchronous JMS consumer
* jms setup - Install a JMS provider in your project
* logging setup - Configure logging in your project
* metadata for id - Shows detailed information about the metadata item
* metadata for type - Shows detailed metadata for the indicated type
* metadata status - Shows metadata statistics
* metadata trace - Traces metadata event delivery notifications
* osgi find - Finds bundles by name
* osgi headers - Display headers for a specific bundle
* osgi install - Installs a bundle JAR from a given URL
* osgi log - Displays the OSGi log information
* osgi obr deploy - Deploys a specific OSGi Bundle Repository (OBR) bundle
* osgi obr info - Displays information on a specific OSGi Bundle Repository (OBR
) bundle
* osgi obr list - Lists all available bundles from the OSGi Bundle Repository (O
BR) system
* osgi obr start - Starts a specific OSGi Bundle Repository (OBR) bundle
* osgi obr url add - Adds a new OSGi Bundle Repository (OBR) repository file URL

* osgi obr url list - Lists the currently-configured OSGi Bundle Repository (OBR
) repository file URLs
* osgi obr url refresh - Refreshes an existing OSGi Bundle Repository (OBR) repo
sitory file URL
* osgi obr url remove - Removes an existing OSGi Bundle Repository (OBR) reposit
ory file URL
* osgi ps - Displays OSGi bundle information
* osgi resolve - Resolves a specific bundle ID
* osgi scr config - Lists the current SCR configuration
* osgi scr disable - Disables a specific SCR-defined component
* osgi scr enable - Enables a specific SCR-defined component
* osgi scr info - Lists information about a specific SCR-defined component
* osgi scr list - Lists all SCR-defined components
* osgi uninstall - Uninstalls a specific bundle
* osgi update - Updates a specific bundle
* osgi version - Displays OSGi framework version
* perform assembly - Executes the assembly goal via Maven
* perform clean - Executes a full clean (including Eclipse files) via Maven
* perform command - Executes a user-specified Maven command
* perform eclipse - Sets up Eclipse configuration via Maven (only necessary if y
ou have not installed the m2eclipse plugin in Eclipse)
* perform package - Packages the application using Maven, but does not execute a
ny tests
* perform tests - Executes the tests via Maven
* persistence setup - Install or updates a JPA persistence provider in your proj
ect
* poll now - Perform a manual file system poll
* poll speed - Changes the file system polling speed
* poll status - Display file system polling information
* project - Creates a new project
* properties list - Shows the details of a particular properties file
* properties remove - Removes a particular properties file property
* properties set - Changes a particular properties file property
* quit - Exits the shell
* reference guide - Writes the reference guide XML fragments (in DocBook format)
into the current working directory
* script - Parses the specified resource file and executes its commands
* security setup - Install Spring Security into your project
* selenium test - Creates a new Selenium test for a particular controller
* solr add - Make target type searchable
* solr all - Make all elegible project types searchable
* solr setup - Install a support for Solr search integration
* system properties - Shows the shell's properties
* test integration - Creates a new integration test for the specified entity
* test mock - Creates a mock test for the specified entity
* version - Displays shell version
* web flow - Install Spring Web Flow configuration artifacts into your project

** Type 'hint' (without the quotes) and hit ENTER for step-by-step guidance **

None of these function correlates with the example on the url I pasted above. Do someone know how I can get roo-1.1.0.M1 working with surf ? I have been going through the documentation but could not find an example that supplied me with information as to how to add the spring-surf-roo-addon-1.0.0.M3-roo-addon.zip to ROO. I did try all the osgi commands no success Smiley Sad

mikeh
Star Contributor
Star Contributor
Please use the Spring Surf forums for questions not relating directly to Alfresco: http://forum.springsource.org/forumdisplay.php?f=72

Thanks,
Mike