cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with installing Alfresco SDK v3

alr
Champ in-the-making
Champ in-the-making
Hello,

I am currently trying to install the Alfresco SDK v3 in order to test the JCR capabilities of Alfresco.

Unfortunately I am exiting with a ClassLoadException which is also explained in the wiki - however I already important every jar out of the dependencies directory.

Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException:
Error loading class [org.alfresco.filesys.repo.ContentDiskDriver] for bean with name 'contentDiskDriver' defined in class path resource [alfresco/network-protocol-context.xml]: problem with class file or dependent class;
nested exception is java.lang.NoClassDefFoundError: org/alfresco/jlan/server/filesys/DiskInterface
Caused by: java.lang.NoClassDefFoundError: org/alfresco/jlan/server/filesys/DiskInterface

I do not find any reference to jlan, when going through the SDK sources (except in the DLLs). jlan is not mentioned in any file or directory name (though the imports in the ContentDiskDriver class are resolved it seems to me).

user@host /cygdrive/c/Alfresco/sdk
$ for i in $(find . -name "*.zip" ) ; do unzip -l $i | grep jlan ; done

user@host /cygdrive/c/Alfresco/sdk
$ for i in $(find . -name "*.jar" ) ; do jar tvf $i | grep jlan ; done

user@host /cygdrive/c/Alfresco/sdk
$ grep -ri jlan .
Binary file ./bin/Win32NetBIOS.dll matches
Binary file ./bin/Win32NetBIOSx64.dll matches
Binary file ./bin/Win32Utils.dll matches
Binary file ./bin/Win32Utilsx64.dll matches


So it just looks, as if there are no jlan classes or configurations in the SDK.

Is there anything I haven't understand correctly in the howto about installing the SDK?

Any help is appreciated.


–Alexander
6 REPLIES 6

alr
Champ in-the-making
Champ in-the-making
Hi again

the best problems are the ones you can solve yourself. The solution was pretty simple
Checking out SVN, going to projects/alfresco-jlan and calling

ant createJar

Important that generated jar seems to have solved my current problem.


–Alexander

alr
Champ in-the-making
Champ in-the-making
Back again

Well, I'm still not done with the SDK it seems. After getting the former stuff working, I now stopped at the following problem:


16:08:44,973  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
16:08:45,676  INFO  [domain.schema.SchemaBootstrap] No changes were made to the schema.
16:08:48,410 UserSmiley Frustratedystem INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Alfresco\ecm\alf_data
16:08:48,488 UserSmiley Frustratedystem INFO  [admin.patch.PatchExecuter] Checking for patches to apply …
16:08:48,785 UserSmiley Frustratedystem INFO  [admin.patch.PatchExecuter] No patches were required.
16:08:48,800 UserSmiley Frustratedystem INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
Exception in thread "main" java.lang.IncompatibleClassChangeError
   at org.alfresco.jlan.server.filesys.DefaultShareMapper.initializeMapper(DefaultShareMapper.java:89)
   at org.alfresco.jlan.server.config.SecurityConfigSection.<init>(SecurityConfigSection.java:108)
   at org.alfresco.filesys.ServerConfigurationBean.processSecurityConfig(ServerConfigurationBean.java:2291)
   at org.alfresco.filesys.ServerConfigurationBean.init(ServerConfigurationBean.java:519)
   at org.alfresco.filesys.ServerConfigurationBean.onApplicationEvent(ServerConfigurationBean.java:3098)
   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
   at org.alfresco.sample.FirstJCRClient.main(FirstJCRClient.java:64)


I get the same incompatibleClassChangeError when executing the foundationexample. Do I use the wrong spring version (the jar file) - I am using the 2.0.2 version from the SDK?

Thanks for any hints!


–Alexander

alr
Champ in-the-making
Champ in-the-making
Hi

though it is somewhat boring to answer my own questions, any step I come closer to a running SDK might be interesting for others as well. However I still could not get the SDK running. It seems that the afresco-jlan.jar is not the right jar due to source code differences with the SDK. When using Java6 I get additionally the following error message which helps a lot:

Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.alfresco.config.ConfigElement, but class was expected

In the SDK org.alfresco.config.ConfigElement is an interface, whereas in the SVN inside the alfresco-jlan project it is a normal class.

So, this did not seem to be the way to go I guess… slowly I am somewhat running out of ideas 🙂


–Alexander

sebp
Champ in-the-making
Champ in-the-making
I had this alfresco jlan problem too. To solve it I downloaded the Alfresco-Labs-3a.r1032-Mini-Setup.exe. Installed it and took the alfresco-jlan-embed.jar from there. It can be found in the tomcat\webapps\alfresco\WEB-INF\lib directory. I think you'll also find it in the other Alfresco Labs 3a distributions (but obviously not in the sdk).

maivanha
Champ in-the-making
Champ in-the-making
help me
dear Alexander
now i am having this problem too, in your post, you read: "going to projects/alfresco-jlan and calling : ant createJar"
but i don't know where is "project/alfresco-jlan" ?
I instanced alfresco in : "D:\alfresco" ; and Ant in : "D:\ant" , jikes in : "D:\jikes"
I want run "FirstFoundationClient" project, and i went in to "D:\alfresco\samples\FirstFoundationClient" ,is it "project" in your mean ?   :?:
but it don't have "alfresco-jlan"  :cry:
i created "alfresco-jlan" folder in this project and ran your command: "ant createJar", but …. it was false  :?

can you help me ?

major_king
Champ in-the-making
Champ in-the-making
Hello,

you have to checkout the alfresco-source code from SVN. There you find "alfresco-jlan" Smiley Happy

http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment

Regards,
christian