Upgrade from Weblogic 10.3.6 to 12.1.3 - java

I installed Weblogic 12.1.3 and have had nothing but problems.
I didn't upgrade an existing domain. I created a new one and tried deploying the application to it. It immediately started bombing out on JSP compilation.
Compilation of JSP File '/WEB-INF/pages/common/layout/MainLayout.jsp' failed:
MainLayout.jsp:112:41: This attribute is not recognized.
<custom:UserMessage type="INFO" message="${TopInfoMsg}" messageContainerId="TopInfoContainDiv" messageDivId="TopInfoMsgDiv" hide="${empty TopInfoMsg}" />
I've tried the following to troubleshoot:
Java 7 and Java 8 (problem occurs in both versions)
Tried the JSP Backwards Compatibility setting in the WLS console
Disabled JRebel
Tried eliminating "xerces hell" as a problem by adding xml-apis to the <prefer-application-packages> in weblogic.xml (also eliminated the tertiary dependency on that package in my Maven POM file).
Put the #page tag with pageEnconding="UTF-8" as the first line of the MainLayout.jsp file.
What I occasionally see is weblogic emptying the contents of the .tag files, but not always.
Any help or troubleshooting ideas would be appreciated.

You should write the content of MainLayout.jsp:112:41 with lines 111 and 113, with its we can try to help you.

Related

Error 404: SRVE0190E: File not found: {0} on websphere 8.5

We are migrating our Web application from WAS5.1 (Java 1.4) to WAS8.5(Java 7) using Eclipse Oxygen and WAS Migration Toolkit plug in.
We are able to build and publish application successfully on WAS8.5 local server but while accessing home page of application, we are getting below error. We don't have any special setting at container level for WAS5.1 but not sure what is missing here.
Error 404: SRVE0190E: File not found: {0}.
I was getting this error when trying to run an EAR on the server using Eclipse. I couldn't find an answer so I deleted the EAR and the project from my computer and re-cloned the project and made a new EAR. Somehow everything worked fine after doing that.. not going to question it. The old "unplug and plug back in".
Please check the web.xml file. I faced same issue and found that web.xml was got overritten with some default values.Not sure how it happened.but changing it to old values was working fine.
Check the jsp pages and if any errors for jsp in web.xml also can cause issues

Hibernate 5 + Glassfish 4.1.1: java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V

When I add Hibernate 5 to my website, I can't get it to work in Glassfish 4.1.1. I always get an error
java.lang.NoSuchMethodError:
org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
I've tried to replace the jboss-logging library in Glassfish' modules folder, like I read in an answer to a similar problem, but it didn't change anything. I also tried to use Hibernate 4, but that gave an other error.
In my case, I was running the Hibernate 5 with JPA annotations on tomcat and stop working when I changed to glassfish 4.1
The error:
hibernate.properties not found
Make sure: src/main/resources/hibernate.cfg.xml exists
And if you only have the dependency of hibernate-core, I was using hibernate-annotations and hibernate-common-annotations and it was creating conflict. The hibernate 5 doesnt need these two, I had read somewhere.Try to remove ;)
After that a new error appears:
java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
The reason was the oldest jboss-logging.jar at:
"YOUR_GLASSFISH_FOLDER/glassfish/modules"
Why? The hibernate 5 has dependency with the newest version of
jboss-logging, and the glassfish 4 uses the oldest version even if you
declare inside your POM file the newest version. Actually I'm using:
org.jboss.logging jboss-logging 3.3.0.Final
Then I downloaded it and replace the old .jar inside the modules path
and it back to work, I spent 2 days trying to solve that and I hope it
helps some future issues =D
I used this link to help me: https://medium.com/#mertcal/using-hibernate-5-on-payara-cc242212a5d6#.npq2hdprz
Another solution, in my case, could be back to the last Hibernate 4 version (4.3.11.Final) but it is already too old in my opinion
I had a similar issue, I was able to fix it by creating a glassfish-web.xml file in the WEB-INF directory. The contents of the file are shown below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
 <class-loader delegate="false"/>
</glassfish-web-app>
This ensures that glassfish does not load it's internal libraries, but libraries from your project..
Try to clean glassfish osgi-cache folder in your domain. You can find details in this Payara github issue: https://github.com/payara/Payara/issues/554 (Payara is a fork of Glassfish with additional features, so basic mechanics remain the same as in Glassfish)

Class case exception in weblogic 12c

I deployed a web application to weblogic 12c. But I got the error in Oracle weblogic configuration shows as below:
**java.lang.ClassCastException: weblogic.j2ee.descriptor.wl.WeblogicApplicationBeanImpl cannot be cast to weblogic.j2ee.descriptor.wl.WeblogicWebAppBean**
I didn't experience the same issue with the older version of weblogic.
Can anybody suggest how can I fix this issue.
Check your descriptors: do they have namespaces defined?
For instance, if you use a weblogic-application.xml descriptor, the root element should be:
<weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application” etc.
The older Weblogic (11) was not as strict about this.
I hope this will help you.
Descriptor error comes only when you use the old or wrong descriptor in the xml files. This issue comes either with weblogic-application.xml or weblogic.xml..
Use the latest weblogic12c descriptor to get away from the issue.

Switch java spring maven project from linux to windows

I am new to spring development so i am stuck here. Is there any configuration while switching spring + maven project from linux to windows. I am running on tomcat server 7. The project is initially developed in linux. I have moved all the file from linux to wondows. While running on server, i get error The requested resource (/myproject/login/) is not available. Do i need to make any changes or add add in configuation.
Thanks in advance.
I think you have missed something.
Try this.but i'am not sure this is working or not.
Tomcat, by default invoker servlet disabled (commented out in the web.xml file). You have to create a 'servlet' and a 'servlet-mapping' entry in your web.xml.
Once you do, you can get rid of the "servlet/" part of your url.
Check out the following URL for more information regarding the invoker servlet:
http://faq.javaranch.com/view?InvokerServlet

thread-max config not read by Resin 4.0.32

It seems to me the thread-max is always 128 no matter what I set:
Below is my config.
<server-default>
<jvm-arg-line>-Xmx2048m</jvm-arg-line>
<thread-max>64</thread-max>
</server-default>
<server id="" address="127.0.0.1" port="6800">
<-- More settings -->
<!-- Maximum number of threads. -->
<thread-max>20</thread-max>
</server>
Am I missing something about this? How do I get the config work?
I can set the value in by code:
com.caucho.util.ThreadPool.setThreadMax(6);
Had another problem with the com.caucho.util.ThreadPool.setThreadMax(6). If I debug or run through Eclipse, it is OK. However, when I run in the Cmd with ant, it reports: [java] java.lang.NoClassDefFoundError: com/caucho/util/ThreadPool exception.
I am using Resin 4.0.32 with Java 1.6_16. Eclipse version is 4.2 if this matters.
Any suggestion or comments are appreciated.
I found the problem,
The reason I get the exception when run with ant but didn't get it while in Eclipse IDE is because in the project, I am referring the resin.jar of version 3.0.21 and the API has been changed in resin 4.0.32 for ThreadPool related functions. It is no longer in com.caucho.util. When I debug using Eclipse, resin 3.0.21 is in the class path. But when I ran with ant, we are using resin 4.0.32.
I guess it is the same reason for the first question. I am not using the right function to read the stats.
Hope this helps.

Categories