laserbyte / openbluedragon

Automatically exported from code.google.com/p/openbluedragon
0 stars 0 forks source link

Web Services error on Single-instance installations #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We are using a single-instance installation of OpenBD on top of the Resin 
servlet engine.  It is configured to match the settings and structure of 
the single-instance setup the OpenBD installer creates (Jordan Michaels' 
installer), with the exception of using Resin rather than Tomcat.

Everything is working great with one exception: web services.  WSDL 
generation and invocation of web services fails with stack traces ('package 
com.naryx.tagfusion.cfm.xml.ws.encoding.ser does not exist'
).  Keep in mind this is part of OpenBlueDragon.jar and that the rest of 
the OpenBD deployment is functioning great.  I know that at first glance 
this sounds like either Issue #62 or what is described in 
http://groups.google.com/group/openbd/browse_thread/thread/d4d977c2d54f0dda
?pli=1 .

However, I have verified that tools.jar is in the JDK directory and that 
the OpenBD libs are being loaded properly through Resin's class loader.  
I'm also using the same JDK as is packaged with the OpenBD installer to 
rule out JDK differences.  In fact this Resin install is identical to the 
OpenBD installer with the exception of using Resin instead of Tomcat.  I 
even took the rest of /opt/openbd from the installer and just added the 
relevant Resin config and brought in the ROOT/bluedragon dir.

After a fair amount of trial and error, I've come to the tentative 
conclusion that the failure has to do with CLASSPATH handling between Resin 
and OpenBD.  In particular, it seems OpenBD is picking-up the Resin-loaded 
jars as 'file:*.jar!' in the CLASSPATH and I believe this is where things 
are breaking down.  If I add the jars to WEB-INF/lib, then they are picked-
up as just '<filename>.jar' as opposed to 'file:<filename>.jar!' in the 
CLASSPATH and the webservices functionality works.  I'm told my a java-
developer colleague that file:<filename>.jar! is a standard internal 
representation of jars in a CLASSPATH, but nonetheless, I think this might 
be causing the problem.

The simple code I'm using to trigger the error is the following 
(testws.cfc):

<cfcomponent>
  <cffunction 
name = "echoString" 
returnType = "string" 
output = "no"
access = "remote">
    <cfargument name = "input" type = "string">
    <cfreturn #arguments.input#>
  </cffunction>
</cfcomponent>

If I hit http://<URL>/testws.cfc?wsdl, I get the following errors (attached 
as well for readability):

BlueDragon Internal Server Error
The page you were executing caused an internal BlueDragon server error
Request /testws.cfc
File Trace  /net/souvlaki/home/bziuchkovski/www/testws/testws.cfc

Type    Internal
Tag Context 
Stack Trace 

java.io.IOException: Server compileError: 
Error compiling: 
/opt/openbd/work/temp/ws/637/50FFA06E-FD9A-40AD-
A28EA82852A2C0EE/na_svr/testws.java
/opt/openbd/work/temp/ws/637/50FFA06E-FD9A-40AD-
A28EA82852A2C0EE/na_svr/testwsBeanInfo.java
:
Line 7, column 96:  package com.naryx.tagfusion.cfm.xml.ws.encoding.ser 
does not exist
Line 11, column 38:  package com.naryx.tagfusion.cfm.xml.ws.dynws does not 
exist
Line 11, column 99:  package com.naryx.tagfusion.cfm.xml.ws.dynws does not 
exist
Line 0, column 0: 
3 errors

Classpath: 
file:/opt/openbd/lib/mysql.jar!/:file:/opt/openbd/lib/rome-
1.0RC1.jar!/:file:/opt/openbd/lib/jaxrpc.jar!/:file:/opt/openbd/lib/poi-
3.5-FINAL-
20090928.jar!/:file:/opt/openbd/lib/mail.jar!/:file:/opt/openbd/lib/javolut
ion.jar!/:file:/opt/openbd/lib/mailet_1_0.jar!/:file:/opt/openbd/lib/OpenBl
ueDragon.jar!/:file:/opt/openbd/lib/webservices.jar!/:file:/opt/openbd/lib/
jakarta-oro-2.0.8.jar!/:file:/opt/openbd/lib/xmlrpc-1.2-
b1.jar!/:file:/opt/openbd/lib/jericho-html-
3.1.jar!/:file:/opt/openbd/lib/jcommon-
1.0.0.jar!/:file:/opt/openbd/lib/jtds-
1.2.2.jar!/:file:/opt/openbd/lib/iText-
2.0.8.jar!/:file:/opt/openbd/lib/yuicompressor-
2.4.2.jar!/:file:/opt/openbd/lib/saaj.jar!/:file:/opt/openbd/lib/pircbot.ja
r!/:file:/opt/openbd/lib/postgresql.jar!/:file:/opt/openbd/lib/commons-
httpclient-3.1bd.jar!/:file:/opt/openbd/lib/core-
renderer.jar!/:file:/opt/openbd/lib/commons-
pool.jar!/:file:/opt/openbd/lib/QuickServer.jar!/:file:/opt/openbd/lib/jfre
echart-1.0.1.jar!/:file:/opt/openbd/lib/commons-codec-
1.3.jar!/:file:/opt/openbd/lib/commons-io-
1.2.jar!/:file:/opt/openbd/lib/PDFBox-
0.7.2.jar!/:file:/opt/openbd/lib/ColdFusionAdapter.jar!/:file:/opt/openbd/l
ib/commons-logging.jar!/:file:/opt/openbd/lib/lucene-core-
2.4.0.jar!/:file:/opt/openbd/lib/commons-collections-
3.1.jar!/:file:/opt/openbd/lib/jets3t-
0.7.1.jar!/:file:/opt/openbd/lib/jtidy-
r820.jar!/:file:/opt/openbd/lib/sqljdbc.jar!/:file:/opt/openbd/lib/lucene-
highlighter-
2.4.0.jar!/:file:/opt/openbd/lib/xalan.jar!/:file:/opt/openbd/lib/nirvanix-
api.jar!/:file:/opt/openbd/lib/wsdl4j.jar!/:file:/opt/openbd/lib/commons-
vfs-1.0.jar!/:file:/opt/openbd/lib/java_memcached-
release_2.0.1.jar!/:file:/opt/openbd/lib/lucene-analyzers-
2.4.0.jar!/:file:/opt/openbd/lib/jdom.jar!/:file:/opt/openbd/lib/commons-
discovery.jar!/:file:/opt/openbd/lib/activation.jar!/:file:/opt/openbd/lib/
xom-1.1.jar!/:file:/opt/openbd/lib/ojdbc14.jar!/:file:/opt/openbd/lib/h2-
1.1.104.jar!/:file:/opt/openbd/lib/lucene-snowball-
2.4.0.jar!/:file:/opt/sybase/15_0/shared/lib/jconn3.jar!/:file:/opt/sybase/
15_0/shared/lib/DDLGen.jar!/:file:/opt/sybase/15_0/shared/lib/dsparser.jar!
/:file:/opt/subscribermail/lib/commons-codec-
1.2.jar!/:file:/opt/subscribermail/lib/asm.jar!/:file:/opt/subscribermail/l
ib/hibernate3.jar!/:file:/opt/subscribermail/lib/commons-collections-
2.1.1.jar!/:file:/opt/subscribermail/lib/ehcache-
1.2.2.jar!/:file:/opt/subscribermail/lib/c3p0-
0.9.0.jar!/:file:/opt/subscribermail/lib/cglib-
2.1.3.jar!/:file:/opt/subscribermail/lib/asm-
attrs.jar!/:file:/opt/subscribermail/lib/htmlparser.jar!/:file:/opt/subscri
bermail/lib/commons-logging-
1.0.4.jar!/:file:/opt/subscribermail/lib/junit.jar!/:file:/opt/subscriberma
il/lib/jta.jar!/:file:/opt/subscribermail/lib/antlr-
2.7.6rc1.jar!/:file:/opt/subscribermail/lib/twitter4j-
1.1.7.jar!/:file:/opt/subscribermail/lib/dom4j-
1.6.1.jar!/:file:/opt/subscribermail/lib/htmllexer.jar!/:/home/bziuchkovski
/www/testws/WEB-INF/classes/:file:/opt/openbd-
1.2/jdk/jre/lib/resources.jar!/:/opt/openbd-
1.2/jdk/jre/lib/resources.jar:file:/opt/openbd-
1.2/jdk/jre/lib/rt.jar!/:/opt/openbd-
1.2/jdk/jre/lib/rt.jar:file:/opt/openbd-
1.2/jdk/jre/lib/jsse.jar!/:/opt/openbd-
1.2/jdk/jre/lib/jsse.jar:file:/opt/openbd-
1.2/jdk/jre/lib/jce.jar!/:/opt/openbd-
1.2/jdk/jre/lib/jce.jar:file:/opt/openbd-
1.2/jdk/jre/lib/charsets.jar!/:/opt/openbd-
1.2/jdk/jre/lib/charsets.jar:file:/opt/openbd-
1.2/jdk/jre/lib/ext/localedata.jar!/:/opt/openbd-
1.2/jdk/jre/lib/ext/localedata.jar:file:/opt/openbd-
1.2/jdk/jre/lib/ext/dnsns.jar!/:/opt/openbd-
1.2/jdk/jre/lib/ext/dnsns.jar:file:/opt/openbd-
1.2/jdk/jre/lib/ext/sunpkcs11.jar!/:/opt/openbd-
1.2/jdk/jre/lib/ext/sunpkcs11.jar:file:/opt/openbd-
1.2/jdk/jre/lib/ext/sunjce_provider.jar!/:/opt/openbd-
1.2/jdk/jre/lib/ext/sunjce_provider.jar:file:/opt/resin/lib/resin.jar!/:/op
t/resin/lib/resin.jar:/opt/resin/lib/hessian.jar:/opt/resin/lib/jsdk-
15.jar:/opt/resin/lib/jta-101.jar:/opt/resin/lib/ejb-
15.jar:/opt/resin/lib/jca-15.jar:/opt/resin/lib/jms-
11.jar:/opt/resin/lib/jaxrpc-
15.jar:/opt/resin/lib/pro.jar:/opt/resin/lib/license.jar:/opt/resin/lib/jpa
-15.jar:/opt/resin/lib/j2ee-management-10.jar:/opt/resin/lib/resin-
util.jar:/opt/resin/lib/webbeans-16.jar:file:/opt/openbd-
1.2/jdk/lib/tools.jar!/:/opt/openbd-
1.2/jdk/lib/tools.jar:file:/opt/resin/lib/jaxrpc-
15.jar!/:/opt/resin/lib/jaxrpc-
15.jar:file:/opt/resin/lib/quercus.jar!/:/opt/resin/lib/quercus.jar:file:/o
pt/resin/lib/jsdk-15.jar!/:/opt/resin/lib/jsdk-
15.jar:file:/opt/resin/lib/jaxws-api.jar!/:/opt/resin/lib/jaxws-
api.jar:file:/opt/resin/lib/jta-101.jar!/:/opt/resin/lib/jta-
101.jar:file:/opt/resin/lib/jms-11.jar!/:/opt/resin/lib/jms-
11.jar:file:/opt/resin/lib/jsf-12.jar!/:/opt/resin/lib/jsf-
12.jar:file:/opt/resin/lib/jstl-11.jar!/:/opt/resin/lib/jstl-
11.jar:file:/opt/resin/lib/jpa-15.jar!/:/opt/resin/lib/jpa-
15.jar:file:/opt/resin/lib/resin-util.jar!/:/opt/resin/lib/resin-
util.jar:file:/opt/resin/lib/webbeans-16.jar!/:/opt/resin/lib/webbeans-
16.jar:file:/opt/resin/lib/portlet-10.jar!/:/opt/resin/lib/portlet-
10.jar:file:/opt/resin/lib/javamail-141.jar!/:/opt/resin/lib/javamail-
141.jar:file:/opt/resin/lib/jca-15.jar!/:/opt/resin/lib/jca-
15.jar:file:/opt/resin/lib/webutil.jar!/:/opt/resin/lib/webutil.jar:file:/o
pt/resin/lib/saaj.jar!/:/opt/resin/lib/saaj.jar:file:/opt/resin/lib/jsr88.j
ar!/:/opt/resin/lib/jsr88.jar:file:/opt/resin/lib/script-
10.jar!/:/opt/resin/lib/script-10.jar:file:/opt/resin/lib/j2ee-management-
10.jar!/:/opt/resin/lib/j2ee-management-
10.jar:file:/opt/resin/lib/hessian.jar!/:/opt/resin/lib/hessian.jar:file:/o
pt/resin/lib/resin-deploy.jar!/:/opt/resin/lib/resin-
deploy.jar:file:/opt/resin/lib/activation.jar!/:/opt/resin/lib/activation.j
ar:file:/opt/resin/lib/jws-15.jar!/:/opt/resin/lib/jws-
15.jar:file:/opt/resin/lib/ejb-15.jar!/:/opt/resin/lib/ejb-
15.jar:/opt/resin-3.1.9/lib/resin.jar:/opt/resin-
3.1.9/lib/hessian.jar:/opt/resin-3.1.9/lib/jsdk-15.jar:/opt/resin-
3.1.9/lib/jta-101.jar:/opt/resin-3.1.9/lib/ejb-15.jar:/opt/resin-
3.1.9/lib/jca-15.jar:/opt/resin-3.1.9/lib/jms-11.jar:/opt/resin-
3.1.9/lib/jaxrpc-15.jar:/opt/resin-3.1.9/lib/pro.jar:/opt/resin-
3.1.9/lib/license.jar:/opt/resin-3.1.9/lib/jpa-15.jar:/opt/resin-
3.1.9/lib/j2ee-management-10.jar:/opt/resin-3.1.9/lib/resin-
util.jar:/opt/resin-3.1.9/lib/webbeans-16.jar:/opt/openbd-
1.2/jdk/lib/tools.jar:/opt/resin-3.1.9/lib/jaxrpc-15.jar:/opt/resin-
3.1.9/lib/quercus.jar:/opt/resin-3.1.9/lib/jsdk-15.jar:/opt/resin-
3.1.9/lib/jaxws-api.jar:/opt/resin-3.1.9/lib/jta-101.jar:/opt/resin-
3.1.9/lib/jms-11.jar:/opt/resin-3.1.9/lib/jsf-12.jar:/opt/resin-
3.1.9/lib/jstl-11.jar:/opt/resin-3.1.9/lib/jpa-15.jar:/opt/resin-
3.1.9/lib/resin-util.jar:/opt/resin-3.1.9/lib/webbeans-16.jar:/opt/resin-
3.1.9/lib/portlet-10.jar:/opt/resin-3.1.9/lib/javamail-141.jar:/opt/resin-
3.1.9/lib/jca-15.jar:/opt/resin-3.1.9/lib/webutil.jar:/opt/resin-
3.1.9/lib/saaj.jar:/opt/resin-3.1.9/lib/jsr88.jar:/opt/resin-
3.1.9/lib/script-10.jar:/opt/resin-3.1.9/lib/j2ee-management-
10.jar:/opt/resin-3.1.9/lib/hessian.jar:/opt/resin-3.1.9/lib/resin-
deploy.jar:/opt/resin-3.1.9/lib/activation.jar:/opt/resin-3.1.9/lib/jws-
15.jar:/opt/resin-3.1.9/lib/ejb-15.jar:/opt/openbd-
1.2/jdk/jre/lib/ext/localedata.jar:/opt/openbd-
1.2/jdk/jre/lib/ext/dnsns.jar:/opt/openbd-
1.2/jdk/jre/lib/ext/sunpkcs11.jar:/opt/openbd-
1.2/jdk/jre/lib/ext/sunjce_provider.jar::/home/bziuchkovski/www/testws/WEB-
INF/classes:/home/bziuchkovski/www/testws/WEB-
INF/lib/OpenBlueDragon.jar:/opt/openbd-
1.2/jdk/jre/lib/resources.jar:/opt/openbd-
1.2/jdk/jre/lib/rt.jar:/opt/openbd-
1.2/jdk/jre/lib/sunrsasign.jar:/opt/openbd-
1.2/jdk/jre/lib/jsse.jar:/opt/openbd-1.2/jdk/jre/lib/jce.jar:/opt/openbd-
1.2/jdk/jre/lib/charsets.jar:/opt/openbd-1.2/jdk/jre/classes

    at 
com.naryx.tagfusion.cfm.xml.ws.dynws.DynamicWebServiceTypeGenerator.buildCl
asses(Unknown Source)
    at 
com.naryx.tagfusion.cfm.xml.ws.dynws.DynamicWebServiceTypeGenerator.generat
eType(Unknown Source)
    at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.setupService(Unknown 
Source)
    at com.naryx.tagfusion.cfm.xml.ws.cfcHandler.generateWSDL(Unknown 
Source)
    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:3
9)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:12
33)
    at 
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
    at com.naryx.tagfusion.cfm.cfcServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:114)
    at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java
:336)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
    at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.j
ava:103)
    at 
com.newatlanta.filters.SearchEngineFriendlyURLFilter.doFilter(Unknown 
Source)
    at 
com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.jav
a:87)
    at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:
187)
    at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java
:265)
    at 
com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:436)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682)
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743)
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662)
    at java.lang.Thread.run(Thread.java:619)

Original issue reported on code.google.com by Bob.Ziuc...@gmail.com on 23 Feb 2010 at 10:48

Attachments:

GoogleCodeExporter commented 9 years ago
I forgot to add version information...

OpenBD: 1.2
Resin: 3.1.9 Open Source
JDK: 1.6.0_16
Linux: Centos 4.8 on 2.6.9-89.0.3 x86 kernel

Original comment by Bob.Ziuc...@gmail.com on 24 Feb 2010 at 4:21

GoogleCodeExporter commented 9 years ago
The handling of files have been changed in the 1.3 build.  So please retest and 
reopen if still a bug.

thanks

Original comment by wheldon.greg on 9 Jul 2010 at 9:49

GoogleCodeExporter commented 9 years ago
I have retested today using an updated version of Resin and updated OpenBD.  
The issue still remains with the following software versions:

OpenBD: 1.4
Resin: 4.0.12 Open Source
JDK: 1.6.0_22

Original comment by Bob.Ziuc...@gmail.com on 27 Oct 2010 at 10:19

GoogleCodeExporter commented 9 years ago

Original comment by andyw...@gmail.com on 28 Oct 2010 at 8:11

GoogleCodeExporter commented 9 years ago
I think this issue should be renamed to

Web Services error on Single-instance installations.

The above error occurs on Tomcat as well and is caused by a hardcoded path 
reference which expects the jars for web services to be located in 

/WEB-INF/lib

This is a similar bug to the problems we were having with <cfscript 
language="java">

If you have your open bd installation sharing a single instance in say 
/openbd/lib then the jars are not found when consuming webservices.

If you create a folder called /WEB-INF/lib under your applications webroot and 
copy all the jars in there it will work but obviously defeats the object

A

Original comment by a...@pixl8.co.uk on 5 Dec 2011 at 12:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The issue is with the source in DynamicWebServiceTypeGenerator.java and the 
following lines

    // The JARs are in the WEB-INF lib folder.
        dir = cfWebServices.getDocRootDir();
        if (dir != null && !dir.endsWith(fs))
            dir += fs;
        dir = dir + "WEB-INF" + fs;
        libDir = dir + "lib" + fs;

There is a similar reference in JavaPlatform.java

Original comment by a...@pixl8.co.uk on 31 Dec 2011 at 12:42

GoogleCodeExporter commented 9 years ago
I think we'll have this as an option inside the bluedragon.xml.  Auto detection 
is obviously not working with some of the classpath loaders of the app servers

Original comment by wheldon.greg on 31 Dec 2011 at 3:14

GoogleCodeExporter commented 9 years ago

Original comment by wheldon.greg on 31 Dec 2011 at 3:15

GoogleCodeExporter commented 9 years ago
i have made an attempt to fix this. 

you can define a specific path to find the JAR files in the bluedragon.xml file.

<server>
  <system>
    <libpath>/mypath/here/to/search/</libpath>
  </system>
</server>

This is documented in the manual.

It will be in the nightly build from the 1st of Jan onwards

Original comment by wheldon.greg on 31 Dec 2011 at 5:19