We've a cluster of 3 nodes running Oracle Weblogic 12.2.1.2.
Checking weblogic.Stdout log file, I've started to see tons of the following trace:
<Warning><oracle.dms.instrument><DMS-50763> <Attempt to create pre-existing noun /MY_DOMAIN/MY_CLUSTER_NODE_X/DEPLOY_NAME, of type wls_jaxrsapp_resources, with a conflicting type wls_ear.>
MY_DOMAIN is the configured domain in weblogic server, and DEPLOY_NAME is the name of my deployed war in the server.
Looking at Oracle documentation this error is described as:
DMS-50763: Attempt to create pre-existing noun {0}, of type {1}, with
a conflicting type {2}.
Cause: An attempt has been made to create a noun that already exists and has a type that is different from the current attempt to create it.
Action: Correct the code responsible for creating this noun.
Level: 1 Type: SET_AT_RUNTIME Impact: Other
This description looks confusing to me since the proposed action to solve the problem is about correcting the code, but I guess that error is related on how internally the server uses the war name for more than one resource.
I checked if there is other war or artifact deployed with the same name but it's not. Furthermore I thought that wls_ear refers to the deploy war, and wls_jaxrsapp_resources refers to some jaxb-rest resource (messages, stubs...) but I'm not even sure. I'm only guessing because I didn't find anything about it in the Oracle's documentation with this nomenclature.
Can somebody explain this error with more detail to put me in the right direction?
Related
I wasn't able to find the solution and I found more people stuck in the same problem so I will post it here.
By default a JAX-WS server (at least for WebLogic) will not validate the message received with its associated schema.
This can lead to a lot of problems since any invalid value (wrong xsd:dateTime format, letters on a number field, etc) will result in a null value in the Java object, including mandatory fields.
What I need to do is a simple validation that should be provided by the server.
import com.sun.xml.internal.ws.developer.SchemaValidation;
#Stateless
#WebService(portName="ValidatedService")
#SchemaValidation
public class ValidatedService {
public void operation(#WebParam(name="request") ValidatedRequest request) {
/* do stuff */
}
}
For some reason when I was trying to use the provided schema validation I was getting the following exception:
Caused By: javax.xml.ws.WebServiceException: Annotation #com.sun.xml.internal.ws.developer.SchemaValidation(handler=class com.sun.xml.internal.ws.server.DraconianValidationErrorHandler) is not recognizable, atleast one constructor of class com.sun.xml.internal.ws.developer.SchemaValidationFeature should be marked with #FeatureConstructor
I do not wish to implement any custom validator. The server should provided this type of service with simple and straightforward configuration.
The problem was: I was using the wrong package for #SchemaValidation.
The correct class that worked for me is com.sun.xml.ws.developer.SchemaValidation, which is provided in the file mw_home\modules\glassfish.jaxws.rt_1.3.0.0_2-1-5.jar (using WLS 10.3.6).
In the previous code segment I was referencing the wrong package: com.sun.xml.internal... but using the one provided by WebLogic worked instantly.
If you are using Maven and using the bundled JAR as dependency you might not have this library in the classpath, which led me to the problem. You need to add it to your classpath via dependency (provided scope only) and reference the correct package for that class name in your JAX-WS WebService class (an abstract class won't do it).
More information in the Enabling Schema Validation on the Server page.
This schema validation is enough for me at the moment since I do not need any custom behavior.
In my case: Maven project with many modules. I got the next error when was trying to deploy application into tomcat:
failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Annotation #com.sun.xml.ws.developer.SchemaValidation(handler=class com.sun.xml.ws.server.DraconianValidationErrorHandler) is not recognizable, at least one constructor of class com.sun.xml.ws.developer.SchemaValidationFeature should be marked with #FeatureConstructor
I resolved problem by don't including jaxws-rt.jar in WEB-INF/lib.
It appears that this library already exists in the tomcat/lib folder.
Just tuned up pom.xml, setted provided scope for this dependency entry.
Now all works fine.
I want to run a java application which calls a web service. Everything works fine from the netbeans ide, but fails when I run the .jar generated. What could be the problem?
How can I check the content type that the error is pointing at?
the error says: "SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message. com.sun.xml.messaging.saaj.MessageImpl identifyContentType"
EDIT
I am realizing that the problem could be originated by the fact that the web service that Im consuming uses a custom data type, but I have no idea where to look.
Please help
Your question lacks the details that would help identify your problem (like, what web container are you using, some source code, etc) but I've encountered and resolved this same problem. I'm using Tomcat with Eclipse and apparently, the problem occurs because for some reason, Tomcat can't find some JARs even though I have specified them in my build path. The resolution is to put the JARs in the actual lib directory of Tomcat instead of in some project-specific location. (See this same case with log4j.)
What happens is this missing JAR causes the servlet to produce an internal server error when called. Tomcat generates an error page---which is of type "text/html"---and sends it back to client. So, client reads "text/html" instead of the expected "text/xml".
For a test this SOAP tutorial produces the specified error due to jaxm-api.jar but can be fixed with the solution I described above. I have verified this with Tomcat 7.
How can I check the content type that the error is pointing at?
A bit difficult to answer without some code. But if you are using javax.xml.soap.SOAPPart, it has methods to check the headers of the SOAP transaction. Check the javadocs. Shame it does not override toString(). But personally, I did not arrive at this answer with Java debug methods but via looking at TCP dumps.
My application is throwing this error:
Error : An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jdo.JDOAdapter"
(perhaps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH?) :
{1}
org.datanucleus.exceptions.NucleusUserException: Error :
An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jdo.JDOAdapter" (perhaps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH?) :
{1}
...
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Although my application do have datanucleus-api-jdo-3.0.0-release.jar
What could be the reason if not missing jars?
EDIT:
This is what have been suggested to fix this issue:
This is a sporadic error that happens from time to time on any
persistable class, but moreso on ones that are used a lot in parallel.
It happens in JDO and JPA, and it seems as though the local datastore
locks a particular table / entity group and forgets to release it;
thus causing all subsequent calls to ds operations to fail. I
generally don't have to restart eclipse; just stopping then starting
the server tends to fix the problem, if not, a full refresh/clean
build will do the trick.
However, I have already restarted my GAE server and re-run my application still getting the same error.
Here is the complete POM.xml
Here is the complete stack trace.
Use latest versions. Include all dependencies (jdo-api, datanucleus-api-jdo). Read docs for what needs to be in the CLASSPATH (enhanced versions of your classes, for example).
I am trying to send mail in my web application. I am using the libraries javax.mail-1.4.4 and activation-1.1. My configuration is set up like described in the Tomcat Docs here http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html#JavaMail_Sessions
The web.xml file is configured properly according to this information. The context.xml where I store the settings is configured properly as well (or at least should be) with mail.*, auth, name, type info set properly.
When trying to send a mail this way, I get the following error:
Exception in thread "Thread-27" java.lang.NoClassDefFoundError: javax/mail/Authenticator
in this line:
session = (Session) envCtx.lookup("mail/Session");
I've looked through some solutions, like missing mail/activation libraries, checked up on those but none I could find were able to help me. Any idea what I could do to fix this or get in closer on the error?
"should be" is the operative phrase. I'd recommend that you believe Tomcat when it tells you it's missing things. You have not configured things properly until Tomcat says you have.
I'd recommend that you put them into the Tomcat /lib folder and see if that makes a difference.
I'm using Fuse ESB (ServiceMix) and I've been searching all over in the hope to find a better explanation of the various headers when running the command 'osgi:list'. Namely the two columns I want to understand are 'Blueprint' and 'Spring'. I have my guesses as to what their various statuses refer to, but then other scenarios come up which make me question this.
If anyone could provide some explanation, or better, point me to some documentation that explains the various columns and their potential values, that will be most helpful.
here are the meanings of the various values that can show up in those columns:
Created - the blueprint/spring container was created and all dependencies were resolved successfully.
Creating - the bundle is in the process of being created
Destroyed - the bundle's spring/blueprint container was completely destroyed (happens after it's unregistered as a service)
Failure - the bundle's spring/blueprint container failed to start (either due to an exception or a missing dependency after the grace period expires)
Grace Period - The bundle has 1 or more unsatisfied dependencies.
Waiting - the bundle is waiting on the availability of a service that satisfies a dependency
Full documentation can be found by reading the descriptions of the constants for Blueprint. the Spring states mirror those definitions, though I can't find a good resource online for them. As for why they show up for only some bundles: they'll only have a value if the module contains either a blueprint or a spring file.
Apache ServiceMix is using Gemini Blueprint and Spring.
According to Apache website, those columns displays states of bean resolution defined in Blueprint XML and Spring XML files if they are present in the bundle.
For example Created value means that all bean dependencies have been resolved and injected.