On 05/28/2013 10:36 AM, Francesco Chicchiriccò wrote:
On 27/05/2013 18:16, Nik wrote:
OkI found a problem.
It appears to be a problem coming from the repository.
It happens because there is a redirection in
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/
Hi Nik,
I don't know exactly where this comes from neither why you are getting
this: as said before, there is something strange in the way you get to
the ASF Maven repository: when I perform
wget
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/
I get the actual HTML content listing all artifacts in that directory.
Thanks for getting back to me Francesco.
No Ideas, it looks like an S was added to SNAPSHOT which should not have
been there.
mbp2:1.1.2-SNAPSHOT ntlartey$ ls
~/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
mbp2:1.1.2-SNAPSHOT ntlartey$ cat
~/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a
href="https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-SNAPSHOT.jar">here</a>.</p>
<hr>
<address>Apache/2.2.20 (Ubuntu) Server at repository.apache.org Port
80</address>
</body></html>
mbp2:1.1.2-SNAPSHOT ntlartey$
Workaround:
mbp2:1.1.2-SNAPSHOT ntlartey$ wget
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130524.124212-18.jar
--2013-05-27 15:33:28--
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130524.124212-18.jar
Resolving repository.apache.org... 140.211.11.74
Connecting to repository.apache.org|140.211.11.74|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 73994 (72K) [application/java-archive]
Saving to: 'syncope-archetype-1.1.2-20130524.124212-18.jar'
100%[===================================================================================================================================================================================================>]
73,994 123KB/s in 0.6s
2013-05-27 15:33:30 (123 KB/s) -
'syncope-archetype-1.1.2-20130524.124212-18.jar' saved [73994/73994]
mbp2:1.1.2-SNAPSHOT ntlartey$ pwd
/Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT
mbp2:1.1.2-SNAPSHOT ntlartey$ ls -lrt
total 192
-rw-r--r-- 1 ntlartey staff 73994 May 24 14:42
syncope-archetype-1.1.2-20130524.124212-18.jar
-rw-r--r-- 1 ntlartey staff 420 May 27 15:27
syncope-archetype-1.1.2-SNAPSHOT.jar
-rw-r--r-- 1 ntlartey staff 195 May 27 15:27
resolver-status.properties
-rw-r--r-- 1 ntlartey staff 402 May 27 15:27
maven-metadata-syncope-archetype-repo.xml
-rw-r--r-- 1 ntlartey staff 420 May 27 15:27
syncope-archetype-1.1.2-SNAPSHOT.pom
-rw-r--r-- 1 ntlartey staff 249 May 27 15:27 _maven.repositories
Then mvn archetype:generate + update pom.xml and it compiles/builds.
Glad to hear :-)
Anyway, I'd suggest you to find the reason why are you experiencing
such strange behavior: AFAIK no one else is getting this, so I insist
it should be something in the way you get to the ASF Maven repository.
It could even be something temporary, please check it again soon.
Ok, syncope is generating without the manual copying of jars. Thankyou.
When I deploy and access the console
glassfish (GlassFish Server Open Source Edition 3.1.2 (build 23))throws :
2013-05-27 16:05:04.073+0000 (68) StandardWrapperValve[default]:
PWC1406: Servlet.service() for servlet default threw exception
java.lang.IllegalArgumentException: PWC2788: setAttribute:
Non-serializable attribute with name restTemplate
This was recently fixed: I guess that by manually downloading you
probably did not get latest ones.
It's still there unfortunately after I remake from scratch and deploy on
glassfish.
BTW: this doesn't happen when I deploy and launch the same warson tomcat.
VIZ:
2013-05-28 15:19:38.805+0200 (26) WEB0671: Loading application
[syncope-console] at [/syncope-console]
2013-05-28 15:19:38.885+0200 (26) syncope-console was successfully
deployed in 18,254 milliseconds.
2013-05-28 15:20:10.921+0200 (27) GRIZZLY0051: ProcessorTask exception.
java.lang.IllegalStateException: Invalid packet magic number: 4745
pos=0lastValid=688 end=0
at
com.sun.grizzly.http.ajp.AjpInputBuffer.readAjpMessageHeader(AjpInputBuffer.java:85)
at
com.sun.grizzly.http.ajp.AjpProcessorTask.parseRequest(AjpProcessorTask.java:97)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:706)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
2013-05-28 15:20:39.642+0200 (28) StandardWrapperValve[default]:
PWC1406: Servlet.service() for servlet default threw exception
java.lang.IllegalArgumentException: PWC2788: setAttribute:
Non-serializable attribute with name restTemplate
at
org.apache.catalina.session.ManagerBase.checkSessionAttribute(ManagerBase.java:832)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1713)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:178)
at
org.springframework.web.context.request.ServletRequestAttributes.setAttribute(ServletRequestAttributes.java:129)
at
org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:44)
at
org.springframework.web.context.request.SessionScope.get(SessionScope.java:92)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:329)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
[nik@anvil uforge]$ curl -u admin:password -H "Content-Type:
application/json" -X GET http://10.1.2.217:9090/syncope/cxf/users/self
gives the following exception stack:
2013-05-27 16:14:19.889+0000 (69) StandardWrapperValve[CXFServlet]:
PWC1406: Servlet.service() for servlet CXFServlet threw exception
java.lang.NoSuchMethodError:
javax.ws.rs.core.Response.getHeaders()Ljavax/ws/rs/core/MultivaluedMap;
When trying to self-read admin, I actually get a different error (see
SYNCOPE-373 [1]): this is due to the fact that admin is not a real user.
Authenticating with actual user works fine, anyway.
Regards.
[1] https://issues.apache.org/jira/browse/SYNCOPE-373
REST API seems to work now from glassfish however:
[nik@anvil tmp]$ curl -u admin:password -H "Content-Type:
application/json" -X GET http://10.0.0.1830/syncope/cxf/configurations
<?xml version="1.0" encoding="UTF-8"?><configurations>
<configuration>
<key>createRequest.allowed</key>
<value>true</value>
</configuration>
<configuration>
<key>notificationjob.cronExpression</key>
<value></value>
</configuration>
<configuration>
<key>password.cipher.algorithm</key>
<value>SHA1</value>
</configuration>
<configuration>
<key>smtp.host</key>
<value>not-existing</value>
</configuration>
<configuration>
<key>smtp.port</key>
<value>25</value>
</configuration>
<configuration>
<key>token.expireTime</key>
<value>60</value>
</configuration>
<configuration>
<key>token.length</key>
<value>256</value>
</configuration>
</configurations>[nik@anvil tmp]$
One thing I did notice when generating was "[WARNING] Archetype is not
fully configured" not sure if it means anything though:
Snippet from end of generate:
:
Downloading:
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar
Downloaded:
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-script-interpreter/1.0/maven-script-interpreter-1.0.jar
(21 KB at 260.1 KB/sec)
Downloading:
http://repo.maven.apache.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar
Downloaded:
http://repo.maven.apache.org/maven2/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar (276
KB at 1554.2 KB/sec)
Downloaded:
http://repo.maven.apache.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7.jar
(435 KB at 702.5 KB/sec)
Downloaded:
http://repo.maven.apache.org/maven2/asm/asm-util/3.2/asm-util-3.2.jar
(36 KB at 66.2 KB/sec)
Downloaded:
http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar
(5394 KB at 7347.5 KB/sec)
Downloaded:
http://repo.maven.apache.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar
(1479 KB at 2832.9 KB/sec)
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Downloading:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/maven-metadata.xml
Downloaded:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/maven-metadata.xml
(788 B at 0.3 KB/sec)
Downloading:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130528.100615-20.jar
Downloaded:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130528.100615-20.jar
(73 KB at 43.6 KB/sec)
Downloading:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130528.100615-20.pom
Downloaded:
https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.1.2-SNAPSHOT/syncope-archetype-1.1.2-20130528.100615-20.pom
(7 KB at 5.2 KB/sec)
Define value for property 'groupId': : org.apache.syncope
Define value for property 'artifactId': : Define value for property
'version': 1.0-SNAPSHOT: : 1.1.2-SNAPSHOT
Define value for property 'package': : : uforge
Define value for property 'secretKey': : mysecret12
[WARNING] Archetype is not fully configured
Define value for property 'groupId': : org.apache.syncope
[INFO] Using property: artifactId = org.apache.syncope
[INFO] Using property: version = 1.1.2-SNAPSHOT
[INFO] Using property: package = uforge
[INFO] Using property: secretKey = mysecret12
Confirm properties configuration:
groupId: org.apache.syncope
artifactId: org.apache.syncope
version: 1.1.2-SNAPSHOT
package: uforge
secretKey: mysecret12
Y: :
[INFO]
----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype:
syncope-archetype:1.1.2-SNAPSHOT
[INFO]
----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.apache.syncope
[INFO] Parameter: artifactId, Value: org.apache.syncope
[INFO] Parameter: version, Value: 1.1.2-SNAPSHOT
[INFO] Parameter: package, Value: uforge
[INFO] Parameter: packageInPathFormat, Value: uforge
[INFO] Parameter: secretKey, Value: mysecret12
[INFO] Parameter: package, Value: uforge
[INFO] Parameter: version, Value: 1.1.2-SNAPSHOT
[INFO] Parameter: groupId, Value: org.apache.syncope
[INFO] Parameter: artifactId, Value: org.apache.syncope
[INFO] Parent element not overwritten in
/home/nik/UShareSoft/WKS/syncopeOnGlassfish/test/org.apache.syncope/core/pom.xml
[INFO] Parent element not overwritten in
/home/nik/UShareSoft/WKS/syncopeOnGlassfish/test/org.apache.syncope/console/pom.xml
[INFO] project created from Archetype in dir:
/home/nik/UShareSoft/WKS/syncopeOnGlassfish/test/org.apache.syncope
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3:58.683s
[INFO] Finished at: Tue May 28 14:23:49 CEST 2013
[INFO] Final Memory: 12M/118M
[INFO]
------------------------------------------------------------------------
[nik@anvil test]$
Best Regards,
Nik
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/