Hi fellow idm-mers,
I'm following the instructions in [1] to build a project. I'd like to base the build at 1.1.2-SNAPSHOT or 1.2.0-SNAPSHOT using the info in [2]. If I follow the instructions [1] "Snapshot (development) releases" I should use the following to get a correct SNAPSHOT build: mvn archetype:generate \ -DarchetypeGroupId=org.apache.syncope \ -DarchetypeArtifactId=syncope-archetype \ -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ -DarchetypeVersion=1.2.0-SNAPSHOT But this doesn't work, I must be missing something somewhere, because I only get to 1.1.1 Any guidance to get the core and console at 1.1.2-SNAPSHOT or 1.2.0-SNAPSHOT will be much appreciated. Best Regards, Nik [1] https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project [2] https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/ |
Il 27/05/2013 09:58, Nik ha scritto:
Hi fellow idm-mers,Hi Nik, may be you forgot to add the SNAPSHOT repository: point 2 of [1]/Snapshot (development) releases. Best regards, F. |
Hi Fabio,
So if I follow you correctly: 1) I run mvn archetype:generate \
-DarchetypeGroupId=org.apache.syncope \
-DarchetypeArtifactId=syncope-archetype \
-DarchetypeRepository=http://repo1.maven.org/maven2 \
-DarchetypeVersion=1.1.2-SNAPSHOT
2) then add all the following to the generated from 1) pom.xml <repositories> <repository> <id>ASF</id> <url>https://repository.apache.org/content/repositories/snapshots/</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>And that's it! I'll try and let you know. rgds, Nik
|
Il 27/05/2013 10:18, Nik ha scritto:
No you don't. mvn archetype:generate \ -DarchetypeGroupId=org.apache.syncope \ -DarchetypeArtifactId=syncope-archetype \ -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ -DarchetypeVersion=1.2.0-SNAPSHOT OK for this. Regards, F.
|
On 05/27/2013 10:21 AM, Fabio Martelli
wrote:
mvn archetype:generate \but this gives me: [nik@anvil snapshot120]$ mvn archetype:generate \ > -DarchetypeGroupId=org.apache.syncope \ > -DarchetypeArtifactId=syncope-archetype \ > -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ > -DarchetypeVersion=1.2.0-SNAPSHOT /usr/lib/jvm/java [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [INFO] Archetype defined by properties Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml (402 B at 0.4 KB/sec) [WARNING] The metadata /home/nik/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml is invalid: end tag name </body> must match start tag name <hr> from line 7 (position: TEXT seen ...</address>\n</body>... @9:8) Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar [WARNING] Checksum validation failed, expected <!DOCTYPE but is 08c17e15de2e8732a4cddb281732916952e87c7d for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar [WARNING] Checksum validation failed, expected <!DOCTYPE but is 08c17e15de2e8732a4cddb281732916952e87c7d for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar (420 B at 0.5 KB/sec) [WARNING] The metadata /home/nik/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml is invalid: end tag name </body> must match start tag name <hr> from line 7 (position: TEXT seen ...</address>\n</body>... @9:8) Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom [WARNING] Checksum validation failed, expected <!DOCTYPE but is 9be18526804c0108aa167a02a5e1a17163749204 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom [WARNING] Checksum validation failed, expected <!DOCTYPE but is 9be18526804c0108aa167a02a5e1a17163749204 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom (420 B at 0.2 KB/sec) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.587s [INFO] Finished at: Mon May 27 10:23:40 CEST 2013 [INFO] Final Memory: 10M/210M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: null: MojoFailureException: NullPointerException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [nik@anvil snapshot120]$ |
Administrator
|
On 27/05/2013 10:24, Nik wrote:
You mush have troubles with JDK / Maven / network connectivity (are you behind some kind of proxy?): besides successfully run the command above on different platforms, also visiting [1] gives me the expected metadata document, [2] and [3] the expected checksums. Regards. [1] http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [2] https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml.md5 [3] https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml.sha1 -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ |
Hi Francesco,
Not sure ... I can only "successfully" build to level 1.1.1 using this maven method on two very different environments. At work is a linux box with jdk 1.7: network is a high bandwith fibre-optic [nik@anvil syncopeOnGlassfish]$ mvn -version /usr/lib/jvm/java Apache Maven 3.0.4 (rNON-CANONICAL_2013-01-22_13-18_mockbuild; 2013-01-22 14:18:29+0100) Maven home: /usr/share/maven Java version: 1.7.0_19, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.8.11-100.fc17.x86_64", arch: "amd64", family: "unix" [nik@anvil syncopeOnGlassfish]$ [nik@anvil syncopeOnGlassfish]$ javac -version javac 1.7.0_19 [nik@anvil syncopeOnGlassfish]$ but I get the same with my machine at home a mac book pro with its mac JDK 1.6.0_37 mbp2:WKS ntlartey$ javac -version javac 1.6.0_37 mbp2:WKS ntlartey$ mbp2:WKS ntlartey$ mvn -version Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home: /usr/share/maven Java version: 1.6.0_37, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac" mbp2:WKS ntlartey$ i.e mbp2:WKS ntlartey$ snapshot120]$ mvn archetype:generate \ > > -DarchetypeGroupId=org.apache.syncope \ > > -DarchetypeArtifactId=syncope-archetype \ > > -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ > > -DarchetypeVersion=1.2.0-SNAPSHOT -bash: -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots: No such file or directory mbp2:WKS ntlartey$ mvn archetype:generate \ > -DarchetypeGroupId=org.apache.syncope \ > -DarchetypeArtifactId=syncope-archetype \ > -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ > -DarchetypeVersion=1.2.0-SNAPSHOT [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [INFO] Archetype defined by properties Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml (402 B at 0.3 KB/sec) [WARNING] The metadata /Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml is invalid: end tag name </body> must match start tag name <hr> from line 7 (position: TEXT seen ...</address>\n</body>... @9:8) Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar [WARNING] Checksum validation failed, expected <!DOCTYPE but is 08c17e15de2e8732a4cddb281732916952e87c7d for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar [WARNING] Checksum validation failed, expected <!DOCTYPE but is 08c17e15de2e8732a4cddb281732916952e87c7d for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.jar (420 B at 0.5 KB/sec) Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml [WARNING] Checksum validation failed, expected <!DOCTYPE but is f1283ec8f06b6ea4d2091f71e4529b882d474bb6 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata.xml (402 B at 0.5 KB/sec) [WARNING] The metadata /Users/ntlartey/.m2/repository/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/maven-metadata-syncope-archetype-repo.xml is invalid: end tag name </body> must match start tag name <hr> from line 7 (position: TEXT seen ...</address>\n</body>... @9:8) Downloading: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom [WARNING] Checksum validation failed, expected <!DOCTYPE but is 9be18526804c0108aa167a02a5e1a17163749204 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom [WARNING] Checksum validation failed, expected <!DOCTYPE but is 9be18526804c0108aa167a02a5e1a17163749204 for http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom Downloaded: http://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/syncope-archetype-1.2.0-SNAPSHOT.pom (420 B at 0.5 KB/sec) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.642s [INFO] Finished at: Mon May 27 10:49:50 CEST 2013 [INFO] Final Memory: 7M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: null: MojoFailureException: NullPointerException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException mbp2:WKS ntlartey$
|
I took a look at the trace output
with -X enabled:
ie [1] mvn -X archetype:generate -DarchetypeGroupId=org.apache.syncope -DarchetypeArtifactId=syncope-archetype -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots -DarchetypeVersion=1.2.0-SNAPSHOT : : [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-archetype-plugin:2.2:generate' with basic configurator --> [DEBUG] (f) archetypeArtifactId = syncope-archetype [DEBUG] (f) archetypeCatalog = remote,local [DEBUG] (f) archetypeGroupId = org.apache.syncope [DEBUG] (f) archetypeRepository = http://repository.apache.org/content/repositories/snapshots [DEBUG] (f) archetypeVersion = 1.2.0-SNAPSHOT [DEBUG] (f) basedir = /home/nik/UShareSoft/WKS/syncopeOnGlassfish/test [DEBUG] (f) interactiveMode = true [DEBUG] (f) localRepository = id: local url: file:///home/nik/.m2/repository/ layout: none [DEBUG] (f) remoteArtifactRepositories = [ id: central url: http://repo.maven.apache.org/maven2 layout: default snapshots: [enabled => false, update => daily] releases: [enabled => true, update => daily] ] [DEBUG] (f) session = org.apache.maven.execution.MavenSession@6509dc6 [DEBUG] -- end configuration -- : My question to you is: a) If the remoteArtifactRepositories is set to http://repo.maven.apache.org/maven2 how will it retrive the bits for a snapshot release greater than 1.1.1 (based on http://search.maven.org/#search|ga|1|syncope)? b) Shouldn't the remoteArtifactRepositories be set for https://repository.apache.org/content/repositories/snapshots/org/apache/syncope/syncope-archetype/1.2.0-SNAPSHOT/? c) If yes, to b) how is this url specified in the command line in [1] above? rgds, Nik
|
Ok I 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-SNAPSHOTS/ 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. 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 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) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:273) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1125) at org.apache.syncope.console.SyncopeSession.<init>(SyncopeSession.java:99) at org.apache.syncope.console.SyncopeApplication.newSession(SyncopeApplication.java:182) at org.apache.wicket.Application.fetchCreateAndSetSession(Application.java:1557) at org.apache.wicket.Session.get(Session.java:168) [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; at org.apache.cxf.jaxrs.utils.JAXRSUtils.setMessageContentType(JAXRSUtils.java:1596) at org.apache.cxf.jaxrs.utils.JAXRSUtils.convertFaultToResponse(JAXRSUtils.java:1590) at org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:313) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:207) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223) rgds, Nik
|
Administrator
|
On 27/05/2013 18:16, Nik wrote:
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.
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.
This was recently fixed: I guess that by manually downloading you probably did not get latest ones.
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 -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ |
On 05/28/2013 10:36 AM, Francesco
Chicchiriccò wrote:
Thanks for getting back to me Francesco. No Ideas, it looks like an S was added to SNAPSHOT which should not have been there.
Ok, syncope is generating without the manual copying of jars. Thankyou.
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 wars on 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)
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/ |
Administrator
|
On 28/05/2013 15:38, Nik wrote:
[...] Thanks for reporting: this worths further Glassfish-specific analysis. Besides this exception, is the admin console working fine or not? Regards. -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ |
On 05/28/2013 03:42 PM, Francesco
Chicchiriccò wrote:
Unfortunately it doesn't launch. I just see the following in the browser. HTTP Status 500 -type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute with name restTemplate note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1.2 logs. GlassFish Server Open Source Edition 3.1.2Just let me know if you want to see any particular logs etc.rgds, Nik
|
In reply to this post by ilgrosso
Another thing I noticed:
When I configure the persistence properties to be innodb mysql. The quartz tables do not get written in the target DB even when they are present in the init sql file: [nik@anvil org.apache.syncope]$ grep -c QRTZ ./core/target/syncope/WEB-INF/classes/quartz/tables_mysql_innodb.sql 47 [nik@anvil org.apache.syncope]$ I guess the TYPE=InnoDB in the sql file has no effect, but the syntax should be ENGINE=InnoDB mysql> use syncope; Database changed mysql> show tables; +------------------------------+ | Tables_in_syncope | +------------------------------+ | ACT_GE_BYTEARRAY | | ACT_GE_PROPERTY | | ACT_HI_ACTINST | | ACT_HI_ATTACHMENT | | ACT_HI_COMMENT | | ACT_HI_DETAIL | | ACT_HI_PROCINST | | ACT_HI_TASKINST | | ACT_HI_VARINST | | ACT_ID_GROUP | | ACT_ID_INFO | | ACT_ID_MEMBERSHIP | | ACT_ID_USER | | ACT_RE_DEPLOYMENT | | ACT_RE_MODEL | | ACT_RE_PROCDEF | | ACT_RU_EVENT_SUBSCR | | ACT_RU_EXECUTION | | ACT_RU_IDENTITYLINK | | ACT_RU_JOB | | ACT_RU_TASK | | ACT_RU_VARIABLE | | ConnInstance | | ConnInstance_capabilities | | Entitlement | | ExternalResource | | MAttr | | MAttrUniqueValue | | MAttrValue | | MDerAttr | | MDerSchema | | MSchema | | MVirAttr | | MVirSchema | | Membership | | Notification | | NotificationTask_recipients | | Notification_events | | OPENJPA_SEQUENCES_TABLE | | OPENJPA_SEQUENCE_TABLE | | Policy | | RAttr | | RAttrUniqueValue | | RAttrValue | | RDerAttr | | RDerSchema | | RMapping | | RMappingItem | | RSchema | | RVirAttr | | RVirSchema | | Report | | ReportExec | | ReportletConfInstance | | SyncopeConf | | SyncopeLogger | | SyncopeRole | | SyncopeRole_Entitlement | | SyncopeRole_ExternalResource | | SyncopeUser | | SyncopeUser_ExternalResource | | SyncopeUser_passwordHistory | | Task | | TaskExec | | UAttr | | UAttrUniqueValue | | UAttrValue | | UDerAttr | | UDerSchema | | UMapping | | UMappingItem | | USchema | | UVirAttr | | UVirSchema | | UserRequest | | logging_event | | logging_event_exception | | logging_event_property | | role_search | | role_search_attr | | role_search_entitlements | | role_search_resource | | user_search | | user_search_attr | | user_search_membership | | user_search_resource | +------------------------------+ 86 rows in set (0.00 sec)
|
Administrator
|
On 28/05/2013 16:18, Nik wrote:
What is the value of the 'quartz.sql' property in your core/src/main/resources/persistence.properties? -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ |
On 28/05/2013 16:22, Francesco
Chicchiriccò wrote:
I'm trying to do the same project; stay tuned :) Massi -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ -- Massimiliano Perrone Tel +39 393 9121310 Tirasa S.r.l. Viale D'Annunzio 267 - 65127 Pescara Tel +39 0859116307 / FAX +39 0859111173 http://www.tirasa.net Apache Syncope PMC Member http://people.apache.org/~massi/ "L'apprendere molte cose non insegna l'intelligenza" (Eraclito) |
In reply to this post by ilgrosso
On 05/28/2013 04:22 PM, Francesco
Chicchiriccò wrote:
[nik@anvil org.apache.syncope]$ cat ./core/src/main/resources/persistence.properties # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. jpa.driverClassName=com.mysql.jdbc.Driver jpa.url=jdbc:mysql://localhost:3306/syncope?characterEncoding=UTF-8 jpa.username=root jpa.password=welcome jpa.dialect=org.apache.openjpa.jdbc.sql.MySQLDictionary quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate quartz.sql=tables_mysql_innodb.sql logback.sql=mysql.sql [nik@anvil org.apache.syncope]$ |
One point.
I use a mysql jdb connector from our webservice component in glassfish rather than adding yet another msyql connector jar. It is mysql-connector-java-5.1.25.tar.gz, so I'm guessing this is not a compatibility issue? Nik
|
Administrator
|
In reply to this post by Nik-2
On 28/05/2013 16:27, Nik wrote:
Ok: could you please: 1. drop and create again (or just make empty) your current MySQL database 2. download [1], save it under core/src/main/resources/quartz/ (create required directories if needed) 3. change "TYPE=InnoDB" to "ENGINE=InnoDB" (or any relevant change needed to make it work) 4. rebuild and redeploy 5. see if Quartz tables are now created Thanks. [1] https://svn.apache.org/repos/asf/syncope/branches/1_1_X/core/src/main/resources/quartz/tables_mysql_innodb.sql -- Francesco Chicchiriccò ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~ilgrosso/ |
> Ok: could you please: > > 1. drop and create again (or just make empty) your current MySQL database can do this. > 2. download [1], save it under core/src/main/resources/quartz/ (create > required directories if needed) can do this. > 3. change "TYPE=InnoDB" to "ENGINE=InnoDB" (or any relevant change > needed to make it work) I wanted to do this several times over the past days, but how if there is no main source path: VIZ [nik@anvil org.apache.syncope]$ find . -name tables_mysql.sql ./core/target/syncope/WEB-INF/classes/quartz/tables_mysql.sql ./core/target/war/work/org.apache.syncope/syncope-core/WEB-INF/classes/quartz/tables_mysql.sql [nik@anvil org.apache.syncope]$ If i change the at the target is it not overwritten when I "mvn clean package"? rgds, Nik > 4. rebuild and redeploy > 5. see if Quartz tables are now created > > Thanks. > > [1] > https://svn.apache.org/repos/asf/syncope/branches/1_1_X/core/src/main/resources/quartz/tables_mysql_innodb.sql > -- > Francesco Chicchiriccò > > ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member > http://people.apache.org/~ilgrosso/ |
Free forum by Nabble | Edit this page |