This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Weblogic Class Loading issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Weblogic Class Loading issue" Watch "Weblogic Class Loading issue" New topic
Author

Weblogic Class Loading issue

Danny Vittal
Greenhorn

Joined: Feb 24, 2005
Posts: 10
Note: I am not sure what is the best suitable subject for this issue.

Stack Trace:
Error 1)

<Dec 30, 2011 11:02:51 AM GMT+05:30> <Error> <HTTP> <BEA-101017> <[ServletContext@29472630[app:EM11X module:Web path:/Web spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@14d05d1[
POST /Web/GenerateMealPlanAction.do HTTP/1.1
Via: 1.1 INDCHN-MGMT01
Cookie: org.ditchnet.jsp.tabs:CommercialFormulaTabs=; org.ditchnet.jsp.tabs:KitchenTabs=; JSESSIONID=sZQFT9MJQc6vS6MCSXtdjWwSTLCcG6nqL12Fdyj1NFHcp4WnpkCB!1348500068
Referer: http://130.78.88.83:7001/Web/GenerateMealPlanAction.do?vo.viewCode=generateMealPlanFrame&method=1&&menu_id=DS_DFLT&module_id=DS&function_id=DS_GEN_MEAL_PLAN&function_name=Generate%20Meal%20Plan&function_type=R&access=YYYYN&desktopFlag=N&vo.functionId=DS_GEN_MEAL_PLAN
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; InfoPath.1)
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-us
Pragma: no-cache
Connection: Keep-Alive
Content-Length: 488

]] Root cause of ServletException.
java.lang.IllegalArgumentException: Cannot invoke com.vo.GenerateMealPlanVO.setServingDate on bean class 'class com.vo.GenerateMealPlanVO' - argument type mismatch - had objects of type "java.lang.String" but expected signature "com.core.util.Date"
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2181)
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2141)
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1948)
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2054)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1015)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2155)
Truncated. see log file for complete stacktrace
>

Error 2)

<Dec 30, 2011 11:11:19 AM GMT+05:30> <Error> <HTTP> <INDCHN-EPORT01> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1325223679258> <BEA-101017> <[ServletContext@29472630[app:EM11X module:Web path:/Web spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@1da8bfe[
POST /Web/LookupAction.do HTTP/1.1
Via: 1.1 INDCHN-MGMT01
Cookie: org.ditchnet.jsp.tabs:CommercialFormulaTabs=; org.ditchnet.jsp.tabs:KitchenTabs=; JSESSIONID=GhG4T9TJ0ytD8dhRSGBFv2c3v1hNLftTTCJQHp6Qn9C5SnMGTVYF!1348500068
Referer: http://130.78.88.83:7001/Web/core/lookup/jsp/LookupCriteria.jsp?undefined
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; InfoPath.1)
Accept: */*
Accept-Language: en-us
Pragma: no-cache
Connection: Keep-Alive
Content-Length: 304

]] Root cause of ServletException.
java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
at com.lookup.pojo.web.LookupAction.doActionQuery(LookupAction.java:107)
at com.core.pojo.web.BaseAction.execute(BaseAction.java:97)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
>


Analysis:

Migrating J2EE Application from Oracle 10g Application Server to Oracle 11g Weblogic Server. I am stuck with above two issues. This issue not present while running in Oracle 10g Application Server

1) I was thinking it is something to do with JSTL versions and the below command is executed to make the JSTL version to jstl 1.1.2

java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy -library D:/Oracle/Middleware/wlserver_10.3/common/deployable-libraries/jstl-1.1.2.war

The problem remains same.

2) Now <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> is added to weblogic.xml to make the Web application to load application specific libraries from WEB-INF/lib directory.

The problem remains same.

3) I checked Class Loader Analysis Tool and found conflicting classes and based on CAT recommendation the below list is added to weblogic.xml and <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> is removed since both cannot co-exist.

<wls:prefer-application-packages>
<wls:package-name>antlr.*</wls:package-name>
<wls:package-name>antlr.collections.*</wls:package-name>
<wls:package-name>antlr.collections.impl.*</wls:package-name>
<wls:package-name>antlr.debug.misc.*</wls:package-name>
<wls:package-name>com.mysql.jdbc.*</wls:package-name>
<wls:package-name>javax.ejb.*</wls:package-name>
<wls:package-name>javax.ejb.spi.*</wls:package-name>
<wls:package-name>javax.enterprise.deploy.*</wls:package-name>
<wls:package-name>javax.jms.*</wls:package-name>
<wls:package-name>javax.management.j2ee.*</wls:package-name>
<wls:package-name>javax.resource.*</wls:package-name>
<wls:package-name>javax.resource.cci.*</wls:package-name>
<wls:package-name>javax.resource.spi.*</wls:package-name>
<wls:package-name>javax.security.jacc.*</wls:package-name>
<wls:package-name>javax.servlet.*</wls:package-name>
<wls:package-name>javax.servlet.http.*</wls:package-name>
<wls:package-name>javax.servlet.jsp.*</wls:package-name>
<wls:package-name>javax.transaction.*</wls:package-name>
<wls:package-name>javax.transaction.xa.*</wls:package-name>
<wls:package-name>javax.xml.*</wls:package-name>
<wls:package-name>javax.xml.datatype.*</wls:package-name>
<wls:package-name>javax.xml.namespace.*</wls:package-name>
<wls:package-name>javax.xml.parsers.*</wls:package-name>
<wls:package-name>javax.xml.registry.*</wls:package-name>
<wls:package-name>javax.xml.transform.*</wls:package-name>
<wls:package-name>javax.xml.validation.*</wls:package-name>
<wls:package-name>javax.xml.xpath.*</wls:package-name>
<wls:package-name>oracle.core.lmx.*</wls:package-name>
<wls:package-name>oracle.core.lvf.*</wls:package-name>
<wls:package-name>oracle.jdbc.*</wls:package-name>
<wls:package-name>oracle.jdbc.aq.*</wls:package-name>
<wls:package-name>oracle.jdbc.connector.*</wls:package-name>
<wls:package-name>oracle.jdbc.dcn.*</wls:package-name>
<wls:package-name>oracle.jdbc.diagnostics.*</wls:package-name>
<wls:package-name>oracle.jdbc.driver.*</wls:package-name>
<wls:package-name>oracle.jdbc.internal.*</wls:package-name>
<wls:package-name>oracle.jdbc.oci.*</wls:package-name>
<wls:package-name>oracle.jdbc.oracore.*</wls:package-name>
<wls:package-name>oracle.jdbc.pool.*</wls:package-name>
<wls:package-name>oracle.jdbc.rowset.*</wls:package-name>
<wls:package-name>oracle.jdbc.util.*</wls:package-name>
<wls:package-name>oracle.jdbc.xa.*</wls:package-name>
<wls:package-name>oracle.jpub.runtime.*</wls:package-name>
<wls:package-name>oracle.jsp.provider.*</wls:package-name>
<wls:package-name>oracle.net.ano.*</wls:package-name>
<wls:package-name>oracle.net.aso.*</wls:package-name>
<wls:package-name>oracle.net.jdbc.*</wls:package-name>
<wls:package-name>oracle.net.jndi.*</wls:package-name>
<wls:package-name>oracle.net.ns.*</wls:package-name>
<wls:package-name>oracle.net.nt.*</wls:package-name>
<wls:package-name>oracle.net.resolver.*</wls:package-name>
<wls:package-name>oracle.security.o3logon.*</wls:package-name>
<wls:package-name>oracle.security.o5logon.*</wls:package-name>
<wls:package-name>oracle.sql.*</wls:package-name>
<wls:package-name>oracle.sql.converter.*</wls:package-name>
<wls:package-name>org.apache.commons.*</wls:package-name>
<wls:package-name>org.apache.derby.*</wls:package-name>
<wls:package-name>org.apache.oro.*</wls:package-name>
<wls:package-name>org.apache.xerces.*</wls:package-name>
<wls:package-name>org.apache.xmlcommons.*</wls:package-name>
<wls:package-name>org.gjt.mm.*</wls:package-name>
<wls:package-name>org.joda.time.*</wls:package-name>
<wls:package-name>org.w3c.dom.*</wls:package-name>
<wls:package-name>org.xml.sax.*</wls:package-name>
</wls:prefer-application-packages>

The problem remains same.

Your help is greatly appreciated as I am stuck with this issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Weblogic Class Loading issue
 
Similar Threads
[WAS 7] java.io.IOException when file uploading with IE 8, works on FireFox 6
How to delete a cookie from Request (age old question never answered)
Identical request in browser and Java with different responses, why does this happen?
Which Jar to include for InternalResourceView and JstlView classes?
Limit on Data/Key-Value Pairs in Form Submission