How do I get Eclipse to ignore errors in WSDL file? - eclipse

EDIT: To be clear, I want to get rid of the big red X on my project, not just filter the errors from the "Problems" list.
I get a bunch of these errors. How do I make Eclipse ignore them? I donøt have the option of fixing the actual problem :(
src-resolve.4.2: Error resolving component 'ser:char'. It was detected that 'ser:char' is in namespace 'http://schemas.microsoft.com/2003/10/Serialization/', but components from this namespace are not referenceable from schema document 'file:///Users/itunesuser/git/online-service-wizard/suppression-extension/src/main/resources/com/satorisoftware/ws/infuse/multiservice/multiservice.wsdl'. If this is the incorrect namespace, perhaps the prefix of 'ser:char' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///Users/itunesuser/git/online-service-wizard/suppression-extension/src/main/resources/com/satorisoftware/ws/infuse/multiservice/multiservice.wsdl'. multiservice.wsdl /Scrubbr-suppression-extension/src/main/resources/com/satorisoftware/ws/infuse/multiservice line 623 WSDL Problem

Go to window > preferences search for validations(it is not under any menu) > scroll down for wsdl and uncheck the wsdl in the list see the screenshot like below.

Go to Properties, find Validation, switch off WSDL validation entirely.
Not ideal, but better than nothing.

Related

Eclipse XML Validation - how to exclude certain files?

Since the reactions in the Eclipse WTP forum were not really helpful I try to maybe get an answer here:
In our test folders we have a couple of (purposely) faulty XML files.
EACH and EVERY time I do a full rebuild these are flagged as validation errors!
No matter what I specify in Preferences -> Validation -> XML Validation -> Settings under "Exclude Group: these files keep getting validated and hence flagged as build errors and this is mighty annoying!
What syntax is expected for a "Folder or Filename" rule?
Our faulty testfiles are named like "Filename-01.xml" to "Filename-30.xml" but strings like "Filename*.xml" or "Filename*" (with or without the case sensitive flag checked) obviously don't match. Whether specifying the full pathname or just the directory-local name or even trying with RegEx syntax (i.e. "Filename.*") didn't make any difference.
What is the secret sauce to get this "Exclude Group" working?
Or is this simply a bug that we have to live with (because I have little hope that this will ever get fixed...)?

SuiteCloud IDE Validator Ignore List

In the SuiteCloud Eclipse IDE for NetSuite, what is the Ignore List setting under Preferences > NetSuite > Validation? Is it a single file that behaves like, say, a .gitignore? Or is it an explicit list of files to ignore?
I suspect this setting is why Eclipse is always building libraries and other files I've explicitly told it not to in my NetSuite projects.
Can anyone provide some clarity on the usage of this field?
Attempt 1
I tried setting this preference to a single file with the following contents:
**/*.min.js
**/*.lib.js
**/docs/**
**/Third Party/**
**/node_modules/**
**/bower_components/**
**/*jquery*
**/*moment*
**/*lodash*
But that does not seem to work as expected. Files that should be caught by these regexes are still validated. One of them in particular (docstrap.lib.js) crashes the entire IDE every single time when the SuiteScript validator encounters it.
Attempt 2
I tried to put a similar string of regexes directly into the field itself:
**/*.min.js,**/*.lib.js,**/docs/**,...
but this just yields an error directly in the dialog itself: Value must be an existing file
Attempt 3
Created a new SuiteScript project with only blanket.min.js in the project root. Added an ignore file with the following contents:
/blanket.min.js
./blanket.min.js
*blanket.min.js
blanket.min.js
"blanket.min.js"
*blanket*
**/blanket*
*/blanket*
.\blanket.min.js
**\blanket*
*\blanket*
\blanket.min.js
\blanket*
.\blanket*
C:\Development\Projects\validator-test\blanket.min.js
C:/Development/Projects/validator-test/blanket.min.js
blanket.min.js still gets validated. Completely lost as to how this ignore file should be formatted.
The ignore list is used by the SuiteCloud IDE (IDE) to avoid having errors in the IDE for non-standard script ids in SuiteScript 1.0 APIs.
As an example...
nlapiLogRecord('customrecord_foo');
Since customrecord_foo is a non-standard record, it will be marked as an error by the IDE.
To tell the IDE to ignore customrecord_foo, the ignore list can be used.
It's a text file, with one script id per line.
customrecord_foo
customrecord_bar
The specified non-standard script ids in the ignore list file will not be flagged as an error by the IDE.

Error Importing a Symfony project in Eclipse

I'm trying to use Eclipse to work with Symfony2.
I'm used to Eclipse in Java but not really with PHP.
When I try to import a project with import wizard, everything is fine until the very few last moments, when I get this error :
As you can see, The error log panel is empty, and there is even no log file in my brand new workspace. (but it would appear if I get another error elsewhere)
Not my goal but it could provide some infos :
If I create a new Eclipse Symfony2 project from scrap, I get a fully working dummy website. Still, there remain 2 "redcross" errors:
cvc-complex-type.2.1: Element 'configurator' must have no character or element information item [children], because the type's content type is empty. (in /app/cache/dev/appDevDebugProjectContainer.xml line 2106) XML Problem
cvc-complex-type.2.4.a: Invalid content was found starting with element 'factory'. One of '{"http://symfony.com/schema/dic/services":file, "http://symfony.com/schema/dic/services":argument, "http://symfony.com/schema/dic/services":configurator, "http://symfony.com/schema/dic/services":call, "http://symfony.com/schema/dic/services":tag, "http://symfony.com/schema/dic/services":property}' is expected. appDevDebugProjectContainer.xml /rezdfezrdfrezdfr/app/cache/dev line 1265 XML Problem
cvc-complex-type.2.4.a: Invalid content was found starting with element 'factory'. One of '{"http://symfony.com/schema/dic/services":file, "http://symfony.com/schema/dic/services":argument, "http://symfony.com/schema/dic/services":configurator, "http://symfony.com/schema/dic/services":call, "http://symfony.com/schema/dic/services":tag, "http://symfony.com/schema/dic/services":property}' is expected.
(in /app/cache/dev/appDevDebugProjectContainer.xml line 1265)
Since it is not my goal right now, I'm didn't debug these errors yet, but I plan to. EDIT : as I saw on several SO posts, I disabled my project validators to ignore XML validation. No effect :-(
I think it is not the same as Error Importing a Symfony project in Eclipse with dubture plugin, since I dont get any log.
Do anybody know this problem and have a way to have the import wizard working ?
Thanks for any help.

I get errors when typing the #SidedProxy. What happened?

I am making a Minecraft Mod with Eclipse Mars and I got errors when typing the following:
#SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
What did I do wrong? It said "the attribute clientSide/serverSide is undefined for the annotation type SidedProxy" .
I cannot run Minecraft to test my mod without it, so I need to fix this error.
For a definitive answer you need to give us more information.
What version of minecraft forge are you using?
Have you correctly imported SidedProxy?
In eclipse, hold ctrl and click on #SidedProxy to open where it is declared, and check that you are using the correct attribute names (it may have changed between versions, so you may need to put something different)

How to solve validation error on xsi:noNamespaceSchemaLocation in jdoconfig.xml

Since I updated today to GAE 1.7.2.1, I'm having validation errors in eclipse in all my jdoconfig.xml files.
I have the default jdoconfig.xml content :
[...]
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
[...]
And eclipse validation throws:
Referenced file contains errors (http://java.sun.com/xml/ns/jdo/jdoconfig).
For more information, right click on the message in the Problems View and
select "Show Details..."
When clicking on details I can see a bunch of lines like:
s4s-elt-character: Non-whitespace characters are not allowed in schema elements
other than 'xs:appinfo' and 'xs:documentation'. Saw 'var_U = "undefined";'.
In different lines and different content in "Saw ... "
It occurs in every single project I start using the "New Web Application Project..." from the google plugin.
So does anyone have this problem? Any fix?
Try this:
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
Per the answer here Validating jdoconfig with incorrect url
The xmlns is not a real file/directory, more a namespace, so ought not exist! The version is appended to get the real XSD file, namely http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
There are a couple problems here.
The syntactic problem is that the URI you are giving as the value of xsi:noNamespaceSchemaLocation is redirected to http://www.oracle.com/technetwork/java/index.html and returns an HTML document. The XSD validator you are using is trying without success to parse
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<script type="text/javascript">
var _U = "undefined";
var g_HttpRelativeWebRoot = "/ocom/";
var SSContributor = false;
...
as an XSD schema document, and for one reason or another its attempts to explain what went wrong focus on finding the string var_U = "undefined" in a place where it was not expecting to see character data.
Then there are some conceptual problems.
Your document is in a namespace named http://java.sun.com/xml/ns/jdo/jdoconfig. Why on earth are you pointing the schema validator to a schema without a target namespace (which is that noNamespaceSchemaLocation does), if you want to validate your document? Given that (at least some of) your document's elements are namespace-qualified, you will want (as joncalhoun has already suggested) to use xsi:schemaLocation and provide a pair telling the validator where it can find a schema document for each namespace you want it to know about.
It's possible that a schema document used to be served from the location http://java.sun.com/xml/ns/jdo/jdoconfig, but since it's apparently the standard namespace named for your vocabulary, that's not actually very likely. Most systems distinguish fairly reliably between namespaces, which are abstract and poorly defined things, and schema documents, which are typically XML documents that define specific XSD schema components for a given namespace. It's not illegal to use the URI for a schema document as the name of a namespace, but it is unusual.
Note that the URL given by joncalhoun for the schema document (http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd) actually does resolve (after redirection to http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/jdo/jdoconfig_3_0.xsd) to a schema document, which specifies http://java.sun.com/xml/ns/jdo/jdoconfig as its target namespace. (This means that even if you did succeed in retrieving this schema document by giving its URI as the value of xsi:noNamespaceSchemaLocation, you'd then get an error because it's not a schema document for elements and attributes with no namespace.)
This makes me think that you should read joncalhoun's answer again and try it again, carefully. If it didn't work when you tried it, my money says that either you tried something similar but not exactly what he suggested, or it solved this problem but that simply exposed some other problem, which is easy to mistake for failure.
One solution is setting XML Catalog in Eclipse preferences.
Details:
Entry element: URI
Location: http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
URI: http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd
Key type: Namespace name
Key: http://java.sun.com/xml/ns/jdo/jdoconfig
The syntactic and conceptual issues C.M. mentions are a problem with the plugin and Google's settings where both recommend,
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig
I don't specifically use jdo but I still get the validation error with this namespace. It was fine with this namespace until just recently.
I used LuboM's method and it worked for me. Neither LuboM's nor joncalhoun's is the answer though since it ties me in to jdo 3.0
Oracle is going to have to provide the fix. Apparently their intent was to resolve the namespace issues themselves across versions of jdo.
This is what I did to fix it:
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
I am success on this:
Right Click Project -> Properties -> Validation -> XML Syntax
Enable Project Specific Settings (If you need)
Under Validating Files, For No grammar Specified Select "Warning"
Click "Ok"
If you ask for Validating the file, Click "Yes"
You can do the same for all the projects by going to Windows -> Preferences.
Make sure you are validating the file (Step 4).
I had the same issue, and excluded just this jdoconfig.xml file from Eclipse's validation. Even though your Eclipse throws an error for it, it in no way affects being able to deploy the project to GAE correctly.
Here is how to exclude just the jdoconfig.xml file to get rid of that pesky error:
Right click on your Eclipse Project, ->Properties->Validation->XML Validator, click on the "..." button for further options.
You should see Include Group and Exclude Group options. Click Exclude Group->Add Rule...->Folder or file name, and browse to your file.
Clean or rebuild your project. The validation error should be gone.
This worked for me in Eclipse Luna.
You might have try this path to solve your problem:
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">