forge / plugin-hibersap

Hibersap Plugin
GNU Lesser General Public License v3.0
8 stars 12 forks source link

***ERROR*** [generate-sap-entities] Can not get class for byte[] #14

Closed yuganESB closed 11 years ago

yuganESB commented 11 years ago

Hi We are using HiberSAP with Jboss forge hibersap plugin. When trying to generate classes for some of BAPIs , we are getting below error:

[TestSAP] TestSAP $ generate-sap-entities --name-pattern Z?EBUS_GETBUS*

Select a function to generate the necessary Java classes:

1 - [Z_EBUS_GETBUSINESSPARTNER] 2 - [Z_EBUS_GETBUSINESSPARTNER_FIX] 3 - [Z_EBUS_GETBUSINESSPARTNER_TMP] 4 - [Cancel]

? Choose an option by typing the number of the selection: 1 _ERROR_ [generate-sap-entities] Can not get class for byte[] [TestSAP] TestSAP $

This error is not coming for all BAPIs in same sap system. But occurring with most of BAPIs. I could not trace any more error messages to share here, Please help me in resolving this error, Thanks in advance.

cerker commented 11 years ago

Hi, this is a bug in Hibersap which is already fixed in the current trunk:

see: https://sourceforge.net/tracker/?func=detail&aid=3566667&group_id=225273&atid=1064492

I am about to do a new Hibersap release 1.1.0; would you mind waiting a few days and use the new version?

To give it a try, you could also build Hibersap from trunk: check out the trunk from svn, go to module "hibersap", run "mvn install -DskipTests -Pdefault" and change the Hibersap version of your project to 1.1.0-SNAPSHOT. You might have to change a few xml element names in your hibersap.xml, since there are some changes in the new version, good news is you can use the xsd provided in the hibersap-core jar or under http://hibersap.sourceforge.net/xml/hibersap_1_1.xsd. If configuring programmatically there are API changes too, which should be quite straight forward using your IDE's auto-completion facilities.

There won't be any further API or XML changes, it's just the documentation which has to be adapted with which I am half-way through - the release should be done till the beginning of next week.

yuganESB commented 11 years ago

Thanks Cerker for your quick reply. I ill wait for new version. Mean while i will give a try with the changes from Trunk.

Thanks Again.

yuganESB commented 11 years ago

Hi Cerker

I tried steps suggested by you. Downloaded hibersap-trunk.tar from hibersap trunk. Then mvn install command.. But it failed in my machine.. below are the lines from console. (Still, i tried to genrate classes for the same BAPI by changing repository version in POM to 1.1.0-SNAPSHOT. But it did not work.) Is there any thing to do with HiberSAP-plugin too?

Can you please have a look once.. Please let me know if any thing wrong in steps i executed

[INFO] ------------------------------------------------------------------------ [INFO] Building Hibersap JCA 1.1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.cuckoo-ra:cuckoo-jar:jar:1.0.0-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Hibersap .......................................... SUCCESS [4.766s] [INFO] Hibersap Parent ................................... SUCCESS [1.390s] [INFO] Hibersap Core ..................................... SUCCESS [2.593s] [INFO] Hibersap JCo ...................................... SUCCESS [2.391s] [INFO] Hibersap JCA ...................................... FAILURE [0.047s] [INFO] Hibersap EJB ...................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11.561s [INFO] Finished at: Wed Oct 31 11:49:59 GMT 2012 [INFO] Final Memory: 9M/23M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project hibersap-jca: Could not resolve depend encies for project org.hibersap:hibersap-jca:jar:1.1.0-SNAPSHOT: The following a rtifacts could not be resolved: javax.resource:connector:jar:1.0, org.cuckoo-ra: cuckoo-jar:jar:1.0.0-SNAPSHOT: Failure to find javax.resource:connector:jar:1.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resol ution will not be reattempted until the update interval of central has elapsed o r updates are forced -> [Help 1]

Thanks Yugandhar

yuganESB commented 11 years ago

Hi Cerker Can you let me know what is the release date of HiberSAP 1.1.0. I tried steps sugggested in above comment, but no luck , i still see same error. Also, in above comments, I posted errors occured while intallation.

Thanks

cerker commented 11 years ago

Hi, I did the new Hibersap release 1.1.0 yesterday. Information can be found under http://hibersap.org.

@Max: Do we need to change something in the Forge plugin? The API, XML schema, etc. should be the same as in the recent 1.1.0-beta releases...

mxsb commented 11 years ago

Hi Carsten,

I need to reference the new version in the plugin pom.xml. Think I'll take 1.1.0 as minimum version in a range, so we will always be up to date without a release.

I want to create a test for the "Can not get class for byte[]" problem, maybe you can give me a hand on this task.

Best regards

Max

On 12.11.2012 19:48, Carsten Erker wrote:

Hi, I did the new Hibersap release 1.1.0 yesterday. Information can be found under http://hibersap.org.

@Max https://github.com/Max: Do we need to change something in the Forge plugin? The API, XML schema, etc. should be the same as in the recent 1.1.0-beta releases...

— Reply to this email directly or view it on GitHub https://github.com/forge/plugin-hibersap/issues/14#issuecomment-10299203.

yuganESB commented 11 years ago

Hi.. Thanks for posting.. Am trying to reinstall Forge HiberSAP plugin.. getting below error .. Can you please give your inputs..

Wrote C:\/Documents and Settings/41736Yu/.forge/plugins/org/hibersap/forge/hiber sap-plugin/1.1.0-SNAPSHOT-0226bdc4-d5b3-4f2a-9369-5de6a10d8f22/module.xml Not loading plugin [org.hibersap.forge.hibersap-plugin] because it references Fo rge API version [1.1.0.Final] which may not be compatible with my current versio n [1.0.5.Final]. To remove this plugin, type 'forge remove-plugin org.hibersap.f orge.hibersap-plugin:1.1.0.Final:1.1.0-SNAPSHOT-0226bdc4-d5b3-4f2a-9369-5de6a10d 8f22. Otherwise, try installing a new version of the plugin. Windows? Really? Okay...

[no project] C:\ $

Basically i tried below command to install plugin.. forge git-plugin https://github.com/forge/plugin-hibersap.git --ref 1.0.5

Thanks

mxsb commented 11 years ago

Hi,

please update your Forge version to 1.1.0.Final and reinstall the plugin via forge git-plugin https://github.com/forge/plugin-hibersap.git --ref 1.1.0-SNAPSHOT

Hope this works for you..

Best regards

Max

-----Original Message----- From: yuganESB Sent: 14.11.2012, 10:21 To: forge/plugin-hibersap Cc: Max Schwaab Subject: Re: [plugin-hibersap] _ERROR_ [generate-sap-entities] Can not get class for byte

Hi.. Thanks for posting.. Am trying to reinstall Forge HiberSAP plugin.. getting below error .. Can you please give your inputs..

Wrote C:\/Documents and Settings/41736Yu/.forge/plugins/org/hibersap/forge/hiber sap-plugin/1.1.0-SNAPSHOT-0226bdc4-d5b3-4f2a-9369-5de6a10d8f22/module.xml Not loading plugin [org.hibersap.forge.hibersap-plugin] because it references Fo rge API version [1.1.0.Final] which may not be compatible with my current versio n [1.0.5.Final]. To remove this plugin, type 'forge remove-plugin org.hibersap.f orge.hibersap-plugin:1.1.0.Final:1.1.0-SNAPSHOT-0226bdc4-d5b3-4f2a-9369-5de6a10d 8f22. Otherwise, try installing a new version of the plugin. Windows? Really? Okay...

[no project] C:\ $

Basically i tried below command to install plugin.. forge git-plugin https://github.com/forge/plugin-hibersap.git --ref 1.0.5

Thanks


Reply to this email directly or view it on GitHub: https://github.com/forge/plugin-hibersap/issues/14#issuecomment-10359755

yuganESB commented 11 years ago

Thanks Max for your quick response. I could install Forge 1.1.0 Final and HiberSAP plugin as suggested by you.

Now, am not getting previous error , i.e _ERROR_ [generate-sap-entities] Can not get class for byte[]. But, During the generation of classes , i got below error. As like previous, below error is coming only with BAPIs which were earlier giving 'can not get class for byte[]'. For other BAPIs, am able to generate classes and test the code.

19 - [Z_EBUS_UPDATEBUSINESSPARTNER] 20 - [Z_EBUS_UPDATEDEPLOYEDADVERT] 21 - [Cancel]

? Choose an option by typing the number of the selection: 11

? Please enter a class name. Leave empty for default [ZEbusGetbusinesspartner]

? Please enter a Java package. Leave empty for default [com.customerdetails.hibersap] _ERROR_ Exception encountered: null (type "set VERBOSE true" to enable stack traces) [HiberSAP110] HiberSAP110 $

Am still investigating this issue, Please let me know if you already have an idea with this problem.. Many thanks for support.

cerker commented 11 years ago

Can you please send the stack trace?
(Issue "set VERBOSE true" and run the "generate-sap-entities" command again in forge to get one.)

mxsb commented 11 years ago

Hi,

I checked the problem and it turns out that the error depends on a bug in Forge. A ticket is already opened and I hope it will be fixed soon.

We'll give you an update when the bug is fixed..

Best regards

Max

On 14.11.2012 13:34, yuganESB wrote:

Thanks Max for your quick response. I could install Forge 1.1.0 Final and HiberSAP plugin as suggested by you.

Now, am not getting previous error , i.e /ERROR/ [generate-sap-entities] Can not get class for byte[]. But, During the generation of classes , i got below error. As like previous, below error is coming only with BAPIs which were earlier giving 'can not get class for byte[]'. For other BAPIs, am able to generate classes and test the code.

19 - [Z_EBUS_UPDATEBUSINESSPARTNER] 20 - [Z_EBUS_UPDATEDEPLOYEDADVERT] 21 - [Cancel]

? Choose an option by typing the number of the selection: 11

? Please enter a class name. Leave empty for default [ZEbusGetbusinesspartner]

? Please enter a Java package. Leave empty for default [com.customerdetails.hibersap] /ERROR/ Exception encountered: null (type "set VERBOSE true" to enable stack traces) [HiberSAP110] HiberSAP110 $

Am still investigating this issue, Please let me know if you already have an idea with this problem.. Many thanks for support.

— Reply to this email directly or view it on GitHub https://github.com/forge/plugin-hibersap/issues/14#issuecomment-10364572.

yuganESB commented 11 years ago

I set VERBOSE true. Below, am sharing stack trace for your reference...

18 - [Z_EBUS_READ_CONFIG] 19 - [Z_EBUS_UPDATEBUSINESSPARTNER] 20 - [Z_EBUS_UPDATEDEPLOYEDADVERT] 21 - [Cancel]

? Choose an option by typing the number of the selection: 11

? Please enter a class name. Leave empty for default [ZEbusGetbusinesspartner]

? Please enter a Java package. Leave empty for default [com.customerdetails.hibersap] _ERROR Exception encountered: (type "set VERBOSE false" to disable stack tr aces) java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.SimpleName.setIdentifier(SimpleName.java:186 ) at org.eclipse.jdt.core.dom.AST.newSimpleName(AST.java:1269) at org.eclipse.jdt.core.dom.AST.newName(AST.java:1318) at org.jboss.forge.parser.java.impl.ImportImpl.setName(ImportImpl.java:5 8) at org.jboss.forge.parser.java.impl.AbstractJavaSource.addImport(Abstrac tJavaSource.java:171) at org.jboss.forge.parser.java.impl.AbstractJavaSource.addImport(Abstrac tJavaSource.java:144) at org.jboss.forge.parser.java.impl.FieldImpl.setType(FieldImpl.java:354 ) at org.hibersap.forge.sap.SAPEntityBuilder.createStructureClass(SAPEntit yBuilder.java:256) at org.hibersap.forge.sap.SAPEntityBuilder.createParameters(SAPEntityBui lder.java:172) at org.hibersap.forge.sap.SAPEntityBuilder.createNew(SAPEntityBuilder.ja va:81) at org.hibersap.forge.GenerateSAPEntitiesPlugin.generateSAPEntities(Gene rateSAPEntitiesPlugin.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.forge.shell.command.Execution.perform(Execution.java:134) at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.jav a:109) at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.jav a:47) at org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:818 ) at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:841) at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:631) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanIns tance.java:48) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandle r.java:125) at org.jboss.forge.shell.ShellImpl$Proxy$$$WeldClientProxy.doShell(She llImpl$Proxy$$$_WeldClientProxy.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflec tions.java:305) at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureRefle ctionAccess.java:54) at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation (SecureReflectionAccess.java:163) at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflect ions.java:299) at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldM ethodImpl.java:188) at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(For wardingWeldMethod.java:59) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpe cialValue(MethodInjectionPoint.java:198) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl. java:282) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl. java:265) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.jav a:234) at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImp l.java:635) at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java :622) at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java :616) at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:172) at java.lang.Thread.run(Thread.java:662) [HiberSAP110] HiberSAP110 $

Thanks for your support...

mxsb commented 11 years ago

Please update to Forge version 1.1.3.Final and give it another try. The bug in Forge is fixed..

Best regards

Max

yuganESB commented 11 years ago

Thanks Max and Cerker.. I could test the BAPI now.. All mentioned issues are resolved. Many Thanks for your support..