Hi ,
I was trying to deploy the artifactory.war on weblogic 10.3.2 and got the
following error:
2010-03-10 21:27:54,214 [art-init] [ERROR]
(o.a.w.s.ArtifactoryContextConfigListener:160) - Error creating spring
context
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [na:1.6.0_05]
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[na:1.6.0_05]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[na:1.6.0_05]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[na:1.6.0_05]
at
org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.configure(ArtifactoryContextConfigListener.java:155)
[artifactory-web-application-2.2.1.jar:na]
at
org.artifactory.webapp.servlet.ArtifactoryContextConfigListener.access$100(ArtifactoryContextConfigListener.java:51)
[artifactory-web-application-2.2.1.jar:na]
at
org.artifactory.webapp.servlet.ArtifactoryContextConfigListener$1.run(ArtifactoryContextConfigListener.java:72)
[artifactory-web-application-2.2.1.jar:na]
Caused by: java.lang.NoSuchMethodError: standardDays
at
org.artifactory.request.RequestResponseHelper.<clinit>(RequestResponseHelper.java:47)
[artifactory-core-2.2.1.jar:na]
at
org.artifactory.engine.DownloadServiceImpl.init(DownloadServiceImpl.java:73)
[artifactory-core-2.2.1.jar:na]
at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source)
[na:na]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[na:1.6.0_05]
at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_05]
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
[spring-tx-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at
org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:74)
[artifactory-core-2.2.1.jar:na]
at
org.artifactory.jcr.lock.aop.LockingAdvice.invoke(LockingAdvice.java:46)
[artifactory-core-2.2.1.jar:na]
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
[spring-aop-3.0.0.RELEASE.jar:3.0.0.RELEASE]
at $Proxy153.init(Unknown Source) [na:na]
at
org.artifactory.spring.ArtifactoryApplicationContext.refresh(ArtifactoryApplicationContext.java:231)
[artifactory-core-2.2.1.jar:na]
at
org.artifactory.spring.ArtifactoryApplicationContext.<init>(ArtifactoryApplicationContext.java:105)
[artifactory-core-2.2.1.jar:na]
... 7 common frames omitted
I went and had a look at the code (one benefit of open-source :-> ... ) and
RequestResponseHelper.java:47 is calling the following code:
import org.joda.time.Duration;
private static final long CACHE_YEAR_SECS =
Duration.standardDays(365).getStandardSeconds();
If you set the following options
JAVA_OPTIONS="-verbose:class -Xverboselog:./verbose.log"
and then start up weblogic, with the artifactory war file, you get the
following:
[wasad...@centos5-vm vgr-wls-loc]$ grep "org/joda/time/Duration" verbose.log
| grep file
[INFO ][class ] created: #17220 org/joda/time/Duration
(file:/apps/software/Oracle/Middleware/wls1032/modules/joda.time_1.2.1.0.jar)
whereas it should be using:
[wasad...@centos5-vm autodeploy]$ unzip -l artifactory.war| grep joda
534827 07-08-09 10:38 WEB-INF/lib/joda-time-1.6.jar
I can add a WEB-INF/weblogic.xml deployment descriptor to the war file that
will cause the app to load classes from the web-app in preference to the
system classpath;
[wasad...@centos5-vm autodeploy]$ cat WEB-INF/weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
http://www.bea.com/ns/weblogic/weblogic-web-app
http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
[wasad...@centos5-vm autodeploy]$ jar uvf artifactory.war WEB-INF/
adding: WEB-INF/(in = 0) (out= 0)(stored 0%)
adding: WEB-INF/weblogic.xml(in = 555) (out= 247)(deflated 55%)
After redeploying artifactory with this change , it started up fine.
Would it be possible to have this added to the default deployment? As it's
a container specific deployment descriptor , it shouldn't affect anything
else?
Kind Regards
David
--
View this message in context:
http://old.nabble.com/Artifactory-2.2.1-fails-to-deploy-on-Weblogic-10.3.2-%2811G%29-tp27864307p27864307.html
Sent from the Artifactory-Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users