WebLogic Server Version: 12.1.2.0.0 Attempting to precompile - weblogic12c

I am deploying my JAVA EE ear app. as usual in WL server,
but suddenly it seems that everytime WL is trying precompile all the JSP again and the deployment take ages
12.1.2.0.0.>
ST> <Info> <HTTP> <BEA-101343> <my_devices: Attempting to precompile /WEB-INF/jsp/template/header.jsp, since the class file associated with it was found to be out-of-date.>
ST> <Info> <HTTP> <BEA-101295> <Recompiling JSP [ServletContext#29540787[app:my_devices module:my_devices path:null spec-version:3.0]], resource [/WEB-INF/jsp/template/popupHeader.jsp], because it is stale. It was previously compiled using a different version of WebLogic Server.
12.1.2.0.0.>

Precompile is a good thing !!
But if you want to disable it to get a faster deployment, change your weblogic.xml file and include the following:
<jsp-descriptor>
<jsp-param>
<param-name>precompile</param-name>
<param-value>false</param-value>
</jsp-param>
</jsp-descriptor>
That should help you on this !

Related

How do I ignore/upgrade a module in JBoss Wildfly 9?

I just downloaded Wildfly 9.0.0.CR2 with Java 7 on Mac 10.9.5. I notice by default, Wildfly 9 includes a bouncycastle module (modules/system/layers/base/org/bouncycastle/main/bcprov-jdk15on-1.52.jar) . I would like to install another bouncycastle module in Wildfly (bcprov-jdk16-1.46.jar). Is there a way I can disable the one that JBoss has included? When I tried to delete the module Jboss included (the modules/system/layers/base/org/bouncycastle/ folder), I get the error upon JBoss startup
08:36:19,086 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:131)
at org.jboss.as.server.ServerService.boot(ServerService.java:350)
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:271)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.stream.XMLStreamException: WFLYCTL0083: Failed to load module org.jboss.as.weld
at org.jboss.as.controller.parsing.ExtensionXml.parseExtensions(ExtensionXml.java:155)
at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:433)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:144)
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:106)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123)
... 3 more
You might have a look at this discussion, it is almost the same thing you want to do (opposite direction w.r.t. versions):
BouncyCastle 1.51 loading in war on Wildfly 8.0
The long and the short of it is, you can create a custom module (or, I think, another slot for the existing module?) and reference that one in your jboss-deployment-structure.xml instead of the default module wildfly is bringing with it.
If you don't want/need BC as a module, you could also just include it in the lib folder of your EAR/WAR and it will be loadable from there.
Our deployment structure looks essentially like this:
my.ear
+ lib/ <-- dependencies for multi-submodule deployment
+ META-INF/ <-- application.xml defines submodule(s) e.g. web.war,
<-- also jboss-deployment-structure.xml to include/export wildfly core modules for your EAR
+ web.war <-- our core deployment
And we include e.g. a different version of hibernate than in wildfly. I expect you can include a different BC version in your ear as well.
See also:
https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
Custom module tutorial:
http://middlewaremagic.com/jboss/?p=1933
Similar issue with resolution: https://developer.jboss.org/thread/175395
WildFly uses modular classloading and as such not everything is on classpath of every module.
Deployment itself is just another module that gets extra dependencies based on what deployment descriptors tell server should be added.
When it comes to bouncycastle, there are modules that themselves require it, but that doesn't mean they will expose this dependency to your deployment.
There was a bug in 8.0 that caused that BC was exposed to user deployment in case when user deployment was using web services. This was fixed since than.
Given that you use WildFly 9 that shouldn't a problem anymore.
As other suggested, you can create new module with different name or at least different slot name, which you can than include via your jboss-deployment-structure.xml
Just btw, bcprov-jdk16-1.46 is much older than what is provided in WildFly.

Deplyoment Issue in Migrating from Primefaces 3.5 to 4.0

I was using primefaces 3.5 in my project and now have updated to 4.0 but its failing to deploy on Glassfish after upgrading and resulting in the following error:
Severe: Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.lang.Exception:
No Function Found on type: org.primefaces.util.ComponentUtils with
signature: java.lang.String resolveWidgetVar(java.lang.String)
I have removed the 3.5 version JAR and placed the new one in the project library, but still failing to deploy with the mentioned error given.
I'm using:
Glassfish: 4.1,
Netbeans 8.0.1
You should clear glassfish cache because old primefaces library which referred in the class path of your app server.
Stop the glassfish server.
Delete the content of the osgi-cache, by removing the felix directory in your domain. This is usually found in glassfish4/glassfish/domains/domain1/osgi-cache

GWT Maven : Module 'xxx' may need to be (re)compiled

Problem: Keep getting "module 'xxx' may need to be (re)compiled".
Steps:
Importing a sample GWT-Maven project into eclipse ("MobileWebApp" - from the GWT SDK).
GWT|compile the project.
Running in production mode (without the codesvr parameter, i.e. using "localhost:8888/MobileWebApp.html").
Notes:
I am fairly new to both GWT and Maven.
I read GWT module may need to be (re)compiled REDUX.
Dev mode does work (I am able to debug the application).
Detailed Steps:
Copying the "MobileWebApp" folder from the "samples" folder inside the GWT SDK (version 2.5.1) to my eclipse workspace.
Importing the project: File->Import->Existing Maven Projects (pointing to the "MobileWebApp" folder where the pom.xml exists.
Configuring the project following these steps: https://developers.google.com/eclipse/docs/faq?hl=iw#gwt_with_maven
At this point I am able to run the app as "Web Application" and debug it.
Running GWT|Compile: The nocache.js stuff is being placed in the target folder.
Now, when i try to run the app in production mode I am getting the (re)compile error.
Logs:
"DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
DataNucleus Enhancer completed with success for 0 classes. Timings : input=713 ms, enhance=0 ms,
total=713 ms. Consult the log for full details
DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details"
"Compiling module com.google.gwt.sample.mobilewebapp.MobileWebApp
Validating units:
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\mobilewebapp
Invoking Linker AppCacheLinker
Be sure your landing page's tag declares a manifest:
Link succeeded
Compilation succeeded -- 152.077s"
"Initializing App Engine server
06/07/2013 20:12:33 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
06/07/2013 20:12:33 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
06/07/2013 20:12:33 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/web.xml
06/07/2013 20:12:34 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
06/07/2013 20:12:36 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888/
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
Linking modules
Bootstrap link for command-line module 'com.google.gwt.sample.mobilewebapp.MobileWebApp'
Linking module 'mobilewebapp'
Invoking Linker AppCacheLinker
DevMode warning: Clobbering appcache.nocache.manifest to allow debugging. Recompile before deploying your app!
Be sure your landing page's tag declares a manifest:
06/07/2013 20:13:38 com.google.apphosting.utils.jetty.AppEngineAuthentication$AppEngineAuthenticator authenticate
INFO: Got /MobileWebApp.html but no one was logged in, redirecting."
Pom.xml: https://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/
Thanks ahead.
Answering my own question:
1) from command: "mvn gwt:run".
2) Google|GWT compile.
P.S. As much as I am happy figuring that out (after agonizing couple of days) I would still like to know the reasons of why I have to - first lunch the app then compile it. Very strange - in my humble opinion.
offtopic: This sample app was supposed to be "offline executable" (from mobile, at the very least) - so how exactly do I test it? I tried (after running the app once or twice from mobile device, so that it will be cached) to switch to airplane mode and navigating to the app (just like he demonstrated) but, obviously(?), the server is not reachable.. Do I need to enable something specific for it to work? (my mobile device is Google-Nexus-4)
Multiple steps:
Update Project properties -> deployment Assembly using Deploy GWT maven project with eclipse deploys webapp directory instead of target/project directory
mvn clean package
mvn gwt:compile
In eclipse, click on 'GWT Compile Project' -> Advacned -> Remove '-war src/main/webapp' argument and hit compile.
Output should be like this -
Linking into target/project-1.0-SNAPSHOT/ModuleName
Now the deployment should work fine.

Error deploying application to Glassfish 3

When I try to deploy my application named shopping-1 to Glassfish 3 I get the following error:
'Publishing to GlassFish Server Open Source Edition 3 (Java EE 6)2 at localhost...'has encountered a problen.
cannot Deploy shopping-1
Deployment Error for module: shopping-1: Exception while loading the app :
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
org.apache.catalina.LifecycleException:
java.lang.ClassNotFoundException:
org.springframework.web.servlet.DispatcherServlet
How do I track down and fix this issue?
apparently the shopping-1.war file doesn't include the archive containing the DispatcherServlet class.
unzip -l shopping-1.war | grep spring (on Linux) will give you the list of all spring-related included jar files
First run appserver admin-list applications
Check if there are any deployed applications on the server.
Undeploy by running them if there are.
Stop the application server.
Open the location folder where you have the war file for deployment
Check that there is only one war file at a time in it.
7.Start the application server
Deploy the war.
Should work fine.

weblogic 11g R1

I have prepared my ejb jars and war using weblogic.appc
weblogic 11g R1, all compilations were fine, I have prepared ear and deployed in weblogi server .I am getting belows erorr. afte deployment and ear status went to failed state.
I am not att all using this oracle.help.OHW file. don't know it is refered
Can any suggest how comeout of this problem.
[HTTP:101216]Servlet: "OHW" failed to preload on startup in Web application: "cbcm". javax.servlet.ServletException: [HTTP:101249][ServletContext#13514259[app:cbcm module:cbcm path:/cbcm spec-version:null]]: Servlet class oracle.help.OHW for servlet OHW could not be loaded because the requested class was not found in the classpath . java.lang.ClassNotFoundException: oracle.help.OHW. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:551) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1985) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1959) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1878) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Check your web.xml within your WAR, there is a servlet and servlet-mapping for the Oracle help files and this servlet most likely.
Comment out those.
I received the same error as "failed to preload on startup in Web application:".
Below is how I am able to resolve the error.
in your web.xml, check if following property is present
<load-on-startup>0</load-on-startup>
this property is to load your bundled artifacts during the server restart itself. This was the cause of the issue because there were some jar file which weblogic server required to load before the loading of our bundled artifacts. Now since server is not yet started completely and all the libraries required to our application is not yet loaded, hence server is throwing "failed to preload on startup in Web application:".
The solution to this is remove load-on-startup from web.xml and That's it!!