Panic here, I was just editing my jobs, but suddenly when I wanted to run it, I got a syntax error I didn't recognize. And when I checked the code, the whole screen was empty!!! All the Java code in the back had dissappeared (while you cannot even edit the code manually..)
Even after restarting etc..
What did I do? Any idea how I can fix it or put it back (without having to build the job again)?
If I make a new job in the same project, it does create code for that job. But if I for instance add new components to my existing jobs, no code is added or is appearing again.
OK. First of all relax. Chances are this is not terminal.
Do you have the Open Source Edition or the Enterprise Edition?
If you have the Enterprise Edition I am assuming you are using either GIT or SVN. If so, your code is safe and if the worst comes to the worst you can roll back to a previous version. If you are using the Open Source Edition you may not have the same backup, but you can mitigate any future issues by taking a zip backup of your workspace folder. Once you have that backup, go to the workspace/project/process folder and find the job that is not working. It may be in another folder (it will replicate your Talend job tree structure. You will be looking for a file called the same as your job with an extension of ".item". It is just an xml file with a ".item" extension. Copy that file somewhere, change the extension to ".xml" and open it. Can you see evidence of your old job structure in that file. By that I mean, can you see components mentioned that you recognise? If so, you *may* be able to get round this by copying the ".item", ".properties" and ".screenshot" files for that job into another folder and using the Talend import process to re-import that job from there.
@Annewieke I have just encountered a similar situation for a job I am working on in Talend Open Studio 6.4.0 .
Are you getting the error message "Error: Could not find or load main class" when you build your job?
@rhall_2_0 : I have the Open Studio version, but we do make back-ups.. So I could find an older version, from 2 days ago unfortunately, but still better than making a total new one.
@mobmsc2 : When building I get another error, a Persistence Exception, could not generate code (which makes sense without any code)
1. Yes I am able to do that too
2. Yep, same here
3. Same here
4. Me too, suddenly the code disappeared when I wanted to run again. I was just adding tLogRows in between my components, because i couldn't figure out another error.
If you have backups, then you are fine. If you have checked the ".item" files and still have code, it may be an idea to backup the current state of your workspace, reinstall Talend and use your workspace backup as the workspace of your new instance of Talend.
This sounds like an issue I once had with a corrupt install of Talend. Everything was sorted by installing a new version and importing my old code
Looking at the log in workspace\.metadata
the 1st error I think is related to the issue mentions
!ENTRY org.talend.platform.logging 4 0 2017-07-05 11:24:59.997 !MESSAGE 2017-07-05 11:24:59,996 ERROR org.talend.commons.exception.CommonExceptionHandler - Failed to generate code.
And these may be related as well (I was working with the tMySQLSCD component at the time)
Caused by: java.lang.NullPointerException
Is there a way to work directly in the .items file to see if the error is correct-able?
Could you please follow the steps as below to restore the items to see if it works?
1. Back up the workspace.
2. Delete the workspace and restart the studio.
3. Import all items from the backup of workspace done in step1
Are you using oracle JDK 1.8?
When you say delete workspace do you mean the entire folder called "workspace" in DI parent folder or just the project I encountered the problem which is contained within the workspace folder?
I exported the workspace to an archive file, I had rebooted the computer and without started the Studio I deleted the project folder within the workspace.
I started the studio and was asked to create a project or import. I imported the archive and gave it a new project name
The job is listed but still no java code in the studio tab.
The java version as reported by installation details -> configuration is
java.runtime.name=Java(TM) SE Runtime Environment java.runtime.version=1.8.0_131-b11 java.specification.name=Java Platform API Specification java.specification.vendor=Oracle Corporation java.specification.version=1.8
I decided to delete the component tMySQLSCD from my job and it appears to have made a difference. I also provided a date pattern string to the schema I was using as this was the editing I was doing at the time.
I added a SCD component from the pallet again to the job
The java code gets generated now and the job executes
For what its worth I am using built in schema for the tMap and SCD components while I design the job
I have seen this before but never had it answered. Sometimes a component in your job can become corrupt. I have no idea why and it is very difficult to find. Removing the offending component and re-adding it can resolve this. It has been a while since I have seen this (not since v5). Was this in v6.4?
Yes its in Version: 22.214.171.12470510_1410,
Also the issue seems to re-appear if I have to make changes to the tMySQLSCD component
For me it was in 6.3 , now I updated it to 6.4..
I couldn't get the code back, so I just went back to my back-up and re-did the changes that I lost.
When I tried to disconnect the tConvert and tXMLMap and add a tLogRow in between, that was the point I lost the code again.. but now I could get it back by undoing the changes.
So, it keeps weird..
I notice it when I need to populate a schema change to the SCD component from earlier components.
Also the code view has a noticeable delay even for a fairly simple job before the code does appear once the SCD component is on the canvas so maybe the issue is a time-out style event or at least something to consider.