Quantcast
Channel: Alfresco Forums - Development Environment
Viewing all 158 articles
Browse latest View live

BaseWebScriptTest - Use it on existing repository

$
0
0

I'm trying to test a repository webscript using BaseWebScriptTest.

However it wants to use the repository at localhost:4578.

Is there a way to point BaseWebScriptTest at my existing development repository?

I tried adding a call to super.setRemoteServer() but it seems to just ignore that setting.

4.2.e


Fatal error detected by the JRE: SIGSEGV

$
0
0

Using Eclipse Luna 4.4.2, SDK 2.1, JDK 1.8.0_60-b27, Maven 3.3.3 on Mac OS 10.10.4 I created a test share project as described in Creating a Share project with Eclipse.

Immediately after starting to run / debug the project in Eclipse I am getting this fatal error:

objc[1032]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.[INFO] Scanning for projects...[INFO][INFO]------------------------------------------------------------------------[INFO] Building test-share AMP project 1.0-SNAPSHOT[INFO]------------------------------------------------------------------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00000001054e41cf, pid=1032, tid=20227
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27)(build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM)64-Bit Server VM (25.60-b23 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0xe41cf]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping,try"ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/peter/alfresco-dev/test-share/hs_err_pid1032.log[thread 4867 also had an error]
#
# Compiler replay data is saved as:
# /Users/peter/alfresco-dev/test-share/replay_pid1032.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

Any ideas are welcome.

Thanks,
Peter

5.0.d

Peter Horak

Non-resolvable import POM: Could not find artifact org.alfresco:alfresco-platform-distribution:pom:5.0.0.3

$
0
0

Hi All,

I have all-in one project in my Eclipse. When I open a file from individual projects like share or core it shows below error in Eclipse IDE. But when I open the same POM.xml from the parent project it doesn't give any error.

Error in Eclipse IDE:
Missing artifact org.alfresco:alfresco-repository:jar:5.0.0.3

When I try to run the repo pom.xml it gives the below errors:
Non-resolvable import POM: Could not find artifact org.alfresco:alfresco-platform-distribution:pom:5.0.0.3 in alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public) @ line 60, column 25 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.alfresco:alfresco-platform-distribution:pom:5.0.0.3 in alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public)

5.0

Associate Email With Password

$
0
0

HI,Everyone!

Maybe I post a wrong place,please forgive a new fresher.

I want to implement a function:Users can get their password back by input their

Emails before they log in the Alfresco/share.

I think this would be a big project,but I want to know how to get through it or just

how to start my struggle?

In fact,I do not know what does the Email of each user work for Yet...

Best Regards.

5.0.d

Custom document action javascript

$
0
0

Hi. I'm trying to create a custom document action in Alfresco. But, when i try to run the new "Button" created, nothing happens, the function is not called. I'm trying, in this time, make a button equal to the "Copy to..." only for testing, so, my code is this:

~/alfresco/tomcat/webapps/share/components/documentlibrary/actions.js

 (...)
    onActionSign :function dlA_onActionSign(record){//testar upload de um documentothis._copyMoveTo("copy", record);},(...)

~/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml

(...)<action id="document-sign" type="javascript"  label="actions.document.document-sign"><param name="function">onActionSign</param><evaluator>evaluator.doclib.action.editableByCurrentUser</evaluator></action>(...)

I saw that in the ~/alfresco/tomcat/webapps/share/components/documentlibrary/actions-min.js my function not appears, i think that is because not works, but how i generate this file? What is my error?

Thanks.

5.0.d

Alfresco Books

$
0
0

I am new to alfresco and i am searching for a good book. However, whatever book I search is on older versions of Alfresco and nothing on 5.0 version. Pls suggest a good book for Developer.

5.0.d

HOW TO:Set a custom Login Page

$
0
0

Hi ,Everyone

I am confused about where to start a custom Login Page.

I mainly want to know if I need to get down the source code to code it or any other smart ways?

Here's my purpose:

I'd like to let my users to log in Alfresco with their phone or E-mail.I 'm required to design a new page with two buttons of that two

logos which link to the "phone" login page and "E-mail" login page.

login with phone:
users login with their phone number.Once they input their phone number to the input box and confirm,their phone will receive messages of their password.

login with E-mail :
users login with their E-mail adrress.Once they input their E-mail to the input box and confirm,their E-mail will receive E-mails of their password.

5.0.d

problem with alfresco log

$
0
0

Dear Members i use Alfresco 5.0.d and i add a tenant with the adminConsole

create alfresco.com admin /usr/tenantstores/admin

so after restar Alfresco i get this error log

 08:41:21,118 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 09210000 Failed to create store root:/usr/tenantstores/admin

now i cant enter to adminConsol and i cant enter to alfresco share
i dont know where i can fix that error

Regards

5.0.d

Doubt about project structure in Intellij

$
0
0

Hi all

We are creating a new custom configuration in Alfresco 4.2.e and as we have moved now to Intellij we would like to start working with this IDE. We have followed several tutorias that explains how to configure the Intellij project folder structure to create a new AMP file, and seems to work fine for model configurations, or for xml configurations like web-client-config-custom ... and so on. But when we try to add customizations that involve Java code, it seens that when we create the amp and apply it to the war, they are not being taken in consideration.

For example, we just have introduced an img file in the Pagetag.java file to make sure Alfresco is using our customizations, but nothing is reflected when the amp to war deploy is made.

I dont know if the folder structure we have created for the project is the right one. Could you please take a look to this screenshot and let me know if our Intellij project structure is the right one?

Any other advice will be really appreciated

Thanks a lot

4.2.e

If this post was helpful, please click Yes on the Post Rating -->

Custom changes not being reflected in Java files

$
0
0

hi there

Lets see if someone can give me a hand here please.

We are trying to customize the Alfresco Explorer in version 4.2 using Alfresco Maven SDK 1.1. We have built the project over Eclipse and seems to go ok, however when we try to make a single change in the java files, seems that nothing is happening. For example we just added a new image in the pageTag.java file and it is not shown when the amp or war are created.

as I said we are using maven with architype "Alfresco AMP" as it is shown in the image. When I run "mvn integration-test -Pamp-to-war" the project is built fine and no error is shown however no change appears in the image, seems that the changes that I apply in the Java files are not taken into consideration.

Does anyone know what I am doing wrong please? If you have any guide or linke to show how to customize the java files in 4.2 I will really appreciate it

I am following the instructions shown in here:

http://docs.alfresco.com/4.2/tasks/dev-extensions-maven-sdk-quick-start.html

Thanks a lot in advanec

4.2.e

If this post was helpful, please click Yes on the Post Rating -->

mvn integration-test

$
0
0

Hello

I have executed the command : mvn integration-test -Damp-to-war and Tomcat does not start

It's the proyect somecp-mvn-tutorial-repo that we can find on documentation. The command end without errors and it pass the three unit test but it doesn't start. It doesn't apper any error.

I also have tried : mvn integration-test -Damp-to-war -Dmaven.tomcat.port=8080 but it's the same

Thank you very much in advance.

How to read .msg files

$
0
0

Hello,

I would like to read msg file in alfresco in order to reference my documents and doing research in these documents.

It's really important because I keep all emails from my company and I need to do some research and organise.

Someone have an idea.

Thanks !

Advanced Search with custom properties

$
0
0

Hello.

I have configured advanced search to find results searching by fields in custom properties. It's not working. For example, a custom property defined it's "price". If I try to search a document which have custom property set to 6 and I introduce 7 it should not be showed on results but it's showing.

It's like the results match whatever criteria I introduce. What I want it's that match all the criterias

Any idea?

Thanks very much in advance

Remote unit testing

$
0
0

With SDK 2.1.1 I like to use remote unit testing. Am i right that it should work with all-in-one and alfresco-repo amp?

What is working:
from Eclipse the jUnit test without a running alfresco. oke. Every start takes me 15sec and not a quicker start the second and third time.
with all-in-one in two terminals session "mvn integration-test -Pall-in-one" and "mvn test" works

What is not working:
With the alfresco repo AMP, both commandline and Eclipse, there will be an error when starting the jUnit test

ava HotSpot(TM)64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in8.0
Running com.virtorg.demoamp.test.DemoComponentTest
java.lang.RuntimeException: Unable to send request to http://localhost:4578/com.virtorg.demoamp.test.DemoComponentTest?method=testChildNodesCount&runner=org.springframework.test.context.junit4.SpringJUnit4ClassRunner: <html><head><meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/><title>Error 500 com.virtorg.demoamp.test.DemoComponentTest</title></head><body><h2>HTTP ERROR:500</h2><p>Problem accessing /com.virtorg.demoamp.test.DemoComponentTest. Reason:<pre>    com.virtorg.demoamp.test.DemoComponentTest</pre></p><hr /><i><small>Powered by Jetty://</small></i> </body></html> 
	at com.tradeshift.test.remote.internal.InternalRemoteRunner.handleError(InternalRemoteRunner.java:189)
	at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:143)
	at com.tradeshift.test.remote.internal.InternalRemoteRunner.runChild(InternalRemoteRunner.java:41)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
java.lang.RuntimeException: Unable to send request to http://localhost:4578/com.virtorg.demoamp.test.DemoComponentTest?method=testWiring&runner=org.springframework.test.context.junit4.SpringJUnit4ClassRunner: <html>

Is there a solution to use jUnit testing with the Alfresco repo AMP?

All projects are created with "mvn archetype:generate -Dfilter=org.alfresco:". And using the default test from the artifact.

Thxs Gerard

5.0.d

How to add multiple AMP mosule to alfresco-sdk?

$
0
0

I am new to alfresco-sdk. I am used to have old style AMP modules and then run ant script to combine them into alfresco WAR file.

I have followed tutorials of alfresco-sdk for

1) alfresco all in one
2) alfresco AMP
3) alfresco share

archetypes and it ran successfully.

I could not figure out if I have three different AMP modules, how can I combine them in one?

Say for example, currently I following AMP modules in my repo -

1) alfresco-DEF-AMP
2) alfresco-generic-AMP
3) alresco-ABC-AMP

What should I do such that when I give amp-to-war command, it takes customization from above three modules and puts then into alfresco WAR.

It would be good if you share some examples.

5.0.d

WebScripts Search

$
0
0

Hello everyone , I 'm just getting closer to the world of webscript then are just a beginner .
I started to try someone and I understand how they should be defined in Alfresco .
Now I would need to implement a webscript I will search across the repository of all the nodes that are allowed as "guest " and I list them .
I just can not figure out which features should I use .
I did a little ' research about it but can not find anything that suits me .
Can anyone help me out ?!
Thank you all in advance !

File Upload Date in Java

$
0
0

Hi,

I want help to write a java code to retrieve the file uploaded date. Is there any provision to get this date in Java. Are there any Alfresco API available.
The version used is Version: Community - v3.2.0 (2039). The code snippet used to retrieve is as below:

public GeneralVO getFile(Reference space)
{
String id = null;
GeneralVO generalVO = null;
try
{
createSession ();
try
{
Node[] nodes = getRepositoryService ().get (new Predicate (new Reference[]
{ space }, STORE, null));
Reference nodeRef = nodes[0].getReference ();
QueryResult rootChildren = getRepositoryService ().queryChildren (nodeRef);
ResultSet rootChildrenResults = rootChildren.getResultSet ();
ResultSetRow[] row = rootChildrenResults.getRows ();
if (row != null)
{
for (ResultSetRow rows : row)
{
generalVO = new GeneralVO ();
id = rows.getNode ().getId ();
// generalVO.setId(id);

NamedValue[] values = rows.getColumns ();
for (NamedValue col : values)
{
String strValue = col.getValue ();
if (col.getName ().endsWith (Constants.PROP_NAME) == true)
{

int fileTpe = strValue.indexOf (".");
if (fileTpe != -1)
{
generalVO.setId (id);
generalVO.setName (strValue);

}
}
}
}
}
}
catch(AxisFault af){
System.out.println(af.getFaultCode());
} catch (Exception ex)
{
ex.printStackTrace ();
}
} catch (Exception e)
{
System.err.println ("Can not initiate session with Alfresco server.");
e.printStackTrace ();
}
return generalVO;
}

Thank you in advance.

Regards,
Omkar.

3.2

File Upload Date in Java

$
0
0

Hi,

I want help to write a java code to retrieve the file uploaded date. Is there any provision to get this date in Java. Are there any Alfresco API available.
The version used is Version: Community - v3.2.0 (2039). The code snippet used to retrieve is as below:

public GeneralVO getFile(Reference space)
{
String id = null;
GeneralVO generalVO = null;
try
{
createSession ();
try
{
Node[] nodes = getRepositoryService ().get (new Predicate (new Reference[]
{ space }, STORE, null));
Reference nodeRef = nodes[0].getReference ();
QueryResult rootChildren = getRepositoryService ().queryChildren (nodeRef);
ResultSet rootChildrenResults = rootChildren.getResultSet ();
ResultSetRow[] row = rootChildrenResults.getRows ();
if (row != null)
{
for (ResultSetRow rows : row)
{
generalVO = new GeneralVO ();
id = rows.getNode ().getId ();
// generalVO.setId(id);

NamedValue[] values = rows.getColumns ();
for (NamedValue col : values)
{
String strValue = col.getValue ();
if (col.getName ().endsWith (Constants.PROP_NAME) == true)
{

int fileTpe = strValue.indexOf (".");
if (fileTpe != -1)
{
generalVO.setId (id);
generalVO.setName (strValue);

}
}
}
}
}
}
catch(AxisFault af){
System.out.println(af.getFaultCode());
} catch (Exception ex)
{
ex.printStackTrace ();
}
} catch (Exception e)
{
System.err.println ("Can not initiate session with Alfresco server.");
e.printStackTrace ();
}
return generalVO;
}

Thank you in advance.

Regards,
Omkar.

3.2

Web service client startSession not works with my Alfresco 5.0

$
0
0

Hi,

I'm changing our Alfresco 4.1.6 to an Alfresco 5.0.

When I execute this code from Java

WebServiceFactory.setEndpointAddress(endPoint);
AuthenticationResult result = WebServiceFactory.getAuthenticationService().startSession(username, password);

and points to our old Alfresco 4.1.6 (with a url http://10.120.X.XXX:8080/alfresco/api) works ok and connect.

But when I execute that code on our new Alfresco (with the same url "/alfresco/api" but new IP) it returns a exception.

We still use the same web-service-client library (alfresco-webservice-client-2.1.jar). Alfresco 5.0 not works witj this library? Or maybe the url to start the session are different?

When I call to this url with a browser returns me an org.alfresco.webservice.util.WebServiceException: Error starting session.

{"list":{"pagination":{"count":1,"hasMoreItems":false,"totalItems":1,"skipCount":0,"maxItems":100},"entries":[{"entry":{"quotas":[],"isEnabled":true,"id":"-default-"}}]}}

What's the problem? Someone knows it?

5.0

dashboard

Viewing all 158 articles
Browse latest View live