cancel
Showing results for 
Search instead for 
Did you mean: 

1.1 STILL has problems with remoting and same error

rsfeir
Champ in-the-making
Champ in-the-making
I am back to the same spot I was before with 1.1, come on guys, this shouldn't be this complicated.  I followed all the steps as closely as I can, and these normally work when I work with other webservices and yet I still get this error!

I am running alfresco in its prepackaged jboss bundled download, not even in idea, the unit test runs in idea.

I've regenerated all the files and used the latest Sample1 from your code.  This can't work on your end. 

I'll be glad to help debug it, but I need an answer that's more than just try the trunk or use 1.1 when it comes out, because this is what I did and got nowhere.

"C:\Program Files\Java\jdk1.5.0_05\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 5.0\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;C:\Projects\eric-brc\apps\genericPortlet\eric.war\WEB-INF\classes;C:\Projects\jboss-portal-2.0.1RC1-jboss-4.0.2\server\default\deploy\jboss-portal.sar\lib\portlet-api-lib.jar;C:\Projects\jboss-portal-2.0.1RC1-jboss-4.0.2\server\default\lib\jboss-j2ee.jar;C:\Projects\jboss-portal-2.0.1RC1-jboss-4.0.2\server\default\lib\javax.servlet.jar;C:\Projects\jboss-portal-2.0.1RC1-jboss-4.0.2\server\default\lib\javax.servlet.jsp.jar;C:\Projects\libraries\axis\lib\axis-ant.jar;C:\Projects\libraries\axis\lib\axis-schema.jar;C:\Projects\libraries\axis\lib\axis.jar;C:\Projects\libraries\axis\lib\commons-discovery-0.2.jar;C:\Projects\libraries\axis\lib\commons-logging-1.0.4.jar;C:\Projects\libraries\axis\lib\jaxrpc.jar;C:\Projects\libraries\axis\lib\log4j-1.2.8.jar;C:\Projects\libraries\axis\lib\saaj.jar;C:\Projects\libraries\axis\lib\wsdl4j-1.5.1.jar;C:\Projects\junit3.8.1\junit.jar;C:\Projects\libraries\axis\lib\activation-1.0.2.jar;C:\Projects\libraries\axis\lib\mail.jar;C:\Projects\libraries\wss4j\opensaml-1.0.1.jar;C:\Projects\libraries\wss4j\wss4j.jar;C:\Projects\libraries\wss4j\xalan-2.6.0.jar;C:\Projects\libraries\wss4j\xmlsec-1.2.1.jar;C:\Program Files\JetBrains\IntelliJ IDEA 5.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain gov.nih.niaid.eric.WebServiceSample1
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: Premature end of file.
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}stackTraceSmiley Surprisedrg.xml.sax.SAXParseException: Premature end of file.
   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
   at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
   at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
   at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.www.ws.service.repository.RepositoryServiceSoapBindingStub.getStores(RepositoryServiceSoapBindingStu...
   at gov.nih.niaid.eric.WebServiceSample1.main(WebServiceSample1.java:87)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

   {http://xml.apache.org/axis/}hostname:sfeirr

org.xml.sax.SAXParseException: Premature end of file.
   at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.www.ws.service.repository.RepositoryServiceSoapBindingStub.getStores(RepositoryServiceSoapBindingStu...
   at gov.nih.niaid.eric.WebServiceSample1.main(WebServiceSample1.java:87)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
   at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
   at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
   at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
   at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   … 15 more

Process finished with exit code 1
7 REPLIES 7

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

I'm sorry you are still having difficulties with this.  I have just double checked  running sample1 on the latest code line (1.1) and it works for me using Tomcat (I'll double check JBoss for you tomorrow).

Clearly we are missing something here so I'd gladly take up your offer to help debug the problem. 

As you will have noticed the error messages returned from Axis are not helpful in diagnosing the problem so in order to start to get to the route of the issue could I ask you to turn debug output on for the web service packages. 

The route cause of the exception should then be output as part of the debug messages also it should give us an indication of how far we are getting before the failure.

Let me know how you get on,

Thanks,
Roy

Add  these lines to the log4J.properties file found in core/source/java to turn the webservice debug on:


log4j.logger.org.alfresco.repo.webservice=debug
log4j.logger.org.alfresco.example.webservice=debug

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

I've tried sample1 against jboss and I can't find any problems at this end.

Is it only sample1 you see a problem with or are there other samples/unit tests that are failing?

Hopefully the debug output will help to shed some light on the issue.

Thanks,
Roy

rsfeir
Champ in-the-making
Champ in-the-making
Sample 1 so far, did not try the others, but if I can't get a repository listing, then in my mind right now there is no point.  I am going to turn up loggin as you suggested this AM and see what happens.

will update you soon.

R

rsfeir
Champ in-the-making
Champ in-the-making
Ok, here's a real weird one for you.  When I started Alfresco with alf_start.bat, I had the problem.  Then since I needed to see all the debug being spewed out at the command line, and the alfresco window didn't have enough buffer, so I started from the alfresco/jboss/bin dir running run.bat for jboss directly.

Well, now it works, no errors, with my own code, and I get this as the list of Stores:

system
alfrescoUserStore
lightWeightVersionStore
SpacesStore

I'm happy that I can move forward, but I am VERY curious as to why this might be so different in each case.

R

rwetherall
Confirmed Champ
Confirmed Champ
Hi, 

I'm not sure why that should make a difference.  I'll ask around here and see if anyone has an idea.

Cheers,
Roy

rsfeir
Champ in-the-making
Champ in-the-making
Thanks for looking into it.  The diff will be important to know because I don't know if we'll hit the issue again on deploying to dev and production servers.

That said, in one afternoon I was able to query the repository, get the content and display it in my portlet.  The examples have proven invaluable of course, so thanks in advance to whom ever worte them, and for putting comments in, it helped a lot in following the code.

Once I have a cleaned up version, I will check with my office to see if we could donate the code to Alfresco for inclusion.  Our project is open source, but it being for the government I don't know if there are issues with this.

R

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

Glad to hear you where able to make some progress with this.  Any code you are able to contribute will be gratefully received.

Thanks,
Roy