New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOAP/WSDL generation fails on nightly #37

Closed
MFernstrom opened this Issue Jan 12, 2018 · 10 comments

Comments

Projects
None yet
2 participants
@MFernstrom
Member

MFernstrom commented Jan 12, 2018

Trying to generate a WSDL by adding ?WSDL to a cfc fails with an Internal Server Error (java.lang.RuntimeException: No compiler found in your classpath! (you may need to add 'tools.jar'))

<cffunction name="ImRemote" access="remote" returnType="string">		
	<cfreturn "I'm a returned string">
</cffunction>

I do have the classpath variable JDK_TOOLS pointing to tools.jar for Java 8, as well as tools.jar as an external jar.

I can run OpenBD just fine, but not when trying to run the WSDL generation.

I'm trying to untangle this but I have a feeling it's beyond my Java skill at the moment.

Here's the full error and screenshot of it (console output is awkward on Github)
screen shot 2018-01-12 at 10 44 18 am

java.lang.RuntimeException: No compiler found in your classpath! (you may need to add 'tools.jar')
at org.apache.axis.components.compiler.Javac.compile(Javac.java:156)
at com.naryx.tagfusion.cfm.xml.ws.dynws.DynamicWebServiceTypeGenerator.buildClasses(DynamicWebServiceTypeGenerator.java:421)
at com.naryx.tagfusion.cfm.xml.ws.dynws.DynamicWebServiceTypeGenerator.generateType(DynamicWebServiceTypeGenerator.java:105)
at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.setupService(cfcHandler.java:204)
at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.generateWSDL(cfcHandler.java:122)
at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:33)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:104)
at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:454)
at org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1233)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
at com.naryx.tagfusion.cfm.cfcServlet.doGet(cfcServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:336)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
at com.newatlanta.filters.SearchEngineFriendlyURLFilter.doFilter(SearchEngineFriendlyURLFilter.java:194)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 12, 2018

Member

Looks like I'm not using the JDK but the JRE (1.8.0_73), not sure if that would affect things, and if that would be required on a deployed server.

Member

MFernstrom commented Jan 12, 2018

Looks like I'm not using the JDK but the JRE (1.8.0_73), not sure if that would affect things, and if that would be required on a deployed server.

@wua22

This comment has been minimized.

Show comment
Hide comment
@wua22

wua22 Jan 12, 2018

Member

The functionality in question generates java code on the fly. That code needs to be compiled and hence requires the java compiler which doesn't come with a JRE. However including tools.jar in the classpath is meant to solve that.

Member

wua22 commented Jan 12, 2018

The functionality in question generates java code on the fly. That code needs to be compiled and hence requires the java compiler which doesn't come with a JRE. However including tools.jar in the classpath is meant to solve that.

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 12, 2018

Member

I have tools.jar listed under Libraries in the project settings/properties

screen shot 2018-01-12 at 11 02 07 am

Member

MFernstrom commented Jan 12, 2018

I have tools.jar listed under Libraries in the project settings/properties

screen shot 2018-01-12 at 11 02 07 am

@wua22

This comment has been minimized.

Show comment
Hide comment
@wua22

wua22 Jan 12, 2018

Member
Member

wua22 commented Jan 12, 2018

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 12, 2018

Member

Same error.

I added it to WEB-INF/lib/tools.jar, I removed the old reference, and it's listed in the classpath list of jars when starting the engine.

Member

MFernstrom commented Jan 12, 2018

Same error.

I added it to WEB-INF/lib/tools.jar, I removed the old reference, and it's listed in the classpath list of jars when starting the engine.

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 12, 2018

Member

Could the JDK version of the tools.jar matter?

Member

MFernstrom commented Jan 12, 2018

Could the JDK version of the tools.jar matter?

@wua22

This comment has been minimized.

Show comment
Hide comment
@wua22

wua22 Jan 12, 2018

Member
Member

wua22 commented Jan 12, 2018

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 12, 2018

Member

I'm running it through Eclipse using the Jetty 3.9.0 plugin (The yellow icon one)

Member

MFernstrom commented Jan 12, 2018

I'm running it through Eclipse using the Jetty 3.9.0 plugin (The yellow icon one)

@wua22

This comment has been minimized.

Show comment
Hide comment
@wua22

wua22 Jan 15, 2018

Member

So it appears that in Java 8, invoking com.sun.tools.javac.main.Main.compile() returns com.sun.tools.javac.main.Main$Result rather than an integer as the Axis code expects in org.apache.axis.components.compiler.Javac. To account for that, the Axis code would need to be updated and shipped with OpenBD as opposed to the official version.

A workaround is to use the Java 7 tools.jar.

Member

wua22 commented Jan 15, 2018

So it appears that in Java 8, invoking com.sun.tools.javac.main.Main.compile() returns com.sun.tools.javac.main.Main$Result rather than an integer as the Axis code expects in org.apache.axis.components.compiler.Javac. To account for that, the Axis code would need to be updated and shipped with OpenBD as opposed to the official version.

A workaround is to use the Java 7 tools.jar.

@MFernstrom

This comment has been minimized.

Show comment
Hide comment
@MFernstrom

MFernstrom Jan 15, 2018

Member

Interesting, thanks for looking into it.

I might take a stab at this at some point.

Member

MFernstrom commented Jan 15, 2018

Interesting, thanks for looking into it.

I might take a stab at this at some point.

@MFernstrom MFernstrom closed this Feb 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment