Hi,
Upgrading our applications from one WebLogic Version to another WebLogic Version is a very common thing which we all do. Many times it happens that code wise there is no changes pushed to the Application but we want to upgrade the Deployment descriptors of our Applications.
Using the Latest deployment descriptors inside our Application helps us to use many new features added by the container vendor. Example: If we are porting the Same Application from WLS8.1 to WLS10.1 . If without upgrading the deployment descriptors in our Application if we will directly deploy the same old application to WLS10.1 then you wont get benefited by the new features added by the Container … like Using “plan.xml” feature of WebLogic which allows us to Dynamically change the Deployment descriptors values in the Run time. We will not be able to use the WorkManagers in our Application which uses DTDs …because in WLS8.1 DTDs WorkManager Concept was not introduced….
So always Update your Deployment Descriptors … while moving to a newer version of WebLogic.
In WLS9.x onwards also if your Application is using the Old DTD based Descriptors and If you want to upgrade them to the Current Version of WLS which u are using then Please follow the below steps:
Step-1). Open a command prompt and the run “setWLSEnv.cmd” (which is available inside %WL_HOME%serverbin)
If you are using Unix based operating System then please run
“. ./setWLSEnv.sh”
Note: There are 2 DOTs in above command…… the first DOT represents that set the Environment in the current Shell, AND the second ./ represents execute the script from the current directory. After this Verify that the Classpath is Set properly or not by running following command:
echo $CLASSPATH
Step-2). In the same command prompt move Just beside your Application Directory. and run the following command
java weblogic.DDConverter -d . <Your Application Name>
Example:
java weblogic.DDConverter -d . TestWelcomePage.ear
java weblogic.DDConverter -d . TestEJB.jar
java weblogic.DDConverter -d . TestWebApp.war
In the current directory you will find that the Latest DDs are generated ….
.
.
Thanks
Jay SenSharma
February 8th, 2011 on 5:33 pm
Hi Jay SenSharma
We are trying to upgrade from wls9.2 to 10.3.3. When we used DDconverter i got below exception. Kindly help me to sove the error.
$java weblogic.DDConverter -d newdd myejb.jar
[DDConverter] START Converting EJB-JAR wkscsr_adapter.jar
Failed to marshal: weblogic.j2ee.descriptor.EjbJarBeanImpl
Thanks,
Chaitanya
February 8th, 2011 on 5:50 pm
Hi Chaitanya,
Can you please mail us the “weblogic-ejb-jar.xml” and “ejb-jar.xml” files of your “wkscsr_adapter.jar” file so that we can check if it’s ok or not. You can mail us these files on “contact@middlewaremagic.com”
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
February 14th, 2011 on 9:11 pm
Hi Jay SenSharma
Thanks for the idea you have given, that you need to check the XMLS, I have validated the XMLS in tools like IE,XML marker and found that the syntax is good. Later I followed the below steps
1) Unjar the myejb.jar
1)Removed the Namespace Declaration and Schema Location in weblogic-ejb-jar.xml(i.e xmlns=”http://www.bea.com/ns/weblogic/90″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance) in the location META-INF/
2)Added in the starting of weblogic-ejb-jar.xml
3)Again I have jar the ejbs and ran DDConverter.
It successfully converted.
Again thanx a lot for the quick response and the idea you have given.
April 11th, 2011 on 12:26 pm
Hi Jay,
Currently I am working on migrating the project from JBoss 4.2.2 to Weblogic 11g (10.3.3).
To make it compatible to weblogic 11g I’ve crated weblogic-application.xml file. (But, after deploying it into weblogic 11g I came across class -loader issues.)
In one of the forum I found, by using tag under weblogic-application.xml file it is possible to deal with class-loder issues.
So, I’ve created the weblogic-application.xml file as mentioned below.
Following is the code :
test-ejb.jar
test-model.jar
test-dev.jar
test-hibernate.sar
test-internal.war
But, to generate updated DTD’s when I ran below mentioned command
i.e.
java weblogic.DDConverter -d . test-internal.ear
it is giving me following exception.
[DDConverter] START Converting EAR test-internal.ear
java.lang.NullPointerException
at weblogic.application.descriptor.ReaderEvent2$1.getPropertyIndex(ReaderEvent2.java:52)
at weblogic.application.descriptor.BasicMunger2._onStartElement(BasicMunger2.java:516)
at weblogic.application.descriptor.BasicMunger2.next(BasicMunger2.java:456)
at weblogic.application.descriptor.VersionMunger._next(VersionMunger.java:333)
at weblogic.application.descriptor.VersionMunger.next(VersionMunger.java:221)
at weblogic.application.descriptor.VersionMunger.consumeInputStream(VersionMunger.java:499)
at weblogic.application.descriptor.VersionMunger.init(VersionMunger.java:425)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:85)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:61)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:43)
at weblogic.application.internal.ApplicationReader.(ApplicationReader.java:21)
at weblogic.application.ApplicationDescriptor$MyApplicationDescriptor.createXMLStreamReader(ApplicationDescriptor.java:487)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:402)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:59)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:175)
at weblogic.DDConverter.main(DDConverter.java:10)
weblogic.application.ddconvert.DDConvertException: java.lang.NullPointerException
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:81)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:176)
at weblogic.DDConverter.main(DDConverter.java:11)
Caused by: java.lang.NullPointerException
at weblogic.application.descriptor.ReaderEvent2$1.getPropertyIndex(ReaderEvent2.java:52)
at weblogic.application.descriptor.BasicMunger2._onStartElement(BasicMunger2.java:516)
at weblogic.application.descriptor.BasicMunger2.next(BasicMunger2.java:456)
at weblogic.application.descriptor.VersionMunger._next(VersionMunger.java:333)
at weblogic.application.descriptor.VersionMunger.next(VersionMunger.java:221)
at weblogic.application.descriptor.VersionMunger.consumeInputStream(VersionMunger.java:499)
at weblogic.application.descriptor.VersionMunger.init(VersionMunger.java:425)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:85)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:61)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:43)
at weblogic.application.internal.ApplicationReader.(ApplicationReader.java:21)
at weblogic.application.ApplicationDescriptor$MyApplicationDescriptor.createXMLStreamReader(ApplicationDescriptor.java:487)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:402)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:59)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:175)
at weblogic.DDConverter.main(DDConverter.java:10)
I am unable to understand, whats wrong with my code.
and one more query is
If my project contains, application.xml and weblogic-appliation.xml file. So, server will give preference to the weblogic-application.xml file or not ?
In my project test-ejb.jar contains only MDB’s so is it compulsory to create weblogic-ejb-jar.xml file ?
Expecting quick response from your side.
Regards
Sagar.
April 11th, 2011 on 2:15 pm
Hi Sagar,
“weblogic-ejb-jar.xml” file is mandatory if you are developing and deploying EJB2.0 specifric MDBs in WebLogic Server. But if your MDB is implemented using EJB3.0 specification then you need not to add any “weblogic-ejb-jar.xml” file inside your MDB jars (in case of EJB3.0 container specific Depoyment descriptors are Optional)
Regarding NullPointerException while running weblogic.DDConverter…. I would request you to please provide us the “application.xml” , “weblogic-application.xml”, And if possible then your MDB related Deployment descriptors. If you think that the deployment descriptors cannot be shared publicly … then you can mail us those descriptors at “contact@middlewaremagic.com”
Also i can see that your application has a SAR file as well…. “test-hibernate.sar” WebLogic Doesnot have any concept of Service Archives (SARs) these kind of deployments are possible only on JBoss Server. So WebLogic will not recognize your SAR files. There is a different way for implementing Custom MBeans and Publishing Services in WebLogic:
http://middlewaremagic.com/weblogic/?p=594
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 11th, 2011 on 4:05 pm
Hi Jay,
I’ve sent an email, with subject line as
Regarding : http://middlewaremagic.com/weblogic/?p=2772#comment-3472
Regards
Sagar.
April 11th, 2011 on 4:23 pm
Hi Sagar,
Thank you for providing us the requested files. Looks like SAR entry present inside the “weblogic-application.xml” file is causing the issue.
Also inside your “application.xml” file as well you have mentioned the Entry of SAR:
As i mentioned earlier that . “test-hibernate.sar” WebLogic Does not have any concept of Service Archives (SARs) these kind of deployments are possible only on JBoss Server. So WebLogic will not recognize your SAR files.
So please try removing the above entries from both XML files to see if we get a different error this time.
Regarding the classes And Jars present inside the SAR you can place them inside
Try Placing the Jar files present inside your SAR inside “$EAR_NAME/APP-inf/lib”) If your SAR has some Classes (not in form of JARs) then place them inside “$EAR_NAME/APP-inf/classes” directory. to see if we get any other exception.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 11th, 2011 on 4:42 pm
Hi Jay,
As per your suggestion, I’ve commented out the entry for SAR in application.xml and weblogic-application.xml files.
But, still getting same NP exception.
Don’t know, what wrong going on with my code.
Here is the stack trace…
java.lang.NullPointerException
at weblogic.application.descriptor.ReaderEvent2$1.getPropertyIndex(ReaderEvent2.java:52)
at weblogic.application.descriptor.BasicMunger2._onStartElement(BasicMunger2.java:516)
at weblogic.application.descriptor.BasicMunger2.next(BasicMunger2.java:456)
at weblogic.application.descriptor.VersionMunger._next(VersionMunger.java:333)
at weblogic.application.descriptor.VersionMunger.next(VersionMunger.java:221)
at weblogic.application.descriptor.VersionMunger.consumeInputStream(VersionMunger.java:499)
at weblogic.application.descriptor.VersionMunger.init(VersionMunger.java:425)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:85)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:61)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:43)
at weblogic.application.internal.ApplicationReader.(ApplicationReader.java:21)
at weblogic.application.ApplicationDescriptor$MyApplicationDescriptor.createXMLStreamReader(ApplicationDescriptor.java:487)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:402)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:59)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:175)
at weblogic.DDConverter.main(DDConverter.java:10)
weblogic.application.ddconvert.DDConvertException: java.lang.NullPointerException
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:81)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:176)
at weblogic.DDConverter.main(DDConverter.java:11)
Caused by: java.lang.NullPointerException
at weblogic.application.descriptor.ReaderEvent2$1.getPropertyIndex(ReaderEvent2.java:52)
at weblogic.application.descriptor.BasicMunger2._onStartElement(BasicMunger2.java:516)
at weblogic.application.descriptor.BasicMunger2.next(BasicMunger2.java:456)
at weblogic.application.descriptor.VersionMunger._next(VersionMunger.java:333)
at weblogic.application.descriptor.VersionMunger.next(VersionMunger.java:221)
at weblogic.application.descriptor.VersionMunger.consumeInputStream(VersionMunger.java:499)
at weblogic.application.descriptor.VersionMunger.init(VersionMunger.java:425)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:85)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:61)
at weblogic.application.descriptor.VersionMunger.(VersionMunger.java:43)
at weblogic.application.internal.ApplicationReader.(ApplicationReader.java:21)
at weblogic.application.ApplicationDescriptor$MyApplicationDescriptor.createXMLStreamReader(ApplicationDescriptor.java:487)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:402)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
at weblogic.application.ApplicationDescriptor.getApplicationDescriptor(ApplicationDescriptor.java:301)
at weblogic.application.ddconvert.EarConverter.convertDDs(EarConverter.java:59)
at weblogic.application.ddconvert.DDConverter.runBody(DDConverter.java:155)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.ddconvert.DDConverter.main(DDConverter.java:175)
at weblogic.DDConverter.main(DDConverter.java:10)
Regards
Sagar.
April 11th, 2011 on 6:30 pm
Hi Sagar,
After looking at your latest StackTrace….I tried to reproduce the issue with my own TestCase. I got the reason behind the Error which you are getting :
The above error is being thrown while using DDConverter tool because …this utility is trying to convert the Old Deployment descriptors into the New one. But as you mentioned that you are using Annotatoin based EJBs so you don;t have any Deployment descriptor like “ejb-jar.xml” do you will get the same error because this file is not present inside your EJB META-INF/ejb-jar.xml file.
So first you have to generate the Deployment descriptors using “weblogic.appc” utility which is very Simple:
Syntax:
java weblogic.appc -writeInferredDescriptors YOUR_EAR_FILE
Example:
java weblogic.appc -writeInferredDescriptors EJBApplication.ear/
As soon as you will run the above command it will generate the required Deployment descriptors based on the annotations you have used in your EJBs. You can see the Generated Deployment descriptors inside your EJB jars. Now you can run your “weblogic.DDConverter” utility like following:
java weblogic.DDConverter -verbose -d OUT EJBApplication.ear
OUT directory will be created automatically as soon as you run the above command. With the latest Deployment descriptors.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 11th, 2011 on 9:54 pm
Hi Jay,
Thanks for your such a excellent suggestions.
After made all the changes (as suggested above) I’ve deployed the application by using
weblogic-application.xml which I’ve already sent it to you.
But, now I am getting below exceptions…
weblogic.management.DeploymentException: classloader-structure element in weblogic-application.xml is referencing the module-uri test-model.jar which does not exist in this application.
Following is my folder hierarchy.
Project Folder
|-test-ejb.jar
|-test-model.jar
|-test-dev.jar
|-test-hibernate.sar
|-test-internal.war
So, do I need to use some another tags in
weblogic-appliaction.xml
OR
do I need to modify the folder structure….
Regards,
Sagar.
April 11th, 2011 on 10:10 pm
Hi Sagar,
I am not sure why are you declaring java modules in your application.xml file. The simplest thing you can do here is :
1-A). Remove all the <java> module declaration from your application.xml file.
1-B). Create “<EAR_APP>/APP-INF/lib” directory inside your EAR file.
2). Place the following Jars inside “<EAR_APP>/APP-INF/lib” < test-model.jar , test-dev.jar
3). If your SAR file “test-hibernate.sar” has any Jar inside it then place them as well inside “<EAR_APP>/APP-INF/lib” directory.
4). If your SAR file “test-hibernate.sar” has any class (not in form of JAR) then place those classes inside “<EAR_APP>/APP-INF/classes” directory of your EAR
5). Remove/Comment all the <wls:classloader-structure> entry from your “weblogic-application.xml” file.
6). now try this application.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 11th, 2011 on 10:45 pm
Hi Jay,
Suppose If my application contains hibernate.cfg.xml file and it is being used by classes under test-model.jar (which is under EAR_APP/APP-INF/lib) as well as hibernate.cfg.xml file is used by classes under WAR (WAR_APP/WEB-INF/classes).
In that case, which is the best place to keep hibernate.cfg.xml
either in EAR_APP/APP-INF/classes OR
in WAR_APP/WEB-INF/classes OR
in both the places ?
Regards,
Sagar.
April 11th, 2011 on 11:27 pm
Hi Sagar,
If you have only one hibernate-cfg.xml file then putting it inside EAR_APP/APP-INF/classes will be best …like that all the application modules will be able to access it.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 12th, 2011 on 2:24 pm
Hi Jay,
As application.xml is a standard DD for J2EE enterprise application.
But, suppose if my application contains both the files such as weblogic-application.xml and application.xml files.
So, while deploying the application which file is used by the weblogic?
Regards,
Sagar.
April 12th, 2011 on 3:37 pm
Hi Sagar,
Every valid application must have J2EE specific Standard deployment descriptors like following:
web.xml (for valid web applications)
application.xml (or valid Enterprise applications)
ejb-jar.xml for (valid EJB2.0 based applications …from EJB3.0 onwards this is optional)
ra.xml (For Valid Resource Archives)
But there are some Container specific Deployment descriptors as well …Which are usually optional and Works only on the same Server for which it is designed.
Hi Sagar,
weblogic.xml (for valid web applications)
weblogic-application.xml (or valid Enterprise applications)
weblogic-ejb-jar.xml for (valid EJB2.0 based applications …from EJB3.0 onwards this is optional)
weblogic-ra.xml (For Valid Resource Archives)
So if you don’t want then you can ignore/avoid using Container specific Deployment descriptors …But J2EE Specific dloyment descriptors are must an must b present inside the application. All the deployment descriptors are read by the container at the time of deployment.
Also please refer to the following link: http://middlewaremagic.com/weblogic/?p=1952
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 13th, 2011 on 3:29 pm
Hi Jay,
As per your above helpful suggestions, I am successfully able to deploy the application into weblogic 11g.
And even I’ve not came across any kind of class -loader issues.
But, at some points I found the application got stuck and in console it is showing following exception.
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR
Connection: Keep-Alive
Cookie: JSESSIONID=GDLgNllCQNvn9ndfVbN98HGcQX2s7hv39gLtN3zkJq70pXpp88QJ!1147238033
]”, which is more than the configured time (StuckThreadMaxTime) of “600” seconds. Stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.DataInputStream.readFully(DataInputStream.java:178)
java.io.DataInputStream.readFully(DataInputStream.java:152)
net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:841)
net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:722)
net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
net.sourceforge.jtds.jdbc.ResponseStream.peek(ResponseStream.java:88)
net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3928)
net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:1045)
net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:465)
net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:777)
org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
org.hibernate.loader.Loader.doQuery(Loader.java:674)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
org.hibernate.loader.Loader.doList(Loader.java:2220)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
org.hibernate.loader.Loader.list(Loader.java:2099)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
nielsen.ci.survey.status.persistence.JobStatusPM.findJobs(JobStatusPM.java:94)
nielsen.ci.survey.status.manager.JobStatusBOM.findJobs(JobStatusBOM.java:78)
nielsen.ci.survey.status.struts.JobStatusAction.search(JobStatusAction.java:97)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:160)
nielsen.common.struts.AbstractDispatchAction.execute(AbstractDispatchAction.java:60)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
So, just want to know your thoughts, whether it is a Weblogic 11g known issue.
OR
I need to do any extra settings ?
Regards
Sagar.
April 13th, 2011 on 4:15 pm
Hi Sagar,
As this is STUCK Thread issue so we would require at least 4-5 Thread Dumps each Taken in the interval of 8-9 Seconds At the time when you started Seeing the STUCK Thread scenario. Because Stuck Thread analysis requires these basic information.
Also please let us know exactly which Database & Database Version and JDBC Driver version you are using?
You can send the Thread Dumps at contact@middlewaremagic.com.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 14th, 2011 on 1:07 pm
Hi Jay,
We are using MS -SQL – 2008 as an our database.
Following are the driver details.
Driver Class : net.sourceforge.jtds.jdbc.Driver
Jar file version and name : jtds-1.2.2.jar.
I’ve already sent an email with thread dumps as an attachment.
(The subject line of email is “Thread Stuck Issue By Sagar”).
For now, to get rid off this issue I’ve added FilesPollingWorkManager
under Admin console –> Environment –> Work Managers.
(of type work manager) by enabling “Ignore Stuck Threads” check box.
But I think it is not a proper solution to deal with Thread stuck issue.
Apart from that, I am also trying to integrate chain-saw for logging with weblogic 11g.
For that I’ve added SocketHubReceiver under chainsaw.xml file.
But, unable to integrate it with Weblogic 11g server.
Just want know your useful thoughts on this.
Regards
Sagar.
April 14th, 2011 on 4:16 pm
Hi Sagar,
We haven’t received any Thread Dumps or any other attachments in E-Mail. Please make sure that you are sending it to the correct E-Mail Address as “contact@middlewaremagic.com”
.
.
Keep Posting :
Thanks
Jay SenSharma
April 14th, 2011 on 4:39 pm
Hi Jay,
I have re-sent the email to above email address(contact@middlewaremagic.com) with subject line as “Thread Stuck Issue By Sagar”.
Please review and let me know if you need any further information from my side.
Regards
Sagar.
April 18th, 2011 on 11:27 am
Hi Jai,
Did you get a chance to look into my query mentioned above ?
Regards,
Sagar.
April 18th, 2011 on 10:27 pm
Hi Sagar,
The thread dump which you send is just a snippet of Thread dump not the Full Thread dump….Also thread dump analysis requires at lease 4-5 thread dumps each should be taken in the interval of around 8-9 seconds at the time when your server was stuck or responding very slow.
For more in depth analysis server log also needed. Please send those details at contact@middlewaremagic.com
NOTE: by the Thread dump snippet which you provided previously i could just guess that there could be N/W issues because most of the threads were stuck at the java.net.SocketInputStream.socketRead0(Native Method) method.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 21st, 2011 on 3:42 pm
Hi Jai,
In our application we are using FORM based authentication.
1) To switch the ports from http to https for login page, we made the below entry in web.xml
/common/*
GET
CONFIDENTIAL
2) Again to switch the ports from https to http, for home page, we made the below entry in web.xml
/home.pg
GET
POST
NONE
3) My question is, while login time htpps protocol is generating. But in home page also https is appearing. It should convert to http in home page.
Currrently i strucked at this point.
Regards,
Tiru.
April 21st, 2011 on 4:52 pm
HI Tiru,
You can exclude some pages to be accessed by HTTPS protocol like described in the following Forum explained by Ravish Mody:
http://forums.oracle.com/forums/thread.jspa?threadID=2162775&tstart=0
Example:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureResource</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Non-SecureResource</web-resource-name>
<url-pattern>/home.jsp</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
</web-app>
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
April 21st, 2011 on 5:39 pm
Hi Jai,
Here, I have configured /home.do as NONE and /common/* as CONFIDENTIAL in web.xml
But, when user successfully logged in and control re-directs to the next page the url change to …./home.do.
But, the protocol and the port number remain as https and 7002.
Do I need to make any other extra setting in application OR under admin console itself, so that
once user logging is done the protocol should change from https to http and port number change from
7002 to 7001.
Regards,
Tiru
April 21st, 2011 on 6:05 pm
Hi Jai,
I have sent, my sample code in web.xml through attachement to mail a/c as subeject “Regarding switching of https to http”
Please review, let us know where i made mistake in web.xml.
Regards,
Tiru
April 22nd, 2011 on 10:35 am
Hi Jai,
Did you get a chance to look into my query mentioned above ?
Regards,
Tiru.
April 22nd, 2011 on 10:48 am
Hi Tiru,
I am little busy with some schedules at present , It looks like you are using Struts framework as well which is making the resolution of this issue Time Taking.
I will have to write a complete Testcase with your web.xml Tomorrow… I am planing to use Struts1.2 (may be you are using the same) Let us know if you are using Struts2.0 ?
.
.
Thanks
Jay SenSharma
April 22nd, 2011 on 12:35 pm
Hi Jai,
yes, i am currently using struts1.2 and let me know if you need any further information from my side.
Currently i am struck at this point.
Regards,
Tiru.
April 22nd, 2011 on 1:10 pm
Hi Jay,
While configuring datasource in WEBLOGIC 11G I am using JTDS type 4 driver.
But I am getting following exception in weblogic console.
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:290)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
Truncated. see log file for complete stacktrace
Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:263)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1193)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1117)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:244)
at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1109)
Truncated. see log file for complete stacktrace
>
Please review the stack trace, and let me know your suggestion.
Here are my drive details mentioned below.
Driver class name : net.sourceforge.jtds.jdbc.Driver
Jar file name / version : jtds-1.2.2.jar
Regards,
Sagar.
April 22nd, 2011 on 2:02 pm
Hi Sagar,
I DON’t see jtds Jdbc driver Supported with WebLogic 11g in the following document provided by Oracle:
http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls
In the above excel sheet click on “Oracle Fusion Middleware on WebLogic Server – Non Oracle Databases Certification”
Try using a different Jdbc Driver which is mentioned in the above Excel sheet and comes under supported configuration.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
May 24th, 2011 on 5:29 pm
Hi Jai,
Currently I am working on implementing Security in current project. (in Weblogic 11g (10.3.3) application server).
For that I’ve performed following steps.
1.Admin Console Setting :
Configured the LDAP settings in mylealm.i.e TestAD
under provider tab.
2. Setting at Application level :
Modified web.xml and weblogic.xml.In
web.xml added the security roles and we mapped
the security roles to Principal-names in weblogic.xml
At 1st the security module is working fine and it is properly authenticating the users.
But while performing QA, we found there are some users not able to logged in to the application and those groups are already present in web.xml and weblogic.xml.
My question is : there is any admin console settings we need to do so that the groups added in deployment descriptors taking preference to authenticate the users?
OR
Is it possible to configure all the groups in admin console itself rather than in deployment descriptors ?
If it is, please suggest me the helpful solution ASAP. Because it is the urgent requirement.
Regards,
Tiru.
May 24th, 2011 on 5:44 pm
Hi tirupathireddy,
While deploying your application you can also chose which kind of “Security Model” you want for your application like :
You can also refer to the following link for more details:
http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/pagehelp/Securitysecurityrealmrealmgeneraltitle.html
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
May 24th, 2011 on 6:19 pm
Hi Jay,
We tried the above approach, but we didn’t get the sol’s.
1)For testing purpose we have removed all the valid security-roles from web.xml and weblogic.xml and added the dummy one. After that deployed the application in weblogic server.
Still the application is authenticating the users. We are unable to recognize,is it because of admin console LDAP(realm ) settings OR something else?
My requirement is:
The application should authenticate with the users (i.e.groups) configured in DD’s(web.xml and weblogic.xml) not with the groups in LDAP configured in admin console.
Thanks,
Tiru.
May 31st, 2011 on 12:19 pm
Hi Jai
1)using target we are deploying the ear file in remote machine.
2)Here we are not including the log files into this ear file.Separately we have created the the folder structure(path) and with in that folder we are storing the log files.
Path is(in remote VM):/var/log/emerging/apps/logfilename.xml
My question is:
1)Can we edit the log file from weblogic admin console to change the log level?
OR
2) Is there any better way to edit the log file which is located in remote machine by the administrator to change the log level?
Thanks,
Tiru
September 3rd, 2011 on 2:10 am
Hello Jay,
Application Server : Weblogic 10.3
JDK : 1.6
Technology stack : J2EE, EJB 2.0, Struts.
I want to use weblgic-ra.xml in my application to detect the connection leaks by specifying below properties inside the file.
Please let me know how to go about it.
Thanks,
Umesh Pathak
September 3rd, 2011 on 2:12 am
Oop !! parameters did not get printed
Here are the params –
connection-profiling-enabled
inactive-connection-timeout-seconds
September 4th, 2011 on 10:23 pm
Hi Umesh,
The following two links will be helpful:
http://download.oracle.com/docs/cd/E11035_01/wls100/resadapter/connect.html#wp1251022
And
http://wiki.apache.org/jackrabbit/JackrabbitOnWeblogic
Which has some example weblogic-ra.xml file as well.
.
.
Keep Posting 🙂
Thanks
Jay SenSharma
September 8th, 2011 on 12:10 am
Just got the information that we can set the Profile Connection Leak property in Admin Console of WL 10.3 from settings for Data source – Configuration – Diagnostics tab. I have enabled this in our testing box, waiting for the log files to see the leakage information.
July 26th, 2012 on 10:56 pm
Hi Jay,
This post has been very helpful in troubleshooting my issue for deploying EJBs on WL10g(10.3). Hopefully you can help me further.
We are upgrading from WL8.1 to WL10g. There are some EJBs that were written using WL8.1 and now we want to migrate them to WL10g. I am not planning to change any EJB code as part of this migration and trying to get the EJBs up and running in WL10g.
I am using the Appc compiler to generate dependent EJB classes. Code compiles correctly but I face issues while deploying the .ear file on WL10g. I started off with getting a ClassNotFoundException for weblogic.ejb20.internal.EntityEJBLocalHome. While researching for this issue I came across your post about converting the deployment descriptors to relevant version of WL. So I followed the steps you have mentioned and was successful in converting the DD’s. I tried to compile and deploy again using the new DD’s and now I am getting another ClassNotFoundException for weblogic.ejb20.interface.WLEnterpriseBean. I noticed these classes/interfaces are available in weblogic8.1 jar but not in weblogic10.3 jar and hence the ClassNotFoundException. But I have ran Appc on this EJBs using weblogic10.3 jar and it should have created appropriate stub classes that should have been specific to WL10g.
Looks like somewhere in the EJB it is still referencing the old WL8.1 server. But I am not able to find where that might be. Could you please help me out with this? I can send you my files if you want to take a peek.
TIA.