You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Prasad Deshpande (JIRA)" <ji...@apache.org> on 2010/03/12 14:08:27 UTC

[jira] Created: (CXF-2710) DynamicClientFactory compilation wrong classpath Jboss5

DynamicClientFactory compilation wrong classpath Jboss5
-------------------------------------------------------

                 Key: CXF-2710
                 URL: https://issues.apache.org/jira/browse/CXF-2710
             Project: CXF
          Issue Type: Bug
         Environment: Windows XP SP2, JBoss 5.1.0, JDK 1.6.0_07
            Reporter: Prasad Deshpande


Hi, I'm getting error when compiling dynamic client inside an .ear. when I debug through, I found that in method "compileJavaSrc" of DymanicClientFactory class, I get classPath as empty string because of which compilation is failing. However if I set classPath value to "." then it all works file.

I thought of debugging the reason for why classPath is coming as null & found that in "setupClasspath" method I get value of classLoader parameter as "BaseClassLoader@828ebf{vfsfile:/C:/jboss-5.1.0.GA/server/eFp-40-Oracle/deploy/efp.ear/}"  which is not an instanceof URLClassLoader. also protocol now says that it's "vfsfile:/" not "file:/". I think we need some default value of classpath like ".", Otherwise "javac" command would fail like below.

12:56:07,937 INFO  [STDOUT]  javac: invalid flag: C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@3c65c3-1268398562703-classes
 Usage: javac <options> <source files>
 use -help for a list of possible options
12:56:07,937 SEVERE [DynamicClientFactory] Could not compile java files for http://localhost:8080/webservice/services/WSFreeTextListAPI?wsdl.


If you have any suggestion to me, please let me know. I'll correct my code.

Here is my code snippet:
        JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
        client = factory.createClient(wsdlUrl);
        ClientImpl clientImpl = (ClientImpl) client;
        Endpoint endpoint = clientImpl.getEndpoint();

I tried using ClassLoader version of the "createClient" method... still doesn't help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2710) DynamicClientFactory compilation wrong classpath Jboss5

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844542#action_12844542 ] 

Daniel Kulp commented on CXF-2710:
----------------------------------


Any chance you could test this with 2.2.7-SNAPSHOT?   The compiler stuff was completely redone for 2.2.7-SNAPSHOT so this may already be fixed.   With 2.2.7, there could also be a difference between using Java6 and Java5 so if that could also be tested, that would be great.    On Java6, we try to use the built in javax.tools.JavaCompiler tool instead of forking javac.     Thus, flags and such are handled differently.

> DynamicClientFactory compilation wrong classpath Jboss5
> -------------------------------------------------------
>
>                 Key: CXF-2710
>                 URL: https://issues.apache.org/jira/browse/CXF-2710
>             Project: CXF
>          Issue Type: Bug
>         Environment: Windows XP SP2, JBoss 5.1.0, JDK 1.6.0_07
>            Reporter: Prasad Deshpande
>
> Hi, I'm getting error when compiling dynamic client inside an .ear. when I debug through, I found that in method "compileJavaSrc" of DymanicClientFactory class, I get classPath as empty string because of which compilation is failing. However if I set classPath value to "." then it all works file.
> I thought of debugging the reason for why classPath is coming as null & found that in "setupClasspath" method I get value of classLoader parameter as "BaseClassLoader@828ebf{vfsfile:/C:/jboss-5.1.0.GA/server/eFp-40-Oracle/deploy/efp.ear/}"  which is not an instanceof URLClassLoader. also protocol now says that it's "vfsfile:/" not "file:/". I think we need some default value of classpath like ".", Otherwise "javac" command would fail like below.
> 12:56:07,937 INFO  [STDOUT]  javac: invalid flag: C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@3c65c3-1268398562703-classes
>  Usage: javac <options> <source files>
>  use -help for a list of possible options
> 12:56:07,937 SEVERE [DynamicClientFactory] Could not compile java files for http://localhost:8080/webservice/services/WSFreeTextListAPI?wsdl.
> If you have any suggestion to me, please let me know. I'll correct my code.
> Here is my code snippet:
>         JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
>         client = factory.createClient(wsdlUrl);
>         ClientImpl clientImpl = (ClientImpl) client;
>         Endpoint endpoint = clientImpl.getEndpoint();
> I tried using ClassLoader version of the "createClient" method... still doesn't help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2710) DynamicClientFactory compilation wrong classpath Jboss5

Posted by "Prasad Deshpande (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844560#action_12844560 ] 

Prasad Deshpande commented on CXF-2710:
---------------------------------------

Daniel,

I tested with 2.2.7-SNAPSHOT too... nothing different.  The "cmdArray" variable in "internalCompile" of Compiler class has following value. And I can see that classpath is still missing. Look at the index 2 of the array. I'm sure if I add "." (i.e. current working directory) it works fine... as it's working in 2.2.6.

[javac, -classpath, , -d, C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@1ca3b85-1268410876156-classes, -target, 1.5, @C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/cxf-tmp-906868/cxf-compiler61456.tmp]

Any more guesses?

> DynamicClientFactory compilation wrong classpath Jboss5
> -------------------------------------------------------
>
>                 Key: CXF-2710
>                 URL: https://issues.apache.org/jira/browse/CXF-2710
>             Project: CXF
>          Issue Type: Bug
>         Environment: Windows XP SP2, JBoss 5.1.0, JDK 1.6.0_07
>            Reporter: Prasad Deshpande
>
> Hi, I'm getting error when compiling dynamic client inside an .ear. when I debug through, I found that in method "compileJavaSrc" of DymanicClientFactory class, I get classPath as empty string because of which compilation is failing. However if I set classPath value to "." then it all works file.
> I thought of debugging the reason for why classPath is coming as null & found that in "setupClasspath" method I get value of classLoader parameter as "BaseClassLoader@828ebf{vfsfile:/C:/jboss-5.1.0.GA/server/eFp-40-Oracle/deploy/efp.ear/}"  which is not an instanceof URLClassLoader. also protocol now says that it's "vfsfile:/" not "file:/". I think we need some default value of classpath like ".", Otherwise "javac" command would fail like below.
> 12:56:07,937 INFO  [STDOUT]  javac: invalid flag: C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@3c65c3-1268398562703-classes
>  Usage: javac <options> <source files>
>  use -help for a list of possible options
> 12:56:07,937 SEVERE [DynamicClientFactory] Could not compile java files for http://localhost:8080/webservice/services/WSFreeTextListAPI?wsdl.
> If you have any suggestion to me, please let me know. I'll correct my code.
> Here is my code snippet:
>         JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
>         client = factory.createClient(wsdlUrl);
>         ClientImpl clientImpl = (ClientImpl) client;
>         Endpoint endpoint = clientImpl.getEndpoint();
> I tried using ClassLoader version of the "createClient" method... still doesn't help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2710) DynamicClientFactory compilation wrong classpath Jboss5

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844689#action_12844689 ] 

Daniel Kulp commented on CXF-2710:
----------------------------------


Just added some checks in Compiler for empty classpaths.  It WAS just checking for null, but thos checks should also check for an empty string which it wasn't doing previously.   Can you check with snapshots from tonight or checkout the code and build your own?

> DynamicClientFactory compilation wrong classpath Jboss5
> -------------------------------------------------------
>
>                 Key: CXF-2710
>                 URL: https://issues.apache.org/jira/browse/CXF-2710
>             Project: CXF
>          Issue Type: Bug
>         Environment: Windows XP SP2, JBoss 5.1.0, JDK 1.6.0_07
>            Reporter: Prasad Deshpande
>
> Hi, I'm getting error when compiling dynamic client inside an .ear. when I debug through, I found that in method "compileJavaSrc" of DymanicClientFactory class, I get classPath as empty string because of which compilation is failing. However if I set classPath value to "." then it all works file.
> I thought of debugging the reason for why classPath is coming as null & found that in "setupClasspath" method I get value of classLoader parameter as "BaseClassLoader@828ebf{vfsfile:/C:/jboss-5.1.0.GA/server/eFp-40-Oracle/deploy/efp.ear/}"  which is not an instanceof URLClassLoader. also protocol now says that it's "vfsfile:/" not "file:/". I think we need some default value of classpath like ".", Otherwise "javac" command would fail like below.
> 12:56:07,937 INFO  [STDOUT]  javac: invalid flag: C:/DOCUME~1/Prasad_D/LOCALS~1/Temp/org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory@3c65c3-1268398562703-classes
>  Usage: javac <options> <source files>
>  use -help for a list of possible options
> 12:56:07,937 SEVERE [DynamicClientFactory] Could not compile java files for http://localhost:8080/webservice/services/WSFreeTextListAPI?wsdl.
> If you have any suggestion to me, please let me know. I'll correct my code.
> Here is my code snippet:
>         JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
>         client = factory.createClient(wsdlUrl);
>         ClientImpl clientImpl = (ClientImpl) client;
>         Endpoint endpoint = clientImpl.getEndpoint();
> I tried using ClassLoader version of the "createClient" method... still doesn't help.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.