In the catalina log file we see this error message in some cases when the web application are tried to be redeployed:
INFO: Deploying web application archive ROOT.war
13-May-2009 09:50:09 org.apache.catalina.core.StandardContext processTlds
SEVERE: Error reading tld listeners java.lang.IllegalArgumentException: URI has an authority component
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(File.java:340)
at org.apache.catalina.startup.TldConfig.getJarPaths(TldConfig.java:695)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:277)
at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4441)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4248)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829)
It looks like the application is re-deployed due to the fact that the NAS (network attached storage) is temporarily not accessible. It could be that authority means "cannot access' but I like to understand the reason and the message.
thanks
Actually it looks like it has something to do with a .tld file in a JAR somewhere containing an badly formatted URI. Check the contents of the JARs in the app you are re-deploying.
(Also why are you re-deploying ROOT?)
Related
We are migrating out project from java 6 to java 8, and as part of the migration we are upgrading weblogic server from 11g R1 to 12c R2.
There are some weblogic libraries missing in the new release, that our project seems to depend on. In particular, these libraries are
modules\com.oracle.ws.orawsdl_1.4.0.0.jar
modules\com.oracle.ws.http_client_1.4.0.0.jar
They are defined in the PRE_CLASSPATH variable on setDomainEnv.sh of the previous weblogic installation. I don't know what their purpose is and where they are used (is there some trick to track their usage in the project source?), and they can't be found with the new installation.
I tried to search them as such starting from the Oracle_home directory
find . -type f -iname "*orawsdl*"
./oracle_common/modules/com.oracle.webservices.orawsdl-api.jar
./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.webservices.orawsdl-api/12.2.1/com.oracle.webservices.orawsdl-api-12.2.1.location
./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.webservices.orawsdl-api/12.2.1/com.oracle.webservices.orawsdl-api-12.2.1.pom
./oracle_common/plugins/maven/com/oracle/fmwshare/oracle.webservices.orawsdl/12.2.1/oracle.webservices.orawsdl-12.2.1.pom
./oracle_common/plugins/maven/com/oracle/fmwshare/orawsdl/12.2.1/orawsdl-12.2.1.pom
./inventory/featuresets/resources/modules/orawsdl_12.2.1.2.0.jar
./inventory/featuresets/orawsdl_12.2.1.2.0.xml
./inventory/refcounts/featuresets/orawsdl_12.2.1.2.0.ref
./inventory/refcounts/components/oracle.webservices.orawsdl_12.2.1.2.0.ref
find . -type f -iname "*http_client*"
./oracle_common/http_client_12.jar
./oracle_common/modules/com.oracle.http_client.http_client.jar
./oracle_common/ccr/lib/http_client_12.jar
./oracle_common/ccr/lib/http_client_11116.jar
./oracle_common/plugins/maven/com/oracle/fmwshare/oracle.http_client/12.2.1/oracle.http_client-12.2.1.pom
./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.http_client.http_client/12.2.1/com.oracle.http_client.http_client-12.2.1.pom
./oracle_common/plugins/maven/com/oracle/fmwshare/com.oracle.http_client.http_client/12.2.1/com.oracle.http_client.http_client-12.2.1.location
./oracle_common/http_client_11116.jar
./inventory/refcounts/components/oracle.http_client_12.2.1.2.0.ref
./oui/modules/http_client.jar
Nothing refers to the same package, but is some of these proper alternative?
Also, when I try to deploy to the new server installation, I get the following error.
java.lang.ClassNotFoundException: org.apache.commons.pool2.BasePooledObjectFactory
After dropping the apache commons-pool lib in weblogic classpath (Which was never needed in the previous installation), I get a different error
Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
Important note
Deploy succeeds if I define metadata-complete=true to all web.xml files, but I'm sure this is not clever, as it may bypass some important configuration I'm not aware of. So how do I troubleshoot the cause of this problem?
I think it has something to do with how weblogic tries to take control of the web services it should not. In the project axis is used as the web service implementation. In the succeeded deployment (old weblogic, and new weblogic with metadata-complete=true set), only one web service is shown in under Web Services section of the deployment overview.
However, with the failed deployment (the userdigest.xml error) all web services are shown under this tab, as if weblogic tries to take control of them due to some annotation scanning, I guess.
Here is the error message from log file
<24.7.2017, 11:16:55,876 ap. EEST> <Error> <HTTP> <BEA-101216> <Servlet: "fi.sysopen.hekopassi.vrk.tv.TV_DATA2HekopassiImpl" failed to preload on startup in Web application: "/hekopassi".
javax.xml.ws.WebServiceException: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$WLSTubelineAssemblerImpl.createServer(WLSTubelineAssemblerFactory.java:374)
at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:193)
at weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory$WLSEndpointImpl.<init>(WLSContainer.java:774)
at weblogic.wsee.jaxws.WLSContainer$WLSEndpointFactory.create(WLSContainer.java:725)
at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:332)
Truncated. see log file for complete stacktrace
Caused By: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
at weblogic.wsee.policy.runtime.PolicyServer.loadPolicy(PolicyServer.java:183)
at weblogic.wsee.policy.runtime.PolicyServer.getPolicy(PolicyServer.java:118)
at weblogic.wsee.policy.deployment.PolicyRef.getPolicy(PolicyRef.java:216)
at weblogic.wsee.policy.deployment.PolicyReferenceWsdlExtension.getEffectivePolicy(PolicyReferenceWsdlExtension.java:129)
at weblogic.wsee.policy.deployment.WsdlPolicySubject.getEffectivePolicyFromWsdlExtensible(WsdlPolicySubject.java:489)
Truncated. see log file for complete stacktrace
>
INFO [OpenFrame] FrontEnd logging service shutdown completed
INFO [OpenFrame] FrontEnd logging service shutdown completed
INFO [OpenFrame] BackEnd Log4 Logging service is going down!
INFO [OpenFrame] BackEnd Logging service shutdown completed
<24.7.2017, 11:17:01,540 ap. EEST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application "hekopassi".
weblogic.application.ModuleException: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: Unable to find policy: "usernamedigest.xml", please make sure to use dynamic wsdl when initializing the service stub
at weblogic.wsee.policy.runtime.PolicyServer.loadPolicy(PolicyServer.java:183)
at weblogic.wsee.policy.runtime.PolicyServer.getPolicy(PolicyServer.java:118)
at weblogic.wsee.policy.deployment.PolicyRef.getPolicy(PolicyRef.java:216)
at weblogic.wsee.policy.deployment.PolicyReferenceWsdlExtension.getEffectivePolicy(PolicyReferenceWsdlExtension.java:129)
at weblogic.wsee.policy.deployment.WsdlPolicySubject.getEffectivePolicyFromWsdlExtensible(WsdlPolicySubject.java:489)
Truncated. see log file for complete stacktrace
I am having this problem with deploying and running an empty .jspx page on weblogic server. I have a generic web application in which I want to add just a page to it in the ViewController. When I create this page and right click over it and then click over Run I get the following error:
[04:36:57 PM] Deploying Application...
<Sep 14, 2016 4:37:07 PM CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1473863817655' for task '4'. Error is: 'weblogic.application.ModuleException: Could not setup environment'
weblogic.application.ModuleException: Could not setup environment
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:149 5)
at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:438)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
Truncated. see log file for complete stacktrace
Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ejb_submit_batch.jar#PTBatchSessionEJB' declared in the ejb-ref or ejb-local-ref 'ejb/PTBatchSessionEJB' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:496)
at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3144)
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1493)
Truncated. see log file for complete stacktrace
Truncated. see log file for complete stacktrace
Caused By: weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ejb_submit_batch.jar#PTBatchSessionEJB' declared in the ejb-ref or ejb-local-ref 'ejb/PTBatchSessionEJB' in the application module 'ViewControllerWebApp.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.
at weblogic.deployment.BaseEnvironmentBuilder.addEJBLinkRef(BaseEnvironmentBuilder.java:464)
at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:496)
at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3144)
at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1493)
Truncated. see log file for complete stacktrace
I really don't know how to resolve this problem due to the fact that I am working on it for 3 days. Any suggestion to resolve. I am available to provide you will all required files and logs.
Thanks in advance.
UPDATE
I should mention that if I comment this part in my web.xml the page launches perfectly ! But if I delete the commented part the error above appears.
<!--<ejb-local-ref>
<ejb-ref-name>ejb/PTBatchSessionEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>it.enigen.pt.batch.submit.ejb.PTBatchSessionEJBLocal</local>
<ejb-link>ejb_submit_batch.jar#PTBatchSessionEJB</ejb-link>
</ejb-local-ref>-->
I'm developing a java Web Application, which uses a com4j library to connect to, and extract data from an external database. My application work seamlessly on my localhost, which runs a maven/jetty setup.
However, I need the application to be hosted on a WebLogic server, which i am not the admin of. When deploying and starting the web-app there, I get an unsatisfied link exception, as shown below.
I have been trying numerous suggested solutions to similar problems, without any luck. The errors have been changing slightly from time to time, but mostly the same. All of the suggested solutions I have found, can be boiled down to three suggestions, found on this site: https://com4j.java.net/deployment.html
It should work automatically when you package the jar:
It does not. The jar is definitely in the war-file, and the dll is inside the .jar but still the same exception occurs.
Place com4j.dll in the same directory as com4j.jar:
Does absolutely nothing to the error message.
Set the system property java.library.path to include the directory where com4j.dll resides: The error changed to .dll is already loaded in another ClassLoader.
i've tried one at the time, all at once, and different combinations of the above.
I do not expect a wizard to swoop down and tell me exactly what to do here, but I would love some help finding another angle of attack to this problem.
<11-06-2014 15:23:34 CEST> <Error> <Deployer> <BEA-149265>
<Failure occurred in the execution of deployment request with ID
'1402493014299' for task '158'. Error is:
'weblogic.application.ModuleException: Unable to load com4j.dll'
weblogic.application.ModuleException: Unable to load com4j.dll
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1401)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.UnsatisfiedLinkError: no com4j-x86 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com4j.COM4J.loadNativeLibrary(COM4J.java:530)
at com4j.COM4J.<clinit>(COM4J.java:522)
Truncated. see log file for complete stacktrace
>
Solution for your problem is probably explained here :
https://com4j.java.net/deployment.html
You can set up java.library.path variable in various ways :
Modify startWebLogic script in your domain.
or
Login to weblogic administator console, go to Environment -> Servers -> My Server ->Server Start tab -> Add -Djava.library.path=PATH_TO_LIBRARY in Arguments: text field.
We are getting the following error in catalina.out file when we restart our application with newrelic java agent configured.
We have followed the steps specified in newrelic installation guide and following is the entry created in catalina.sh by newrelic installer:
# ---- New Relic switch automatically added to start command on 2013 Dec 09, 20:24:35
NR_JAR=/usr/share/fk-ops-tomcat6-base/newrelic/newrelic.jar; export NR_JAR
JAVA_OPTS="$JAVA_OPTS -javaagent:$NR_JAR"; export JAVA_OPTS
Exception on app restart in catalina.out:
Error bootstrapping New Relic agent: java.lang.RuntimeException: java.io.IOException: No such file or directory
java.lang.RuntimeException: java.io.IOException: No such file or directory
at com.newrelic.bootstrap.BootstrapLoader.load(BootstrapLoader.java:95)
at com.newrelic.bootstrap.BootstrapAgent.premain(BootstrapAgent.java:93)
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1704)
at java.io.File.createTempFile(File.java:1792)
at java.io.File.createTempFile(File.java:1828)
at com.newrelic.bootstrap.BootstrapLoader.getJarFileInAgent(BootstrapLoader.java:81)
at com.newrelic.bootstrap.BootstrapLoader.addBridgeJarToClassPath(BootstrapLoader.java:47)
at com.newrelic.bootstrap.BootstrapLoader.load(BootstrapLoader.java:92)
... 7 more
I just encountered the same problem. The not very helpful error message alluded to the fact that the newrelic agent (or rather the user under which my server is running) wasn't able to write into /tmp. Maybe that helps!
I hit that exception with that stack trace recently, and in my case it was caused by the temporary directory not existing at all.
In particular: by default tomcat uses $CATALINA_BASE/temp as value for the java.io.tmpdir property, and seems to create that when needed. At the time the newrelic agent boots up however it may not yet exist, and so newrelic agent fails with that exception.
After restarting things are fine (now the directory exists!), but I solved in my startup scripts:
1. set the value of CATALINA_TMPDIR explicitly to something I control
2. ensure that directory exists before starting tomcat.
Make sure the newrelic.yml placed and marked readable in the same directory as the .jar
I work for New Relic.
As you've seen from the answers above, there can be multiple causes for this kind of message - some of which are pretty unexpected. Since this forum is not intended for back-and-forth messaging about incidents, in case neither of the previous two answers solved the problem for you, your best bet will be to open a ticket for support at http://support.newrelic.com where we can ask to look at your logfile and gather debug logs as necessary.
I had the same problem using apache version 6.0.33. Once I upgraded to 7.0.53 everything worked.
save problem.
But I found this:
Sep 09, 2015 11:19:48 AM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /mnt/apache-tomcat-7.0.56/temp
then doing this:
mkdir /mnt/apache-tomcat-7.0.56/temp
cp /mnt/apache-tomcat-7.0.56/newrelic/* /mnt/apache-tomcat-7.0.56/temp
Everything works.
You may not need cp.
If you look at very early of Tomcat log (catalina.out) after NewRelic exception, you can see what folder is required that are missing. Here is mine:
May 29, 2017 5:04:31 PM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /var/log/tomcat/tomcat7/temp
May 29, 2017 5:04:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.59
Hope this help
I have my war running on tomcat in a context path - say /path1.
I've made some more changes to my codebase, added more classes, jars etc, and now without disturbing the first war that is running on /path1, i want to add this war to /path2.
Can this be done?
Because when I tried this the second war is failing to start when spring loads -
SEVERE: Error listenerStart
Feb 7, 2011 4:46:44 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/path2] startup failed due to previous errors
And there is no stack trace or anything though i've set log level to debug.
I think there is no problem with the code because when I run this on my local machine and on a server where the first one is not running it works fine. When i try to run this on the server with /path1 active then it fails.
Thanks!
The 'listenerStart' bit suggests that the error is in a ServletContextListener, so if you have any of those in your code, take a hard look, and see what they're doing; are they accessing any resources that the other instance might then try to share?