1. JIRA is done. This one is
GUVNOR-2085<https://issues.jboss.org/browse/GUVNOR-2085>
2.
3. You are correct on the pom. However, that URL matches where my Guvnor is running.
Seems like it is finding a phantom dependency or something that doesn't exist at
compile or runtime since the code runs outside guvnor. The thing it is failing to transfer
doesn't even exist.
My Guvnor URL:
http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/
From the POM:
<repository>
<id>guvnor-m2-repo</id>
<name>Guvnor M2 Repo</name>
<url>http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/maven2/</url>
</repository>
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Michael Anstis
Sent: Thursday, March 13, 2014 3:41 PM
To: Rules Users List
Subject: Re: [rules-users] Pojo with spring dependency in DWB
Look at the pom generated for your project in the workbench (you'll need to use the
administration perspective and select the pom.xml file).
I suspect it contains a repository definition for localhost:8080.... try changing this to
the web context and port /maven2 is available on for your deployment.
The assumption the repository is always on localhost:8080 is wrong (tssk, tssk those
naughty developers!).
Another JIRA would be lovely - whilst we decide what best to do about it.
Sent on the move
On 13 Mar 2014 21:30, "Joe White"
<Joe.White@recondotech.com<mailto:Joe.White@recondotech.com>> wrote:
Another thing I'm running into trying to work around the load issue. I added the
library references with the Add button on the project dependency screen (with
group/artifact-id etc) . And I get the exception below:
2014-03-13 15:14:36,219 [pool-15-thread-5] ERROR org.sonatype.aether.collection.
DependencyCollectionException: Failed to collect dependencies for
org.springframework:spring-context:jar:3.1.1.RELEASE ()
java.lang.RuntimeException: org.sonatype.aether.collection.DependencyCollectionException:
Failed to collect dependencies for org.springframework:spring-context:jar:3.1.1.RELEASE
()
at org.kie.scanner.MavenRepository.getArtifactDependecies(MavenRepository.java:94)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at
org.kie.scanner.ArtifactResolver.getArtifactDependecies(ArtifactResolver.java:39)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at org.kie.scanner.ArtifactResolver.getAllDependecies(ArtifactResolver.java:50)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at org.kie.scanner.KieModuleMetaDataImpl.init(KieModuleMetaDataImpl.java:137)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at
org.kie.scanner.KieModuleMetaDataImpl.<init>(KieModuleMetaDataImpl.java:77)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at
org.kie.scanner.KieModuleMetaData$Factory.newKieModuleMetaData(KieModuleMetaData.java:28)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.Builder.getKieModuleMetaData(Builder.java:186)
~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at org.guvnor.common.services.builder.Builder.build(Builder.java:159)
~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl.doBuild(BuildServiceImpl.java:122)
~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl.build(BuildServiceImpl.java:77)
~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at
org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder$4.run(ResourceChangeIncrementalBuilder.java:240)
[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed
to collect dependencies for org.springframework:spring-context:jar:3.1.1.RELEASE ()
at
org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
~[aether-impl-1.13.1.jar:na]
at
org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
~[aether-impl-1.13.1.jar:na]
at org.kie.scanner.MavenRepository.getArtifactDependecies(MavenRepository.java:92)
~[kie-ci-6.0.1.Final.jar:6.0.1.Final]
... 14 common frames omitted
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read
artifact descriptor for
org.hibernate:com.springsource.org.hibernate.validator:jar:4.2.0.Final
at
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
~[maven-aether-provider-3.0.5.jar:3.0.5]
at
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
~[maven-aether-provider-3.0.5.jar:3.0.5]
at
org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
~[aether-impl-1.13.1.jar:na]
at
org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
~[aether-impl-1.13.1.jar:na]
... 16 common frames omitted
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer
artifact org.hibernate:com.springsource.org.hibernate.validator:pom:4.
2.0.Final from/to guvnor-m2-repo
(
http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7...):
Access denied to:
http://localhost:8080/
kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/maven2/org/hibernate/com.springsource.org.hibernate.validator/4.2.0.Final/com.springsource.org.hibernate.validator-4.2.0.Final.pom
(401)
at
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
~[aether-impl-1.13.1.jar:na]
at
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
~[aether-impl-1.13.1.jar:na]
at
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
~[aether-impl-1.13.1.jar:na]
at
org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
~[maven-aether-provider-3.0.5.jar:3.0.5]
... 19 common frames omitted
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer
artifact org.hibernate:com.springsource.org.hibernate.validator:pom:4.2.0.
Final from/to guvnor-m2-repo
(
http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7...):
Access denied to:
http://localhost:8080/kie-
drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/maven2/org/hibernate/com.springsource.org.hibernate.validator/4.2.0.Final/com.springsource.org.hibernate.validator-4.2.0.Final.pom
(401)
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
~[aether-connector-wagon-1.13.1.jar:na]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
~[aether-connector-wagon-1.13.1.jar:na]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
~[aether-connector-wagon-1.13.1.jar:na]
at
org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
~[aether-util-1.13.1.jar:na]
... 3 common frames omitted
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to:
http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomc
at7.0/maven2/org/hibernate/com.springsource.org.hibernate.validator/4.2.0.Final/com.springsource.org.hibernate.validator-4.2.0.Final.pom
(401)
at org.sonatype.maven.wagon.AhcWagon.fillInputData(AhcWagon.java:282)
~[wagon-ahc-1.2.1.jar:na]
at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
~[wagon-provider-api-1.0.jar:1.0]
at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
~[wagon-provider-api-1.0.jar:1.0]
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
~[wagon-provider-api-1.0.jar:1.0]
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601)
~[aether-connector-wagon-1.13.1.jar:na]
... 4 common frames omitted
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>]
On Behalf Of Michael Anstis
Sent: Thursday, March 13, 2014 3:02 PM
To: Rules Users List
Subject: Re: [rules-users] Pojo with spring dependency in DWB
Ok that explains it.
Could you be kind enough to open a GUVNOR JIRA for this (stating what you've said
here) please?
Sent on the move
On 13 Mar 2014 20:57, "Joe White"
<Joe.White@recondotech.com<mailto:Joe.White@recondotech.com>> wrote:
I get it for any jar where the WB doesn't seen the pom and I have to enter the
artifact information manually.
Running on tomcat.
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>]
On Behalf Of Michael Anstis
Sent: Thursday, March 13, 2014 2:36 PM
To: Rules Users List
Subject: Re: [rules-users] Pojo with spring dependency in DWB
Nice ;-)
Do you get that error when uploading any JAR to the maven repository? What application
server is this?
Sent on the move
On 13 Mar 2014 20:27, "Joe White"
<Joe.White@recondotech.com<mailto:Joe.White@recondotech.com>> wrote:
For reference the uber jar approach also didn't work for this one. I created a jar
with dependencies and added that and it still doesn't find the entity manager class.
When adding spring-orm to the DWB manually (where the EntityManager lives) I get the
error below:
I'll keep after it to see if I can find an approach that works.
org.guvnor.common.services.shared.exceptions.GenericPortableException: mark/reset not
supported
org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:24)
org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:180)
org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84)
org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)
org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>]
On Behalf Of Michael Anstis
Sent: Thursday, March 13, 2014 1:51 PM
To: Rules Users List
Subject: Re: [rules-users] Pojo with spring dependency in DWB
That's something I'm working on right now.
Some where in the dependency chain for @Component is EntityManager that is not included in
your project's dependencies (I guess scope "provided" but it can occur for
other reasons).
The best we're going to be able to achieve is handle the exception better in the
workbench code. We can't do much about dependency chains.
Sent on the move
On 13 Mar 2014 19:42, "Joe White"
<Joe.White@recondotech.com<mailto:Joe.White@recondotech.com>> wrote:
Here is a better more complete stack trace:
Exception in thread "pool-9-thread-8" java.lang.NoClassDefFoundError:
javax/pers
istence/EntityManager
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at
org.drools.core.common.ProjectClassLoader.internalLoadClass(ProjectClassLoader.java:99)
at
org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:82)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at org.kie.scanner.KieModuleMetaDataImpl.getClass(KieModuleMetaDataImpl.java:91)
at org.guvnor.common.services.builder.Builder.build(Builder.java:162)
at
org.guvnor.common.services.builder.BuildServiceImpl.doBuild(BuildServiceImpl.java:122)
at
org.guvnor.common.services.builder.BuildServiceImpl.build(BuildServiceImpl.java:77)
at
org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)
at
org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder$3.run(ResourceChangeIncrementalBuilder.java:214)
From:
rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>
[mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>]
On Behalf Of Joe White
Sent: Thursday, March 13, 2014 1:24 PM
To: Rules Users List
Subject: [rules-users] Pojo with spring dependency in DWB
What is the best way to import a jar that has a spring dependency into the Drools
Workbench? When I upload my pojos that I intend use in my rules I get the exception below.
Do I also need to load the spring jars for this to work or is it not possible?
Specifically I need my rules objects to have the @Component annotation so that they can be
autowired.
Exception in thread "pool-9-thread-1" java.lang.NoClassDefFoundError:
javax/peristence/EntityManager
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at
org.drools.core.common.ProjectClassLoader.internalLoadClass(ProjectCassLoader.java:99)
at org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoadr.java:82)
Joe
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users