last day (14 days later) » 

1:38 PM
Hi
 
hi friend
i really dont know what is the problem
 
hey shall we look into that issue ?
do u hv any screen sharing option like teamviewer ?
 
no sry friend in my work dont let me install teamviewer i'm just and intern :(
this was my last try
 
ok
 
<plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
            <execution>
                <goals>
                    <goal>generate</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <schemaLanguage>WSDL</schemaLanguage>
             <generateDirectory>${project.build.sourceDirectory}/gensrc
              </generateDirectory>
 
1:52 PM
how did you resolve tools.jar error ?
and you said you have JDK installed ? Do you have a path like this C:\Program Files\Java\jdk1.8.0_25
 
i change the JAVA_HOME variable, at firt it was pointing to the JRE but i change it to my JDK
 
ok you're running mvn clean install from the directory containing pom.xml rt ?
 
yes if i dont run it like that it gives me an error
what do you mean by "rt"
 
right :)
ok can you ping the log you get when you are running mvn install command ?
 
1:57 PM
also can you confirm the value of JAVA_HOME environment variable ?
 
yes the value is right i checked it but how do i confirm it
 
i mean to say ping me your JAVA_HOME var value you set in your system
 
C:\Program Files\Java\jdk1.8.0_11
 
ok cool
 
this is the value of my Path value
C:\Program Files\Java\jdk1.8.0_11\bin;%JAVA_HOME%\bin;%Maven_Home%\bin;
the jdk looking by this is included two times
 
2:03 PM
ya you can remove the absolute path - C:\Program Files\Java\jdk1.8.0_11\bin - that part from you PATH variable..
 
ok i'm going to delete it
 
we usually use a variable in path so that any updates to that variable will reflect automatically in PATH... like in this case, if I just change JAVA_HOME to jdk1.8.0_31 in future.. i don't have to come and change the path.. :)
anyways that's not the issue I believe.. wat about the log I asked you ?
 
here it is
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PruebaWSproy 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ app ---
[INFO] Deleting D:\Users\myUser\Documents\workspace-sts-3.6.0.RELEASE\PruebaWSproy\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
do you think id because my properties?
i dont have this variable in my properties
 
what properties ?
 
${project.build.sourceDirectory}
in my POM.xml properties
 
2:10 PM
that won't be a problem... anyways you tried with absolute path yesterday rt ?
 
yep
how can i check if my workspace folder have permisions to let other app create content in that folder?
 
some one else joined this chat i guess..
on windows you'll have access usually
but the main thing is i don't see the jaxb plugin running in log
so we've to include that in default build or invoke that target first..
2mins
 
do you mean to add that plugin as the firts plugin in the <plugins> tag?
i dont have targets in my build tag
here is my build tag
sorry
<build>
	         <pluginManagement>
	        <plugins>
	            <plugin>
	                <artifactId>maven-eclipse-plugin</artifactId>
	                <version>2.9</version>
	                <configuration>
	                    <additionalProjectnatures>
	                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
	                    </additionalProjectnatures>
	                    <additionalBuildcommands>
	                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
 
ya checking on that.. we already defined a generate goal for jaxb plugin rt ? either we should invoke it first on include it in default lifecycle phase so that you don't have to do it again and again
 
i'm going to put it as the firts plugin and run it
no the same
 
2:18 PM
yup it wont make a difference :)
did you define this variable - project.version - in the top in your pom ?
 
do i need to declare a depency so i can have jaxb
 
no no maven is supposed to resolve all the dependencies.. dont worry about that..
 
i'm using eclipse spring tools suite
 
but you're running mvn command from windows command line rt ?
 
yes
i update in eclipse
and i also run it in the cmd in windows
 
2:25 PM
ok what about the project.version variable I asked ? did you define a variable with that name in pom in <properties> at the top ?
 
no this is my properties tag
 
If you didn't, just remove that variable and specify some version like this 0.12.3
 
<properties>
<java-version>1.8</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
<project.version>0.12.3</project.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

</properties>
sry
 
ok its there.. np then..
why sry ?
 
i defined that variable
 
2:27 PM
ok.. remove forceRegenerate tag in your config
and run again
 
nop the same :(
i think it dont have a solution lol
 
no we can fix it.. we're just missing a small part.. thats it :)
<execution>
<id>jaxb2</id>
<configuration></configuration>
add that id inside execution but outside configuration..
then you can do mvn jaxb2:generate
 
ok let me try
how do i add the id inside the configuration tags so far i have this

  <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
            <execution>
                <id>jaxb2</id>
                <goals>
                    <goal>generate</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <schemaLanguage>WSDL</schemaLanguage>
 
ya that's it
you added the id that's important.. we'll do mvn id:goalName
so mvn jaxb2:generate
 
so i execute those commands? id:goalName firts and then mvn jaxb2:generate.... but i dont add the id tag inside the configuration tag as you told me how do i added there
*didnt
 
2:39 PM
ya whatever the config that you pinged me is good..
 
ok i'm goint to run the commands
 
just save and invoke mvn jaxb2:generate... the other one was to just to explain :)
 
ok
it downloaded something but it the build was a failure let me copy the results give me 2 mins
 
ok
 
[INFO] Scanning for projects...
[WARNING] The POM for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT: Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT
Downloading: repo.maven.apache.org/maven2/org/codehaus/mojo/…
 
2:51 PM
oops.. looks like there's a conflict with id
change it to something else like maven-jaxb
then invoke maven-jaxb:generate
 
    ok i run it again after you told me to change the id name and it print me this
    [INFO] Scanning for projects...
[WARNING] The POM for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT is missing, no dependency information available
 [WARNING] Failed to retrieve plugin descriptor for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT: Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT
i'm going to change the id and run it
i change it like this
 <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb2-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
            <execution>
                <id> maven-jaxb</id>
                <goals>
                    <goal>generate</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <schemaLanguage>WSDL</schemaLanguage>
             <generateDirectory>${project.build.sourceDirectory}/gensrc
but when i try tu run this command
maven-jaxb:generate it says that or the syntax of the tagis not correct
*maven-jaxb:generate it says that the name of the file or the dir or the syntax of the tag is not correct
 
ok just try this..
<id>jaxb2-generate</id>
<phase>generate-sources</phase>
same place where id is and then run mvn clean install
 
any luck ?
 
3:08 PM
no man :(
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PruebaWSproy 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ app ---
[INFO] Deleting D:\Users\myUser\Documents\workspace-sts-3.6.0.RELEASE\PruebaWSproy\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
it says succes but still no classes
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>jaxb2-generate</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generateDirectory>${project.build.sourceDirectory}/gensrc
</generateDirectory>
<generatePackage>com.wsdl.src</generatePackage>
<schemas>
<schema>
<url>http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl</url>
 
ok mvn jaxb2:xjc
 
ok
[INFO] Scanning for projects...
[WARNING] The POM for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT: Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:1.0.0-BUILD-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:1.0.0-BUILD-SNAPSHOT
[INFO]
 
haha..
 
lol what happend did you see the error??
 
ok one last thing.. change.. <phase>generate-sources</phase> to <phase>compile</phase>
if this doesn't work, im going to setup this thing in my system.. ;)
 
3:18 PM
wow thnks man let me try, i changed the pahse to compile but what command should i run
mvn jaxb2:xjc ?
 
no same mvn clean install
 
no no luck
 
ok give me 15mins.. :)
 
it prints me this
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PruebaWSproy 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ app ---
[INFO] Deleting D:\Users\myUser\Documents\workspace-sts-3.6.0.RELEASE\PruebaWSproy\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app ---
ok friend 15 mins heheheh
 
3:49 PM
hey
do you have the xsd file with you instead of the URL ?
the file at the URL is throwing some exceptions while parsing.. I tried with my own xsd in src/main/resources folder and files are generated at this location
D:\work\test-project\src\main\java\gensrc\com\temp\src
___________________________________________________

<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>AUTODETECT</schemaLanguage>
<generateDirectory>${project.build.sourceDirectory}/gensrc
</generateDirectory>
<generatePackage>com.temp.src</generatePackage>
<!--
<schemas>
<schema>
mvn jaxb2:generate
 
XSD the file?
*xsd file? do you mean the pom.xml file?
 
no no... xsd or wsdl
in your pom, you're mentioning schema source as URL rt ? like this
http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl
wsdl at that url is invalid i guess.. throwing exceptions while parsing
 
oh yeah no i dont have that file, i was following this example spring.io/guides/gs/consuming-web-service
mm do you have some url where i can use for test
 
haha.. nope but you can create a file.. im uploading one
its not allowing upload anything but images..
copy the contents in to some xsd.. any file name.. extension should be .xsd.. that's important
 
ok where should i create that example.xsd file inside my project?
 
4:01 PM
<schemaDirectory>src/main/resources/</schemaDirectory>
src - main - resources
bcoz that's the place we told the plugin to look for XSDs or WSDLs
 
ahahah thanks it worked
but now i have a simple error i believe is something when it generates the packages
 
yes wat is it ?
 
in my src/main/java folder a package with the name "gensrc.com.tempsrc" was generated and inside that packages are the clases but when i open the classes in my editor they are started with this "package com.temp.src;" and it give me this error in my eclipse ide Description Resource Path Location Type
The declared package "com.temp.src" does not match the expected package "gensrc.com.temp.src" AddressType.java
here is the class
package com.temp.src;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
* <p>Clase Java para AddressType complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
 
that's just eclipse build path error..
right click on your project - Java Build Path - Source tab - Add Folder - select gensrc folder
 
yeah i right clicked and it created a package com.temp.src and it move the class to that package
and now i dont have the error
but where in the pom.xml file i specified that the class where going to be created with com.temp.src
 
4:13 PM
no no.. if you do that you're changing project structure.. you can do that every time you build source files isn't it ?
so just add gensrc folder to your build path.. then that folder will be added to your classpath..
<generatePackage>com.temp.src</generatePackage> inside <configuration>
 
is already there
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>AUTODETECT</schemaLanguage>
<generateDirectory>${project.build.sourceDirectory}/gensrc
</generateDirectory>
<generatePackage>com.temp.src</generatePackage>
<!--
<schemas>
<schema>
<url>http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl</url>
 
ya that's what im telling ..
you asked where in pom are we mentioning that package structure.. so i just pinged that :)
 
i thought that the classes where going to be generated in com.temp.src not in gensrc.com.temp.src
so do you said that i should add gensrc.com.temp.src in classpath?
 
but we also mentioned <generateDirectory>${project.build.sourceDirectory}/gensrc remember ?
so that will resolve to your-project/src/main/java/gensrc
combining generateDirectory and generatePackage, you will get that gensrc.com.temp.src
 
mmm ok is that a good pratice? should i create my classes in there?? i did this right click on your project - Java Build Path - Source tab - Add Folder - select gensrc folder and i no longer have errors
 
4:21 PM
you're getting that compiler error only in eclipse rt ? that's because eclipse considers src/main/java as a build path root .. but your files are in
src/main/java/gensrc/com/temp/src but in your source file.. the package declaration says only com.temp.src -- there's an additional gensrc directory according to eclipse, thats why we add gensrc also to build path
Ya that's just to make eclipse happy
 
mmm ok thanks a lot friend can i give you more than 25 points lol?? anyway i was doing this in eclipse to pratice in my job they need to do this in netbeans but i think i can do it now, is almost the same POM.xml in netbeans than in eclipse right?
 
Hmm but I think you'll get similar error when building your WAR/JAR file..

do one thing change it like this.. <generateDirectory>gensrc
</generateDirectory>

Now your gensrc will be right next to your src folder.. you can add gensrc to build path to make eclipse happy but you should also tell maven-compiler-plugin to consider files in gensrc folder as well in addition to files in src
 
ok i will do that thanks if i have any problems in netbeans i will ask you again later right?
 
sure.. you can post a new question with your doubts.. when you post a new one many ppl will help not just me.. in case no one responded.. just leave that question url as a comment in our current question
 
ok thanks friend
 
4:32 PM
np :)
you can even upvote it ;)
room mode changed to Gallery: anyone may enter, but only approved users can talk
 

last day (14 days later) »